query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Attach with the resource model relationships.
protected function withRelationships() { if ($this->resource instanceof Model) { $this->attachRelations($this->resource); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function push() {\n\t\t$this->save();\n\n\t\t// To sync all of the relationships to the database, we will simply spin through\n\t\t// the relationships, calling the \"push\" method on each of the models in that\n\t\t// given relationship, this should ensure that each model is saved.\n\t\tforeach ($this->relationships as $name => $models) {\n\t\t\tif ( ! is_array($models)) {\n\t\t\t\t$models = array($models);\n\t\t\t}\n\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->push();\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n\t\t$policies = Policy::get(); \n\t\t$resources = Resource::get(); \n\n\t\tforeach($policies as $policy) {\n\t\t\tforeach($resources as $resource) {\n\t\t\t\t$policy->resources()->attach($resource); \n\t\t\t}\n\t\t}\n }", "public function setRelations() {}", "private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $foreign_model = (is_array($relation)) ? $relation[0] : $relation;\n $foreign_model_name = strtolower($foreign_model);\n $this->load->model($foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n if($option=='has_many_pivot')\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n $foreign_key = (is_array($relation)) ? $relation[1] : $this->{$foreign_model_name}->primary;\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n else\n {\n $foreign_key = (is_array($relation)) ? $relation[1] : singular($this->table) . '_id';\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => $foreign_model_name, 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n ($option == 'has_many_pivot') ? ($this->_relationships[$key]['pivot_table'] = $pivot_table) : FALSE;\n\n }\n }\n }\n }\n }", "private function prepRelations() : self\n {\n\n // Lvd.\n $maxRId = 0;\n $relationships = [];\n\n // Add Sheets.\n foreach ($this->xlsx->getBook()->getSheets() as $sheet) {\n\n $relationships[] = [\n '@Id' => 'rId' . $sheet->getId(),\n '@Type' => $this->types['sheet'],\n '@Target' => 'worksheets/sheet' . $sheet->getId() . '.xml',\n ];\n\n // Count max ID.\n $maxRId = max($maxRId, $sheet->getId());\n }\n\n // Add the rest of relationships.\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['styles'],\n '@Target' => 'styles.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['theme'],\n '@Target' => 'theme/theme1.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['sharedStrings'],\n '@Target' => 'sharedStrings.xml',\n ];\n\n // Save.\n $this->array['Relationships']['@@']['Relationship'] = $relationships;\n\n return $this;\n }", "public function initialize()\n {\n $this->hasMany('idmov', 'App\\Models\\MovEstoque', 'movimentacao_manual_estoque_idmov', array('alias' => 'MovEstoque'));\n $this->hasMany('idmov', 'App\\Models\\MovimentacaoManualEstoqueItem', 'idmov', array('alias' => 'MovimentacaoManualEstoqueItem'));\n $this->belongsTo('cd_ordem_servico_reparo', 'App\\Models\\OrdemServicoReparo', 'cd_ordem_servico', array('alias' => 'OrdemServicoReparo'));\n $this->belongsTo('cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('requerente', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->belongsTo('usuario_responsavel', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function associate($entity)\n {\n // The Mapper will retrieve this association within the object model, we won't be using\n // the foreign key attribute inside the parent Entity.\n //\n //$this->parent->setEntityAttribute($this->foreignKey, $entity->getEntityAttribute($this->otherKey));\n //\n // Instead, we'll just add the object to the Entity's attribute\n\n $this->parent->setEntityAttribute($this->relation, $entity->getEntityObject());\n }", "public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }", "private function createRelation()\n {\n $this->createBuilder();\n }", "public function setupAssociations() \n {\n \n }", "public function attach($rel_objects, $relation_name = null) {\n $objects = array(0=>$this);\n if (!$relation_name) $relation_name = strtolower(get_class(is_array($rel_objects) ? $rel_objects[0] : $rel_objects));\n $this->_loaded_abilities['Relative']->attach($objects, $rel_objects, $relation_name);\n\n $this->clearHash($relation_name);\n return $this;\n }", "public function initialize()\n {\n $this->hasMany('cd_upload', 'App\\Models\\Empresa', 'logo', array('alias' => 'Empresa'));\n $this->hasMany('cd_upload', 'App\\Models\\EmpresaHasArquivos', 'cd_upload', array('alias' => 'EmpresaHasArquivos'));\n $this->hasMany('cd_upload', 'App\\Models\\EmpresaHasLinkCentralcompras', 'cd_upload', array('alias' => 'EmpresaHasLinkCentralcompras'));\n $this->hasMany('cd_upload', 'App\\Models\\LancamentoHasUpload', 'cd_upload', array('alias' => 'LancamentoHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\LiquidacaoHasUpload', 'cd_upload', array('alias' => 'LiquidacaoHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\NfentradaHasUpload', 'cd_upload', array('alias' => 'NfentradaHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\UploadHas', 'upload_cd_upload', array('alias' => 'UploadHas'));\n $this->belongsTo('cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n }", "public function testResourceRelationships()\n {\n $post = factory(Post::class)->make();\n $post->author = factory(User::class)->make();\n $post->comments = factory(Comment::class, 2)->make();\n\n $serializer = new ResourceSerializer($post, [], ['author', 'comments']);\n $resource = $serializer->toResourceObject();\n\n $this->assertArrayHasKey('relationships', $resource);\n $this->assertArrayHasKey('author', $resource['relationships']);\n $this->assertJsonApiResourceIdentifier($resource['relationships']['author']);\n $this->assertEquals('users', $resource['relationships']['author']['data']['type']);\n $this->assertArrayHasKey('comments', $resource['relationships']);\n $this->assertCount(2, $resource['relationships']['comments']['data']);\n }", "public function saveRelations($attributes = [])\n {\n $this->categories()->sync(array_get($attributes, 'categories', []));\n $this->tags()->sync(array_get($attributes, 'tags', []));\n $this->upSellProducts()->sync(array_get($attributes, 'up_sells', []));\n $this->crossSellProducts()->sync(array_get($attributes, 'cross_sells', []));\n $this->relatedProducts()->sync(array_get($attributes, 'related_products', []));\n }", "protected function addActionsForRelatedEntities()\n {\n if (! $this->mapper) {\n return;\n }\n\n foreach ($this->mapper->getRelations() as $name) {\n $this->mapper->getRelation($name)->addActions($this);\n }\n }", "protected function saveRelations()\n {\n $spotIdsToRemove = $relationsToAdd = [\n 'photos' => [],\n 'tags' => [],\n 'amenities' => [],\n 'locations' => []\n ];\n // Preparing spots remote photos for insert\n if($this->photos != [])\n {\n foreach($this->photos as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['associated_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['associated_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['photos'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['associated_id']))\n {\n $relationsToAdd['photos'][] = $item;\n }\n }\n }\n }\n // Preparing spots amenities for insert\n if($this->amenities != [])\n {\n foreach($this->amenities as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['amenities'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['amenities'][] = $item;\n }\n }\n }\n }\n // Preparing spots tags for insert\n if($this->tags != [])\n {\n foreach($this->tags as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['tags'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['tags'][] = $item;\n }\n }\n }\n }\n // Preparing spots points for insert\n if($this->locations != [])\n {\n foreach($this->locations as $remote_id => $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['locations'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['locations'][] = $item;\n }\n }\n }\n // Database transaction to remove all old relations of existing spots and add new relations for inserted and updated spots\n DB::transaction(function() use ($spotIdsToRemove, $relationsToAdd) {\n if($spotIdsToRemove['photos'] != [])\n {\n DB::table('remote_photos')->whereIn('associated_id', $spotIdsToRemove['photos'])->where('associated_type', Spot::class)->delete();\n }\n if($spotIdsToRemove['amenities'] != [])\n {\n DB::table('spot_amenities')->whereIn('spot_id', $spotIdsToRemove['amenities'])->delete();\n }\n if($spotIdsToRemove['tags'] != [])\n {\n DB::table('spot_tag')->whereIn('spot_id', $spotIdsToRemove['tags'])->delete();\n }\n if($spotIdsToRemove['locations'] != [])\n {\n DB::table('spot_points')->whereIn('spot_id', $spotIdsToRemove['locations'])->delete();\n }\n if($relationsToAdd['photos'] != [])\n {\n DB::table('remote_photos')->insert($relationsToAdd['photos']);\n }\n if($relationsToAdd['amenities'] != [])\n {\n DB::table('spot_amenities')->insert($relationsToAdd['amenities']);\n }\n if($relationsToAdd['tags'] != [])\n {\n DB::table('spot_tag')->insert($relationsToAdd['tags']);\n }\n if($relationsToAdd['locations'] != [])\n {\n DB::table('spot_points')->insert($relationsToAdd['locations']);\n }\n });\n }", "public function addOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->linkModelWithOwner($attributeName, $this->owner->{$attributeName});\n }\n }", "public function initialize()\n {\n $this->keepSnapshots(true);\n $this->addBehavior(new Blameable());\n $this->useDynamicUpdate(true);\n $this->hasMany(\"id\", \"models\\Formentrys\", \"form_id\", ['alias' => 'Entries']);\n $this->hasMany(\"id\", \"models\\Formfields\", \"form_id\", ['alias' => 'Formfields']);\n $this->belongsTo(\"user_id\", \"models\\Users\", \"id\", ['alias' => 'Users']);\n }", "public function initialize()\n {\n $this->belongsTo(\"hotel_id\", \"Hotels\", \"id\");\n $this->belongsTo(\"user_id\", \"User\", \"id\");\n $this->hasMany(\"id\", \"Transaction\", \"reservation_id\");\n }", "public function associateRelationships($object, Request $request) {\n \n /**\n * Validate commentstatus ID, if failed set to default\n */\n $validator = Validator::make($request->all(), [\n 'commentstatus_id' => 'required|integer|min:1|exists:commentstatus,id',\n ]);\n\n /**\n * Validator fails - try to set the valid comment id\n *\n */\n if ($validator->fails()) {\n \n /**\n * Auto approve ?\n */\n if(env('AUTO_APPROVE_COMMENTS', 0) == 1){\n \n $object->commentstatuses()->associate(2);\n }\n \n /**\n * Manual approve\n */\n else{\n $object->commentstatuses()->associate(1);\n }\n \n }\n else{\n\n $object->commentstatuses()->associate($request->input('commentstatus_id'));\n }\n\n /**\n * Validate article ID, if failed set to actual authorized article\n */\n $validator = Validator::make($request->all(), [\n 'article_id' => 'required|integer|min:1|exists:article,id',\n ]);\n \n /**\n * Validator fails - nothing to do\n */\n if ($validator->fails()) {\n \n } \n \n /**\n * Validator OK - save it\n */\n else {\n\n $object->articles()->associate($request->input('article_id'));\n }\n \n /**\n * Validate page ID, if failed set to actual authorized page\n */\n $validator = Validator::make($request->all(), [\n 'page_id' => 'required|integer|min:1|exists:page,id',\n ]);\n \n /**\n * Validator fails - nothing to do\n */\n if ($validator->fails()) {\n\n // nothing\n \n } \n \n /**\n * Validator OK - save it\n */\n else {\n\n $object->pages()->associate($request->input('page_id'));\n }\n\n }", "public function initialize()\n {\n $this->hasMany('cd_desconto', 'App\\Models\\PdvVendasHasItens', 'cd_desconto', array('alias' => 'PdvVendasHasItens'));\n $this->belongsTo('cd_caixa', 'App\\Models\\PdvCaixa', 'cd_caixa', array('alias' => 'PdvCaixa'));\n $this->belongsTo('cd_produto', 'App\\Models\\Produto', 'cd_produto', array('alias' => 'Produto'));\n $this->belongsTo('cd_unidade_negocio', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('cd_usuario_criacao', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n }", "public function initialize()\n {\n $this->belongsTo('id_segmentation', 'Entities\\Segmentation', 'id', array('foreignKey' => true, 'alias' => 'Segmentation'));\n $this->belongsTo('id_factor_network', 'Entities\\FactorNetwork', 'id', array('foreignKey' => true, 'alias' => 'FactorNetwork'));\n }", "public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }", "public function joinResources()\n {\n $this->builder->join('resources', 'rs_id', '=', 'add_resource');\n }", "public function attachRelationship(Request $request, object $model, string $fieldName): bool;", "public function initialize()\n {\n $this->hasMany('informacion_id', 'Informacionadicional', 'informacion_id', array('alias' => 'Informacionadicional'));\n $this->belongsTo('informacion_adicionalId', 'Adicional', 'adicional_id', array('alias' => 'Adicional'));\n }", "public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }", "public function fill()\n {\n $relationships = $this->relationships;\n $modelRelations = $this->loadRequiredRelationships();\n\n return collect($relationships)->transform(function($relations, $key) use($modelRelations) {\n $merge = array_get($modelRelations, $key);\n return $merge ? $this->mergeRelations($merge, $relations) : $relations;\n })->all();\n }", "protected function relations()\n {\n $this->belongsTo(\n 'language_iso',\n ModelLanguage::class,\n 'iso',\n [\n 'alias' => 'Language',\n 'foreignKey' => true\n ]\n );\n }", "protected function addRelationship(AbstractEntity $entity)\n {\n // attach item\n $attach = $this->resourceService()->attach($this->getId(), $entity->get('resource_type'), [\n 'type' => $entity->get('resource_type'),\n 'id' => $entity->get('id')\n ]);\n // add to relationships\n $this->relationships->get($entity->get('resource_type'))->push($entity->get('id'));\n // update cache\n $this->cacheSelf();\n }", "private function attachPhotoableModel($relationship, $object, $attributes = [])\n {\n $this->$relationship()->attach(\n $object,\n $attributes\n );\n\n return $this;\n }", "public function buildRelations()\n {\n $this->addRelation('ArtRequest', 'ArtRequestORM\\\\ArtRequest', RelationMap::ONE_TO_MANY, array('event_id' => 'event_id', ), 'CASCADE', 'CASCADE', 'ArtRequests');\n }", "private function initRestorableRelations() {\n\n\t\t$configs = $this->cascadable();\n\n\t\t$this->runCascadeRestore = $configs['restore']['enable'] ?? true;\n\n\t\t$this->relationships = Arr::wrap($configs['restore']['relations'] ?? $configs);\n\t}", "public function setRelations(Notification $notification, Collection $entities)\n {\n $entities->each(function ($entity) use ($notification) {\n $entity->notifications()->attach($notification->id);\n });\n }", "public function initialize()\n {\n $this->skipAttributes([\n \"question_id\",\n ]);\n\n $this->skipAttributesOnCreate([\n \"question_status\"\n ]);\n\n $this->skipAttributesOnUpdate([\n \"question_creation_time\"\n ]);\n\n $this->hasMany('question_id', 'QaApp\\Models\\Answer', 'question_id', array('alias' => 'Answers'));\n }", "public function initialize()\n {\n $this->setDefaultSchema();\n $this->setSource(\"invite\");\n\n $this->hasMany('id', 'Meetingg\\Models\\User', 'invite_id', ['alias' => 'User']);\n $this->belongsTo('user_id', 'Meetingg\\Models\\User', 'id', ['alias' => 'User']);\n\n $this->belongsTo('meeting_id', 'Meetingg\\Models\\Meeting', 'id', ['alias' => 'Meeting']);\n\n $this->hasMany('id', 'Meetingg\\Models\\Meeting\\User', 'invite_id', ['alias' => 'MeetingUsers']);\n $this->hasMany('id', 'Meetingg\\Models\\Discussion\\User', 'invite_id', ['alias' => 'DiscussionUsers']);\n }", "function save ()\n {\n parent::_save ( $this->relationships, $this->basepath ) ;\n }", "public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }", "public function buildRelations()\n {\n $this->addRelation('Photo', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\Photo', RelationMap::MANY_TO_ONE, array('photo_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('UserRate', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\UserRate', RelationMap::ONE_TO_MANY, array('photo_id' => 'photo_id', ), 'CASCADE', 'CASCADE', 'UserRates');\n $this->addRelation('User', 'wiosloCMS\\\\UserBundle\\\\Model\\\\User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Users');\n }", "public function isAddToRelationship();", "protected function attachRelations(Model $model)\n {\n $relations = array_filter($model->getRelations(), static function ($value, $key) {\n return $key !== 'pivot' ?: (bool) $value === false;\n }, ARRAY_FILTER_USE_BOTH);\n\n foreach ($relations as $relation => $relationObj) {\n if (config('json-api.normalize_relations', false)) {\n $relation = Str::snake($relation);\n }\n\n if ($relationObj instanceof DatabaseCollection) {\n /** @var \\Illuminate\\Database\\Eloquent\\Model $relationModel */\n foreach ($relationObj->all() as $relationModel) {\n $this->relationships[$relation]['data'][] = $this->processModelRelation(\n $relationModel\n );\n }\n }\n\n if ($relationObj instanceof Model) {\n $this->relationships[$relation]['data'] = $this->processModelRelation(\n $relationObj\n );\n }\n }\n }", "public function loadRelated()\n {\n return;\n }", "protected function normalizeRelationsData()\n {\n if (is_null($this->data['relationships'])) {\n $this->data['relationships'] = [];\n }\n\n foreach ([ 'normal', 'reverse', 'image', 'file', 'checkbox', 'category' ] as $key) {\n\n if ( ! array_key_exists($key, $this->data['relationships'])\n || ! is_array($this->data['relationships'][ $key ])\n ) {\n $this->data->relationships[ $key ] = [];\n }\n }\n\n return $this;\n }", "public function buildRelations()\n {\n $this->addRelation('Alert', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'Alerts');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('AdsTags', 'AdsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'AdsTagss');\n $this->addRelation('Content', 'Content', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Contents');\n $this->addRelation('Ad', 'Ad', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Ads');\n }", "public function attach($ids, array $attributes = [], $touch = true)\n {\n list($idsOnly, $idsAttributes) = $this->getIdsWithAttributes($ids, $attributes);\n\n $this->attributes = $attributes;\n\n $this->parent->fireModelEvent('pivotAttaching', true, $this, $idsOnly, $idsAttributes);\n MorphToMany::attach($ids, $this->attributes, $touch);\n $this->parent->fireModelEvent('pivotAttached', false, $this, $idsOnly, $idsAttributes);\n }", "public function initialize()\n {\n $this->hasMany('id', 'AppCustomer', 'app_id', NULL);\n $this->hasMany('id', 'AppPrivileges', 'app_id', NULL);\n }", "public function initialize()\n {\n $this->hasMany('id', 'GroupProfile', 'media_id', array('alias' => 'GroupProfile'));\n $this->belongsTo('profile_id', 'Profile', 'id', array('alias' => 'Profile'));\n $this->belongsTo('evenement_id', 'Event', 'id', array('alias' => 'Event'));\n }", "protected function _saveLinks()\n {\n $resource = $this->_linkFactory->create();\n $mainTable = $resource->getMainTable();\n $positionAttrId = [];\n $nextLinkId = $this->_resourceHelper->getNextAutoincrement($mainTable);\n\n // pre-load 'position' attributes ID for each link type once\n foreach ($this->_linkNameToId as $linkName => $linkId) {\n $select = $this->_connection->select()->from(\n $resource->getTable('catalog_product_link_attribute'),\n ['id' => 'product_link_attribute_id']\n )->where(\n 'link_type_id = :link_id AND product_link_attribute_code = :position'\n );\n $bind = [':link_id' => $linkId, ':position' => 'position'];\n $positionAttrId[$linkId] = $this->_connection->fetchOne($select, $bind);\n }\n while ($bunch = $this->_dataSourceModel->getNextBunch()) {\n $productIds = [];\n $linkRows = [];\n $positionRows = [];\n\n foreach ($bunch as $rowNum => $rowData) {\n if (!$this->isRowAllowedToImport($rowData, $rowNum)) {\n continue;\n }\n\n $sku = $rowData[self::COL_SKU];\n\n $productId = $this->skuProcessor->getNewSku($sku)[$this->getProductEntityLinkField()];\n $productLinkKeys = [];\n $select = $this->_connection->select()->from(\n $resource->getTable('catalog_product_link'),\n ['id' => 'link_id', 'linked_id' => 'linked_product_id', 'link_type_id' => 'link_type_id']\n )->where(\n 'product_id = :product_id'\n );\n $bind = [':product_id' => $productId];\n foreach ($this->_connection->fetchAll($select, $bind) as $linkData) {\n $linkKey = \"{$productId}-{$linkData['linked_id']}-{$linkData['link_type_id']}\";\n $productLinkKeys[$linkKey] = $linkData['id'];\n }\n foreach ($this->_linkNameToId as $linkName => $linkId) {\n $productIds[] = $productId;\n if (isset($rowData[$linkName . 'sku'])) {\n $linkSkus = explode($this->getMultipleValueSeparator(), $rowData[$linkName . 'sku']);\n $linkPositions = !empty($rowData[$linkName . 'position'])\n ? explode($this->getMultipleValueSeparator(), $rowData[$linkName . 'position'])\n : [];\n foreach ($linkSkus as $linkedKey => $linkedSku) {\n $linkedSku = trim($linkedSku);\n if (($this->skuProcessor->getNewSku($linkedSku) !== null || $this->isSkuExist($linkedSku))\n && strcasecmp($linkedSku, $sku) !== 0\n ) {\n $newSku = $this->skuProcessor->getNewSku($linkedSku);\n if (!empty($newSku)) {\n $linkedId = $newSku['entity_id'];\n } else {\n $linkedId = $this->getExistingSku($linkedSku)['entity_id'];\n }\n\n if ($linkedId == null) {\n // Import file links to a SKU which is skipped for some reason,\n // which leads to a \"NULL\"\n // link causing fatal errors.\n $this->_logger->critical(\n new \\Exception(\n sprintf(\n 'WARNING: Orphaned link skipped: From SKU %s (ID %d) to SKU %s, ' .\n 'Link type id: %d',\n $sku,\n $productId,\n $linkedSku,\n $linkId\n )\n )\n );\n continue;\n }\n\n $linkKey = \"{$productId}-{$linkedId}-{$linkId}\";\n if (empty($productLinkKeys[$linkKey])) {\n $productLinkKeys[$linkKey] = $nextLinkId;\n }\n if (!isset($linkRows[$linkKey])) {\n $linkRows[$linkKey] = [\n 'link_id' => $productLinkKeys[$linkKey],\n 'product_id' => $productId,\n 'linked_product_id' => $linkedId,\n 'link_type_id' => $linkId,\n ];\n }\n if (!empty($linkPositions[$linkedKey])) {\n $positionRows[] = [\n 'link_id' => $productLinkKeys[$linkKey],\n 'product_link_attribute_id' => $positionAttrId[$linkId],\n 'value' => $linkPositions[$linkedKey],\n ];\n }\n $nextLinkId++;\n }\n }\n }\n }\n }\n if (Import::BEHAVIOR_APPEND != $this->getBehavior() && $productIds) {\n $this->_connection->delete(\n $mainTable,\n $this->_connection->quoteInto('product_id IN (?)', array_unique($productIds))\n );\n }\n if ($linkRows) {\n $this->_connection->insertOnDuplicate($mainTable, $linkRows, ['link_id']);\n }\n if ($positionRows) {\n // process linked product positions\n $this->_connection->insertOnDuplicate(\n $resource->getAttributeTypeTable('int'),\n $positionRows,\n ['value']\n );\n }\n }\n return $this;\n }", "public function initialize()\n {\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', array('alias' => 'Cargaestudiantes'));\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', array('alias' => 'Datosprofesiona'));\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', NULL);\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', NULL);\n }", "public function initialize()\r\n {\r\n $this->belongsTo('encuesta_personalId', 'Personal', 'personal_id', array('alias' => 'Personal'));\r\n $this->belongsTo('encuesta_alojamientoId', 'Alojamiento', 'alojamiento_id', array('alias' => 'Alojamiento'));\r\n $this->belongsTo('encuesta_recepcionId', 'Recepcion', 'recepcion_id', array('alias' => 'Recepcion'));\r\n $this->belongsTo('encuesta_unidadId', 'Unidad', 'unidad_id', array('alias' => 'Unidad'));\r\n $this->belongsTo('encuesta_adicionalId', 'Adicional', 'adicional_id', array('alias' => 'Adicional'));\r\n $this->belongsTo('encuesta_sorteoId', 'Sorteo', 'sorteo_id', array('alias' => 'Sorteo'));\r\n }", "public function buildRelations()\n {\n $this->addRelation(\n 'Group',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Group',\n RelationMap::MANY_TO_ONE,\n array('group_id' => 'id',),\n null,\n null\n );\n $this->addRelation(\n 'Batch',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Batch',\n RelationMap::MANY_TO_ONE,\n array('batch_id' => 'id',),\n null,\n null\n );\n }", "public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n Apps::class,\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->setSource('users_associated_apps');\n }", "public function initialize() {\n\n // Relation to DasUsers\n $this->belongsTo('id', 'Aiden\\Models\\DasUsers', 'users_id', ['alias' => 'DasUsers']);\n\n // Relation to Phrases\n $this->hasMany('id', 'Aiden\\Models\\UsersPhrases', 'users_id', [\"alias\" => \"Phrases\"]);\n\n // Relation to Das\n $this->hasManyToMany('id', 'Aiden\\Models\\DasUsers', 'users_id', 'das_id', 'Aiden\\Models\\Das', 'id', ['alias' => 'Das']);\n\n // Relation to Councils\n $this->hasManyToMany('id', 'Aiden\\Models\\UsersCouncils', 'users_id', 'councils_id', 'Aiden\\Models\\Councils', 'id', ['alias' => 'Councils']);\n\n }", "public function initialize()\n {\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_periodo', 'CobPeriodo', 'id_periodo', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_contrato', 'CobActaconteo', 'id_contrato', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_ajuste_reportado', 'CobAjusteReportado', 'id_ajuste_reportado', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actaconteo_persona_facturacion', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona_facturacion', array(\n \t\t\t'reusable' => true\n \t));\n }", "public function initialize()\n {\n $this->hasMany('id', 'Message', 'idFil', array('alias' => 'Message'));\n $this->belongsTo('idFil', 'Message', 'id', array('alias' => 'Message'));\n $this->belongsTo('idProjet', 'Projet', 'id', array('alias' => 'Projet'));\n $this->belongsTo('idUser', 'User', 'id', array('alias' => 'User'));\n }", "public function initialize()\n {\n $this->belongsTo('cons_order_id', '\\Orders', 'id', array('alias' => 'Orders'));\n $this->belongsTo('order_id', '\\Orders', 'id', array('alias' => 'Orders'));\n }", "protected static function _relations() {\n\n\t}", "public function initialize()\n {\n $this->belongsTo('id_categoria_gastos', 'CategoriaGastos', 'id_categoria_gastos', array('alias' => 'CategoriaGastos'));\n $this->belongsTo('id_presupuesto', 'Presupuesto', 'id_presupuesto', array('alias' => 'Presupuesto'));\n }", "public function testAddMultipleRelationshipItemsToData()\n {\n $this->document->addToData($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('selfUrl/'), // self url\n [], // links for resource\n null // meta\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('selfUrlWillBeHidden/'),\n [LinkInterface::SELF => new Link('selfUrlWillBeHidden/')], // links for resource\n ['this meta' => 'wont be shown'], // meta when resource is primary\n [], // links for included resource\n false, // show relationships in 'included'\n ['this meta' => 'wont be shown'], // meta when resource within 'included'\n ['some' => 'comment meta'] // meta when resource is in relationship\n ), new stdClass(), true);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [], // links\n null, // relationship meta\n true, // show data\n false // is root\n );\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : {\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : [\n { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} },\n { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} }\n ]\n }\n }\n }\n }\nEOL;\n $this->check($expected);\n }", "public function attach(Collection|Model $model, $collection = null, $attributes = []): void\n {\n if ($model instanceof Collection) {\n $model->each(fn (Model $m) => $this->attach($m, $collection, $attributes));\n\n return;\n }\n\n $this->file_attachments()\n ->create(array_merge($attributes, [\n 'model_type' => get_class($model),\n 'model_id' => $model->getKey(),\n 'collection' => $collection,\n ]));\n }", "public function SaveRelationship(object $data)\n {\n return $this->model->push($data);\n }", "public function initialize()\n {\n $this->belongsTo('cfop', 'App\\Models\\Cfop', 'cfop', array('alias' => 'Cfop'));\n $this->belongsTo('cod_genero', 'App\\Models\\GeneroItem', 'id_genero', array('alias' => 'GeneroItem'));\n $this->belongsTo('ncm', 'App\\Models\\Ncm', 'cd_ncm', array('alias' => 'Ncm'));\n $this->belongsTo('cd_nfservico', 'App\\Models\\Nfservico', 'cd_nfservico', array('alias' => 'Nfservico'));\n $this->belongsTo('tipo_item', 'App\\Models\\TipoItem', 'id_tipo', array('alias' => 'TipoItem'));\n $this->belongsTo('unidadeMedida', 'App\\Models\\Unidademedida', 'cd_medida', array('alias' => 'Unidademedida'));\n $this->belongsTo('cfop', 'App\\Models\\Cfop', 'cfop', array('foreignKey' => true,'alias' => 'Cfop'));\n $this->belongsTo('cod_genero', 'App\\Models\\GeneroItem', 'id_genero', array('foreignKey' => true,'alias' => 'GeneroItem'));\n $this->belongsTo('ncm', 'App\\Models\\Ncm', 'cd_ncm', array('foreignKey' => true,'alias' => 'Ncm'));\n $this->belongsTo('cd_nfservico', 'App\\Models\\Nfservico', 'cd_nfservico', array('foreignKey' => true,'alias' => 'Nfservico'));\n $this->belongsTo('tipo_item', 'App\\Models\\TipoItem', 'id_tipo', array('foreignKey' => true,'alias' => 'TipoItem'));\n $this->belongsTo('unidadeMedida', 'App\\Models\\Unidademedida', 'cd_medida', array('foreignKey' => true,'alias' => 'Unidademedida'));\n }", "public function initialize()\n\t{\n\t\t$this->hasMany('id', 'Talon\\Models\\Users\\SuccessLogins', 'usersId', array(\n\t\t\t'alias' => 'successLogins',\n\t\t\t'foreignKey' => array(\n\t\t\t\t'message' => 'User cannot be deleted because he/she has activity in the system'\n\t\t\t)\n\t\t));\n\n\t\t$this->hasMany('id', 'Talon\\Models\\Users\\PasswordChanges', 'usersId', array(\n\t\t\t'alias' => 'passwordChanges',\n\t\t\t'foreignKey' => array(\n\t\t\t\t'message' => 'User cannot be deleted because he/she has activity in the system'\n\t\t\t)\n\t\t));\n\n\t\t$this->hasMany('id', 'Talon\\Models\\Users\\ResetPasswords', 'usersId', array(\n\t\t\t'alias' => 'resetPasswords',\n\t\t\t'foreignKey' => array(\n\t\t\t\t'message' => 'User cannot be deleted because he/she has activity in the system'\n\t\t\t)\n\t\t));\n\t}", "public function initialize()\n {\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->setSource('users_associated_company');\n }", "public function buildRelations()\n {\n $this->addRelation('Country', 'Slashworks\\\\AppBundle\\\\Model\\\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), null, 'CASCADE');\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'SET NULL', 'CASCADE', 'RemoteApps');\n $this->addRelation('UserCustomerRelation', 'Slashworks\\\\AppBundle\\\\Model\\\\UserCustomerRelation', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'CASCADE', 'UserCustomerRelations');\n }", "public function Attach(&$entity)\n {\n \n }", "public function initialize()\n {\n /*$this->hasOne('id', 'Broadcasters', 'id', NULL);\n $this->hasOne('id', 'Clients', 'id', NULL);\n $this->hasMany('id', 'Credits', 'user_id', NULL);*/\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}", "public function initialize()\n {\n $this->hasMany(\"id\", \"Hotelsfacility\", \"hotel_id\");\n $this->hasMany(\"id\", \"HotelRoom\", \"hotel_id\");\n $this->belongsTo(\"city_id\", \"City\", \"id\");\n $this->belongsTo(\"province_id\", \"Province\", \"id\");\n $this->belongsTo(\"country_id\", \"Country\", \"id\");\n\n }", "public function initialize() {\n $this->setSource('article');\n\n $this->belongsTo('author_id', Article::class, 'author_id', [\n 'alias' => 'author',\n 'reusable' => true,\n ]);\n\n $this->hasMany('article_id', ArticleTag::class, 'article_id', [\n 'alias' => 'tagRelation',\n ]);\n\n $this->hasMany('article_id', Comment::class, 'article_id', [\n 'alias' => 'comments',\n ]);\n }", "public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }", "public function touch()\n {\n $key = $this->getRelated ()->getKeyName ();\n $columns = $this->getRelatedFreshUpdate ();\n $ids = $this->getRelatedIds ();\n if ( count ( $ids ) > 0 ) {\n $this->getRelated ()->newQuery ()->whereIn ( $key, $ids )->update ( $columns );\n }\n }", "protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }", "public function resources()\n {\n return $this->hasMany('arts\\Resource', 'post_id', 'post_id');\n }", "public function attach($id, $relation, $ids)\n {\n return $this->find($id)->{$relation}()->attach($ids);\n }", "public function setResource(PostResourceStringsAsyncUploadsRequestBodyDataRelationshipsResource $resource): self\n {\n $this->initialized['resource'] = true;\n $this->resource = $resource;\n\n return $this;\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function initialize()\n {\n $this->hasMany('id', 'MapsScore', 'map_id', array('alias' => 'MapsScore'));\n $this->hasMany('id', 'Matchs', 'current_map', array('alias' => 'Matchs'));\n $this->hasMany('id', 'PlayerKill', 'map_id', array('alias' => 'PlayerKill'));\n $this->hasMany('id', 'Players', 'map_id', array('alias' => 'Players'));\n $this->hasMany('id', 'PlayersHeatmap', 'map_id', array('alias' => 'PlayersHeatmap'));\n $this->hasMany('id', 'Round', 'map_id', array('alias' => 'Round'));\n $this->hasMany('id', 'RoundSummary', 'map_id', array('alias' => 'RoundSummary'));\n $this->belongsTo('match_id', 'Matchs', 'id', array('alias' => 'Matchs'));\n }", "public function initialize()\n {\n $this->hasMany('id', 'Aulas', 'id_materia', array('alias' => 'Aulas'));\n $this->hasMany('id', 'Aulas', 'id_materia', NULL);\n }", "public function attach($owner)\n\t{\n\t\tparent::attach($owner);\n\n\t\t$metadata = $this->owner->getMetadata();\n\n\t\t// Add many-many relation\n\t\t$metadata->addRelation($this->xrefRelationName, array(\n\t\t\tCActiveRecord::MANY_MANY,\n\t\t\t$this->xrefClass,\n\t\t\t$this->modelClass.'('.$this->ownerFkName.','.$this->indexFkName.')',\n\t\t));\n\t}", "function _save_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Check if relation already exists\r\n\t\t\t$query = $this->db->get_where($relationship_table, $data, NULL, NULL);\r\n\r\n\t\t\tif ($query->num_rows() == 0)\r\n\t\t\t{\r\n\t\t\t\t// If this object has a \"has many\" relationship with the other object\r\n\t\t\t\tif (in_array($object->model, $this->has_many))\r\n\t\t\t\t{\r\n\t\t\t\t\t// If the other object has a \"has one\" relationship with this object\r\n\t\t\t\t\tif (in_array($this->model, $object->has_one))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($object->model . '_id' => $object->id), 1, 0);\r\n\r\n\t\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t\t$this->db->where($object->model . '_id', $object->id);\r\n\t\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (in_array($this->model, $object->has_many))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// We can add the relation since this specific relation doesn't exist, and a \"has many\" to \"has many\" relationship exists between the objects\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If this object has a \"has one\" relationship with the other object\r\n\t\t\t\telse if (in_array($object->model, $this->has_one))\r\n\t\t\t\t{\r\n\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($this->model . '_id' => $this->id), 1, 0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t$this->db->where($this->model . '_id', $this->id);\r\n\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Relationship already exists\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "public function attach(&$parent, &$child, $rel_name) {\n\t$parent->save();\n\t$child->save();\n\n\t$rels = $parent->getRelationships($rel_name);\n\t$insert = true;\n\tforeach ($rels as $rel) {\n\t $node = $rel->getEndNode();\n\t if ($node->getProperty('name') == $child->getProperty('name')) {\n\t\t$insert = false;\n\t }\n\t}\n\tif ($insert) {\n\t $parent->relateTo($child, $rel_name)->save();\n\t}\n }", "function setup(){\n if(!class_exists('Relationship')){\n\n }\n\n $rel = new Relationship();\n if(!empty($this->vardef['relationship'])){\n \t$rel->retrieve_by_name($this->vardef['relationship']);\n }\n if($rel->relationship_type == 'many-to-many'){\n if($rel->lhs_module == $this->module_dir){\n $this->related_module = $rel->rhs_module;\n $module_dir = $rel->lhs_module;\n }else {\n if($rel->rhs_module == $this->module_dir){\n $this->related_module = $rel->lhs_module;\n $module_dir = $rel->rhs_module;\n }else{\n die(\"this field has no relationships mapped with this module\");\n }\n }\n if($module_dir != $this->module_dir){\n die('These modules do not match : '. $this->module_dir . ' and ' . $module_dir);\n }\n if(isset($GLOBALS['beanList'][$this->module_dir])){\n $class = $GLOBALS['beanList'][$this->module_dir];\n if(file_exists($GLOBALS['beanFiles'][$class])){\n $this->bean = loadBean($this->module_dir);\n $this->bean->retrieve($_REQUEST['bean_id']);\n if($this->bean->load_relationship($this->vardef['name'])){\n $this->check_id();\n $this->retrieve_values();\n }else{\n die('failed to load the relationship');\n }\n }else{\n die('class file do not exist');\n }\n }else{\n die($this->module_dir . ' is not in the beanList.');\n }\n }\n else{\n die(\"the relationship is not a many-to-many\");\n }\n }", "public function initialize()\n {\n $this->hasMany('idprodutoArea', 'App\\Models\\TabelaPrecoHasDesconto', 'produtoArea_idprodutoArea', array('alias' => 'TabelaPrecoHasDesconto'));\n $this->belongsTo('area_cd_area', 'App\\Models\\Area', 'cd_area', array('alias' => 'Area'));\n $this->belongsTo('produto_cd_produto', 'App\\Models\\Produto', 'cd_produto', array('alias' => 'Produto'));\n $this->belongsTo('cd_tabela', 'App\\Models\\TabelaPreco', 'cd_tabela', array('alias' => 'TabelaPreco'));\n $this->belongsTo('unidade_negocio_cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->hasMany('idprodutoArea', 'App\\Models\\TabelaPrecoHasDesconto', 'produtoArea_idprodutoArea', NULL);\n $this->belongsTo('area_cd_area', 'App\\Models\\Area', 'cd_area', array('foreignKey' => true,'alias' => 'Area'));\n $this->belongsTo('produto_cd_produto', 'App\\Models\\Produto', 'cd_produto', array('foreignKey' => true,'alias' => 'Produto'));\n $this->belongsTo('cd_tabela', 'App\\Models\\TabelaPreco', 'cd_tabela', array('foreignKey' => true,'alias' => 'TabelaPreco'));\n $this->belongsTo('unidade_negocio_cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('foreignKey' => true,'alias' => 'UnidadeNegocio'));\n }", "private static function relations()\n {\n $files = ['OneToOne', 'OneToMany', 'ManyToMany', 'BelongsTo'];\n $folder = static::$root.'MVC/Relations'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyRelationException', 'ModelNotFindedException'];\n $folder = static::$root.'MVC/Relations/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function __construct()\n {\n $this->relationships = array();\n }", "public function buildRelations()\n {\n $this->addRelation('Website', '\\\\CE\\\\Model\\\\Website', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('WebsiteRouting', '\\\\CE\\\\Model\\\\WebsiteRouting', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_routing_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n }", "function load ()\n {\n $this->relationships = parent::_load ( $this->basepath ) ;\n }", "public function initialize()\n {\n \t$this->belongsTo('id_verificacion', 'CobVerificacion', 'id_verificacion', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actadocumentacion', 'CobActadocumentacionDatos', 'id_actadocumentacion', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('estado', 'IbcReferencia', 'id_referencia', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->hasMany('id_actadocumentacion', 'CobActadocumentacionPersona', 'id_actadocumentacion', array(\n \t\t\t'foreignKey' => array(\n \t\t\t\t\t'message' => 'El acta no puede ser eliminada porque existen beneficiarios asociados a ésta'\n \t\t\t)\n \t));\n }", "public function with($relations);" ]
[ "0.59108377", "0.59044814", "0.5795088", "0.5678341", "0.5669424", "0.55456805", "0.547129", "0.547129", "0.5431078", "0.53381836", "0.5315674", "0.53146356", "0.53123987", "0.5267002", "0.52664524", "0.5259545", "0.5253737", "0.5239713", "0.5227259", "0.5221178", "0.52103007", "0.517636", "0.51747507", "0.5174228", "0.5173968", "0.5172636", "0.5151132", "0.51486224", "0.5147727", "0.5141416", "0.513162", "0.51314014", "0.5122991", "0.51160115", "0.5115129", "0.50736964", "0.5051273", "0.50494933", "0.50436383", "0.50343925", "0.5026033", "0.50164646", "0.5016227", "0.49981922", "0.4992687", "0.4984348", "0.49697572", "0.4968789", "0.49669623", "0.49591672", "0.49578926", "0.49550307", "0.49548128", "0.49503505", "0.49436516", "0.4939077", "0.49354276", "0.4923178", "0.49210793", "0.49177128", "0.4913612", "0.49098864", "0.4909789", "0.49078733", "0.4901685", "0.49015954", "0.48992896", "0.4893846", "0.4879192", "0.48772842", "0.48701322", "0.48676467", "0.48642838", "0.48625323", "0.48549202", "0.48535597", "0.48450783", "0.4833173", "0.4829837", "0.4829837", "0.4829837", "0.4829837", "0.4829837", "0.4829837", "0.4829837", "0.4829837", "0.4829837", "0.48236135", "0.48147967", "0.48122725", "0.481186", "0.4810754", "0.48062938", "0.4799073", "0.47987187", "0.47972137", "0.47922006", "0.47879934", "0.47867796", "0.47815794" ]
0.79850817
0
Attach relationships to the resource.
protected function attachRelations(Model $model) { $relations = array_filter($model->getRelations(), static function ($value, $key) { return $key !== 'pivot' ?: (bool) $value === false; }, ARRAY_FILTER_USE_BOTH); foreach ($relations as $relation => $relationObj) { if (config('json-api.normalize_relations', false)) { $relation = Str::snake($relation); } if ($relationObj instanceof DatabaseCollection) { /** @var \Illuminate\Database\Eloquent\Model $relationModel */ foreach ($relationObj->all() as $relationModel) { $this->relationships[$relation]['data'][] = $this->processModelRelation( $relationModel ); } } if ($relationObj instanceof Model) { $this->relationships[$relation]['data'] = $this->processModelRelation( $relationObj ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }", "public function push() {\n\t\t$this->save();\n\n\t\t// To sync all of the relationships to the database, we will simply spin through\n\t\t// the relationships, calling the \"push\" method on each of the models in that\n\t\t// given relationship, this should ensure that each model is saved.\n\t\tforeach ($this->relationships as $name => $models) {\n\t\t\tif ( ! is_array($models)) {\n\t\t\t\t$models = array($models);\n\t\t\t}\n\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->push();\n\t\t\t}\n\t\t}\n\t}", "public function setRelations() {}", "private function prepRelations() : self\n {\n\n // Lvd.\n $maxRId = 0;\n $relationships = [];\n\n // Add Sheets.\n foreach ($this->xlsx->getBook()->getSheets() as $sheet) {\n\n $relationships[] = [\n '@Id' => 'rId' . $sheet->getId(),\n '@Type' => $this->types['sheet'],\n '@Target' => 'worksheets/sheet' . $sheet->getId() . '.xml',\n ];\n\n // Count max ID.\n $maxRId = max($maxRId, $sheet->getId());\n }\n\n // Add the rest of relationships.\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['styles'],\n '@Target' => 'styles.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['theme'],\n '@Target' => 'theme/theme1.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['sharedStrings'],\n '@Target' => 'sharedStrings.xml',\n ];\n\n // Save.\n $this->array['Relationships']['@@']['Relationship'] = $relationships;\n\n return $this;\n }", "public function attach($rel_objects, $relation_name = null) {\n $objects = array(0=>$this);\n if (!$relation_name) $relation_name = strtolower(get_class(is_array($rel_objects) ? $rel_objects[0] : $rel_objects));\n $this->_loaded_abilities['Relative']->attach($objects, $rel_objects, $relation_name);\n\n $this->clearHash($relation_name);\n return $this;\n }", "private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $foreign_model = (is_array($relation)) ? $relation[0] : $relation;\n $foreign_model_name = strtolower($foreign_model);\n $this->load->model($foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n if($option=='has_many_pivot')\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n $foreign_key = (is_array($relation)) ? $relation[1] : $this->{$foreign_model_name}->primary;\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n else\n {\n $foreign_key = (is_array($relation)) ? $relation[1] : singular($this->table) . '_id';\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => $foreign_model_name, 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n ($option == 'has_many_pivot') ? ($this->_relationships[$key]['pivot_table'] = $pivot_table) : FALSE;\n\n }\n }\n }\n }\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function saveRelations($attributes = [])\n {\n $this->categories()->sync(array_get($attributes, 'categories', []));\n $this->tags()->sync(array_get($attributes, 'tags', []));\n $this->upSellProducts()->sync(array_get($attributes, 'up_sells', []));\n $this->crossSellProducts()->sync(array_get($attributes, 'cross_sells', []));\n $this->relatedProducts()->sync(array_get($attributes, 'related_products', []));\n }", "public function testAddMultipleRelationshipItemsToData()\n {\n $this->document->addToData($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('selfUrl/'), // self url\n [], // links for resource\n null // meta\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('selfUrlWillBeHidden/'),\n [LinkInterface::SELF => new Link('selfUrlWillBeHidden/')], // links for resource\n ['this meta' => 'wont be shown'], // meta when resource is primary\n [], // links for included resource\n false, // show relationships in 'included'\n ['this meta' => 'wont be shown'], // meta when resource within 'included'\n ['some' => 'comment meta'] // meta when resource is in relationship\n ), new stdClass(), true);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [], // links\n null, // relationship meta\n true, // show data\n false // is root\n );\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : {\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : [\n { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} },\n { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} }\n ]\n }\n }\n }\n }\nEOL;\n $this->check($expected);\n }", "public function buildRelations()\n {\n $this->addRelation('ArtRequest', 'ArtRequestORM\\\\ArtRequest', RelationMap::ONE_TO_MANY, array('event_id' => 'event_id', ), 'CASCADE', 'CASCADE', 'ArtRequests');\n }", "public function isAddToRelationship();", "protected function saveRelations()\n {\n $spotIdsToRemove = $relationsToAdd = [\n 'photos' => [],\n 'tags' => [],\n 'amenities' => [],\n 'locations' => []\n ];\n // Preparing spots remote photos for insert\n if($this->photos != [])\n {\n foreach($this->photos as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['associated_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['associated_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['photos'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['associated_id']))\n {\n $relationsToAdd['photos'][] = $item;\n }\n }\n }\n }\n // Preparing spots amenities for insert\n if($this->amenities != [])\n {\n foreach($this->amenities as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['amenities'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['amenities'][] = $item;\n }\n }\n }\n }\n // Preparing spots tags for insert\n if($this->tags != [])\n {\n foreach($this->tags as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['tags'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['tags'][] = $item;\n }\n }\n }\n }\n // Preparing spots points for insert\n if($this->locations != [])\n {\n foreach($this->locations as $remote_id => $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['locations'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['locations'][] = $item;\n }\n }\n }\n // Database transaction to remove all old relations of existing spots and add new relations for inserted and updated spots\n DB::transaction(function() use ($spotIdsToRemove, $relationsToAdd) {\n if($spotIdsToRemove['photos'] != [])\n {\n DB::table('remote_photos')->whereIn('associated_id', $spotIdsToRemove['photos'])->where('associated_type', Spot::class)->delete();\n }\n if($spotIdsToRemove['amenities'] != [])\n {\n DB::table('spot_amenities')->whereIn('spot_id', $spotIdsToRemove['amenities'])->delete();\n }\n if($spotIdsToRemove['tags'] != [])\n {\n DB::table('spot_tag')->whereIn('spot_id', $spotIdsToRemove['tags'])->delete();\n }\n if($spotIdsToRemove['locations'] != [])\n {\n DB::table('spot_points')->whereIn('spot_id', $spotIdsToRemove['locations'])->delete();\n }\n if($relationsToAdd['photos'] != [])\n {\n DB::table('remote_photos')->insert($relationsToAdd['photos']);\n }\n if($relationsToAdd['amenities'] != [])\n {\n DB::table('spot_amenities')->insert($relationsToAdd['amenities']);\n }\n if($relationsToAdd['tags'] != [])\n {\n DB::table('spot_tag')->insert($relationsToAdd['tags']);\n }\n if($relationsToAdd['locations'] != [])\n {\n DB::table('spot_points')->insert($relationsToAdd['locations']);\n }\n });\n }", "protected function addActionsForRelatedEntities()\n {\n if (! $this->mapper) {\n return;\n }\n\n foreach ($this->mapper->getRelations() as $name) {\n $this->mapper->getRelation($name)->addActions($this);\n }\n }", "public function testResourceRelationships()\n {\n $post = factory(Post::class)->make();\n $post->author = factory(User::class)->make();\n $post->comments = factory(Comment::class, 2)->make();\n\n $serializer = new ResourceSerializer($post, [], ['author', 'comments']);\n $resource = $serializer->toResourceObject();\n\n $this->assertArrayHasKey('relationships', $resource);\n $this->assertArrayHasKey('author', $resource['relationships']);\n $this->assertJsonApiResourceIdentifier($resource['relationships']['author']);\n $this->assertEquals('users', $resource['relationships']['author']['data']['type']);\n $this->assertArrayHasKey('comments', $resource['relationships']);\n $this->assertCount(2, $resource['relationships']['comments']['data']);\n }", "public function setRelations(Notification $notification, Collection $entities)\n {\n $entities->each(function ($entity) use ($notification) {\n $entity->notifications()->attach($notification->id);\n });\n }", "public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }", "private function createRelation()\n {\n $this->createBuilder();\n }", "protected function addRelationship(AbstractEntity $entity)\n {\n // attach item\n $attach = $this->resourceService()->attach($this->getId(), $entity->get('resource_type'), [\n 'type' => $entity->get('resource_type'),\n 'id' => $entity->get('id')\n ]);\n // add to relationships\n $this->relationships->get($entity->get('resource_type'))->push($entity->get('id'));\n // update cache\n $this->cacheSelf();\n }", "public function addRelationship(string $name, $relationship);", "public function run()\n {\n\t\t$policies = Policy::get(); \n\t\t$resources = Resource::get(); \n\n\t\tforeach($policies as $policy) {\n\t\t\tforeach($resources as $resource) {\n\t\t\t\t$policy->resources()->attach($resource); \n\t\t\t}\n\t\t}\n }", "public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }", "public function associateRelationships($object, Request $request) {\n \n /**\n * Validate commentstatus ID, if failed set to default\n */\n $validator = Validator::make($request->all(), [\n 'commentstatus_id' => 'required|integer|min:1|exists:commentstatus,id',\n ]);\n\n /**\n * Validator fails - try to set the valid comment id\n *\n */\n if ($validator->fails()) {\n \n /**\n * Auto approve ?\n */\n if(env('AUTO_APPROVE_COMMENTS', 0) == 1){\n \n $object->commentstatuses()->associate(2);\n }\n \n /**\n * Manual approve\n */\n else{\n $object->commentstatuses()->associate(1);\n }\n \n }\n else{\n\n $object->commentstatuses()->associate($request->input('commentstatus_id'));\n }\n\n /**\n * Validate article ID, if failed set to actual authorized article\n */\n $validator = Validator::make($request->all(), [\n 'article_id' => 'required|integer|min:1|exists:article,id',\n ]);\n \n /**\n * Validator fails - nothing to do\n */\n if ($validator->fails()) {\n \n } \n \n /**\n * Validator OK - save it\n */\n else {\n\n $object->articles()->associate($request->input('article_id'));\n }\n \n /**\n * Validate page ID, if failed set to actual authorized page\n */\n $validator = Validator::make($request->all(), [\n 'page_id' => 'required|integer|min:1|exists:page,id',\n ]);\n \n /**\n * Validator fails - nothing to do\n */\n if ($validator->fails()) {\n\n // nothing\n \n } \n \n /**\n * Validator OK - save it\n */\n else {\n\n $object->pages()->associate($request->input('page_id'));\n }\n\n }", "public function SaveRelationship(object $data)\n {\n return $this->model->push($data);\n }", "public function attach($id, $relation, $ids)\n {\n return $this->find($id)->{$relation}()->attach($ids);\n }", "public function buildRelations()\n {\n $this->addRelation(\n 'Group',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Group',\n RelationMap::MANY_TO_ONE,\n array('group_id' => 'id',),\n null,\n null\n );\n $this->addRelation(\n 'Batch',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Batch',\n RelationMap::MANY_TO_ONE,\n array('batch_id' => 'id',),\n null,\n null\n );\n }", "public function associate($entity)\n {\n // The Mapper will retrieve this association within the object model, we won't be using\n // the foreign key attribute inside the parent Entity.\n //\n //$this->parent->setEntityAttribute($this->foreignKey, $entity->getEntityAttribute($this->otherKey));\n //\n // Instead, we'll just add the object to the Entity's attribute\n\n $this->parent->setEntityAttribute($this->relation, $entity->getEntityObject());\n }", "protected function normalizeRelationsData()\n {\n if (is_null($this->data['relationships'])) {\n $this->data['relationships'] = [];\n }\n\n foreach ([ 'normal', 'reverse', 'image', 'file', 'checkbox', 'category' ] as $key) {\n\n if ( ! array_key_exists($key, $this->data['relationships'])\n || ! is_array($this->data['relationships'][ $key ])\n ) {\n $this->data->relationships[ $key ] = [];\n }\n }\n\n return $this;\n }", "function save ()\n {\n parent::_save ( $this->relationships, $this->basepath ) ;\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }", "public function linkRelationships() {\n\t\t// Loop through the databases' tables, and use any FK information to build all the relationships.\n\t\t\n\t\t// Build one-to-one and one-to-many relationships\n\t\tforeach ($this->getDatabases() as $dbName => $database) {\n\t\t\tforeach ($database->getTables() as $tableName => $table) {\n\t\t\t\tforeach ($table->getForeignKeys() as $fk) {\n\t\t\t\t\t\n\t\t\t\t\t// Skip this fk if we've already linked it.\n\t\t\t\t\tif ($fk->isLinked()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference database\n\t\t\t\t\tif ($fk->hasRefDatabaseName()) {\n\t\t\t\t\t\t$refDatabase = $table->getSchema()->getDatabase($fk->getRefDatabaseName());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$refDatabase = $table->getDatabase();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference table\n\t\t\t\t\t$refTable = $refDatabase->getTable($fk->getRefTableName());\n\t\t\t\t\t\n\t\t\t\t\tif (is_null($refTable)) {\n\t\t\t\t\t\techo 'ERROR IN DATABASE SCHEMA: FK setup to non-existing table. Take a look at ' . $dbName . '.' . $tableName . \"\\n\";\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference columns\n\t\t\t\t\t$refKey = array();\n\t\t\t\t\tforeach ($fk->getRefKeyName() as $columnName) {\n\t\t\t\t\t\t$refKey[] = $refTable->getColumn($columnName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference \"object name\"\n\t\t\t\t\tif ($fk->hasRefObjectName()) {\n\t\t\t\t\t\t$refObjectName = $fk->getRefObjectName();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$refObjectName = $refTable->getTableName();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get local columns\n\t\t\t\t\t$localKey = array();\n\t\t\t\t\tforeach ($fk->getLocalKeyName() as $columnName) {\n\t\t\t\t\t\t$localKey[] = $table->getColumn($columnName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get local \"object name\"\n\t\t\t\t\tif ($fk->hasLocalObjectName()) {\n\t\t\t\t\t\t$localObjectName = $fk->getLocalObjectName();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$localObjectName = $table->getTableName();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If a table has an FK, two things happen:\n\t\t\t\t\t\n\t\t\t\t\t// 1. The local table can pull a \"has one\" relationship to the reference table\n\t\t\t\t\t\n\t\t\t\t\t$hasOne = new SchemaRelationshipHasOne();\n\t\t\t\t\t$hasOne->setRefTable($refTable);\n\t\t\t\t\t$hasOne->setRefObjectName($refObjectName);\n\t\t\t\t\t$hasOne->setRefKey($refKey);\n\t\t\t\t\t$hasOne->setLocalTable($table);\n\t\t\t\t\t$hasOne->setLocalObjectName($localObjectName);\n\t\t\t\t\t$hasOne->setLocalKey($localKey);\n\t\t\t\t\t\n\t\t\t\t\t$table->addHasOneRelationship($hasOne);\n\t\t\t\t\t\n\t\t\t\t\t// 2. The reference table can pull a \"has many\" relationship to the local table\n\t\t\t\t\t\n\t\t\t\t\t$hasMany = new SchemaRelationshipHasMany();\n\t\t\t\t\t$hasMany->setRefTable($table);\n\t\t\t\t\t$hasMany->setRefObjectName($localObjectName);\n\t\t\t\t\t$hasMany->setRefKey($localKey);\n\t\t\t\t\t$hasMany->setLocalTable($refTable);\n\t\t\t\t\t$hasMany->setLocalObjectName($refObjectName);\n\t\t\t\t\t$hasMany->setLocalKey($refKey);\n\t\t\t\t\t\n\t\t\t\t\t$refTable->addHasManyRelationship($hasMany);\n\t\t\t\t\t\n\t\t\t\t\t// Link the has one and has many together\n\t\t\t\t\t$hasOne->setHasManyRelationship($hasMany);\n\t\t\t\t\t$hasMany->setHasOneRelationship($hasOne);\n\t\t\t\t\t\n\t\t\t\t\t// Set the FK as linked so we don't link it up again.\n\t\t\t\t\t$fk->setIsLinked(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}", "public function setupAssociations() \n {\n \n }", "private function initRestorableRelations() {\n\n\t\t$configs = $this->cascadable();\n\n\t\t$this->runCascadeRestore = $configs['restore']['enable'] ?? true;\n\n\t\t$this->relationships = Arr::wrap($configs['restore']['relations'] ?? $configs);\n\t}", "public function attach($ids, array $attributes = [], $touch = true)\n {\n list($idsOnly, $idsAttributes) = $this->getIdsWithAttributes($ids, $attributes);\n\n $this->attributes = $attributes;\n\n $this->parent->fireModelEvent('pivotAttaching', true, $this, $idsOnly, $idsAttributes);\n MorphToMany::attach($ids, $this->attributes, $touch);\n $this->parent->fireModelEvent('pivotAttached', false, $this, $idsOnly, $idsAttributes);\n }", "public function attach(&$parent, &$child, $rel_name) {\n\t$parent->save();\n\t$child->save();\n\n\t$rels = $parent->getRelationships($rel_name);\n\t$insert = true;\n\tforeach ($rels as $rel) {\n\t $node = $rel->getEndNode();\n\t if ($node->getProperty('name') == $child->getProperty('name')) {\n\t\t$insert = false;\n\t }\n\t}\n\tif ($insert) {\n\t $parent->relateTo($child, $rel_name)->save();\n\t}\n }", "private function attachPhotoableModel($relationship, $object, $attributes = [])\n {\n $this->$relationship()->attach(\n $object,\n $attributes\n );\n\n return $this;\n }", "protected static function _relations() {\n\n\t}", "public function store(Requests\\RelationshipRequest $request)\n\t{\n\t\t//\n\t\tRelationship::create($request->all());\n\t\treturn redirect('relationships');\n\t}", "public function setRelations(Collection $relations);", "public function buildRelations()\n {\n $this->addRelation('Alert', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'Alerts');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('AdsTags', 'AdsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'AdsTagss');\n $this->addRelation('Content', 'Content', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Contents');\n $this->addRelation('Ad', 'Ad', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Ads');\n }", "public function fill()\n {\n $relationships = $this->relationships;\n $modelRelations = $this->loadRequiredRelationships();\n\n return collect($relationships)->transform(function($relations, $key) use($modelRelations) {\n $merge = array_get($modelRelations, $key);\n return $merge ? $this->mergeRelations($merge, $relations) : $relations;\n })->all();\n }", "public function addOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->linkModelWithOwner($attributeName, $this->owner->{$attributeName});\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Website', '\\\\CE\\\\Model\\\\Website', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('WebsiteRouting', '\\\\CE\\\\Model\\\\WebsiteRouting', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_routing_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n }", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function saveProductRelations($product)\n {\n parent::saveProductRelations($product);\n\n $data = $product->getCustomOneLinkData();\n if (!is_null($data)) {\n $this->_getResource()->saveProductLinks($product, $data, self::LINK_TYPE_CUSTOMONE);\n }\n\n $data = $product->getCustomTwoLinkData();\n if (!is_null($data)) {\n $this->_getResource()->saveProductLinks($product, $data, self::LINK_TYPE_CUSTOMTWO);\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Moneda', 'Moneda', RelationMap::MANY_TO_ONE, array('moneda_id' => 'id', ), null, null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), null, null);\n $this->addRelation('Negocio', 'Negocio', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'Negocios');\n $this->addRelation('DireccionRequerimiento', 'DireccionRequerimiento', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'DireccionRequerimientos');\n }", "public function buildRelations()\n {\n $this->addRelation('Country', 'Slashworks\\\\AppBundle\\\\Model\\\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), null, 'CASCADE');\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'SET NULL', 'CASCADE', 'RemoteApps');\n $this->addRelation('UserCustomerRelation', 'Slashworks\\\\AppBundle\\\\Model\\\\UserCustomerRelation', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'CASCADE', 'UserCustomerRelations');\n }", "public function joinResources()\n {\n $this->builder->join('resources', 'rs_id', '=', 'add_resource');\n }", "public function attach($owner)\n\t{\n\t\tparent::attach($owner);\n\n\t\t$metadata = $this->owner->getMetadata();\n\n\t\t// Add many-many relation\n\t\t$metadata->addRelation($this->xrefRelationName, array(\n\t\t\tCActiveRecord::MANY_MANY,\n\t\t\t$this->xrefClass,\n\t\t\t$this->modelClass.'('.$this->ownerFkName.','.$this->indexFkName.')',\n\t\t));\n\t}", "public function attachPermissions($permissions)\n {\n foreach ($permissions as $permission) {\n $this->attachPermission($permission);\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Photo', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\Photo', RelationMap::MANY_TO_ONE, array('photo_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('UserRate', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\UserRate', RelationMap::ONE_TO_MANY, array('photo_id' => 'photo_id', ), 'CASCADE', 'CASCADE', 'UserRates');\n $this->addRelation('User', 'wiosloCMS\\\\UserBundle\\\\Model\\\\User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Users');\n }", "public function parseRelationships()\n {\n foreach ($this->relationships as $relationship) {\n if (in_array($relationship->getRelation(), $this::SUBJECTS))\n {\n $root = $this->getRelationship($relationship->getDependentId());\n $root->addDependency($relationship);\n }\n }\n }", "public function attachRelationship(Request $request, object $model, string $fieldName): bool;", "public function setFlexFormRelations() {}", "public function buildRelations()\n {\n $this->addRelation('Marca', 'Marca', RelationMap::MANY_TO_ONE, array('idmarca' => 'idmarca', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedor', 'Proveedor', RelationMap::MANY_TO_ONE, array('idproveedor' => 'idproveedor', ), 'CASCADE', 'CASCADE');\n }", "protected function relations()\n {\n $this->belongsTo(\n 'language_iso',\n ModelLanguage::class,\n 'iso',\n [\n 'alias' => 'Language',\n 'foreignKey' => true\n ]\n );\n }", "public function createLinksFromRelations(Metadata $operation);", "public function testAddRelationViaObject()\n {\n $resource = new Entry($this->createFakeNode());\n $resource->setEntityType('Foo');\n $resource->addLink('FooSet(123)', 'self');\n\n $entry = new Entry($this->createFakeNode());\n $entry->addRelation($resource);\n\n static::assertEquals(\n '<entry>' .\n '<link type=\"application/atom+xml;type=entry\" ' .\n 'href=\"FooSet(123)\" ' .\n 'rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Foo\" ' .\n 'title=\"Foo\"/>' .\n '</entry>',\n $this->getXML($entry)\n );\n }", "public function setRelationshipAttributes($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Asset\\V1\\RelationshipAttributes::class);\n $this->relationship_attributes = $var;\n\n return $this;\n }", "public function uriRelationships();", "private static function relations()\n {\n $files = ['OneToOne', 'OneToMany', 'ManyToMany', 'BelongsTo'];\n $folder = static::$root.'MVC/Relations'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyRelationException', 'ModelNotFindedException'];\n $folder = static::$root.'MVC/Relations/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function with($relations);", "public function buildRelations()\n\t{\n $this->addRelation('Organisatie', 'Organisatie', RelationMap::MANY_TO_ONE, array('organisatie_id' => 'id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'persoon_id', ), null, null);\n\t}", "public function buildRelations()\n {\n $this->addRelation('Denomination', 'Denomination\\\\Denomination', RelationMap::MANY_TO_ONE, array('denomination_id' => 'id', ), null, null);\n $this->addRelation('ProfessionalCategory', 'ProfessionalCategory\\\\ProfessionalCategory', RelationMap::MANY_TO_ONE, array('professional_category_id' => 'id', ), null, null);\n $this->addRelation('Country', 'Country\\\\Country', RelationMap::MANY_TO_ONE, array('country_of_birth_id' => 'id', ), null, null);\n $this->addRelation('Migration', 'Migration\\\\Migration', RelationMap::ONE_TO_MANY, array('id' => 'person_id', ), null, null, 'Migrations');\n }", "public function buildRelations()\n {\n $this->addRelation('Label', '\\\\MediaProperty\\\\Label', RelationMap::MANY_TO_ONE, array('label_id' => 'id', ), null, null);\n $this->addRelation('Album', '\\\\MediaItem\\\\Album', RelationMap::ONE_TO_MANY, array('id' => 'artist_id', ), null, null, 'Albums');\n }", "function _save_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Check if relation already exists\r\n\t\t\t$query = $this->db->get_where($relationship_table, $data, NULL, NULL);\r\n\r\n\t\t\tif ($query->num_rows() == 0)\r\n\t\t\t{\r\n\t\t\t\t// If this object has a \"has many\" relationship with the other object\r\n\t\t\t\tif (in_array($object->model, $this->has_many))\r\n\t\t\t\t{\r\n\t\t\t\t\t// If the other object has a \"has one\" relationship with this object\r\n\t\t\t\t\tif (in_array($this->model, $object->has_one))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($object->model . '_id' => $object->id), 1, 0);\r\n\r\n\t\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t\t$this->db->where($object->model . '_id', $object->id);\r\n\t\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (in_array($this->model, $object->has_many))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// We can add the relation since this specific relation doesn't exist, and a \"has many\" to \"has many\" relationship exists between the objects\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If this object has a \"has one\" relationship with the other object\r\n\t\t\t\telse if (in_array($object->model, $this->has_one))\r\n\t\t\t\t{\r\n\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($this->model . '_id' => $this->id), 1, 0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t$this->db->where($this->model . '_id', $this->id);\r\n\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Relationship already exists\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('Genero', 'Genero', RelationMap::MANY_TO_ONE, array('id_genero' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tematica', 'Tematica', RelationMap::MANY_TO_ONE, array('id_tematica' => 'id', ), null, 'CASCADE');\n $this->addRelation('Autor', 'Autor', RelationMap::MANY_TO_ONE, array('id_autor' => 'id', ), null, 'CASCADE');\n $this->addRelation('Materia', 'Materia', RelationMap::MANY_TO_ONE, array('id_materia' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tipopublicacion', 'Tipopublicacion', RelationMap::MANY_TO_ONE, array('id_tipopublicacion' => 'id', ), null, 'CASCADE');\n\t}", "public function buildRelations()\n {\n $this->addRelation('EmailManagerTrace', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerTrace', RelationMap::MANY_TO_ONE, array('trace_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('EmailManagerHistoryEmail', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerHistoryEmail', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', 'RESTRICT', 'EmailManagerHistoryEmails');\n }", "public function attachPermissions($permissions);", "public function buildRelations()\n {\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('idbanco' => 'idbanco', ), 'CASCADE', 'CASCADE');\n }", "public function __construct()\n {\n $this->relationships = array();\n }", "public function buildRelations()\n {\n $this->addRelation('Users', 'Users', RelationMap::ONE_TO_MANY, array('r_user_type_id' => 'r_user_type_id', ), null, null, 'Userss');\n }", "public function push()\n {\n if (!$this->save()) {\n return false;\n }\n\n // To sync all of the relationships to the database, we will simply spin through\n // the relationships and save each model via this \"push\" method, which allows\n // us to recurse into all of these nested relations for the model instance.\n foreach ($this->relations as $models) {\n $models = $models instanceof self ? [$models] : $models;\n\n foreach ($models as $model) {\n if (!$model->push()) {\n return false;\n }\n }\n }\n\n return true;\n }", "public function with($relations)\n {\n }", "public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Biblio', '\\\\Slims\\\\Models\\\\Bibliography\\\\Biblio\\\\Biblio', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':biblio_id',\n 1 => ':biblio_id',\n ),\n), null, null, null, false);\n $this->addRelation('User', '\\\\Slims\\\\Models\\\\System\\\\User\\\\User', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':uid',\n 1 => ':user_id',\n ),\n), null, null, null, false);\n $this->addRelation('Colltype', '\\\\Slims\\\\Models\\\\Masterfile\\\\Colltype\\\\Colltype', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':coll_type_id',\n 1 => ':coll_type_id',\n ),\n), null, null, null, false);\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', null);\n\t\t$this->addRelation('OOBookingType', 'OOBookingType', RelationMap::MANY_TO_ONE, array('oobookingtype_id' => 'id', ), null, null);\n\t\t$this->addRelation('OOEntry', 'OOEntry', RelationMap::ONE_TO_MANY, array('id' => 'oobooking_id', ), 'CASCADE', null, 'OOEntrys');\n\t\t$this->addRelation('OORequest', 'OORequest', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);\n\t}", "private function addRelation(Stack $stack, $from, $relation, $to)\n {\n $stack->push('MATCH (a:test {roId: \"'.$from.'\"}) MATCH (b:test {roId: \"'.$to.'\"}) MERGE (a)-[:'.$relation.']->(b)', [\n 'from' => $from,\n 'to' => $to,\n 'relation' => $relation\n ]);\n return $stack;\n }", "protected static function _addManyToManyRelation(array $params)\n {\n $name = $params['foreignClass'] . 's';\n\n $params['type'] = self::MANY_TO_MANY;\n\n static::$_relations[$name] = $params;\n }", "public function initialize()\n {\n $this->hasMany('idmov', 'App\\Models\\MovEstoque', 'movimentacao_manual_estoque_idmov', array('alias' => 'MovEstoque'));\n $this->hasMany('idmov', 'App\\Models\\MovimentacaoManualEstoqueItem', 'idmov', array('alias' => 'MovimentacaoManualEstoqueItem'));\n $this->belongsTo('cd_ordem_servico_reparo', 'App\\Models\\OrdemServicoReparo', 'cd_ordem_servico', array('alias' => 'OrdemServicoReparo'));\n $this->belongsTo('cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('requerente', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->belongsTo('usuario_responsavel', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n }", "public function bulkSetLink()\n {\n $this->crud->hasAccessOrFail('bulkSetLink');\n\n $entries = $this->crud->getRequest()->input('entries');\n $link = $this->crud->getRequest()->input('link');\n\n foreach ($entries as $key => $id) {\n if ($entry = $this->crud->model->find($id)) {\n $entry->links()->attach($link);\n }\n }\n\n return response()->json($entries);\n }", "public function buildRelations()\n {\n $this->addRelation('Contact', 'Contact', RelationMap::MANY_TO_ONE, array('contact_id' => 'id', ), null, null);\n $this->addRelation('State', 'State', RelationMap::MANY_TO_ONE, array('state_id' => 'id', ), null, null);\n $this->addRelation('School', 'School', RelationMap::ONE_TO_MANY, array('id' => 'sponsor_id', ), null, null, 'Schools');\n }", "public function addRelation(RelationInterface $relation);" ]
[ "0.78235674", "0.61321104", "0.5996231", "0.5796973", "0.56827164", "0.561693", "0.5600107", "0.5600107", "0.5552956", "0.5548483", "0.5547372", "0.54890287", "0.54645425", "0.54370624", "0.5421416", "0.5417474", "0.5415624", "0.5392998", "0.538638", "0.5368264", "0.5350012", "0.53496957", "0.52551264", "0.5244523", "0.52275133", "0.51808494", "0.5174582", "0.51705265", "0.5168255", "0.5167523", "0.5167523", "0.5167523", "0.5167523", "0.5167523", "0.5167523", "0.5167523", "0.5167523", "0.5167523", "0.5159229", "0.5159065", "0.5148046", "0.51443183", "0.51342624", "0.5117663", "0.5101674", "0.5089915", "0.50878644", "0.50769025", "0.50717586", "0.507164", "0.503751", "0.50301456", "0.5026155", "0.50250375", "0.50250375", "0.50250375", "0.50250375", "0.50250375", "0.50250375", "0.50250375", "0.50250375", "0.5024969", "0.50124484", "0.5011316", "0.5000932", "0.4993801", "0.49878046", "0.49844658", "0.4981641", "0.49775174", "0.49768156", "0.49683625", "0.4950141", "0.49485555", "0.49397904", "0.49333492", "0.4927586", "0.4922647", "0.49210697", "0.49145952", "0.49033308", "0.48959452", "0.48936898", "0.4892179", "0.489035", "0.4877583", "0.4874576", "0.4862483", "0.4853768", "0.48506865", "0.48469487", "0.48205283", "0.48183027", "0.48156866", "0.48115173", "0.4807977", "0.48021334", "0.4796277", "0.4795723", "0.47918534" ]
0.49826172
68
Process a model relation attaching to its model additional attributes.
protected function processModelRelation(Model $model) { $modelResourceClass = $this->getModelResource($model); /** @var \SkoreLabs\JsonApi\Http\Resources\JsonApiResource $modelResource */ $modelResource = new $modelResourceClass($model, $this->authorise); $modelIdentifier = $modelResource->getResourceIdentifier(); if (! empty(Arr::get($modelIdentifier, $model->getKeyName(), null))) { $this->addIncluded($modelResource); return $modelIdentifier; } return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }", "public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }", "public function buildRelation()\n {\n $this->buildForeignRelation($this->getRelationName());\n $this->buildLocalRelation('Record');\n }", "public function attachRelationship(Request $request, object $model, string $fieldName): bool;", "protected function attachRelations(Model $model)\n {\n $relations = array_filter($model->getRelations(), static function ($value, $key) {\n return $key !== 'pivot' ?: (bool) $value === false;\n }, ARRAY_FILTER_USE_BOTH);\n\n foreach ($relations as $relation => $relationObj) {\n if (config('json-api.normalize_relations', false)) {\n $relation = Str::snake($relation);\n }\n\n if ($relationObj instanceof DatabaseCollection) {\n /** @var \\Illuminate\\Database\\Eloquent\\Model $relationModel */\n foreach ($relationObj->all() as $relationModel) {\n $this->relationships[$relation]['data'][] = $this->processModelRelation(\n $relationModel\n );\n }\n }\n\n if ($relationObj instanceof Model) {\n $this->relationships[$relation]['data'] = $this->processModelRelation(\n $relationObj\n );\n }\n }\n }", "public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }", "protected function mergeTranslationsWithAttributes()\n\t{\n\t\t$this->attributes = array_merge($this->attributes, $this->translatedAttributes);\n\t}", "public function onRelationManageAdd()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n\n /*\n * Add\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n /*\n * Remove existing relations from the array\n */\n $existingIds = $this->findExistingRelationIds($checkedIds);\n $checkedIds = array_diff($checkedIds, $existingIds);\n $foreignKeyName = $this->relationModel->getKeyName();\n\n $models = $this->relationModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->add($model, $sessionKey);\n }\n }\n\n }\n /*\n * Link\n */\n elseif ($this->viewMode == 'single') {\n if ($recordId && ($model = $this->relationModel->find($recordId))) {\n\n $this->relationObject->add($model, $sessionKey);\n $this->viewWidget->setFormValues($model->attributes);\n\n /*\n * Belongs to relations won't save when using add() so\n * it should occur if the conditions are right.\n */\n if (!$this->deferredBinding && $this->relationType == 'belongsTo') {\n $parentModel = $this->relationObject->getParent();\n if ($parentModel->exists) {\n $parentModel->save();\n }\n }\n\n }\n }\n\n return $this->relationRefresh();\n }", "public function onConstruct()\n {\n $this->useDynamicUpdate(true); // set for all, without this phalcon sometimes will re-select from database and overwrite your changes if you call save() more than 1 time\n $this->keepSnapshots(true);\n $modelRelationAlias = $this->getModelsManager()->getRelations(get_called_class());\n foreach ($modelRelationAlias as $alias)\n {\n $this->modelRelations[$alias->getType()][] = $alias->getOption('alias');\n }\n }", "public function processRelation(\\Magento\\Framework\\Model\\AbstractModel $orderAddress)\n {\n if ($orderAddress instanceof OrderAddressInterface) {\n /** @var $orderAddressModel \\Magento\\CustomerCustomAttributes\\Model\\Sales\\Order\\Address */\n $orderAddressModel = $this->orderAddressFactory->create();\n $orderAddressModel->saveAttributeData($orderAddress);\n }\n }", "public function buildRelations()\n {\n $this->addRelation('EmailManagerTrace', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerTrace', RelationMap::MANY_TO_ONE, array('trace_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('EmailManagerHistoryEmail', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerHistoryEmail', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', 'RESTRICT', 'EmailManagerHistoryEmails');\n }", "function _save_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Check if relation already exists\r\n\t\t\t$query = $this->db->get_where($relationship_table, $data, NULL, NULL);\r\n\r\n\t\t\tif ($query->num_rows() == 0)\r\n\t\t\t{\r\n\t\t\t\t// If this object has a \"has many\" relationship with the other object\r\n\t\t\t\tif (in_array($object->model, $this->has_many))\r\n\t\t\t\t{\r\n\t\t\t\t\t// If the other object has a \"has one\" relationship with this object\r\n\t\t\t\t\tif (in_array($this->model, $object->has_one))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($object->model . '_id' => $object->id), 1, 0);\r\n\r\n\t\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t\t$this->db->where($object->model . '_id', $object->id);\r\n\t\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (in_array($this->model, $object->has_many))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// We can add the relation since this specific relation doesn't exist, and a \"has many\" to \"has many\" relationship exists between the objects\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If this object has a \"has one\" relationship with the other object\r\n\t\t\t\telse if (in_array($object->model, $this->has_one))\r\n\t\t\t\t{\r\n\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($this->model . '_id' => $this->id), 1, 0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t$this->db->where($this->model . '_id', $this->id);\r\n\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Relationship already exists\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "public function addRelations(One_Model $model, One_Relation_Adapter $link)\n\t{\n\t\treturn null;\n\t}", "public static function extraRelationships(){\n // NOTE: you may need to adjust the relation name and the related\n\t\t// class name for the relations automatically generated below.\n\t\t return array(\n 'author' => array(self::BELONGS_TO, 'User', 'object_author'),\n 'language' => array(self::BELONGS_TO, 'Language', 'lang'),\n \n ); \n }", "public function buildRelations()\n {\n $this->addRelation('ArtRequest', 'ArtRequestORM\\\\ArtRequest', RelationMap::ONE_TO_MANY, array('event_id' => 'event_id', ), 'CASCADE', 'CASCADE', 'ArtRequests');\n }", "private function handleRelationshipLinking($model,$data,$relationshipName,$relMeta,$field){\n if($data=='')\n $data=null;\n\n if($relMeta['type']=='belongsTo'){\n $foreignKey=$relMeta['foreignKey'];\n $ownerKey=$relMeta['ownerKey'];\n if(is_array($data)&&array_key_exists($ownerKey,$data)){\n $model->$foreignKey=$data[$ownerKey];\n }elseif (is_object($data)&&$data->$ownerKey!=''){\n $model->$foreignKey=$data->$ownerKey;\n }else{\n $model->$foreignKey=$data;\n }\n }elseif ($relMeta['type']=='belongsToMany'){\n $relatedKey=$relMeta['relatedKey'];\n if($data instanceof Collection){\n $data=$data->toArray();\n }elseif(is_object($data)){\n $data=(array)$data;\n }\n if(!$data||!is_array($data)||sizeof($data)==0){\n $model->$relationshipName()->detach();\n }elseif (is_array(reset($data))&&array_key_exists($relatedKey,reset($data))){\n $sync=[];\n\n foreach ($data as $entry){\n $pivot=$this->getPivot($entry,$relMeta);\n $sync[$entry[$relatedKey]]=$pivot;\n }\n if(sizeof($sync)>0)\n $model->$relationshipName()->sync($sync);\n }else{\n $model->$relationshipName()->sync($data);\n }\n }\n }", "public function addOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->linkModelWithOwner($attributeName, $this->owner->{$attributeName});\n }\n }", "protected function _preSaveRelatedRecords(AdapterInterface $connection, $related) {}", "protected static function _relations() {\n\n\t}", "public function buildRelations()\n {\n $this->addRelation('Attribute', '\\\\Thelia\\\\Model\\\\Attribute', RelationMap::MANY_TO_ONE, array('attribute_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Feature', '\\\\Thelia\\\\Model\\\\Feature', RelationMap::MANY_TO_ONE, array('feature_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('ChoiceFilterOther', '\\\\ChoiceFilter\\\\Model\\\\ChoiceFilterOther', RelationMap::MANY_TO_ONE, array('other_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Category', '\\\\Thelia\\\\Model\\\\Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Template', '\\\\Thelia\\\\Model\\\\Template', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', 'RESTRICT');\n }", "function _processModel(&$subject) {\n\t\t$this->_addFixture($subject->name);\n\t\t$associated = $subject->getAssociated();\n\t\tforeach ($associated as $alias => $type) {\n\t\t\t$className = $subject->{$alias}->name;\n\t\t\tif (!isset($this->_fixtures[$className])) {\n\t\t\t\t$this->_processModel($subject->{$alias});\n\t\t\t}\n\t\t\tif ($type == 'hasAndBelongsToMany') {\n\t\t\t\t$joinModel = Inflector::classify($subject->hasAndBelongsToMany[$alias]['joinTable']);\n\t\t\t\tif (!isset($this->_fixtures[$joinModel])) {\n\t\t\t\t\t$this->_processModel($subject->{$joinModel});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function normalizeRelationsData()\n {\n if (is_null($this->data['relationships'])) {\n $this->data['relationships'] = [];\n }\n\n foreach ([ 'normal', 'reverse', 'image', 'file', 'checkbox', 'category' ] as $key) {\n\n if ( ! array_key_exists($key, $this->data['relationships'])\n || ! is_array($this->data['relationships'][ $key ])\n ) {\n $this->data->relationships[ $key ] = [];\n }\n }\n\n return $this;\n }", "public function addRelation(RelationInterface $relation);", "public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n $this->addRelation('Label', '\\\\MediaProperty\\\\Label', RelationMap::MANY_TO_ONE, array('label_id' => 'id', ), null, null);\n $this->addRelation('Album', '\\\\MediaItem\\\\Album', RelationMap::ONE_TO_MANY, array('id' => 'artist_id', ), null, null, 'Albums');\n }", "public function beforeInsert(&$args) {\n $model = $args[0];\n $data = &$args[1];\n foreach ($this->_relationConfig as $foreignModel => $modelRelationConfig) {\n $foreignKey = $modelRelationConfig[self::FOREIGN_KEY_COLUMN_KEY];\n // only act if the foreign key column is filled\n if (!empty($data[$foreignKey])) {\n $maxWeight = $this->findHighestWeight($model, $data[$foreignKey], $modelRelationConfig);\n $data[$modelRelationConfig[self::WEIGHT_COLUMN_KEY]] = ($maxWeight+1);\n }\n }\n }", "protected function addActionsForRelatedEntities()\n {\n if (! $this->mapper) {\n return;\n }\n\n foreach ($this->mapper->getRelations() as $name) {\n $this->mapper->getRelation($name)->addActions($this);\n }\n }", "private function createRelation()\n {\n $this->createBuilder();\n }", "public function buildRelations()\n {\n $this->addRelation('Photo', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\Photo', RelationMap::MANY_TO_ONE, array('photo_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('UserRate', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\UserRate', RelationMap::ONE_TO_MANY, array('photo_id' => 'photo_id', ), 'CASCADE', 'CASCADE', 'UserRates');\n $this->addRelation('User', 'wiosloCMS\\\\UserBundle\\\\Model\\\\User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Users');\n }", "function addRelation($request) {\r\n\t\t$sourceModule = $request->getModule();\r\n\t\t$sourceRecordId = $request->get('src_record');\r\n\r\n\t\t$relatedModule = $request->get('related_module');\r\n\t\t$relatedRecordIdList = $request->get('related_record_list');\r\n\r\n\t\t$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule);\r\n\t\t$relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModule);\r\n\t\t$relationModel = Vtiger_Relation_Model::getInstance($sourceModuleModel, $relatedModuleModel);\r\n\t\tforeach($relatedRecordIdList as $relatedRecordId) {\r\n\t\t\t$relationModel->addRelation($sourceRecordId,$relatedRecordId,$listPrice);\r\n\t\t\tif($relatedModule == 'PriceBooks'){\r\n\t\t\t\t$recordModel = Vtiger_Record_Model::getInstanceById($relatedRecordId);\r\n\t\t\t\tif ($sourceRecordId && ($sourceModule === 'Products' || $sourceModule === 'Services')) {\r\n\t\t\t\t\t$parentRecordModel = Vtiger_Record_Model::getInstanceById($sourceRecordId, $sourceModule);\r\n\t\t\t\t\t$recordModel->updateListPrice($sourceRecordId, $parentRecordModel->get('unit_price'));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function addRelation(\\RubenSteeb\\TestModelRelations\\Domain\\Model\\RelationClass $relation)\n\t{\n\t\t$this->relations->attach($relation);\n\t}", "protected function addProcessedRelation($key, $value, $type = RelationTypes::PRODUCT_RELATION)\n {\n $this->getSubject()->addProcessedRelation($key, $value, $type);\n }", "public function buildRelations()\n {\n $this->addRelation('Alert', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'Alerts');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('AdsTags', 'AdsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'AdsTagss');\n $this->addRelation('Content', 'Content', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Contents');\n $this->addRelation('Ad', 'Ad', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Ads');\n }", "public function attach(string $relation, Model $model, array $pivotData = [])\n {\n return $this->getDaoRepository()->attach($this, $relation, $model, $pivotData);\n }", "public function populateRelated(&$item)\n {\n /*\n if($item->animalsid) {\n $item->animals = $this->getRelatedAdminModel('Animal')->getItem($item->animalsid);\n }\n\n if($item->clinicsid) {\n $item->clinics = $this->getRelatedAdminModel('Clinic')->getItem($item->clinicsid);\n }\n\n if($item->id) {\n $item->containerslist = $this->getRelatedAdminModel('containerslist')->getContainersInRequest($item->id);\n $item->examslist = $this->getRelatedAdminModel('examslist')->getExamsInRequestByCategory($item->id);\n $item->totalexams = count($this->getRelatedAdminModel('examslist')->getExamsInRequest($item->id));\n }\n */\n }", "protected function addRelation($field)\n {\n $this->owner->relationsKeeper->addRelation($field);\n }", "public function attach(Collection|Model $model, $collection = null, $attributes = []): void\n {\n if ($model instanceof Collection) {\n $model->each(fn (Model $m) => $this->attach($m, $collection, $attributes));\n\n return;\n }\n\n $this->file_attachments()\n ->create(array_merge($attributes, [\n 'model_type' => get_class($model),\n 'model_id' => $model->getKey(),\n 'collection' => $collection,\n ]));\n }", "public function buildRelations()\n {\n $this->addRelation('Country', 'Slashworks\\\\AppBundle\\\\Model\\\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), null, 'CASCADE');\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'SET NULL', 'CASCADE', 'RemoteApps');\n $this->addRelation('UserCustomerRelation', 'Slashworks\\\\AppBundle\\\\Model\\\\UserCustomerRelation', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'CASCADE', 'UserCustomerRelations');\n }", "public function buildRelations()\n {\n $this->addRelation('Website', '\\\\CE\\\\Model\\\\Website', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('WebsiteRouting', '\\\\CE\\\\Model\\\\WebsiteRouting', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_routing_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n }", "private function populateTranslations()\n {\n //translations\n $aRelated = $this->owner->getRelatedRecords();\n if (isset($aRelated[$this->relation]) && $aRelated[$this->relation] != null) {\n if (is_array($aRelated[$this->relation])) {\n foreach ($aRelated[$this->relation] as $model) {\n $this->_models[$model->getAttribute($this->languageField)] = $model;\n }\n } else {\n $model = $aRelated[$this->relation];\n $this->_models[$model->getAttribute($this->languageField)] = $model;\n }\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('idbanco' => 'idbanco', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n {\n $this->addRelation('Users', 'Users', RelationMap::ONE_TO_MANY, array('r_user_type_id' => 'r_user_type_id', ), null, null, 'Userss');\n }", "function addRelation($request) {\n\t\t$sourceModule = $request->getModule();\n\t\t$sourceRecordId = $request->get('src_record');\n\n\t\t$relatedModule = $request->get('related_module');\n\t\tif(is_numeric($relatedModule)){\n\t\t\t$relatedModule = Vtiger_Functions::getModuleName($relatedModule);\n\t\t}\n\t\t$relatedRecordIdList = $request->get('related_record_list');\n\t\t$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule);\n\t\t$relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModule);\n\t\t$relationModel = Vtiger_Relation_Model::getInstance($sourceModuleModel, $relatedModuleModel);\n\t\tforeach($relatedRecordIdList as $relatedRecordId) {\n\t\t\t$relationModel->addRelation($sourceRecordId,$relatedRecordId,$listPrice);\n\t\t\tif($relatedModule == 'PriceBooks'){\n\t\t\t\t$recordModel = Vtiger_Record_Model::getInstanceById($relatedRecordId);\n\t\t\t\tif ($sourceRecordId && ($sourceModule === 'Products' || $sourceModule === 'Services')) {\n\t\t\t\t\t$parentRecordModel = Vtiger_Record_Model::getInstanceById($sourceRecordId, $sourceModule);\n\t\t\t\t\t$recordModel->updateListPrice($sourceRecordId, $parentRecordModel->get('unit_price'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$response = new Vtiger_Response();\n\t\t$response->setResult(true);\n\t\t$response->emit();\n\t}", "public function unpackAdditionalAttributes(&$data, $mergeInstructions)\n {\n MonsterVariable::processEntityVariables($this);\n if (isset($data['comment'])) {\n $this->processComments($data['comment']);\n }\n }", "public function addProcessedRelation($definition)\n\t{\n\t\tif (!is_array($definition)) {\n\t\t\t$definition=array($definition=>array());\n\t\t}\n\t\t$definition=self::normalizeRelatedArray($definition);\n\t\t$this->_processedRelations=CMap::mergeArray($this->_processedRelations,$definition);\n\n\t\treturn $this;\n\t}", "public function setManyManyAttributes($relationName,$relatedObject,$attributes)\n\t{\n\t\t$objHash=spl_object_hash($relatedObject);\n\t\tif(!isset($this->relationAttributes[$relationName][$objHash]))\n\t\t\t$this->initManyManyAttributes($relationName,$relatedObject);\n\n\t\t$merged=array_merge($this->relationAttributes[$relationName][$objHash],$attributes);\n\t\t$this->relationAttributes[$relationName][$objHash]=$merged;\n\t}", "protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }", "public function buildRelations()\n {\n $this->addRelation(\n 'Group',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Group',\n RelationMap::MANY_TO_ONE,\n array('group_id' => 'id',),\n null,\n null\n );\n $this->addRelation(\n 'Batch',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Batch',\n RelationMap::MANY_TO_ONE,\n array('batch_id' => 'id',),\n null,\n null\n );\n }", "public function buildRelations()\n {\n $this->addRelation('Marca', 'Marca', RelationMap::MANY_TO_ONE, array('idmarca' => 'idmarca', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedor', 'Proveedor', RelationMap::MANY_TO_ONE, array('idproveedor' => 'idproveedor', ), 'CASCADE', 'CASCADE');\n }", "public function embedsOneThis(?EmbeddableMongoModel $model, string $relation): self\n {\n // If no model given, dissociate actual one.\n if (!$model) {\n $this->{$relation}()->dissociate();\n return $this->persist();\n }\n\n // If model exists delete it first and replace it by a now one not yet persisted.\n // It avoids data duplication.\n // This should not happen if we respect the embeddable convention but we could forget it 🤷‍♂️\n if ($model->exists):\n $class = get_class(tap($model)->delete());\n $model = (new $class)->fill($model->toArray());\n endif;\n\n // Associate model.\n $this->{$relation}()->associate($model);\n return $this->persist();\n }", "public function buildRelations()\n {\n $this->addRelation('Denomination', 'Denomination\\\\Denomination', RelationMap::MANY_TO_ONE, array('denomination_id' => 'id', ), null, null);\n $this->addRelation('ProfessionalCategory', 'ProfessionalCategory\\\\ProfessionalCategory', RelationMap::MANY_TO_ONE, array('professional_category_id' => 'id', ), null, null);\n $this->addRelation('Country', 'Country\\\\Country', RelationMap::MANY_TO_ONE, array('country_of_birth_id' => 'id', ), null, null);\n $this->addRelation('Migration', 'Migration\\\\Migration', RelationMap::ONE_TO_MANY, array('id' => 'person_id', ), null, null, 'Migrations');\n }", "public function addRelationHook($callback): void\n {\n $this->relationHooks[] = $callback;\n }", "public function addRelatedModel($relationshipName) {\n\t\t$model = $this->model;\n\t\t$relationship = $model::metaGetRelationship($relationshipName);\n\n\t\t// Related model\n\t\t$relatedModel = $relationship[\"model\"];\n\n\t\t// Adding related model to related model list\n\t\t$this->relatedModels[] = $relatedModel;\n\t\t\n\t\t// Adding related model table to related table list\n\t\t$this->relatedTables[] = $relatedModel::getTableName();\n\t\t\n\t\t// Adding relationship $relationshipName of $relatedModel\n\t\t// to the relationship list\n\t\t$this->relationships[$relationshipName] = [\n\t\t\t\"model\" => $relatedModel,\n\t\t\t\"table\" => $relatedModel::getTableName(),\n\t\t\t\"name\" => $relationshipName,\n\t\t\t\"attributes\" => $relationship\n\t\t];\n\n\t\t$this->relationships[$relationshipName][\"attributes\"][\"table\"] = $relatedModel::getTableName();\n\t}", "public function relationsToArray()\n {\n $attributes = [];\n\n foreach ($this->getArrayableRelations() as $key => $value) {\n // If the values use the Arrayable trait we can just call this\n // toArray method on the instances which will convert both models and\n // collections to their proper array form and we'll set the values.\n if (array_key_exists('Habil\\Bcoin\\Arrayable', class_uses($value))) {\n $relation = $value->toArray();\n }\n\n // If the value is null, we'll still go ahead and set it in this list of\n // attributes since null is used to represent empty relationships if\n // if it a has one or belongs to type relationships on the models.\n elseif (is_null($value)) {\n $relation = $value;\n }\n\n // we will snake case this key so that the relation attribute is snake cased in this returned\n // array to the developers, making this consistent with attributes.\n $key = Str::snake($key);\n\n // If the relation value has been set, we will set it on this attributes\n // list for returning. If it was not arrayable or null, we'll not set\n // the value on the array because it is some type of invalid value.\n if (isset($relation) || is_null($value)) {\n $attributes[$key] = $relation;\n }\n\n unset($relation);\n }\n\n return $attributes;\n }", "public function attach($owner)\n\t{\n\t\tparent::attach($owner);\n\n\t\t$metadata = $this->owner->getMetadata();\n\n\t\t// Add many-many relation\n\t\t$metadata->addRelation($this->xrefRelationName, array(\n\t\t\tCActiveRecord::MANY_MANY,\n\t\t\t$this->xrefClass,\n\t\t\t$this->modelClass.'('.$this->ownerFkName.','.$this->indexFkName.')',\n\t\t));\n\t}", "protected function _postSaveRelatedRecords(AdapterInterface $connection, $related) {}", "public function onRelationManageCreate()\n {\n $this->forceManageMode = 'form';\n $this->beforeAjax();\n $saveData = $this->manageWidget->getSaveData();\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey(true) : null;\n\n if ($this->viewMode == 'multi') {\n $newModel = $this->relationModel;\n\n /*\n * In special cases, has one/many will require a foreign key set\n * to pass any constraints imposed by the database. This emulates\n * the \"create\" method on the relation object.\n */\n if (in_array($this->relationType, ['hasOne', 'hasMany'])) {\n $newModel->setAttribute(\n $this->relationObject->getForeignKeyName(),\n $this->relationObject->getParentKey()\n );\n }\n\n $modelsToSave = $this->prepareModelsToSave($newModel, $saveData);\n foreach ($modelsToSave as $modelToSave) {\n $modelToSave->save(null, $this->manageWidget->getSessionKey());\n }\n\n $this->relationObject->add($newModel, $sessionKey);\n }\n elseif ($this->viewMode == 'single') {\n $newModel = $this->viewModel;\n $this->viewWidget->setFormValues($saveData);\n\n /*\n * Has one relations will save as part of the add() call.\n */\n if ($this->deferredBinding || $this->relationType != 'hasOne') {\n $newModel->save(null, $this->manageWidget->getSessionKey());\n }\n\n $this->relationObject->add($newModel, $sessionKey);\n\n /*\n * Belongs to relations won't save when using add() so\n * it should occur if the conditions are right.\n */\n if (!$this->deferredBinding && $this->relationType == 'belongsTo') {\n $parentModel = $this->relationObject->getParent();\n if ($parentModel->exists) {\n $parentModel->save();\n }\n }\n }\n\n return $this->relationRefresh();\n }", "public function addRelation($data)\n {\n if ($data instanceof Relation) {\n $relation = $data;\n $relation->setEntity($this);\n $this->relations[] = $relation;\n\n if (!in_array($relation->getForeignEntityName(), $this->foreignEntityNames)) {\n $this->foreignEntityNames[] = $relation->getForeignEntityName();\n }\n\n return $relation;\n }\n\n $relation = new Relation();\n $relation->setEntity($this);\n $relation->loadMapping($data);\n\n return $this->addRelation($relation);\n }", "private function attachPhotoableModel($relationship, $object, $attributes = [])\n {\n $this->$relationship()->attach(\n $object,\n $attributes\n );\n\n return $this;\n }", "public function afterSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE\n ) {\n // If set delete option.\n if (array_key_exists('delete', $rel) && $rel['delete'] === true) {\n // Find all related models with null ID link.\n $deleteModels = call_user_func($this->_settings[$rel['name']][1] . '::model')->findAllByAttributes(array($this->_settings[$rel['name']][2] => null));\n foreach ($deleteModels as $m) {\n $m->delete();\n }\n }\n }\n }\n }", "public function export_addFilesFromRelations() {}", "abstract protected function getModelAttributes();", "public function buildRelations()\n\t{\n\t\t$this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', null);\n\t\t$this->addRelation('OOBookingType', 'OOBookingType', RelationMap::MANY_TO_ONE, array('oobookingtype_id' => 'id', ), null, null);\n\t\t$this->addRelation('OOEntry', 'OOEntry', RelationMap::ONE_TO_MANY, array('id' => 'oobooking_id', ), 'CASCADE', null, 'OOEntrys');\n\t\t$this->addRelation('OORequest', 'OORequest', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);\n\t}", "private function prepRelations() : self\n {\n\n // Lvd.\n $maxRId = 0;\n $relationships = [];\n\n // Add Sheets.\n foreach ($this->xlsx->getBook()->getSheets() as $sheet) {\n\n $relationships[] = [\n '@Id' => 'rId' . $sheet->getId(),\n '@Type' => $this->types['sheet'],\n '@Target' => 'worksheets/sheet' . $sheet->getId() . '.xml',\n ];\n\n // Count max ID.\n $maxRId = max($maxRId, $sheet->getId());\n }\n\n // Add the rest of relationships.\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['styles'],\n '@Target' => 'styles.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['theme'],\n '@Target' => 'theme/theme1.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['sharedStrings'],\n '@Target' => 'sharedStrings.xml',\n ];\n\n // Save.\n $this->array['Relationships']['@@']['Relationship'] = $relationships;\n\n return $this;\n }", "private function addPolymorphicToRelation()\n {\n $path = app_path(\"{$this->polymorphicName}.php\");\n\n File::append($path,\n $this->replacePolymorphicRelationNames()\n );\n }", "public function afterFind()\r\n {\r\n parent::afterFind();\r\n foreach ($this->getRelatedRecords() as $relation) {\r\n if (is_array($relation)) {\r\n foreach ($relation as $record) {\r\n $record->afterFind();\r\n }\r\n } else {\r\n $relation->afterFind();\r\n }\r\n }\r\n }", "private function set_relation_joins() {\n if(!$this->use_relations) return;\n $relations = [];\n foreach ($this->colmodel as $i => $col) {\n if (!isset($col['relation']))\n continue;\n foreach (explode('>', $col['relation']) as $relation) {\n if (!str_contains($relation, '.'))\n continue;\n list($model_name, $relation_name) = explode('.', $relation);\n if ($relation_name != '' && !in_array($relation, $relations)) {\n $this->set_relation_join($model_name, $relation_name);\n $relations[] = $relation;\n }\n }\n }\n }", "private function addThroughRelation(string $stub = 'has-one-through')\n {\n $path = app_path(\"{$this->farParent}.php\");\n\n File::append($path,\n $this->replaceThroughRelationNames($stub)\n );\n }", "public function buildRelations()\n\t{\n $this->addRelation('Aviso', 'Aviso', RelationMap::MANY_TO_ONE, array('aviso_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n\t}", "public function saveRelations(One_Model $model, One_Relation_Adapter $link)\n\t{\n\t\treturn null;\n\t}", "public function afterSave()\n {\n if ($this->post === null) {\n return;\n }\n $relation = $this->owner->getRelation($this->attribute);\n /** @var ActiveQuery $via */\n $via = is_array($relation->via) ? $relation->via[1] : $relation->via;\n /** @var \\yii\\db\\ActiveRecord $viaClass */\n $viaTable = explode(' ', reset($via->from))[0];\n $link = $relation->link;\n $condition = [];\n foreach ($via->link as $viaAttribute => $ownerAttribute) {\n $condition[$viaAttribute] = $this->owner->$ownerAttribute;\n }\n $newIds = array_unique(array_filter($this->post, function($v){return !empty($v);}));\n $oldIds = $relation->select(array_keys($link))->column();\n \\Yii::$app->db->createCommand()->delete($viaTable,\n array_merge($condition, [reset($link) => array_diff($oldIds, $newIds)])\n )->execute();\n \\Yii::$app->db->createCommand()->batchInsert($viaTable, array_keys($condition)+$link, array_map(function ($id) use ($condition) {\n return array_merge($condition, [$id]);\n }, array_diff($newIds, $oldIds)))->execute();\n if ($this->callback) {\n call_user_func($this->callback, array_diff($newIds, $oldIds), array_diff($oldIds, $newIds));\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Contact', 'Contact', RelationMap::MANY_TO_ONE, array('contact_id' => 'id', ), null, null);\n $this->addRelation('State', 'State', RelationMap::MANY_TO_ONE, array('state_id' => 'id', ), null, null);\n $this->addRelation('School', 'School', RelationMap::ONE_TO_MANY, array('id' => 'sponsor_id', ), null, null, 'Schools');\n }", "public function buildRelations()\n {\n $this->addRelation('UnitUsaha', 'DataDikdas\\\\Model\\\\UnitUsaha', RelationMap::MANY_TO_ONE, array('unit_usaha_id' => 'unit_usaha_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('Mou', 'DataDikdas\\\\Model\\\\Mou', RelationMap::MANY_TO_ONE, array('mou_id' => 'mou_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('SumberDana', 'DataDikdas\\\\Model\\\\SumberDana', RelationMap::MANY_TO_ONE, array('sumber_dana_id' => 'sumber_dana_id', ), 'RESTRICT', 'RESTRICT');\n }", "private function addJoinsFromRelatedModel($relationship)\n {\n /** @var Loupe $model */\n foreach ($this->relationships as $model) {\n if (method_exists($model, $relationship)) {\n $model->$relationship();\n $statement = $this->getStatement();\n\n foreach ($model->getStatement()->getJoins() as $join) {\n $statement->setJoinString($join);\n }\n }\n }\n }", "public function associate($entity)\n {\n // The Mapper will retrieve this association within the object model, we won't be using\n // the foreign key attribute inside the parent Entity.\n //\n //$this->parent->setEntityAttribute($this->foreignKey, $entity->getEntityAttribute($this->otherKey));\n //\n // Instead, we'll just add the object to the Entity's attribute\n\n $this->parent->setEntityAttribute($this->relation, $entity->getEntityObject());\n }", "public function beforeValidate()\n {\n /** @var BaseActiveRecord $model */\n $model = $this->owner;\n foreach ($this->attributes as $attribute => $attributeConfig) {\n if ($this->hasScenario($attributeConfig)) {\n $file = $this->getAttributeValue($attribute);\n if (!$this->validateFile($file)) {\n $file = $this->getUploadInstance($attribute);\n }\n if (!isset($this->files[$attribute]) && $this->validateFile($file)) {\n $model->$attribute = $file;\n $this->files[$attribute] = $file;\n } else {\n if ($model->$attribute == null) {\n $nullValue = $this->getAttributeConfig($attribute, 'nullValue');\n $model->$attribute = $nullValue;\n }\n }\n }\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Biblio', '\\\\Slims\\\\Models\\\\Bibliography\\\\Biblio\\\\Biblio', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':biblio_id',\n 1 => ':biblio_id',\n ),\n), null, null, null, false);\n $this->addRelation('User', '\\\\Slims\\\\Models\\\\System\\\\User\\\\User', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':uid',\n 1 => ':user_id',\n ),\n), null, null, null, false);\n $this->addRelation('Colltype', '\\\\Slims\\\\Models\\\\Masterfile\\\\Colltype\\\\Colltype', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':coll_type_id',\n 1 => ':coll_type_id',\n ),\n), null, null, null, false);\n }", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "private function mergeExtra()\n {\n if (method_exists($this, 'extra')) {\n $this->extra = $this->extra();\n }\n }", "public function beforeUpdate(&$args) {\n $model = $args[0];\n $data = &$args[1];\n $where = $args[2];\n \n foreach ($this->_relationConfig as $foreignModel => $modelRelationConfig) {\n $foreignKey = $modelRelationConfig[self::FOREIGN_KEY_COLUMN_KEY];\n $weightColumn = $modelRelationConfig[self::WEIGHT_COLUMN_KEY];\n /**\n * Only act if the foreign key field is filled, since weight is calculated per foreign key.\n * This means duplicate weight values might occur in the database, but the foreign key \n * will always differ.\n * You should be able to add a UNIQUE INDEX to your table containing the foreign key column and the\n * weight column.\n */\n if (array_key_exists($foreignKey, $data) && $data[$foreignKey]) {\n /**\n * If the weight column is not given in the new data, fetch it. \n * This is quite the pickle, since the given WHERE clause might update (and thus fetch)\n * multiple records, but we can only provide one set of modified data to apply to every \n * matching record. \n * This is currently not fixed. If a WHERE clause is given that matches multiple records,\n * the current weight of the first record found is used.\n */\n if (!array_key_exists($weightColumn, $data)) {\n $data[$weightColumn] = $this->findCurrentWeight($model, $where, $data[$foreignKey], $modelRelationConfig);\n }\n \n // only act if the foreign key column is filled, and the weight column is null\n if (!$data[$weightColumn]) {\n $maxWeight = $this->findHighestWeight($model, $data[$foreignKey], $modelRelationConfig);\n $data[$weightColumn] = ($maxWeight+1);\n }\n }\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Contrarecibo', 'Contrarecibo', RelationMap::MANY_TO_ONE, array('idcontrarecibo' => 'idcontrarecibo', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n\t{\n $this->addRelation('Track', 'Track', RelationMap::MANY_TO_ONE, array('track_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Featurevectortype', 'Featurevectortype', RelationMap::MANY_TO_ONE, array('featurevectortype_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('File', 'File', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('DistanceRelatedByTrackAId', 'Distance', RelationMap::ONE_TO_MANY, array('track_id' => 'track_a_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('DistanceRelatedByTrackBId', 'Distance', RelationMap::ONE_TO_MANY, array('track_id' => 'track_b_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Distancejob', 'Distancejob', RelationMap::ONE_TO_MANY, array('track_id' => 'track_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Featurevectorsegment', 'Featurevectorsegment', RelationMap::ONE_TO_MANY, array('track_id' => 'track_id', ), 'RESTRICT', 'CASCADE');\n\t}", "private static function relations()\n {\n $files = ['OneToOne', 'OneToMany', 'ManyToMany', 'BelongsTo'];\n $folder = static::$root.'MVC/Relations'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyRelationException', 'ModelNotFindedException'];\n $folder = static::$root.'MVC/Relations/Exceptions'.'/';\n\n self::call($files, $folder);\n }" ]
[ "0.6068328", "0.5639036", "0.55003345", "0.5497323", "0.5476686", "0.5397924", "0.539193", "0.5349313", "0.5343175", "0.53379685", "0.5334878", "0.5310397", "0.5309512", "0.5250817", "0.52482766", "0.52315223", "0.52229154", "0.5177175", "0.51648843", "0.5162845", "0.5162481", "0.51389194", "0.51370335", "0.5134624", "0.51295084", "0.51295084", "0.51295084", "0.51295084", "0.51295084", "0.51295084", "0.51295084", "0.51295084", "0.51295084", "0.5115855", "0.51072776", "0.51021814", "0.50954026", "0.50827956", "0.5034925", "0.50301665", "0.50301665", "0.50301665", "0.50301665", "0.50301665", "0.50301665", "0.50301665", "0.50301665", "0.50187033", "0.50161797", "0.50101566", "0.4981302", "0.4957797", "0.49520767", "0.49489987", "0.49385345", "0.49364617", "0.4936163", "0.49305245", "0.4928091", "0.49216157", "0.4917575", "0.49146184", "0.4911854", "0.48848385", "0.4880721", "0.48731643", "0.48729017", "0.48561198", "0.484821", "0.4842852", "0.48304808", "0.48149827", "0.4814777", "0.48008275", "0.48006755", "0.47962", "0.479418", "0.4787386", "0.47781134", "0.4769074", "0.47649306", "0.47638544", "0.47574088", "0.47542068", "0.47473675", "0.4745304", "0.47446516", "0.47428644", "0.47410405", "0.47336757", "0.47189632", "0.47146243", "0.47069737", "0.4702508", "0.46976757", "0.4693277", "0.46858487", "0.4677565", "0.46727934", "0.4670729" ]
0.49331436
57
Set included data to resource's with.
protected function addIncluded(JsonApiResource $resource) { $includesCol = Collection::make([ $resource, array_values($this->getIncluded()), array_values($resource->getIncluded()), ])->flatten(); $includesArr = $this->checkUniqueness( $includesCol )->values()->all(); if (! empty($includesArr)) { Arr::set($this->with, $this->getIncludedConfig(), $includesArr); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIncludedMustOnlyBePresentWithData()\n {\n $doc = Document::fromMeta(['foo' => 'bar']);\n $doc->setIncluded(new ResourceObject('apples', '1'));\n }", "private function _with()\n \t{\n \t\t$this->includes = func_get_args();\n \t\treturn $this;\n \t}", "public function with($data){\n\n \t$this->data = $data;\n\n \treturn $this;\n }", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "public function testAddToIncludedShowMembers()\n {\n $this->document->addToIncluded($resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl/'), // self url\n [], // links for resource\n null, // meta\n [LinkInterface::SELF => new Link('peopleSelfUrl/')], // links for included resource\n false, // show 'relationships' in 'included'\n ['some' => 'meta'] // meta when resource within 'included'\n ), new stdClass(), false));\n\n $this->document->setResourceCompleted($resource);\n\n $expected = <<<EOL\n {\n \"data\" : null,\n \"included\" : [\n {\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"links\" : {\n \"self\" : \"peopleSelfUrl/\"\n },\n \"meta\" : {\n \"some\" : \"meta\"\n }\n }\n ]\n }\nEOL;\n $this->check($expected);\n }", "public function _with($includes) {\n\t\t$this->includes = (array) $includes;\n\n\t\treturn $this;\n\t}", "protected function _prepareFromResourceData()\n {\n if (count($this->_items) == 0) {\n $i = 0;\n $charities = array();\n \n foreach ($this->_resourceCollection as $item) {\n $item->setData('from',$this->_from);\n $item->setData('to',$this->_to);\n $charities[$item->getData('charity_id')][] = $item;\n }\n foreach($charities as $id => $charity)\n {\n $item = $this->getItemModel()->fromCharityData($charity);\n foreach($item->getData() as $idx => $value)\n {\n $this->getTotals()->setData($idx,$this->getTotals()->getData($idx) + $value);\n }\n $this->_items[] = $item;\n }\n }\n \n return $this;\n }", "public function gatherData() {\r\n\t\t$this->resource->gatherData();\r\n\t}", "public function setInclude ($include)\n {\n $this->_include = (string) $include;\n return $this;\n }", "public function using($data = [])\n {\n $this->extra = $data;\n\n return $this;\n }", "function setAllData(&$data) {\n\t\t$this->_data =& $data;\n\t}", "private function setAssetsFromData()\n {\n if (is_array($this->assetData)) {\n $assets = $this->grav['assets'];\n foreach ($this->assetData as $item) {\n $assetType = $item['type'];\n if ($assetType == 'css') {\n $assets->addCss($item['data']);\n } elseif ($assetType == 'js') {\n $assets->addJs($item['data'], $item['prio'], true, null, $item['where']);\n } elseif ($assetType == 'inlinejs') {\n $assets->addInlineJs($item['data'], $item['prio'], $item['where']);\n }\n }\n }\n }", "public function with($data)\n {\n $this->data = $data;\n return $this;\n }", "public function testAddToIncludedHideMembers()\n {\n $this->document->addToIncluded($resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl/'), // self url\n [], // links for resource\n null // meta\n ), new stdClass(), false));\n\n $this->document->setResourceCompleted($resource);\n\n $expected = <<<EOL\n {\n \"data\" : null,\n \"included\" : [\n {\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n }\n }\n ]\n }\nEOL;\n $this->check($expected);\n }", "public function setShopifyData(stdClass $data) {\n if (isset($data->{static::getResourceSingularName()})) {\n /*\n * If we received data in the form:\n * {\n * \"product\": {\n * ...\n * }\n * }\n * we'll extract the resource object (in this example, product)\n */\n $this->shopifyData = $data->{static::getResourceSingularName()};\n } else {\n // otherwise let's assume we got the resource object directly\n $this->shopifyData = $data;\n }\n $this->populateChildren();\n }", "protected function prepareData()\n {\n parent::prepareData();\n $this->prepareConfigurableProductOptions();\n $this->prepareAttributeSet();\n }", "protected function setPutData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "public function set_all_data($data)\n\t{\n\t\t$this->_data = $data;\n\t}", "public function set_resource_data($resource_id, $resource_data) {\n $sql = 'UPDATE resources\n SET internal_data = :internal_data\n WHERE id = :id';\n\n $data = [\n ':id' => $resource_id,\n ':internal_data' => serialize($resource_data),\n ];\n\n $query = $this->pdo->prepare($sql);\n $query->execute($data);\n }", "public function setInclude(array $include)\n {\n $this->include = $include;\n\n return $this;\n }", "public function extendData() {\n }", "public function setHeaders() {\r\n\t\t$this->resource->setHeaders();\r\n\t}", "public function assignData(\\Magento\\Framework\\DataObject $data)\n {\n parent::assignData($data);\n\n if (!$data instanceof \\Magento\\Framework\\DataObject) {\n $data = new \\Magento\\Framework\\DataObject($data);\n }\n\n $additionalData = $data->getAdditionalData();\n $infoInstance = $this->getInfoInstance();\n\n return $this;\n }", "public function prepareData()\r\n\t{\r\n\r\n\t\t// Get title and encode it\r\n\t\tif (empty($this->title)) {\r\n\t\t\t$this->title = urlencode(urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8')));\r\n\t\t}\r\n\r\n\t\t// Get current post permalink and encode it\r\n\t\tif (empty($this->shared_url)) {\r\n\t\t\t$this->shared_url = get_permalink(get_the_ID());\r\n\t\t}\r\n\r\n\t\t// Get excerpt and format it for Twitter\r\n\t\tif (empty($this->tweet)) {\r\n\t\t\t$tweet = (strlen(get_the_excerpt()) > 140) ? substr(get_the_excerpt(), 0, 140) . '...' : get_the_excerpt();\r\n\t\t\t$this->tweet = $tweet . ' ' . $this->shared_url;\r\n\t\t}\r\n\t}", "public function importData($data)\n\t{\n\t\tif($data instanceof stdClass){\n\t\t\t$data = Mage::helper('wmgcybersource')->stdClassToArray($data);\n\t\t}\n\t\t$data = Mage::helper('wmgcybersource')->varienObjectise($data);\n\t\t$this->setData($data);\n\t\treturn $this;\n\t}", "public function prepare()\n {\n $this->_getResource()->prepare($this);\n return $this;\n }", "private function includeWithData($path, $data) {\n\t\t$v = new View($path, $data);\n\t\t$v->render();\n\t}", "public function withData(array $data) {\n\t\t$this->data = array_merge($this->data, $data);\n\t\treturn $this;\n\t}", "protected function includeEverything($data)\n {\n if (is_null($data)) {\n\n $data = [];\n }\n\n if (!isset($data['include_body'])) {\n\n $data['include_body'] = true;\n }\n\n if (!isset($data['include_categories'])) {\n\n $data['include_categories'] = true;\n }\n\n if (!isset($data['include_tags'])) {\n\n $data['include_tags'] = true;\n }\n\n if (!isset($data['include_associations'])) {\n\n $data['include_associations'] = true;\n }\n\n if (!isset($data['include_gallery'])) {\n\n $data['include_gallery'] = true;\n }\n\n if (!isset($data['include_siblings'])) {\n\n $data['include_siblings'] = true;\n }\n\n // --------------------------------------------------------------------------\n\n return $data;\n }", "function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}", "protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }", "private function setData()\n {\n if ($this->config->has('auth.external_concrete')) {\n $data = $this->config->get('auth.external_concrete', '');\n } else {\n // legacy support\n $data = $this->config->get('auth.external_concrete5', '');\n }\n $authUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/attempt_auth']);\n $attachUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/attempt_attach']);\n $baseUrl = $this->urlResolver->resolve(['/']);\n $path = $baseUrl->getPath();\n $path->remove('index.php');\n $name = trim((string) array_get($data, 'name', t('External concrete')));\n\n $this->set('data', $data);\n $this->set('authUrl', $authUrl);\n $this->set('attachUrl', $attachUrl);\n $this->set('baseUrl', $baseUrl);\n $this->set('assetBase', $baseUrl->setPath($path));\n $this->set('name', $name);\n $this->set('user', $this->app->make(User::class));\n }", "public function setIncluded($included)\n {\n $this->excluded = ! $included;\n\n return $this;\n }", "protected function setAttributes()\n {\n if (in_array('attributes', $this->with)) {\n $this->result[$this->attribute]['attributes'] = Arr::get($this->field, 'attributes');\n }\n\n\n return $this;\n }", "public function __construct($include_Reference = null, $include_Person_Name_Data = null, $include_Person_Identification_Data = null, $include_Personal_Information_Data = null, $include_Photo_Data = null, $include_Appointment_Data = null)\n {\n $this\n ->setInclude_Reference($include_Reference)\n ->setInclude_Person_Name_Data($include_Person_Name_Data)\n ->setInclude_Person_Identification_Data($include_Person_Identification_Data)\n ->setInclude_Personal_Information_Data($include_Personal_Information_Data)\n ->setInclude_Photo_Data($include_Photo_Data)\n ->setInclude_Appointment_Data($include_Appointment_Data);\n }", "public function populate($data = array()) {\r\n $this->_id = $data['id'];\r\n $this->_artist = $data['artist'];\r\n $this->_title = $data['title'];\r\n }", "private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }", "public function setResource($resource);", "function initData() {\n\t\t$representative =& $this->getRepresentative();\n\n\t\tif ($representative) {\n\t\t\t$this->_data = array(\n\t\t\t\t'representativeId' => $representative->getId(),\n\t\t\t\t'role' => $representative->getRole(),\n\t\t\t\t'representativeIdType' => $representative->getRepresentativeIdType(),\n\t\t\t\t'representativeIdValue' => $representative->getRepresentativeIdValue(),\n\t\t\t\t'name' => $representative->getName(),\n\t\t\t\t'phone' => $representative->getPhone(),\n\t\t\t\t'fax' => $representative->getFax(),\n\t\t\t\t'email' => $representative->getEmail(),\n\t\t\t\t'url' =>$representative->getUrl(),\n\t\t\t\t'isSupplier' => $representative->getIsSupplier(),\n\t\t\t);\n\t\t}\n\t}", "public function setRequestData()\n {\n $this->setHeaderInformation();\n }", "protected function setData($data) {\n $this->data = collect($data);\n }", "private function _beforeLoad($data)\n {\n $data['update_at']= date('Y-m-d h:i:s',time());\n\n if(isset($data['authors'])) {\n $data['authors'] = implode(',', $data['authors']);\n }\n\n return $data;\n }", "public function testCanNotBeManyIncludedResourcesWithEqualIdentifiers()\n {\n $apple = new ResourceObject('apples', '1');\n $apple->setAttribute('color', 'red');\n $doc = Document::fromIdentifier($apple->toIdentifier());\n $doc->setIncluded($apple, $apple);\n $this->assertJson(json_encode($doc));\n }", "public function setDatas()\n\t{\n\t\t$this->data[\"skeleton\"] = $this->getSkeleton();\n\t\t$this->data[\"css\"] = $this->getCss();\n\t\t$this->data[\"javascript\"] = $this->getJavascript();\n\t\t$this->data[\"module\"] = $this->getModule();\n\t\t$this->data[\"site\"] = $this->getSite();\n\t\t\t\t\t\t\n\t\t$this->_nodeName = $this->getNodeName();\n\t\t$this->_value = $this->getNodeValue();\n\t}", "function prepareFields() {\r\n\t\t$data = array_keys($this->modx->getFieldMeta('msProductData'));\r\n\t\tforeach ($this->resourceArray as $k => $v) {\r\n\t\t\tif (is_array($v) && in_array($k, $data)) {\r\n\t\t\t\t$tmp = $this->resourceArray[$k];\r\n\t\t\t\t$this->resourceArray[$k] = array();\r\n\t\t\t\tforeach ($tmp as $v2) {\r\n\t\t\t\t\tif (!empty($v2)) {\r\n\t\t\t\t\t\t$this->resourceArray[$k][] = array('value' => $v2);\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\tif (empty($this->resourceArray['vendor'])) {\r\n\t\t\t$this->resourceArray['vendor'] = '';\r\n\t\t}\r\n\t}", "public function setup()\n {\n $this->addOriginToData()->addArgumentsToData();\n }", "protected function setGetData()\n\t{\n\t\t$this->request->addParams($this->query->getParams());\n\t}", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function fill($data = array(), $only = null, $include = null, $exclude = null) {\n $fillable = is_array($only) ? $only :\n is_array($include) ? array_merge($this->getFillable(), $include) :\n is_array($exclude) ? array_diff_key($this->getFillable(), array_flip($exclude)) :\n $this->getFillable();\n\n foreach ($fillable as $field => $mapping) {\n if (is_numeric($field)) $field = $mapping; // simple array item; field and mapping are the same\n\n if (array_key_exists($mapping, $data)) {\n $key = $mapping;\n $setter = 'set' . ucfirst($field);\n\n if (method_exists($this, $setter)) {\n $this->{$setter}($data[$key]);\n } else {\n throw new Exception(\"There is no setter for fillable property '{$field}'.\");\n }\n }\n }\n\n return $this;\n }", "public function setResource($resource) {\n\n $this->resource = $resource;\n }", "protected function prepareAssignCatActionData()\n {\n foreach ($this->_data as $key => $value) {\n switch ($key) {\n case 'urlPath':\n $this->_urlPath = $value;\n break;\n case 'paramName':\n $this->_paramName = $value;\n break;\n default:\n $this->_additionalData[$key] = $value;\n break;\n }\n }\n }", "public function setValues($data)\n {\n $this->name = $data['name'];\n $this->author_name = $data['author_name'];\n $this->author_surname = $data['author_surname'];\n $this->release_year = $data['release_year'];\n $this->request_date = $data['request_date'];\n $this->reserve_day = $data['reserve_day'];\n $this->return_day = $data['return_day'];\n $this->picture = $data['picture'];\n }", "protected function handleInclude(&$result, Request $request)\n\t{\n\t\tif( empty($result['data']) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// get data\n\t\t$data = $result['data'];\n\n\t\t// if data is a single object put it in array\n\t\tif( ! is_array($data) )\n\t\t{\n\t\t\t$data = [$data];\n\t\t}\n\n\t\t// take include params / comma(,) separated values turn to array\n\t\t$params = $request->input('include');\n\t\t$params = ( is_array($params) ) ? $params : explode(',', $params);\n\n\t\t$sortedParams = [];\n\n\t\t// sort include params\n\t\tforeach ($params as $param)\n\t\t{\n\t\t\t$param = trim($param);\n\t\t\t\n\t\t\t$includes = explode('.', $param);\n\n\t\t\tif( empty($includes[0]) )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( ! array_key_exists($includes[0], $sortedParams) )\n\t\t\t{\n\t\t\t\t$sortedParams[$includes[0]] = [];\n\t\t\t}\n\n\t\t\t$newInclude = '';\n\t\t\tif(count($includes) > 1)\n\t\t\t{\n\t\t\t\tfor ($i=1; $i < count($includes); $i++)\n\t\t\t\t{ \n\t\t\t\t\t$newInclude .= (empty($include))? $includes[$i] : '.' . $includes[$i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( ! empty($newInclude) )\n\t\t\t{\n\t\t\t\t$sortedParams[$includes[0]][] = $newInclude;\n\t\t\t}\n\t\t}\n\n\t\t// list of different objects and their IDs\n\t\t$toBeIncluded = [];\n\n\t\t// go through sorted params\n\t\tforeach ($sortedParams as $currentInclude => $newIncludeParams)\n\t\t{\n\n\t\t\tforeach ($data as $object)\n\t\t\t{\n\t\t\t\tif( ! is_object($object) || empty($object->{$currentInclude}) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$includeObjParams = $object->{$currentInclude};\n\n\t\t\t\tif( ! is_array($includeObjParams) )\n\t\t\t\t{\n\t\t\t\t\t$includeObjParams = [$includeObjParams];\n\t\t\t\t}\n\n\t\t\t\tforeach ($includeObjParams as $includeObj)\n\t\t\t\t{\n\t\t\t\t\tif( empty($includeObj) || ! is_object($includeObj) || empty($includeObj->id) || empty($includeObj->type) )\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\tif( ! array_key_exists($currentInclude, $toBeIncluded) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$toBeIncluded[$currentInclude] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tif( ! array_key_exists($includeObj->type, $toBeIncluded[$currentInclude]) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$toBeIncluded[$currentInclude][$includeObj->type] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$toBeIncluded[$currentInclude][$includeObj->type][] = $includeObj->id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( empty($toBeIncluded) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$included = [];\n\n\t\tforeach ($toBeIncluded as $currentInclude => $types)\n\t\t{\n\t\t\tforeach ($types as $type => $ids)\n\t\t\t{\n\t\t\t\t$resolveEndpoints = $this->getMappings($type, 'resolvers');\n\n\t\t\t\tif( empty($resolveEndpoints) )\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('No resolver registered for object type: ' . $type);\n\t\t\t\t}\n\n\t\t\t\t$endpoint = $resolveEndpoints[0];\n\n\t\t\t\t$request = new Request(\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'filter' => [ \n\t\t\t\t\t\t\t'id' => ['in'=>$ids] \n\t\t\t\t\t\t], \n\t\t\t\t\t\t'include' => $sortedParams[$currentInclude]\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$includeResult = $this->call($endpoint, $request, null, null, true);\n\n\t\t\t\tif( ! empty($includeResult['data']) && is_array($includeResult['data']) )\n\t\t\t\t{\n\t\t\t\t\t// $included = array_merge($included, $includeResult['data']);\n\t\t\t\t\t// $included = array_unique($included);\n\t\t\t\t\tforeach ($includeResult['data'] as $object)\n\t\t\t\t\t{\n\t\t\t\t\t\t$duplicates = array_filter($included, function($item) use($object){\n\t\t\t\t\t\t\tif($item->id == $object->id && $item->type == $object->type)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif(empty($duplicates))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$included[] = $object;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( ! empty($includeResult['include']) && is_array($includeResult['include']) )\n\t\t\t\t{\n\t\t\t\t\t// $included = array_merge($included, $includeResult['include']);\n\t\t\t\t\t// $included = array_unique($included);\n\t\t\t\t\tforeach ($includeResult['include'] as $object)\n\t\t\t\t\t{\n\t\t\t\t\t\t$duplicates = array_filter($included, function($item) use($object){\n\t\t\t\t\t\t\tif($item->id == $object->id && $item->type == $object->type)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif(empty($duplicates))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$included[] = $object;\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\n\t\t$result['include'] = $included;\n\t}", "public function data($data){\n $this->_options['data'] = $data;\n return $this;\n }", "protected function prepareResourceLESS($data)\n {\n $data['less'] = true;\n\n return $data;\n }", "public function assignData($data) {\n if (!($data instanceof Varien_Object)) {\n $data = new Varien_Object($data);\n }\n $this->getInfoInstance()->setAdditionalData($data->getMarketplace());\n return $this;\n }", "public function set($data);", "public function prepareBaseAssignation()\n {\n /** @var KernelInterface $kernel */\n $kernel = $this->get('kernel');\n $this->assignation = [\n 'head' => [\n 'ajax' => $this->getRequest()->isXmlHttpRequest(),\n 'devMode' => $kernel->isDebug(),\n 'maintenanceMode' => (bool) $this->getSettingsBag()->get('maintenance_mode'),\n 'universalAnalyticsId' => $this->getSettingsBag()->get('universal_analytics_id'),\n 'googleTagManagerId' => $this->getSettingsBag()->get('google_tag_manager_id'),\n 'baseUrl' => $this->getRequest()->getSchemeAndHttpHost() . $this->getRequest()->getBasePath(),\n ]\n ];\n\n return $this;\n }", "protected function buildJsonApiIncludes($resource, Request $request)\n {\n // Get the includes to use.\n $includes = has_includes($request) ? parse_includes($request) : $this->defaultIncludes;\n\n if (count($includes) < 1) {\n return new MissingValue();\n }\n\n // Call the loaders.\n $this->runLoadersIfNotRun($resource, $request);\n\n $all = collect([]);\n $includeMode = strtolower(config('garbetjie-jsonapi.include_mode'));\n\n // Call the extractors.\n foreach ($includes as $include) {\n foreach ($this->includeExtractors[$include] ?? [] as $extractor) {\n $all = $all->concat(to_collection($extractor($resource)));\n }\n }\n\n return $all\n ->filter(\n function ($item) use ($includeMode) {\n // Null value given, so just silently filter.\n if (!$item) {\n return false;\n }\n\n // The resource given is one of the expected interfaces, so return true.\n if ($item instanceof JsonApiResourceInterface || $item instanceof ConvertibleToJsonApiResourceInterface) {\n return true;\n }\n\n // If we're here, then it means an invalid resource was provided. We'll need to handle it depending\n // on the include mode configured.\n\n // Strict mode -> throw an exception.\n if ($includeMode === 'strict') {\n throw new InvalidArgumentException(\n sprintf(\n \"Encountered included resource that doesn't implement %s or %s\",\n JsonApiResourceInterface::class,\n ConvertibleToJsonApiResourceInterface::class\n )\n );\n }\n\n // Fall back to filter mode -> silently filter out the included resource.\n return false;\n }\n )\n ->map(\n function ($item) {\n /* @var JsonApiResourceInterface|ConvertibleToJsonApiResourceInterface $item */\n\n return $item instanceof ConvertibleToJsonApiResourceInterface\n ? $item->convertToJsonApiResource()\n : $item;\n }\n )\n ->unique(\n function (JsonApiResourceInterface $item) {\n return [$item->getJsonApiType(), $item->getJsonApiId()];\n }\n )\n ->map(\n function (JsonApiResourceInterface $item) {\n return new JsonApiResource($item);\n }\n )\n ->values()\n ->toArray();\n }", "private function initData()\n {\n $data = $this->cache->load($this->cacheId);\n if (false === $data) {\n /** @var Reader $reader */\n $reader = $this->readerFactory->create(\n ['fileName' => sprintf(self::SEARCH_PATTERN, $this->componentName)]\n );\n $data = $reader->read();\n $this->cache->save($this->serializer->serialize($data), $this->cacheId);\n } else {\n $data = $this->serializer->unserialize($data);\n }\n\n if (!empty($data)) {\n $this->data[$this->componentName] = [Converter::DATA_ATTRIBUTES_KEY => ['name' => $this->componentName]];\n $this->merge([$this->componentName => $data]);\n $this->data = $this->evaluateComponentArguments($this->data);\n }\n }", "public static function set()\n {\n add_filter( 'template_include', [ __CLASS__, 'add' ] );\n }", "public function assignData($data)\n {\n\n $brand = '';\n if (is_object($data) && $data instanceof Varien_Object) {\n $brand = $data->getIntersolveBrand();\n } elseif (is_array($data) && isset($data['intersolve_brand'])) {\n $brand = $data['intersolve_brand'];\n }\n if (strlen(trim($brand)) === 0) {\n $brand = 'InterSolve';\n }\n $payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment();\n $payment->setAdditionalInformation('BRAND', $brand);\n\n parent::assignData($data);\n return $this;\n }", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\r\n\t\t//$this->_specific_data\t= isset($row->specific) ? $row->specific : '';\r\n\t}", "public function load_data( $data ) {\r\n foreach ( $data as $key => $value ) {\r\n $this->$key = $value;\r\n }\r\n }", "protected function _prepareData()\n {\n if($this->currentApiResponseView->get() instanceof ApiResponseViewInterface && $this->getContextItemId())\n {\n $this->getCollectionByTypeMatch();\n }\n\n return $this;\n }", "public static function setData($data) {}", "abstract public function prepareData();", "public function init() {\n extract($this->data);\n\n // Generate unique ID\n $this->data['id'] = uniqid();\n }", "public function populate($data = array())\n {\n $this->id = $data['id'];\n $this->img = $data['img'];\n $this->comment = $data['comment'];\n $this->date = $data['date'];\n $this->idStatus = $data['idStatus'];\n $this->idUser = $data['idUser'];\n }", "public function withData($data)\n {\n $this->data = $data;\n\n return $this;\n }", "protected function _setSharedData(Controller $controller) {\n\t\t$VisualisationShare = ClassRegistry::init('Visualisation.VisualisationShare');\n\t\t$sectionData = $VisualisationShare->listAll($this->model());\n\n\t\t$controller->set('visualisationSectionShared', $sectionData);\n\t}", "public function set_data() {\n\t\tif (!empty($_GET)) {\n\t\t\tif ('search' === $this->_getKey) {\n\t\t\t\t$this->_getKey = array_keys($_GET);\n\t\t\t\t$this->searchModel->set_search_query(($this->searchModel->searchable)\n\t\t\t\t\t->registerModel(Modules::class, 'module_name')\n\t\t\t\t\t->registerModel(Multiplatforms::class, 'name')\n\t\t\t\t\t->registerModel(Log::class, 'method')\n\t\t\t\t\t->perform($_GET[$this->_getKey[0]])\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->searchModel->result();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function set_data($data)\n {\n }", "public function set_data($data)\n {\n }", "abstract protected function initResource();", "public function populate($data = array())\n {\n parent::populate($data);\n }", "public function mergeIncludes($transformedData, $includedData)\n {\n $keys = array_keys($includedData);\n foreach ($keys as $key) {\n $includedData[$key] = $includedData[$key]['data'];\n }\n return array_merge($transformedData, $includedData);\n }", "public function set_data($data)\n {\n $this->data = $data;\n }", "public function add($data, Resource $resource);", "public function setIncludeContext($includeContext)\n {\n $this->includeContext = $includeContext;\n return $this;\n }", "public function populate($data = array())\n\t{\n\t\t$this->id = $data['id'];\n\t\t$this->name = $data['name'];\n\t}", "public function __construct()\n {\n $accountData = Account::find('first',array('conditions'=>array('id = ?', $this->accountId())));\n // grab only what we need\n $this->setData('account', $accountData->values_for(array('id','name','api_key','map_api_key', 'mobile_url')));\n }", "public abstract function setup(array $data = array());", "public function testScopeIncludedRecords()\n {\n $user = factory(User::class)->make();\n $user->posts = factory(Post::class, 2)->make();\n $user->comments = factory(Comment::class, 2)->make();\n\n $serializer = new ResourceSerializer($user, [], ['posts', 'comments']);\n $serializer->scopeIncludes(['posts']);\n $included = $serializer->getIncluded();\n\n $this->assertInstanceOf(Collection::class, $included);\n $this->assertCount(2, $included->toArray());\n\n foreach ($included as $record) {\n $this->assertEquals('posts', $record['type'], 'scopeIncludes() failed to return relationship subset');\n }\n }", "function _setResourceMenu() {\n\t\t$this->loadModel('Content');\n\t\t$resources = $this->Content->find('all', array('conditions' => array('ctid' => 3), 'limit' => 10));\n\t\t$this->set('resource_list', $resources);\n\t}", "public function testAddLinkToIncludedHideMembersForLinkedResource()\n {\n $this->document->addToIncluded($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl/'), // self url\n [], // links for resource\n ['this meta' => 'wont be shown'], // meta when primary resource\n [LinkInterface::SELF => new Link('peopleSelfUrl/')], // links for included resource\n false, // show 'relationships' in 'included'\n ['some' => 'author meta'] // meta when resource within 'included'\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('selfUrlWillBeHidden/'),\n [LinkInterface::SELF => new Link('selfUrlWillBeHidden/')], // links for resource\n ['this meta' => 'wont be shown'], // meta when resource is primary\n [], // links for included resource\n false, // show relationships in 'included'\n ['this meta' => 'wont be shown'], // meta when resource within 'included'\n ['some' => 'comment meta'] // meta when resource is in relationship\n ), new stdClass(), false);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [], // links\n null, // relationship meta\n true, // show data\n false // is root\n );\n\n $this->document->addRelationshipToIncluded($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : null,\n \"included\" : [{\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} }\n }\n },\n \"links\" : {\n \"self\" : \"peopleSelfUrl/\"\n },\n \"meta\" : {\n \"some\" : \"author meta\"\n }\n }]\n }\nEOL;\n $this->check($expected);\n }", "public function populate($data = array())\n {\n $this->id = $data['id'];\n $this->name = $data['name'];\n $this->dated_at = isset($data['dated_at']) ? new \\DateTime($data['dated_at']) : null;\n $this->year = $data['year'];\n $this->weekday = $data['weekday'];\n $this->type = $data['type'];\n $this->constant = (bool) $data['constant'];\n }", "function wisdom() {\r\n $this->data['pagebody'] = 'justone';\r\n \r\n $source = $this->quotes->get(6);\r\n \r\n $this->data = array_merge($this->data, $source);\r\n \r\n $this->render();\r\n }", "public function initialize()\n {\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->setSource('users_associated_company');\n }", "public function includes() {\n new Updater($this->license_base, $this->product_version, $this->license_type);\n }", "public function populate($data = array())\n\t{\n\t\t$this->id = $data['id'];\n\t}", "protected function loadData()\n {\n\n $this->jsonUrl = 'https://api.srgssr.ch/audiometadata/v2/livestreams';\n parent::loadData();\n\n }", "public function withData($data = null): self\n {\n $this->data = $data;\n\n if ($this->data) {\n $this->injectSlotData();\n }\n\n return $this;\n }", "public function assignData($data) \r\n\t{\r\n\t if (!($data instanceof Varien_Object))\r\n\t {\r\n\t $data = new Varien_Object($data);\r\n\t }\r\n\t \r\n\t $info = $this->getInfoInstance();\r\n\t \r\n\t $info->setCcOwner($data->getCcOwner())\r\n\t ->setCcLast4(substr($data->getCcNumber(), -4))\r\n\t ->setCcNumber($data->getCcNumber())\r\n\t ->setCcCid($data->getCcCid())\r\n\t ->setCcExpMonth($data->getCcExpMonth())\r\n\t ->setCcExpYear($data->getCcExpYear())\r\n ->setCcSsStartMonth($data->getCcSsStartMonth())\r\n ->setCcSsStartYear($data->getCcSsStartYear())\r\n ->setCcSsIssue($data->getCcSsIssue());\r\n\r\n\t return $this;\r\n\t}", "public function testAddLinkToIncludedShowLinkMembers()\n {\n $this->document->addToIncluded($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl'), // self url\n [], // links for resource\n ['this meta' => 'wont be shown'], // meta when primary resource\n [LinkInterface::SELF => new Link('peopleSelfUrl')], // links for included resource\n false, // show 'relationships' in 'included'\n ['some' => 'author meta'] // meta when resource within 'included'\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('selfUrlWillBeHidden/'),\n [LinkInterface::SELF => new Link('selfUrlWillBeHidden/')], // links for resource\n ['this meta' => 'wont be shown'], // meta when resource is primary\n [], // links for included resource\n false, // show relationships in 'included'\n ['this meta' => 'wont be shown'], // meta when resource within 'included'\n ['some' => 'comment meta'] // meta when resource is in relationship\n ), new stdClass(), false);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [\n LinkInterface::SELF => new Link('selfSubUrl'),\n LinkInterface::RELATED => new Link('relatedSubUrl'),\n ],\n ['some' => 'relationship meta'], // relationship meta\n true, // show data\n false // is root\n );\n\n $this->document->addRelationshipToIncluded($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : null,\n \"included\" : [{\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} },\n \"meta\" : { \"some\" : \"relationship meta\" },\n \"links\" : {\n \"self\" : \"selfSubUrl\",\n \"related\" : \"relatedSubUrl\"\n }\n }\n },\n \"links\" : {\n \"self\" : \"peopleSelfUrl\"\n },\n \"meta\" : {\n \"some\" : \"author meta\"\n }\n }]\n }\nEOL;\n $this->check($expected);\n }", "public function __construct($data = null)\n\t{\n\t\t$this->merge($data);\n\t}", "private function get_data() {\n\t\t$this->set_data();\n\t\t\n\t\treturn $this;\n\t}", "public function testIncludedRecords()\n {\n $user = factory(User::class)->make();\n $user->posts = factory(Post::class, 2)->make();\n $user->comments = factory(Comment::class, 2)->make();\n\n foreach ($user->comments as $comment) {\n $comment->creator = factory(User::class)->make();\n }\n\n $serializer = new ResourceSerializer($user, [], ['posts', 'comments', 'comments.creator']);\n $included = $serializer->getIncluded();\n\n $this->assertInstanceOf(Collection::class, $included);\n $this->assertCount(6, $included);\n\n $expected = array_flatten([$user->posts, $user->comments, $user->comments->pluck('creator')]);\n $types = ['posts', 'posts', 'comments', 'comments', 'users', 'users'];\n\n for ($i = 0; $i < count($included); $i++) {\n $this->assertEquals($types[$i], $included[$i]['type']);\n $this->assertEquals($expected[$i]->id, $included[$i]['id']);\n }\n }", "function prepData($data)\r\n {\r\n \t$data['data']['Question']['master'] = $data['form']['master'];\r\n\t$data['data']['Question']['type'] = $data['form']['type'];\r\n\t$data['data']['Question']['count'] = $data['form']['data']['Question']['count'];\r\n\r\n\treturn $data;\r\n }", "protected function parseDataFrom(JsonResource $data)\n {\n return array_merge_recursive($data->resolve(request()), $data->with(request()), $data->additional);\n }" ]
[ "0.6461546", "0.58660907", "0.5725709", "0.57096636", "0.548622", "0.5480279", "0.5458439", "0.54265624", "0.5380657", "0.5362346", "0.536084", "0.53542465", "0.5345471", "0.52756244", "0.5271483", "0.5266808", "0.52666146", "0.52589023", "0.5207301", "0.51631445", "0.5154847", "0.51481414", "0.51158375", "0.5090802", "0.5077086", "0.5053456", "0.50281316", "0.49882054", "0.4981887", "0.4978376", "0.49776778", "0.4941562", "0.49392793", "0.49360076", "0.49322712", "0.49308184", "0.49290735", "0.4926651", "0.49256292", "0.4915321", "0.49065936", "0.49062163", "0.49047166", "0.48991078", "0.48813277", "0.4870847", "0.48621684", "0.48602414", "0.48573235", "0.48490584", "0.4849031", "0.48409775", "0.48405126", "0.4838382", "0.48310667", "0.48305413", "0.47949907", "0.47923124", "0.47867388", "0.4780673", "0.47734317", "0.477084", "0.4769193", "0.47691715", "0.47568092", "0.47546387", "0.475074", "0.47422072", "0.4737662", "0.47361135", "0.47294566", "0.47280556", "0.47271618", "0.47262308", "0.47155127", "0.47112954", "0.47107956", "0.4697958", "0.46975166", "0.46961793", "0.46898952", "0.4676148", "0.46740076", "0.46711004", "0.46697327", "0.46646187", "0.4661462", "0.4661318", "0.46610165", "0.46581843", "0.46557736", "0.46539396", "0.46521467", "0.4650138", "0.46483427", "0.46428424", "0.4638776", "0.4636073", "0.4631381", "0.46299553" ]
0.5842223
2
Get resource included relationships.
public function getIncluded() { return $this->with[$this->getIncludedConfig()] ?? []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRelatedResources()\r\n {\r\n return $this->related_resources;\r\n }", "public function getRelated_resources()\r\n {\r\n return $this->related_resources;\r\n }", "public function getRelationships(ResourceInterface $resource): iterable;", "public function getWithRelations();", "public function getRelations();", "public function getRelations();", "public function getRelations()\n {\n return $this->discoverRelations();\n }", "public function getRelationships()\n {\n return $this->getSchema()->getRelationships( $this->getName() );\n }", "public function getRelations()\n {\n return $this->relations;\n }", "public function getRelations()\n {\n return $this->relations;\n }", "abstract public function included(): ?JsonApiParser\\Collections\\Relations;", "public function relations()\r\n {\r\n return $this->relations;\r\n }", "public function getRelations()\n\t{\n\t\treturn $this->relations;\n\t}", "public function getRelations()\n\t{\n\t\treturn $this->relations;\n\t}", "public function getWithRelations() {\n\n return $this->with_relations;\n \n }", "public function getRelationships($resource, $isPrimary, array $includeRelationships)\n {\n $relations = [];\n\n foreach ($this->_view->viewVars['_associations'] as $association) {\n $associationKey = Inflector::tableize($association->name());\n\n if (get_class($association) === 'Cake\\ORM\\Association\\BelongsTo') {\n $associationKey = Inflector::singularize($associationKey);\n }\n\n $data = $resource->$associationKey;\n if (!$data) {\n continue;\n }\n\n $relations[$associationKey] = [\n self::DATA => $data,\n self::SHOW_SELF => true,\n self::SHOW_RELATED => false,\n ];\n }\n\n return $relations;\n }", "protected function getRelations()\n {\n return array();\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelations()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('relations');\n }", "protected function relationships(): array\n {\n return [];\n }", "protected function loadRequiredRelationships()\n {\n $model = $this->model;\n $relationships = $this->relationships;\n $relations = $this->filterRelationsToLoad($relationships);\n\n $model->load($relations);\n $relations = $model->getRelations();\n $model->setRelations([]);\n\n return $relations;\n }", "function get_user_relationships() {\n\t$policy = new Config;\n\treturn $policy->getUserRelationships();\n}", "public function uriRelationships();", "public function getRelatedRecords()\n {\n return $this->_related;\n }", "public function getRelationships(): ?array;", "public function resources() {\n $resources = array();\n foreach ($this->relFullOperations() as $op) {\n foreach($op->resources() as $resource) {\n if (!in_array ($resource, $resources, true)) {\n array_push($resources, $resource);\n }\n }\n foreach($op->phaseOperations() as $phase) {\n foreach($phase->resources() as $phase_res) {\n if (!in_array ($phase_res, $resources, false)) {\n array_push($resources, $phase_res);\n }\n }\n }\n }\n return collect($resources);\n }", "public function getIncludableRelations()\n {\n return [\n 'author',\n 'comments',\n 'tags',\n ];\n }", "public function resources()\n {\n return $this->hasMany('arts\\Resource', 'post_id', 'post_id');\n }", "public function getMandatoryRelations()\n {\n return $this->with;\n }", "public function accounts()\n {\n return $this->get('ach/relationships');\n }", "public function relations() {\r\n\t\treturn CMap::mergeArray(parent::relations(), array(\r\n\t\t\t\"properties\" => array(self::HAS_MANY,\"APropertyModel\",\"classId\"),\r\n\t\t\t\"interfaces\" => array(self::MANY_MANY,\"AInterfaceModel\",\"classImplements(classId,implementsId)\"),\r\n\t\t));\r\n\t}", "public function getRelationList();", "public function resources() {\n return $this->belongsToMany(AdResource::class, 'ad_role_resources', 'ro_id', 're_id');\n }", "public function relations()\n {\n $hasOne = $this->hasOne();\n $hasMany = $this->hasMany();\n $belongsTo = $this->belongsTo();\n $objects = new stdClass();\n\n if ($hasOne && !empty($hasOne)) {\n foreach ($hasOne as $id => $value) {\n\n $objects->$id = Relationships::hasOne(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n }\n if ($hasMany && !empty($hasMany)) {\n foreach ($hasMany as $id => $value) {\n $objects->$id = Relationships::hasMany(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n\n }\n if ($belongsTo && !empty($belongsTo)) {\n foreach ($belongsTo as $id => $value) {\n $objects->$id = Relationships::belongsTo(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n }\n return $objects;\n }", "public function findAllWithRelation()\n {\n return $this->model\n ->with(static::$relations)\n ->orderBy('is_top', 'DESC')\n ->orderBy('is_published')\n ->orderBy('created_at', 'DESC')\n ->get();\n }", "public function relationships()\n {\n return $this->fields->reject(function($field) {\n return is_null($field->type()->getRelationship());\n });\n }", "protected function getAllRelationships ()\n {\n // start with the set of relationships known to this module plus those already deployed\n $allRelationships = array_merge ( $this->relationships, parent::getDeployedRelationships () ) ;\n \n // add in the relationships known to ModuleBuilder\n require_once 'modules/ModuleBuilder/MB/ModuleBuilder.php' ;\n $mb = new ModuleBuilder ( ) ;\n $mb->getPackages () ;\n foreach ( $mb->getPackageList () as $packageName )\n {\n $package = $mb->packages [ $packageName ] ;\n foreach ( $package->modules as $module )\n {\n \n foreach ( $module->relationships->getRelationshipList () as $relationshipName )\n {\n $relationship = $module->relationships->get ( $relationshipName ) ;\n $allRelationships [ $relationship->getName () ] = $relationship->getDefinition () ;\n }\n }\n }\n \n return $allRelationships ;\n \n }", "public function getRelationshipAttributes()\n {\n return $this->relationship_attributes;\n }", "public function get_related_tables(){\n\t\treturn $this->related;\n\t}", "public function getRelations()\n\t{\n\t\t$relations = $this->resource->relations;\n\n\t\t$results = array();\n\t\tforeach($relations as $relation)\n\t\t{\n\t\t\t$other = $relation->other;\n\t\t\t$name = $relation->name;\n\n\t\t\t$otherClass = null;\n\t\t\tif( ! is_null($other))\n\t\t\t{\n\t\t\t\t$otherClass = $other->getNamespaceFor('model').'\\\\'.$other->name;\n\t\t\t}\n\n\t\t\t$stub = layla_module_stubs_path().'model/'.strtolower($relation->type).'.stub';\n\t\t\t$data = compact('name', 'otherClass');\n\n\t\t\t$content = eval_blade($stub, $data);\n\n\t\t\t$results[] = $this->increaseTabs($content);\n\t\t}\n\n\t\treturn $results;\n\t}", "public function loadRelated()\n {\n return;\n }", "public function hasRelationship() {\n return $this->_has(1);\n }", "function get_user_group_relationships() {\n\t$policy = new Config;\n\treturn $policy->getUserGroupRelationships();\n}", "public function getRelationships()\n {\n $array = array();\n\n foreach ($this->relationships as $relationship) {\n if ($relationship->hasOriginConcepts()\n && $relationship->hasDestinationConcepts()\n && $relationship->getRelation() != \"root\"\n ) {\n $array[] = $relationship;\n }\n }\n\n return $array;\n }", "public function getRelationships($resource, ContextInterface $context): iterable\n {\n $relationships = [];\n $relationshipPaths = $resource->getRelated();\n\n foreach ($resource->getData() as $type => $item) {\n if (isset($relationshipPaths[$type])) {\n if (!is_null($item)) {\n if (isset($item['id'])) {\n $item = new ArrObject($type, $item, $relationshipPaths[$type]);\n } else {\n $item = array_map(function ($row) use ($relationshipPaths, $type) {\n return new ArrObject($type, $row, $relationshipPaths[$type]);\n }, $item);\n }\n }\n\n $relationships[$type] = [\n self::RELATIONSHIP_DATA => $item,\n ];\n }\n }\n\n return $relationships;\n }", "public function resources()\n {\n return $this->belongsToMany(\\Hydrofon\\Resource::class)\n ->orderBy('name');\n }", "public function testScopeIncludedRecords()\n {\n $user = factory(User::class)->make();\n $user->posts = factory(Post::class, 2)->make();\n $user->comments = factory(Comment::class, 2)->make();\n\n $serializer = new ResourceSerializer($user, [], ['posts', 'comments']);\n $serializer->scopeIncludes(['posts']);\n $included = $serializer->getIncluded();\n\n $this->assertInstanceOf(Collection::class, $included);\n $this->assertCount(2, $included->toArray());\n\n foreach ($included as $record) {\n $this->assertEquals('posts', $record['type'], 'scopeIncludes() failed to return relationship subset');\n }\n }", "public static function extraRelationships(){\n // NOTE: you may need to adjust the relation name and the related\n\t\t// class name for the relations automatically generated below.\n\t\t return array(\n 'author' => array(self::BELONGS_TO, 'User', 'object_author'),\n 'language' => array(self::BELONGS_TO, 'Language', 'lang'),\n \n ); \n }", "public function getArrayResourceRels()\n {\n return $this->arrayResourceRels;\n }", "public function testRelationshipsInclusionMeta()\n {\n $this->document->addToIncluded($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl/'), // self url\n [], // links for resource\n null, // meta\n [], // links for included resource\n false, // show relationships in included\n null, // inclusion meta\n null, // relationship meta\n [], // include paths\n true, // show attributes in included\n null, // relationships primary meta\n ['some' => 'relationships meta'] // relationships inclusion meta\n ), new stdClass(), false));\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'relationship-name',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [], // links\n null, // relationship meta\n true, // show data\n false // is root\n );\n\n $this->document->addNullRelationshipToIncluded($parent, $link);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : null,\n \"included\" : [{\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"relationship-name\" : {\n \"data\" : null\n },\n \"meta\" : { \"some\" : \"relationships meta\" }\n }\n }]\n }\nEOL;\n $this->check($expected);\n }", "public function defineRelations()\n\t{\n\t\treturn array();\n\t}", "protected static function _relations() {\n\n\t}", "public function get_active_relations() {\n\t\t\treturn $this->_active_relations;\n\t\t}", "public function getRelationshipAll()\n {\n $rootCategories = $this->category->whereNull('parent_id')->get();\n\n foreach ($rootCategories as $category) {\n $categories[] = $category->getDescendantsAndSelf()->toHierarchy();\n }\n $collection = new Collection();\n foreach ($categories as $category) {\n foreach ($category as $item) {\n $collection->push($item);\n }\n }\n return $collection;\n }", "private function getRelationships() {\n\n $file = $this->getExtractedFile();\n\n $xmlWorkbook = simplexml_load_string( $file->getFromName( \"xl/_rels/workbook.xml.rels\" ) );\n\n $rels = array();\n $key = 0;\n\n foreach ( $xmlWorkbook->Relationship as $ele ) {\n\n $key++;\n $rels[$key]->rId = (string) $ele->attributes()->Id;\n $rels[$key]->type = (string) $ele->attributes()->Type;\n $rels[$key]->typeSlug = end( explode( '/', $ele->attributes()->Type ) );\n $rels[$key]->path = 'xl/' . $ele->attributes()->Target;\n\n }\n\n return $rels;\n }", "public function getIncludes() {\n return $this->includes;\n }", "public function getRelAll ()\n {\n \treturn ($this->db_object->getRowsAll (\"Select * from \".$this->table_prefix.$this->quiz_tables['rel']));\n }", "public function getIncludes()\r\n {\r\n return $this->includes;\r\n }", "public function relationshipsAction()\n\t{\n\t\t$params = $this->getRequest()->getPost();\n\t\tif(!isset($params['uri']) || empty($params['uri'])) {\n\t\t\t$this->_forward('error', 'api', null, array(\n\t\t\t\t'code' => 'RequiredError',\n\t\t\t\t'message' => 'Not all parameters given. This method requires: uri.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$uri = $this->escape($params['uri'], 'uri');\n\t\tif(!($id = $this->loadUri($uri))) {\n\t\t\treturn;\n\t\t}\n\n\t\t$relationships = array();\n\t\tforeach($params as $key => $value) {\n\t\t\tif($key != 'uri' && isset($this->_relationships[$key]))\n\t\t\t\t$relationships[] = $key;\n\t\t}\n\t\t$relationships = array_unique($relationships);\n\n\t\tif(count($relationships) == 0)\n\t\t\t$relationships = array_keys($this->_relationships);\n\n\t\t$query = $this->_queryPrefix .\n\t\t\t'SELECT ?to ?p ?label WHERE {' .\n\t\t\t\t'{ <' . $id . '> ?p ?to . }' .\n\t\t\t\t' UNION ' .\n\t\t\t\t'{ <' . $id . '> owl:sameAs ?sameas . ' .\n\t\t\t\t'?sameas ?p ?to . ' .\n\t\t\t\t'OPTIONAL { ?sameas rdfs:label ?label . } }' .\n\t\t\t\t'FILTER(';\n\n\t\t$first = true;\n\t\tforeach($relationships as $rel) {\n\t\t\tif($first)\n\t\t\t\t$first = false;\n\t\t\telse\n\t\t\t\t$query .= ' || ';\n\t\t\t$query .= ' ?p = <' . $this->_relationships[$rel] . '> ';\n\t\t}\n\t\t$query .= ') }';\n\n\t\t$store = $this->getBrowserStore();\n\t\t$rows = $store->query($query, 'rows');\n\t\tif($errors = $store->getErrors()) {\n\t\t\t$this->forwardTripleStoreError($errors);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$rels = array();\n\t\tforeach($rows as $row) {\n\t\t\tif(isset($rels[$row['to']])) \n\t\t\t\t$rels[$row['to']] .= ',';\n\t\t\telse\n\t\t\t\t$rels[$row['to']] = '';\n\n\t\t\t$rels[$row['to']] .= array_search($row['p'], $this->_relationships);\n\t\t}\n\n\t\t$xml = '<result>';\n\n\t\tforeach($rels as $to => $rel) {\n\t\t\t$profile = $this->getProfile($to, $store);\n\t\t\tif($profile === false)\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t$xml .= '<relationship from=\"' . $id . '\"';\n\t\t\t\n\t\t\tif(isset($row['label']) && !empty($row['label'])) {\n\t\t\t\t$xml .= ' label=\"' . htmlentities($row['label'], ENT_COMPAT, 'UTF-8') . '\"';\n\t\t\t}\n\n\t\t\t$xml .= ' type=\"' . $rel . '\">';\n\t\t\t$xml .= $profile;\n\t\t\t$xml .= '</relationship>';\n\t\t}\n\n\t\t$xml .= '</result>';\n\t\t\t\n\t\t$this->outputXml($xml);\n\t}", "public function getRelatedLinkCollection()\n {\n $collection = $this->getLinkInstance()->useRelatedLinks()\n ->getLinkCollection();\n $collection->setProduct($this);\n $collection->addLinkTypeIdFilter();\n $collection->addProductIdFilter();\n $collection->joinAttributes();\n return $collection;\n }", "public function getDisplay_relations()\r\n {\r\n return $this->m_display_relations;\r\n }", "public function getPossibleRelations()\n {\n return $this->possibleRelations;\n }", "public function getResourceContainedResourceReferenceList()\n {\n return $this->resourceContainedResourceReferenceList;\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }", "public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }", "public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }", "public function getRelatedPosts() {}", "public function getQueueableRelations();", "public function getQueueableRelations();", "public function testResourceRelationships()\n {\n $post = factory(Post::class)->make();\n $post->author = factory(User::class)->make();\n $post->comments = factory(Comment::class, 2)->make();\n\n $serializer = new ResourceSerializer($post, [], ['author', 'comments']);\n $resource = $serializer->toResourceObject();\n\n $this->assertArrayHasKey('relationships', $resource);\n $this->assertArrayHasKey('author', $resource['relationships']);\n $this->assertJsonApiResourceIdentifier($resource['relationships']['author']);\n $this->assertEquals('users', $resource['relationships']['author']['data']['type']);\n $this->assertArrayHasKey('comments', $resource['relationships']);\n $this->assertCount(2, $resource['relationships']['comments']['data']);\n }", "protected function getArrayableRelations()\n {\n return $this->relations;\n }", "public function isRelated();", "public function testAddLinkToIncludedShowLinkMembers()\n {\n $this->document->addToIncluded($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl'), // self url\n [], // links for resource\n ['this meta' => 'wont be shown'], // meta when primary resource\n [LinkInterface::SELF => new Link('peopleSelfUrl')], // links for included resource\n false, // show 'relationships' in 'included'\n ['some' => 'author meta'] // meta when resource within 'included'\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('selfUrlWillBeHidden/'),\n [LinkInterface::SELF => new Link('selfUrlWillBeHidden/')], // links for resource\n ['this meta' => 'wont be shown'], // meta when resource is primary\n [], // links for included resource\n false, // show relationships in 'included'\n ['this meta' => 'wont be shown'], // meta when resource within 'included'\n ['some' => 'comment meta'] // meta when resource is in relationship\n ), new stdClass(), false);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [\n LinkInterface::SELF => new Link('selfSubUrl'),\n LinkInterface::RELATED => new Link('relatedSubUrl'),\n ],\n ['some' => 'relationship meta'], // relationship meta\n true, // show data\n false // is root\n );\n\n $this->document->addRelationshipToIncluded($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : null,\n \"included\" : [{\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} },\n \"meta\" : { \"some\" : \"relationship meta\" },\n \"links\" : {\n \"self\" : \"selfSubUrl\",\n \"related\" : \"relatedSubUrl\"\n }\n }\n },\n \"links\" : {\n \"self\" : \"peopleSelfUrl\"\n },\n \"meta\" : {\n \"some\" : \"author meta\"\n }\n }]\n }\nEOL;\n $this->check($expected);\n }", "public function relations() {\n return [\n 'materias' => [self::HAS_MANY, 'Materia', 'usuario_id'],\n 'tags' => [self::HAS_MANY, 'Tag', 'usuario_id'],\n 'agendas' => [self::HAS_MANY, 'Agenda', 'usuario_id'],\n ];\n }", "protected function getRelations()\n\t{\n\t\treturn ['widgets'];\n\t}", "public function getEager()\n {\n return $this->getModels(['*'], false);\n }", "public function associations(): array\n {\n return $this->_associations;\n }", "public function get()\n {\n $joins = $this->build_relationship();\n\n return array('columns' => implode(',', $this->columns),\n 'joins' => $joins );\n }", "public function getRelationshipAdmins()\n {\n return $this->repository->createQueryBuilder('u')\n ->select('u.id')\n ->addSelect('u.uuid')\n ->addSelect('CONCAT(u.firstName, \\' \\', u.lastName) AS fullName')\n ->addSelect('u.jobTitle')\n ->addSelect('u.modified')\n ->where('u.roles LIKE :roles')\n ->setParameter('roles', '%ROLE_RELATIONSHIP_MANAGER%')\n ->andWhere('u.enabled = true')\n ->getQuery()\n ->getResult();\n }", "public function getRelated(): string\n {\n return $this->related;\n }", "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n \n );\n }", "public function getReferencedEntities();", "public function getRelationshipUsagesAttribute()\n {\n return \\App\\Models\\RelationshipUsage::where('name_id', $this->id)\n ->whereHas('instance_type', function($query) {\n $query->where('relationship', true);\n })\n ->get();\n }", "public function fill()\n {\n $relationships = $this->relationships;\n $modelRelations = $this->loadRequiredRelationships();\n\n return collect($relationships)->transform(function($relations, $key) use($modelRelations) {\n $merge = array_get($modelRelations, $key);\n return $merge ? $this->mergeRelations($merge, $relations) : $relations;\n })->all();\n }", "public function get_relations_for_js() {\n\n\t\t\t$relations = $this->get_active_relations();\n\t\t\t$result = array();\n\n\t\t\tif ( ! empty( $relations ) ) {\n\t\t\t\tforeach ( $relations as $key => $relation ) {\n\t\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'value' => $key,\n\t\t\t\t\t\t'label' => $relation['name'],\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $result;\n\n\t\t}", "public function getRelation()\r\n {\r\n return $this->relation;\r\n }", "public function getRelation()\n {\n return $this->relation;\n }" ]
[ "0.76944345", "0.7667572", "0.7335611", "0.73215365", "0.7155556", "0.7155556", "0.7043731", "0.69553065", "0.69273967", "0.69273967", "0.6915149", "0.68388236", "0.6814594", "0.6814594", "0.68119985", "0.6761621", "0.6754626", "0.6715442", "0.6715442", "0.6715442", "0.6715442", "0.6715442", "0.6715442", "0.6715442", "0.6715442", "0.6715442", "0.6715442", "0.6715442", "0.6662689", "0.6607021", "0.6559416", "0.6521383", "0.64832735", "0.64788103", "0.6469131", "0.64595306", "0.6370641", "0.6346309", "0.6341561", "0.6310686", "0.62979853", "0.62898433", "0.6235423", "0.6209181", "0.6182244", "0.61723137", "0.6167752", "0.6138592", "0.6128084", "0.61167336", "0.609941", "0.60844296", "0.6079198", "0.6061532", "0.6048674", "0.603578", "0.60278493", "0.60163844", "0.60098094", "0.5982951", "0.59687746", "0.5953976", "0.59315956", "0.59121335", "0.59042305", "0.58980936", "0.5897318", "0.58817846", "0.5811815", "0.57980233", "0.57933444", "0.5787399", "0.57812524", "0.5776487", "0.5776487", "0.5776487", "0.5776487", "0.5775034", "0.5775034", "0.5775034", "0.57410026", "0.5735829", "0.5735829", "0.5732908", "0.57288194", "0.5719519", "0.5700835", "0.5691519", "0.5690014", "0.5674747", "0.567207", "0.5650397", "0.5650036", "0.56479055", "0.5640656", "0.56376076", "0.56333077", "0.56296724", "0.5629626", "0.56229174", "0.5618203" ]
0.0
-1
Check and return unique resources on a collection.
protected function checkUniqueness(Collection $collection) { return $collection->unique(static function ($resource) { return implode('', $resource->getResourceIdentifier()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unique(): CollectionInterface;", "static function ensureUniqueIndex($collection, $keys, $options = array()) {\r\n\t\t$options['unique'] = true;\r\n\t\treturn self::ensureIndex($collection, $keys, $options);\r\n\t}", "protected function makeResourcesCollection()\n {\n return collect($this->load())->map(function ($item, $key) {\n $item['slug'] = $key;\n\n $item['name'] = Str::studly($key);\n\n $item['is_global'] = (isset($item['is_global']) && $item['is_global']);\n\n return $item;\n });\n }", "public function testCollectionHasNoRealId()\n {\n $client = static::createRestclient();\n $client->request('GET', '/schema/testcase/requiredhash/collection');\n\n $response = $client->getResponse();\n\n $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());\n $this->assertStringNotContainsString('realId', $response->getContent());\n }", "abstract protected function getResourceCollectionObject($count, $_links);", "public function ensure_unique_index($collection, $keys) {\n $name_parts = array();\n foreach ($keys as $k => $v) {\n $name_parts[] = $k;\n $name_parts[] = $v;\n }\n $name = implode('_', $name_parts);\n $col = $this->db>selectCollection('system.indexes');\n return $col->save(array('ns' => $this->db_name . \".$collection\",\n 'key' => $keys,\n 'name' => $name,\n 'unique' => true));\n }", "static public function GetGETCollectionId() {\n if (isset(self::$collectionId))\n return self::$collectionId;\n else\n return false;\n }", "public function testResolveContentToUpdateCollectionItemsWithoutDuplicatesFromCache(): void\n {\n /** @var \\PostmanGenerator\\CollectionGenerator $generator1 */\n [$generator1] = $this->getRestaurantCollection();\n $generator1->generate();\n\n /** @var \\PostmanGenerator\\CollectionGenerator $generator2 */\n [$generator2] = $this->getRestaurantCollection();\n $generator2->add('Restaurant');\n $generator2->add('Restaurant');\n $generator2->add('Managers');\n $generator2->generate();\n\n $items = $generator2->getCollection()->getItem();\n\n self::assertCount(2, $items);\n self::assertEquals('Restaurant', $items[0]->toArray()['name']);\n self::assertEquals('Managers', $items[1]->toArray()['name']);\n\n $generator2->generate();\n }", "public function isUnique();", "static function ensureUniqueIndex($collection, $keys) {\n global $mongo;\n $name_parts = array();\n foreach ($keys as $k => $v) {\n $name_parts[] = $k;\n $name_parts[] = $v;\n }\n $name = implode('_', $name_parts);\n $col = $mongo->selectCollection(MONGODB_NAME, 'system.indexes');\n $col->save(array('ns' => MONGODB_NAME . \".$collection\",\n 'key' => $keys,\n 'name' => $name,\n 'unique' => true));\n }", "function rest_validate_array_contains_unique_items($input_array)\n {\n }", "public static function getHashedCollection($relations = array(), $pagination = 20, $filters = array())\n {\n $collection = parent::with($relations)->paginate($pagination);\n\n // For each collection item, the ID needs to become hashed\n foreach ($collection as $data)\n {\n $data->id = $data->getHashedId();\n\n foreach($relations as $rel)\n {\n if(method_exists($data, $rel))\n {\n // If collection is returned, run through each model and hash the ID\n if(count($data->$rel) >= 1)\n {\n if(isset($data->$rel->id))\n {\n if(is_int($data->$rel->id))\n {\n $data->$rel->id = $data->$rel->getHashedId();\n }\n }\n }\n }\n }\n }\n\n return $collection;\n }", "public function unique();", "public function unique();", "public function loadCollectionItems(Collection $collection): array;", "public function cleanupDuplicateFalCollectionReferencesCommand() {\n\t\t$this->headerMessage(LocalizationUtility::translate('cleanupDuplicateFalCollectionReferencesCommand', 'dam_falmigration'));\n\t\t$references = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(\n\t\t\t'uid, uid_local, uid_foreign, COUNT(uid) AS amountOfRows',\n\t\t\t'sys_file_reference',\n\t\t\t'tablenames=\"sys_file_collection\" AND fieldname=\"files\" AND deleted=0',\n\t\t\t'uid_foreign, uid_local', // ROLLUP\n\t\t\t'uid_foreign, uid_local'\n\t\t);\n\t\t$this->infoMessage('Found ' . count($references) . ' references to sys_file_collection');\n\t\t$affectedRecords = 0;\n\t\tforeach ($references as $ref) {\n\t\t\t// this reference has duplicates\n\t\t\tif ($ref['amountOfRows'] > 1) {\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery(\n\t\t\t\t\t'sys_file_reference',\n\t\t\t\t\t'uid != ' . $ref['uid'] . ' AND tablenames=\"sys_file_collection\" AND fieldname=\"files\" AND deleted=0 AND uid_local=' . $ref['uid_local'] . ' AND uid_foreign=' . $ref['uid_foreign']\n\t\t\t\t);\n\t\t\t\t$affectedRecords++;\n\t\t\t}\n\t\t}\n\t\t$this->successMessage('Cleaned up ' . $affectedRecords . ' duplicates of references');\n\t}", "function checkForDuplicateUnique(){\n $_ufields_arr = explode(\",\", $this->listSettings->GetItem(\"MAIN\", \"UNIQUE_FIELDS\"));\n $check_fields = true;\n for ($i = 0; $i < sizeof($_ufields_arr); $i ++) {\n list ($_field[$i], $_value[$i]) = explode(\"=\", $_ufields_arr[$i]);\n if (strlen($_value[$i])) {\n $check_fields = false;\n $_query_arr[$_field[$i]] = $_value[$i];\n if ($this->_data[$_field[$i]] == $_value[$i]) {\n $check_fields = true;\n }\n }\n else {\n $_query_arr[$_field[$i]] = $this->_data[$_field[$i]];\n }\n }\n if ($check_fields) {\n $_data = $this->Storage->GetByFields($_query_arr, null);\n }\n else {\n $_data = array();\n }\n if (! empty($_data)) {\n if (($this->item_id != $_data[$this->key_field])) {\n if ($this->Kernel->Errors->HasItem($this->library_ID, \"RECORD_EXISTS\")) {\n $_error_section = $this->library_ID;\n }\n else {\n $_error_section = \"GlobalErrors\";\n }\n $this->validator->SetCustomError($_ufields_arr, \"RECORD_EXISTS\", $_error_section);\n }\n }\n }", "public function hasCollection(string $name): bool;", "public function albumsFromList(Request $request)\n { \n $collection = collect([]);\n foreach(array_unique($request->artists) as $artist){\n\n $albums = Artist::find($artist)->albums;\n\n foreach($albums as $album){\n $condition = TRUE;\n foreach(array_unique($request->artists) as $artistAux){\n if(!($album->artists->contains('id', $artistAux))){\n $condition = false; \n }\n }\n if($condition){\n $collection->push($album);\n }\n }\n }\n return $collection->unique('id');\n }", "function resourcesByPermission($permission){\n if($this->id == Config::get('laracancan.super_admin',0)){\n return Resource::all();\n }\n $roles = $this->roles;\n $resourses = array();\n foreach($roles as $role){\n $roleResources = $role->resourcesByPermission($permission);\n $resourses = array_merge($resourses, $roleResources?$roleResources:array());\n }\n $resourses = array_unique($resourses);\n return $resourses;\n\n }", "abstract protected function check_resources(Modulistica_resources $resources);", "private function loadUnMatchedCollection()\n {\n $this->unMatchedCollection = collect();\n\n foreach ($this->mergeCollection as $key => $item)\n {\n\n foreach ($this->associativePivots as $basePivot => $mergePivot)\n {\n if(!$this->baseCollection->whereIn($basePivot,$item->$mergePivot)->first())\n {\n $this->unMatchedCollection->push($item);\n continue 2;\n }\n }\n\n\n }\n\n }", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "protected static function validateNoDuplicateFileReferences(IResource $resource)\n {\n $collections = $resource->getCollections();\n\n // seen files mapped as file => collection name\n $seenFiles = [];\n\n foreach($collections as $collection)\n {\n $collectionName = $collection->getName();\n $collectionFiles = $collection->getTemplates();\n \n foreach($collectionFiles as $file)\n {\n if(array_key_exists($file, $seenFiles))\n {\n $firstReference = $seenFiles[$file];\n $secondReference = $collectionName;\n throw new DuplicateFileReferenceException(\"Duplicate reference for file ${file}: first found in ${firstReference}, found again in ${secondReference}\");\n } \n \n $seenFiles[$file] = $collectionName;\n }\n }\n }", "public function resources()\n {\n foreach ($this->index as $subject => $properties) {\n if (!isset($this->resources[$subject])) {\n $this->resource($subject);\n }\n }\n\n foreach ($this->revIndex as $object => $properties) {\n if (!isset($this->resources[$object])) {\n $this->resource($object);\n }\n }\n\n return $this->resources;\n }", "public function test_comicEntityIsCreated_collections_setCollections()\n {\n $sut = $this->getSUT();\n $collections = $sut->getCollections();\n $expected = [\n ComicSummary::create(\n 'http://collectionResourceURINumber1',\n 'collection name number 1'\n ),\n ComicSummary::create(\n 'http://collectionResourceURINumber2',\n 'collection name number 2'\n ),\n ];\n\n $this->assertEquals($expected, $collections);\n }", "function getCollection($name);", "public function isReferencingCollection(): bool;", "public function generateUniqueIpList($tempCollection, $collection = null, $ipField = \"ip\") {\n if (!isset($tempCollection)) return false;\n \n $db = $this->_getConnection();\n $tempDb = $this->_getConnectionForTempCollections();\n \n if (!$collection) $collection = $this->tableName;\n $collection = (string) $collection;\n \n \n //have to use a map/reduce because group key max is 12000\n $map = new MongoCode(\"\n function() {\n emit({ip:this.{$ipField}}, 1);\n }\n \");\n \n $reduce = new MongoCode('\n function(k, vals) {\n var sum = 0;\n for (var i in vals) {\n sum += vals[i]; \n }\n return sum; \n }\n ');\n \n $cmd = array(\n 'mapreduce' => $collection, //source collection\n 'map' => $map,\n 'reduce' => $reduce,\n 'out' => array('replace' => $tempCollection, 'db' => (string)$tempDb), //outputs to a new collection\n 'verbose' => true\n );\n $tempOpts['country']['$exists'] = false; \n $cmd['query'] = $tempOpts; \n \n $views = $db->command($cmd); \n }", "public function getAll() : Collection;", "public function testCanNotBeManyIncludedResourcesWithEqualIdentifiers()\n {\n $apple = new ResourceObject('apples', '1');\n $apple->setAttribute('color', 'red');\n $doc = Document::fromIdentifier($apple->toIdentifier());\n $doc->setIncluded($apple, $apple);\n $this->assertJson(json_encode($doc));\n }", "public function deleteItems(Collection $collection): Collection;", "function get($request) {\n \n $response = new Response($request);\n $collection = str_replace('/', DIRECTORY_SEPARATOR, $this->collection);\n \n $resourceUris = '';\n $files = glob($collection.DIRECTORY_SEPARATOR.'*');\n if ($files) {\n foreach ($files as $filepath) {\n \t$filepath = str_replace(DIRECTORY_SEPARATOR, '/', $filepath);\n $resourceUris .= '<li><a href=\"'.$this->turnFilePathIntoUri($filepath, $request).'\">'.basename($filepath).'</a></li>';\n }\n } else {\n $resourceUris .= '<li>Empty collection</li>';\n }\n \n $response->body = '<ul>'.$resourceUris.'</ul>';\n \n return $response;\n \n }", "public function findMissingInCollection($collection_data) {\n $missing_stickers_id = NULL;\n if ($collection_data['success']) {\n // Find the missing stickers of owned stickers\n $missing_stickers = array_filter($collection_data['payload'], function($an_object) { return !$an_object['owned']; });\n $missing_stickers_id = array_map(function($a_value) { return $a_value['id'];}, $missing_stickers);\n }\n return $missing_stickers_id;\n }", "protected function registerCollectionBindings()\n {\n Collection::macro('filterIfHasAny', function ($collection2) {\n //Cycle through the given collection\n return $this->filter(function ($item, $key) use ($collection2) {\n //Check if current item has any of the given $collection2 IDs, if it does, then keep the item, if not, remove it\n if($item->{$collection2->first()->getTable()}->whereIn('id', $collection2->pluck('id')->toArray())->isNotEmpty()) //take the IDs from the $collection2 for performance\n {\n //Item has at least 1 of the given collection2 items\n return true;\n }\n else\n {\n //Item has none of the given\n return false;\n }\n });\n });\n /**\n * Filter a Collection that have a relationship with ALL of the Collection Given.\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Collection\n */\n Collection::macro('filterIfHasAll', function ($collection2) {\n //Cycle through the given collection\n return $this->filter(function ($item, $key) use ($collection2) {\n //Get the current items count of relationships that match the collection given, then compare that to the total of the given collection\n if($item->{$collection2->first()->getTable()}->whereIn('id', $collection2->pluck('id')->toArray())->count() == $collection2->count() ) //take the IDs from the $collection2 for performance\n {\n //Item has at least 1 of the given collection2 items\n return true;\n }\n else\n {\n //Item has none of the given\n return false;\n }\n });\n });\n /**\n * Filter a Collection that have a relationship with ONLY of the Collection Given.\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Collection\n */\n Collection::macro('filterIfHasOnly', function ($collection2) {\n //Cycle through the given collection\n return $this->filter(function ($item, $key) use ($collection2) {\n //Check if the item's relationsip count is the same as the given collection's count, it it isnt then reject\n // &&\n //Get the current items count of relationships that match the collection given, then compare that to the total of the given collection\n if($item->{$collection2->first()->getTable()}->count() == $collection2->count() && $item->{$collection2->first()->getTable()}->whereIn('id', $collection2->pluck('id')->toArray())->count() == $collection2->count() ) //take the IDs from the $collection2 for performance\n {\n //Item has at least 1 of the given collection2 items\n return true;\n }\n else\n {\n //Item has none of the given\n return false;\n }\n });\n });\n\t\t /**\n * Filter a Collection of strings that start with a string\n *\n * @param String\n *\n * @return Collection\n */\n Collection::macro('filterIfStartsWith', function ($string) {\n //Cycle through the given collection\n return $this->filter(function ($item, $key) use ($string) {\n //Check if the string starts with the given string, if so keep it, if not reject it\n\t\t\t\tif(strpos($key, $string) === 0) //strpos is faster than substring checking\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n });\n });\n\n /**\n * Returns true if ANY model in the collection have a relationship with ANY of the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesAnyHaveAnyOfThese', function ($collection2) \n {\n return ($this->filterIfHasAny($collection2)->isNotEmpty()) ? true : false;\n });\n /**\n * Returns true if ANY model in the collection have a relationship with ALL of the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesAnyHaveAllOfThese', function ($collection2) \n {\n return ($this->filterIfHasAll($collection2)->isNotEmpty()) ? true : false;\n });\n \n /**\n * Returns true if ANY model in the collection have a relationship with ONLY the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesAnyHaveOnlyThese', function ($collection2) \n {\n return ($this->filterIfHasOnly($collection2)->isNotEmpty()) ? true : false;\n });\n /**\n * Returns true if ALL models in the collection have a relationship with ANY of the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesAllHaveAnyOfThese', function ($collection2) \n {\n return ($this->filterIfHasAny($collection2)->count() == $this->count()) ? true : false;\n });\n /**\n * Returns true if ALL models in the collection have a relationship with ALL of the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesAllHaveAllOfThese', function ($collection2) \n {\n return ($this->filterIfHasAll($collection2)->count() == $this->count()) ? true : false;\n });\n /**\n * Returns true if ALL models in the collection have a relationship with ONLY the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesAllHaveOnlyThese', function ($collection2) \n {\n return ($this->filterIfHasOnly($collection2)->count() == $this->count()) ? true : false;\n });\n /**\n * Returns true if ALL models in the collection have a relationship with ANY of the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesEveryHaveAnyOfThese', function ($collection2) \n {\n return ($this->filterIfHasAny($collection2)->count() == $collection2->count()) ? true : false;\n });\n /**\n * Returns true if ALL models in the collection have a relationship with ALL of the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesEveryHaveAllOfThese', function ($collection2) \n {\n return ($this->filterIfHasAll($collection2)->count() == $collection2->count()) ? true : false;\n });\n /**\n * Returns true if ALL models in the collection have a relationship with ONLY the given Models\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n Collection::macro('doesEveryHaveOnlyThese', function ($collection2) \n {\n return ($this->filterIfHasOnly($collection2)->count() == $collection2->count()) ? true : false;\n });\n /**\n * Returns true if ANY model in the collection contain ANY of the given Permissions\n *\n * @param Mixed $collection2 /Collection of models to compare, MUST ALL BE ON THE SAME TABLE\n *\n * @return Boolean\n */\n }", "public function all() : Collection;", "public function getCollection($name) {}", "function creatableResources(){\n\n return $this->resourcesByPermission('create');\n }", "public function testUniq() {\n\t\t$array = array(1, 2, 3, 4, 5, 4, 3, 2);\n\t\t$result = _::uniq($array);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(5, $result);\n\t\t$this->assertEquals(1, $result[0]);\n\t\t$this->assertEquals(2, $result[1]);\n\t\t$this->assertEquals(3, $result[2]);\n\t\t$this->assertEquals(4, $result[3]);\n\t\t$this->assertEquals(5, $result[4]);\n\t}", "public function retainAll($collection) {\n\t\t$changed = false;\n\t\tforeach ($this->elements as $k => $v) {\n\t\t\t\tif (! in_array($v, $collection)) {\n\t\t\t\t\t\tunset($this->elements[$k]);\n\t\t\t\t\t\t$this->size--;\n\t\t\t\t\t\t$changed = true;\n\t\t\t\t}\n\t\t}\n\t\treturn $changed;\n\t}", "public function retainAll($collection) {\n\t\t$changed = false;\n\t\tforeach ($this->elements as $k => $v) {\n\t\t\t\tif (! in_array($v, $collection)) {\n\t\t\t\t\t\tunset($this->elements[$k]);\n\t\t\t\t\t\t$this->size--;\n\t\t\t\t\t\t$changed = true;\n\t\t\t\t}\n\t\t}\n\t\treturn $changed;\n\t}", "public function all()\n {\n return $this->resource::collection(\n $this->repository->all()\n );\n }", "public function unique(): self\n {\n return Factory::create(array_unique($this->items));\n }", "function contained_in_ids($collection, $item)\n {\n foreach($collection as $look)\n {\n if($look->id == $item->id) return true;\n }\n return false;\n }", "public function retainAll($collection) {\n $newcollection = array_fill_keys($collection, true);\n $origlength = $this->size(); \n $this->elements = array_intersect_key($this->elements, $newcollection);\n return !($origlength == $this->size());\n }", "public function getUuids();", "private function loadMatchedCollection()\n {\n $this->matchedCollection = collect();\n\n foreach ($this->baseCollection as $key => $item)\n {\n\n $found = true;\n foreach ($this->associativePivots as $basePivot => $mergePivot)\n {\n if(!$this->mergeCollection->whereIn($mergePivot,$item->$basePivot)->first())\n {\n $found = false;\n continue 2;\n }\n }\n\n if($found){\n $this->matchedCollection->push($item);\n }\n\n }\n }", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public static function isCollectionUrl(string $url): bool\n {\n preg_match(\"@/id/([0-9]+)/@\", $url, $matches);\n return count($matches) > 1;\n }", "function get_collection( $request ){\n \n $user_str = $request['user_id'];\n \n if( $user_str && $user = get_user_by('login', $user_str) ) \n {\n $return = array(); \n $collect_post = get_user_meta($user->ID, 'collect_post', true);\n \n if( $collect_post ){\n \n $tmp = json_decode($collect_post, true);\n \n $return['total'] = $tmp['total'];\n $return['project'] = array_map(\n function($p){ return array('id' => $p,'title' => get_the_title($p));}, \n array_unique($tmp['pid'])\n );\n\n }\n\n\n $response = new WP_REST_Response( $return);\n $response->header( 'Access-Control-Allow-Origin', apply_filters( 'access_control_allow_origin', '*' ) );\n $response->header( 'Cache-Control', 'max-age=' . apply_filters( 'api_max_age', WEEK_IN_SECONDS ) );\n return $response;\n }else{return ['alex' => 'china'];}\n\n }", "public function process(): AnonymousResourceCollection\n {\n $counters = (new CountersRepository())->getByTypeFavouritesFirst(CounterType::MINUTES);\n return CountersResource::collection($counters->all());\n }", "function pua_get_collections($collection_ids = null)\n{\n //get popuparchive options\n $puawp_options = get_option('popuparchive_settings');\n if ($puawp_options) {\n $puawp_client_id = $puawp_options['puawp_client_id'];\n $puawp_client_secret = $puawp_options['puawp_client_secret'];\n $puawp_access_token = $puawp_options['puawp_access_token'];\n $puawp_redir_uri = $puawp_options['puawp_redir_uri_base'].$puawp_options['puawp_redir_uri_query'];\n }\n $data = array();\n\n /* Check to see if the token is alredy set, if not return empty */\n /* @todo 2 */\n if (!$puawp_access_token) {\n $data = array(\"client authorization token is not set\");\n\n return $data;\n }\n $popuparchive = puawp_set_access_token($puawp_options);\n\n try {\n /* @todo 1 */\n //$collections = $popuparchive->getPublicCollections(); //get all public collections\n $collections = $popuparchive->get('https://www.popuparchive.com/api/collections'); //get a user's collections\n } catch (Popuparchive_Services_Invalid_Http_Response_Code_Exception $e) {\n /* @todo: add check what kind of error and display message */\n $error_code = $e->getHttpCode();\n\n return $data; //for now if there is a problem return empty array\n }\n /* decode the collections JSON into an array and return */\n $data = json_decode($collections, true);\n\n return $data;\n}", "public function testExists()\n {\n $this->assertFalse(CollectionRegistry::exists('Articles'));\n\n CollectionRegistry::get('Articles', ['name' => 'articles']);\n $this->assertTrue(CollectionRegistry::exists('Articles'));\n }", "private static function collections()\n {\n $files = ['JSON', 'Collection'];\n $folder = static::$root.'Collections'.'/';\n\n self::call($files, $folder);\n }", "public function getCollection() ;", "public function __invoke(Request $request): AnonymousResourceCollection\n {\n $results = null;\n if ($request->has('search')) {\n $results = User::search($request->get('search'))->get()->pluck('uuid');\n }\n\n $query = QueryBuilder::for(User::class)\n ->allowedFilters(['name']);\n\n if ($results) {\n $query->whereIn('uuid', $results);\n }\n\n return UserResource::collection($query->paginate());\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $collection->setOrder('ID','DESC');\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "function count_products($collection){\n \n$collection_prod = collect_find($collection);\n\n$cursor = $collection_prod->find()->toArray();\n\nreturn count($cursor);\n\n}", "public static function bkap_get_resource_ids() {\n\t\t\n\t\t$all_resource_ids \t= array();\n\t\t$args \t\t\t\t= array('post_type' => 'bkap_resource','posts_per_page'=> -1,);\n\t\t$resources \t\t\t= get_posts( $args );\n\t\t\n\t\tif( count( $resources ) > 0 ){\n\t\t\tforeach ( $resources as $key => $value ) {\n\t\t\t\t$all_resource_ids[] = $value->ID;\n\t\t\t}\n\t\t}\n\t\treturn $all_resource_ids;\n\t}", "public function resources() {\n $resources = array();\n foreach ($this->relFullOperations() as $op) {\n foreach($op->resources() as $resource) {\n if (!in_array ($resource, $resources, true)) {\n array_push($resources, $resource);\n }\n }\n foreach($op->phaseOperations() as $phase) {\n foreach($phase->resources() as $phase_res) {\n if (!in_array ($phase_res, $resources, false)) {\n array_push($resources, $phase_res);\n }\n }\n }\n }\n return collect($resources);\n }", "public function createSmartCollections()\n {\n $this->nameAttributeId = $this->getNameAttributeId();\n $this->categoryNames = $this->getCategoryNames();\n $stores = $this->storeRepository->getList();\n $output = null;\n\n foreach ($stores as $store) {\n $this->currentStoreId = $store->getStoreId();\n $smartCollections = $this->getAllSmartCollections($this->currentStoreId);\n\n $categories = $this->categoryCollection->create()\n ->addAttributeToSelect('url_path')\n ->addAttributeToSelect('name')\n ->addAttributeToSelect('is_active')\n ->setStore($this->currentStoreId);\n\n foreach ($categories as $category) {\n if (in_array($category->getEntityId(), [1, 2]) || !$category->getName()) {\n continue;\n }\n\n $categoryPath = self::SMART_COLLECTION_PREFIX . trim($category->getUrlPath());\n\n if (!in_array($categoryPath, $smartCollections)) {\n $result = $this->createSmartCollection($category, $this->currentStoreId);\n } else {\n // If a smart collection already exists edit it\n $collectionId = array_search($categoryPath, $smartCollections);\n $result = $this->updateSmartCollection($category, $this->currentStoreId, $collectionId);\n }\n if (isset($result['error'])) {\n $output = $result['error']['message'];\n }\n }\n }\n\n return $output;\n }", "abstract public function getCollection(string $path);", "public function getUsrCollection($accNum){\r\n return $this->query(\"SELECT * FROM gameTable NATURAL JOIN collection WHERE AccountNum = '\" . $accNum . \"'\");\r\n }", "public function test_list_of_resource()\n {\n $response = $this->artisan('resource:list');\n $this->assertEquals(0, $response);\n }", "public function testGetCollectionItems()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function collection($collection_id)\n {\n $url = preg_replace('/set/i', 'collection:' . $collection_id, $this->public_url);\n return $this->curl($url)->collection;\n }", "public function loadCollectionSlots(Collection $collection): array;", "public function testGetCollectionItemSupplies()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public abstract function retain_collection(Collection $collection);", "public static function getCollection()\n\t{\n\t\treturn static::getDb()->getFileCollection(static::collectionName());\n\t}", "private function isExistsImage($collection, $imageName){\n return Storage::disk('public')->exists($collection . '/' . $imageName);\n }", "public function testGetUniquePath(): void\n {\n $result = $this->phpcrMapper->getUniquePath('/products/machines', 'sulu_io', 'de');\n $this->assertEquals('/products/machines-2', $result);\n $this->assertTrue($this->phpcrMapper->unique($result, 'sulu_io', 'de'));\n\n // drill & drill-1 exists\n $result = $this->phpcrMapper->getUniquePath('/products/machines/drill', 'sulu_io', 'de');\n $this->assertEquals('/products/machines/drill-2', $result);\n $this->assertTrue($this->phpcrMapper->unique($result, 'sulu_io', 'de'));\n\n // products exists\n $result = $this->phpcrMapper->getUniquePath('/products', 'sulu_io', 'de');\n $this->assertEquals('/products-1', $result);\n $this->assertTrue($this->phpcrMapper->unique($result, 'sulu_io', 'de'));\n\n // news not exists\n $result = $this->phpcrMapper->getUniquePath('/news', 'sulu_io', 'de');\n $this->assertEquals('/news', $result);\n $this->assertTrue($this->phpcrMapper->unique($result, 'sulu_io', 'de'));\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "public function testCollectionUsersAll()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function _prepareCollection()\n\t{\n\t\t$collection = Mage::getResourceModel($this->_getCollectionClass());\n\t\t$this->setCollection($collection);\n\t\t \n\t\treturn parent::_prepareCollection();\n\t}", "public function testGetCollectionRole()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getResourceSets();", "public function testGetUniquePath()\n {\n $result = $this->rlpMapper->getUniquePath('/products/machines', 'default', 'de');\n $this->assertEquals('/products/machines-2', $result);\n $this->assertTrue($this->rlpMapper->unique($result, 'default', 'de'));\n\n // drill & drill-1 exists\n $result = $this->rlpMapper->getUniquePath('/products/machines/drill', 'default', 'de');\n $this->assertEquals('/products/machines/drill-2', $result);\n $this->assertTrue($this->rlpMapper->unique($result, 'default', 'de'));\n\n // products exists\n $result = $this->rlpMapper->getUniquePath('/products', 'default', 'de');\n $this->assertEquals('/products-1', $result);\n $this->assertTrue($this->rlpMapper->unique($result, 'default', 'de'));\n\n // news not exists\n $result = $this->rlpMapper->getUniquePath('/news', 'default', 'de');\n $this->assertEquals('/news', $result);\n $this->assertTrue($this->rlpMapper->unique($result, 'default', 'de'));\n }", "public function collection( $collection = null )\n {\n if( is_null( $collection ))\n {\n throw new Exception( 'In order to retrieve documents from Tapioca, a collection name must be passed' );\n }\n\n try\n {\n $this->_get();\n }\n catch(Exception $e )\n {\n throw new Exception( $e->getMessage() );\n }\n\n // ask from cache\n if( $this->_cache )\n {\n $key = $this->collectionKey( $collection );\n\n $cache = $this->_cache->get( $key, $this->_config['cache']['ttl'] );\n\n if( $cache )\n {\n $this->reset();\n\n return $cache;\n }\n }\n\n // call driver implementation\n $hash = call_user_func( array( $this, 'get'.$this->_driver ), $collection );\n\n // reset query\n $this->reset();\n\n // store results to cache\n if( $this->_cache )\n {\n $this->_cache->set( $key, $hash );\n }\n\n return $hash;\n }", "protected function _prepareCollection()\n {\n /* @var $collection Belvg_Storelocator_Model_Resource_Location_Collection */\n $collection = Mage::getModel('storelocator/location')->getResourceCollection();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "public function loop()\n {\n \n $collection = collect(['renato' => 30, 'lisa' => 31, 'leidy' => 23, 'alexandre' => 3, 'renato' => 30, 'lisa' => 31, 'leidy' => 23, 'renato' => 30]);\n //$collection = $collection->duplicates();\n $collection->each(function($item, $key) {\n print_r($key); \n });\n \n }", "function resourceValidator( &$errors, &$warnings, &$resources, &$lang ){\n $valid = 0;\n foreach( $resources as $row => $res ){\n $rid = $res->resourceId();\n if( $rid == 0 ){\n $valid = 2;\n array_push( $errors, sprintf( $lang['xlsimport_error_resource_not_found'], $row ) );\n }\n\n if( $res->getType() == 0 ) {\n $valid = 2;\n array_push( $errors, sprintf( $lang['xlsimport_error_resource_type_unknown'], $row, $res->getTypeName() ) );\n }\n }\n return $valid;\n}", "public function uniquedata()\n {\n $required = self::config()->required_fields; //TODO: also combine with all ancestors of this->class\n $unique = [];\n $hasOnes = $this->hasOne();\n //reduce record to only required fields\n if ($required) {\n foreach ($required as $field) {\n if ($hasOnes === $field || isset($hasOnes[$field])) {\n $field = $field . 'ID'; //add ID to hasones\n }\n $unique[$field] = $this->$field;\n }\n }\n return $unique;\n }", "function checkUnique( $vals ) {\n $c = new Criteria();\n \n foreach ($vals as $key =>$value) {\n $name = \"CreditPeer::\".strtoupper($key);\n eval(\"\\$c->add(\".$name.\",\\$value);\");\n }\n \n $c->setDistinct();\n $Credit = CreditPeer::doSelect($c);\n \n if (count($Credit) >= 1) {\n $this ->Credit = $Credit[0];\n return true;\n } else {\n $this ->Credit = new Credit();\n return false;\n }\n }", "public function collection(Collection $collection);", "static function got($collection, $path){\n\t\treturn self::get($collection, $path, ['make'=>false]);\n\t}", "public function all(): Collection\n {\n }", "public function getCollection()\n {\n $store = Mage::app()->getRequest()->getParam('store');\n $website = Mage::app()->getRequest()->getParam('website');\n if ($store) {\n /** @var Mage_Core_Model_Config_Element $cfg */\n $storeId = Mage::getConfig()->getNode('stores')->{$store}->{'system'}->{'store'}->{'id'}->asArray();\n } elseif ($website) {\n /** @var Mage_Core_Model_Config_Element $cfg */\n $storeId =\n array_values(Mage::getConfig()->getNode('websites')->{$website}->{'system'}->{'stores'}->asArray());\n } else {\n $storeId = 0;\n }\n\n return Mage::getModel('cms/mysql4_page_collection')\n ->addStoreFilter($storeId)\n ->addFieldToFilter('is_active', 1)\n ->addFieldToFilter('identifier', array(array('nin' => array('no-route', 'enable-cookies'))));\n\n }", "public function getUniqueKeyedItems()\r\n {\r\n return $this->uniqueKeyedItems;\r\n }", "public static function ensureUniqueIds(array $lineItems)\n {\n $uniqueIds = array();\n foreach ($lineItems as $lineItem) {\n $uniqueId = $lineItem->getUniqueId();\n if (empty($uniqueId)) {\n $uniqueId = preg_replace(\"/[^a-z0-9]/\", '', Tools::strtolower($lineItem->getSku()));\n }\n if (empty($uniqueId)) {\n throw new Exception(\"There is an invoice item without unique id.\");\n }\n if (isset($uniqueIds[$uniqueId])) {\n $backup = $uniqueId;\n $uniqueId = $uniqueId . '_' . $uniqueIds[$uniqueId];\n $uniqueIds[$backup] ++;\n } else {\n $uniqueIds[$uniqueId] = 1;\n }\n $lineItem->setUniqueId($uniqueId);\n }\n return $lineItems;\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('oggetto_oneclick/order')->getResourceCollection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "function isValidCollection($collectionName) {\r\n\t\tglobal $member, $DIR_MEDIA;\r\n\r\n\t\t// allow creating new private directory\r\n\t\tif (preg_match('#^[0-9]+[/\\\\\\\\]?$#',$collectionName))\r\n\t\t\treturn ((int)$member->getID() == (int)$collectionName);\r\n\r\n\t\t// avoid directory traversal\r\n\t\t// note that preg_replace() is requred to remove the last \"/\" or \"\\\" if exists\r\n\t\t$media = realpath($DIR_MEDIA);\r\n\t\t$media = preg_replace('#[/\\\\\\\\]+$#','',$media);\r\n\t\t$collectionDir = realpath( $DIR_MEDIA . $collectionName );\r\n\t\t$collectionDir = preg_replace('#[/\\\\\\\\]+$#','',$collectionDir);\r\n\t\tif (strpos($collectionDir,$media)!==0 || $collectionDir == $media) return false;\r\n\r\n\t\t// private collections only accept uploads from their owners\r\n\t\t// The \"+1\" of \"strlen($media)+1\" corresponds to \"/\" or \"\\\".\r\n\t\t$collectionName=substr($collectionDir,strlen($media)+1);\r\n\t\t$firstdir = strtok($collectionName,\"/\\\\\");\r\n/*\t\tif (preg_match('/^[0-9]+$/',$collectionName))\r\n\t\t\treturn ((int)$member->getID() == (int)$collectionName);*/\r\n\t\tif (preg_match('/^[0-9]+$/',$firstdir))\r\n\t\t\treturn ((int)$member->getID() == (int)$firstdir);\r\n\t\t\t\r\n\t\t// other collections should exists and be writable\r\n\t\treturn (@is_dir($collectionDir) && @is_writable($collectionDir));\r\n\t}", "public function testCollectionsAll()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function randomKeys(int $number = 1): CollectionInterface;" ]
[ "0.6345423", "0.5607568", "0.5249767", "0.52019995", "0.5192115", "0.5183685", "0.51831496", "0.51767206", "0.5126791", "0.5103973", "0.50755966", "0.50670534", "0.5061302", "0.5061302", "0.5050559", "0.5027293", "0.50051665", "0.49527204", "0.4942993", "0.494027", "0.49378303", "0.49180704", "0.48769677", "0.48769677", "0.48769677", "0.48769677", "0.48686945", "0.48556072", "0.4854326", "0.4845897", "0.48409677", "0.48292628", "0.48254153", "0.48225152", "0.48157427", "0.4812669", "0.48042738", "0.4788352", "0.47774112", "0.47705737", "0.4769263", "0.47545418", "0.47463432", "0.47463432", "0.47395322", "0.47374657", "0.47277087", "0.4726712", "0.47256333", "0.4711766", "0.4709831", "0.4709831", "0.4709831", "0.4709831", "0.47022057", "0.46967256", "0.46938398", "0.46869496", "0.4682193", "0.4682164", "0.46798673", "0.46728185", "0.46673706", "0.46635464", "0.46574977", "0.46557042", "0.4651644", "0.4639437", "0.46337426", "0.46329162", "0.46294925", "0.46263477", "0.46203634", "0.46159697", "0.4614552", "0.46142018", "0.46046016", "0.46004674", "0.45941737", "0.45929363", "0.4592399", "0.45858794", "0.45847738", "0.45839766", "0.4580842", "0.4580151", "0.4574966", "0.4573207", "0.45728746", "0.45726928", "0.45722646", "0.4571948", "0.45718423", "0.45701993", "0.45673573", "0.4567077", "0.45632756", "0.45603624", "0.45577854", "0.4555332" ]
0.74984735
0
Get API resource from model.
protected function getModelResource(Model $model) { return defined(get_class($model).'::JSON_SERIALIZER') ? $model::JSON_SERIALIZER : JsonApiResource::class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApiResource()\n {\n return $this->apiResource;\n }", "protected function getApi()\n {\n return $this->_modelApi;\n }", "public function get_resource();", "public function get(Resource $resource);", "public function retrieve(Resource $resource);", "public function getApiResource() : APIResource\n {\n if (is_null($this->api)) {\n $api = new APIResource();\n $api->setClient($this->getClient())\n ->setBaseUrl($this->getClient()->getRestUrl())\n ->setIsHAL(false)\n ;\n $this->api = $api;\n }\n return $this->api;\n }", "public function getApiResource() : APIResource\n {\n if (is_null($this->api)) {\n $api = new APIResource();\n $api->setClient($this->getClient())\n ->setIsHAL(false)\n ->setBaseUri('/verify')\n ;\n $this->api = $api;\n }\n return $this->api;\n }", "public function model()\n {\n return $this->resource;\n }", "public function getFrom($resource);", "public function resource($actions, $resource, $model)\n {\n \n //Create a new Resource.\n $instance = $this->resourceFactory->__invoke($actions, $model);\n \n //Attach the resource to the router.\n $this->router->attach('rest.resource.'.$resource, \"{$this->routePrefix}/$resource\", $instance);\n \n //Return it for further manipulation.\n return $instance;\n \n }", "public function getResource()\n {\n\n if ($this->is_collection)\n {\n return null;\n }\n\n if ($this->isError())\n {\n return null;\n }\n\n $class = $this->getResourceClass();\n return new $class($this->data);\n }", "public function getResource()\n {\n return $this->resource ?: parent::getResource();\n }", "public function getById() {}", "function getResource()\n {\n return $this->resource;\n }", "public function getApi();", "public function getApi();", "public function getApi();", "public abstract function getApiObjectClass();", "public function getResource(){\n return $this->resource;\n }", "abstract public function get(Model $from);", "public function getResource(): ResourceInterface\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function resource()\n {\n return tap($this->resource, function ($resource) {\n abort_if(is_null($resource), 404);\n });\n }", "public function resource() : Resource\n {\n return Resources::forName($this->resource);\n }", "public function getResourceKey(): string\n {\n return 'model';\n }", "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "protected function getApiResult()\n {\n return Singleton::class('ZN\\Services\\Restful')->get($this->address);\n }", "public function getApi() {\n return $this->_api;\n }", "public function getResource(Request $request, $resourceId);", "protected function _getApi()\n {\n return Mage::getSingleton('payments/api');\n }", "public function getApi() {\n return $this->api;\n }", "public function toApi(): JsonResource\n {\n return resolve(InputResourcerContract::class, ['input' => $this]);\n }", "public function getObject() {}", "public function getObject() {}", "public function resource($resource) {\n // If the resource has already been computed and cached, just use it. Otherwise, compute and cache it somewhere.\n // Big case statement for each possible type of resource\n // Likely going to be using $this->reference a lot\n switch ($resource) {\n case 'offers':\n return $this->offers; // Special case... No caching because of how offers are nested inside products\n case 'category':\n return $this->reference->resourceById('categories', $this->attr('category'));\n case 'brand':\n return $this->reference->resourceById('brands', $this->attr('brand'));\n }\n }", "public function getResource()\n {\n return $this->_resource;\n }", "public function getById()\n {\n }", "public function get_rest_api_instance() {\n\t\treturn $this->rest_api;\n\t}", "public function apiResource() {\n\t\tif (!$this->CI->authex->validateUser()) {\n\t\t\t$this->CI->exitCode = 401;\n\t\t\treturn;\n\t\t}\n\t\t$params = func_get_args();\n\t\tif (!isset($params[0])) {\n\t\t\t$this->CI->exitCode = 400;\n\t\t\t$this->CI->apiResponse = ['message' => 'ResourceID is mandatory'];\n\t\t\treturn null;\n\t\t}\n\t\tswitch ($this->CI->input->method()) {\n\t\tcase 'get':\n\t\t\t$this->CI->apiResponse = $this->getTagsByResourceID($params[0], $this->CI->input->get());\n\t\t\tbreak;\n\t\tcase 'patch':\n\t\t\t$this->CI->apiResponse = $this->patchResourceTags($params[0], $this->CI->input->get());\n\t\t\tbreak;\n\t\tcase 'delete':\n\t\t\t$this->CI->apiResponse = $this->deleteResourceTags($params[0],$this->CI->input->get());\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$this->CI->exitCode = 405;\n\t\t\t$this->CI->apiResponse = ['error' => 'Request method is invalid'];\n\t\t\treturn;\n\t\t}\n\t}", "public function me()\n {\n $user = Auth::guard('api')->user();\n\n return new UserResource($user);\n }", "public function resource(string $type): ResourceInterface\n {\n return $this->api->getResource($type);\n }", "public function getAPIRefEntity() {\n return APIRef::load($this->getAPIRef()[0]['target_id']);\n }", "public function getResource()\n\t{\n\t\tif($this->resource === null) {\n\t\t\t$this->connect();\n\t\t}\n\n\t\treturn $this->resource;\n\t}", "public function getAPI()\n {\n return $this->api;\n }", "public function getResource()\n\t{\n\t\t$this->connectInternal();\n\t\treturn $this->resource;\n\t}", "public function show($id)\n {\n try {\n $model = $this->getModel();\n $record = $model::findOrFail($id);\n\n //return single record as resource\n return new RestResource($record);\n } catch (\\Exception $ex) {\n return $this->respondError($ex);\n }\n }", "protected function _getResource()\n {\n $resourceName = $this->_engine->getResourceName();\n if ($resourceName) {\n $this->_resourceName = $resourceName;\n }\n return parent::_getResource();\n }", "protected function _getApi()\n {\n if (is_null($this->_api)) {\n $this->_api = Mage::getModel('cjcheckout/api', array('payment_method_code' => $this->_paymentMethodCode));\n }\n return $this->_api;\n }", "public function getObject(): object;", "public function getObject();", "public function getObject();", "public function getApiBase();", "public function getApiEndpoint();", "public function readAction($id)\n {\n $model = $this->getBinding()->read($id);\n if ($model === null) {\n // The specified Resource doesn't exist\n $responseClass = $this->container->getParameter('response.class');\n\n return new $responseClass('Not Found', 404);\n }\n\n return $model;\n }", "protected function getRelateApi()\n {\n if (!$this->relateApi) {\n $this->relateApi = new RelateApi();\n }\n\n return $this->relateApi;\n }", "public function getOne($id) {\n\n }", "public function get(int $id): IModel\n {\n }", "public function _getModel(string $modelName) {\n\t\tif($this->models) {\n\t\t\t// if we already scanned the directory (which we should have done already), we can simply check if it's in there and return true\n\t\t\tif(isset($this->models[$modelName])) {\n\t\t\t\t// found as plural version\n\t\t\t\treturn $this->models[$modelName];\n\t\t\t}\n\t\t\t// now check for singular version.\n\t\t\t// I think we need to walk through all available models and get the singleName out of that.\n\t\t\tforeach ($this->models as $model) {\n\t\t\t\tif($model->modelName===$modelName) {\n\t\t\t\t\treturn $model;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$modelFile = Environment::$dirs->models . ucfirst($modelName) . \".php\";\n\t\t\n\t\tif (!file_exists($modelFile)) {\n\t\t\tErrorHandler::throwOne(Array(\"Api Error\", \"Requested recource '{$modelName}' not found/defined.\", 400, ErrorHandler::CRITICAL_EMAIL, false));\n\t\t\texit;\n\t\t} else {\n\t\t\tinclude_once($modelFile);\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($modelName);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\treturn $model;\n\t\t}\n\t\treturn null;\n\t}", "public function getResource($resourceId);", "public function human_resource()\n {\n return $this->hasOne(Human_resource::class, 'id', 'id');\n }", "public function resourceById($resource, $id) {\n if (array_key_exists( $id, $this->{$resource})) {\n return $this->{$resource}[$id];\n } else {\n return new PsApiDummy($this, $resource . \" with id= $id is not present in PsApiCall results\");\n }\n }", "abstract public function resource();", "public function resource($resource) {\n switch ($resource) {\n case 'product':\n return $this->product;\n case 'merchant':\n return $this->reference->resourceById('merchants', $this->attr('merchant'));\n }\n }", "public function getResource() {}", "public function getObject()\n {\n $object = Doctrine::getTable($this->getModel())->findOneById($this->getModelId());\n\n return $object;\n }", "public function toApi(): FormResource;", "abstract public function get($id);", "abstract public function get($id);", "abstract public function get($id);", "public abstract function get($id);", "public function requestApi()\n {\n if (!app()->bound('json-api.inbound')) {\n return null;\n }\n\n return app('json-api.inbound');\n }", "public function testResolverResource()\n {\n $model = new \\stdClass;\n $model->schema = array(\n \"fields\" => array(\n \t \"id\"\n \t),\n \t\"needs\" => array(\n \t \"id\"\t\n )\n );\n $model->loads = new \\stdClass;\n $model->loads->init = \"\";\n $model->loads->primary = \"GET\";\n $model->loads->id = \"id\";\n \n // TODO test resolver resource here\n }", "public function getApiService();", "function apiResource(): string\n {\n return 'payments';\n }", "public function getModel(): Model;", "public function getModel(): Model;", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "final protected function getObject($type){\n\t\t\treturn $this->getFactory()->getObject( $this->getRes(), $type );\n\t\t}" ]
[ "0.7255791", "0.7184972", "0.68990064", "0.68509996", "0.6724998", "0.6621868", "0.6491027", "0.6480216", "0.6254622", "0.61911523", "0.6182163", "0.61033726", "0.6098023", "0.60977215", "0.60671866", "0.60671866", "0.60671866", "0.603092", "0.602464", "0.60125166", "0.60076475", "0.6002483", "0.6002483", "0.6002483", "0.6002483", "0.5996775", "0.59886706", "0.59671295", "0.59526396", "0.5924756", "0.5920635", "0.592015", "0.5916474", "0.59059227", "0.5859634", "0.58461136", "0.58461136", "0.58291405", "0.58250463", "0.5820244", "0.5792982", "0.5785378", "0.5775576", "0.57749075", "0.57625026", "0.5759434", "0.57592535", "0.57522446", "0.57294613", "0.57211906", "0.57041675", "0.56815875", "0.5659059", "0.5659059", "0.56585556", "0.5612051", "0.5603493", "0.55944103", "0.5593213", "0.55781436", "0.55778456", "0.5573166", "0.5565749", "0.5565131", "0.55581313", "0.55465937", "0.5541099", "0.5528202", "0.55263877", "0.55162513", "0.55162513", "0.55162513", "0.55139774", "0.5504963", "0.5502171", "0.55017495", "0.5499199", "0.54955494", "0.54955494", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.54932827", "0.5487864" ]
0.61647356
11
Transform the resource collection into an array.
public function toArray($request) { if($this->type == ScoreCollection::$ALL){ return [ 'scores' => ScoreResource::collection($this->collection), 'score_count' => $this->collection->count(), 'score_average' => $this->average(), ]; } else if($this->type == ScoreCollection::$SINGLE){ return [ 'score_count' => $this->collection->count(), 'score_average' => $this->average(), ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n return [\n 'users' => HiUserResource::collection($this->resource),\n ];\n }", "public function asArray() {\n return $this->resource;\n }", "public function toArray()\n {\n return $this->collection;\n }", "public function toArray()\n {\n if ($this->resource instanceof ArrayableInterface) {\n\n return $this->resource->toArray();\n } else {\n\n return null;\n }\n }", "public function toArray($request): array\n {\n return [\n 'data' => $this->collection->map(\n function ($tag) {\n return new TagResource($tag);\n })\n ]; }", "public function toArray($request)\n {\n $data = $this->collection->transform(function ($uses) {\n $tmp = [\n 'id' => $uses->id,\n 'user_id' => $uses->user_id,\n 'use_date' => $uses->use_date,\n 'application_id' => $uses->application_id,\n 'created_at' => $uses->created_at,\n 'updated_at' => $uses->updated_at,\n ];\n\n return $tmp;\n });\n\n if ($data->count() == 1) {\n // Fixing of sometime collections have one element\n return [$data->first()];\n } else {\n return $data;\n }\n\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray()\n {\n return $this->collection->toArray();\n }", "public function toArray($request)\n {\n return [\n 'data' => ContatoResource::collection($this->collection)\n ];\n }", "public function toArray()\n {\n return $this->transform();\n }", "public function toArray($request)\n {\n return [\n \"items\" => ProductResource::collection(collect($this->items())),\n ];\n }", "public function toArray($request)\n {\n // return parent::toArray($request);\n return $this->collection->transform(function ($item){\n // return $item->only(['field','name']);\n return new ItemResource($item);\n });\n }", "public function toArray(): array\n {\n /** @var Collection $collection */\n $collection = $this->collection->map->toArray();\n return $collection->all();\n }", "public function toArray($request)\n {\n return [\n 'data' => JsonApiResource::collection($this->collection),\n ];\n }", "public function toArray()\n {\n return $this->cast('array');\n }", "public function toArray()\n {\n return iterator_to_array($this->pipeline->get());\n }", "public function toArray($request)\n { \n return $this->collection->map(function($media) { \n return [\n 'id' => $media->id,\n 'name' => $media->name,\n 'label' => $media->label,\n 'group' => $media->group, \n 'gallery' => $media->getMedia('gallery')->map(function($image) use ($media) {\n return $media->getConversions($image, ['main', 'cover', 'thumbnail']);\n }),\n ];\n })->toArray();\n }", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray()\r\n {\r\n $a = array();\r\n if ($this->survivorResources) {\r\n $ab = array();\r\n foreach ($this->survivorResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['survivorResources'] = $ab;\r\n }\r\n if ($this->duplicateResources) {\r\n $ab = array();\r\n foreach ($this->duplicateResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['duplicateResources'] = $ab;\r\n }\r\n if ($this->conflictingResources) {\r\n $ab = array();\r\n foreach ($this->conflictingResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['conflictingResources'] = $ab;\r\n }\r\n if ($this->survivor) {\r\n $a[\"survivor\"] = $this->survivor->toArray();\r\n }\r\n if ($this->duplicate) {\r\n $a[\"duplicate\"] = $this->duplicate->toArray();\r\n }\r\n return $a;\r\n }", "public function toArray($request)\n {\n return [\n 'data' => $this->collection->transform(function($page){\n return [\n 'id' => $page->id,\n 'title' => $page->title\n ];\n }),\n ]; \n }", "public function toArray($request)\n {\n return [\n 'data' => $this->collection->map(function($data) {\n return [\n 'id' => $data->id,\n 'title' => $data->title,\n 'date' => (int) $data->end_date,\n 'banner' => api_asset($data->banner)\n ];\n })\n ];\n }", "public function getAsArray();", "abstract protected function toArray();", "public function toArray($request): array\n {\n return $this->collection->map(function (BaseApiResource $resource) use ($request) {\n return $resource->columns($this->columns)->toArray($request);\n })->all();\n\n //return parent::toArray($request);\n }", "public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}", "public function toArray($request)\n {\n return $this->collection->transform(function ($item) {\n return ['id' => (int) $item->id,\n 'name' => (string) $item->name,\n 'country_id' => (int) $item->country_id,\n ];\n });\n }", "public function transform($resource)\n {\n return [];\n }", "public function toArray($request)\n {\n \n return $this->collection->map(function($resource) use($request){\n\n \n $user_name = '';\n $user_image = null;\n if(isset($this->userDict[$resource->user_id])){\n $user = $this->userDict[$resource->user_id];\n $user_name = $user->name;\n if($user->img){\n $user_image = config('app.static_host') . \"/users/$user->id_code/$user->img\"; \n }\n }\n\n return [\n 'user_name'=>$user_name,\n 'user_image'=>$user_image,\n 'body'=>$resource->body,\n 'created_at'=>$resource->created_at,\n ];\n });\n\n\n\n }", "function toArray() ;", "function toArray() ;", "public function transform()\n {\n $object = $this->resource;\n\n $data = $object instanceof Collection || $object instanceof AbstractPaginator\n ? $object->map([$this, 'transformResource'])->toArray()\n : $this->transformResource($object);\n\n if ($object instanceof AbstractPaginator) {\n $this->withMeta(array_merge(\n $this->getExtra('meta', []), Arr::except($object->toArray(), ['data'])\n ));\n }\n\n $data = array_filter(compact('data') + $this->extras);\n ksort($data);\n\n return $data;\n }", "public function toArray($request): array;", "public function toArray($request)\n {\n $this->buildCollection();\n\n return parent::toArray($request);\n }", "public function toArray($request)\n {\n return [\n 'data' => $this->collection->map(function ($item, $key) {\n return [\n 'name' => $item['name'],\n 'items' => $item->items,\n 'checklists' => $item->checklist\n ];\n })->toArray()\n ];\n }", "public function toArray() {\n return $this->getData();\n }", "public function toArray()\n {\n\n }", "function domains_to_array($collection)\n {\n $result = $collection->map(function($item) {\n return $item->toArray();\n });\n\n return $result;\n }", "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'size' => $this->size,\n 'children' => SizeResource::collection($this->whenLoaded('children'))\n ];\n }", "public function toArray($request)\n\t{\n\t\t$data = $this->resource->toArray();\n\n\t\t$data['id'] = shorten_uuid($data['id']);\n\t\t$data['code_id'] = shorten_uuid($data['code_id']);\n\t\t$data['user_id'] = shorten_uuid($data['user_id']);\n\n\t\t$data['order_cards'] = OrderCardTransformer::collection($this->whenLoaded('orderCards'));\n\n\t\treturn $data;\n\t}", "public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}", "private function arrayify(): array\n {\n return $this->toArray();\n }", "public function toArray($request)\n {\n if (!$this->collects) {\n throw new ResourceCollectionNotFound();\n }\n\n return $this->merge(\n $this->buildMessagableResponse(),\n 2,\n [\n $this::$wrap => $this->collection->toArray(),\n ]\n );\n }", "public function toArray(): array\n {\n $array = [];\n\n foreach ($this->collection as $slot) {\n $array[] = $slot->toArray();\n }\n\n return $array;\n }", "public function toArray($request)\n {\n $collection = $this->collection->map(function($item){\n return [\n 'no' => $item['no'],\n 'campaign_id' => $item['campaign_id'],\n 'name' => $item['name'],\n 'processing_status' => $item['processing_status'],\n 'created_at' => $item['created_at'],\n 'button_status' => $this->getButtonStatus($item['processing_status']),\n 'complainer_rate' => $item['complainer_rate'],\n 'conversioncount' => $item['conversioncount'],\n 'mobileclickscount' => $item['mobileclickscount'],\n 'opt_rate' => $item['opt_rate'],\n 'otherclickscount' => $item['otherclickscount'],\n 'profit' => $item['profit'],\n 'reply_rate' => $item['reply_rate'],\n 'revenue' => $item['revenue'],\n 'sentcount' => $item['sentcount'],\n 'cost' => $item['cost'],\n 'ctr' => $item['ctr'],\n 'roi' => $item['roi']\n ];\n });\n\n return $collection;\n }", "function toArray(){\r\n\t\treturn $this->data;\r\n\t}" ]
[ "0.7504735", "0.7504735", "0.74399644", "0.73232764", "0.7235598", "0.71828806", "0.71595937", "0.71211475", "0.7119079", "0.7119079", "0.71190023", "0.71190023", "0.71190023", "0.71190023", "0.7118959", "0.7118959", "0.7118959", "0.7118959", "0.7118959", "0.7118959", "0.7118959", "0.7118959", "0.7118959", "0.7118959", "0.70545536", "0.70167404", "0.70050263", "0.69780445", "0.6928975", "0.69188565", "0.69038284", "0.6899077", "0.68974596", "0.68799925", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6828235", "0.6820227", "0.6818198", "0.67997384", "0.6771179", "0.6766478", "0.6759827", "0.67586964", "0.67545843", "0.6739066", "0.67293924", "0.67264134", "0.67264134", "0.67158085", "0.67053354", "0.670373", "0.66997916", "0.66883713", "0.6686173", "0.6686015", "0.66844136", "0.66834384", "0.66810066", "0.66790074", "0.6677725", "0.6676003", "0.6675858", "0.66750765" ]
0.0
-1
Return Scores Average Amount
public function average(){ $i = 0; $total = 0; for($i = 0; $i < count($this->collection); $i++){ $total += $this->collection[$i]->amount; } if($i == 0) return 3; return (int)round($total/$i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _getAverageScore() {\n\t\treturn $this->_averageScore;\n\t}", "function average() {\n $total = 0;\n foreach ($this->grades as $value) // goes through grades using foreach\n $total += $value;\n return $total / count($this->grades);\n }", "public function evalAvg()\n {\n $users = User::students()->get();\n $marks = [];\n foreach ( $users as $user )\n {\n if ($this->evalGradeExists($user))\n {\n array_push($marks,$this->userPercentage($user));\n }\n }\n $count = count($marks); //total numbers in array\n $total = 0;\n foreach ($marks as $mark) {\n $total += $mark; // total value of array numbers\n }\n $average = ($total/$count); // get average value\n return round($average,2);\n\n }", "public function average()\n {\n return $this->getSum() / count($this->values);\n }", "public function average(): float\n {\n return $this->sum() / $this->count();\n }", "public function getAverage()\n {\n $total = 0;\n $nb = 0;\n foreach ($this->evaluationSessions as $evaluationSession) {\n if ($evaluationSession->getStatus() === Status::CLOSED) {\n $total += $evaluationSession->getGlobalScore();\n $nb++;\n }\n }\n if ($nb > 0) {\n return floatval($total / $nb);\n }\n return -1;\n }", "public function getAvg(): float\n {\n return $this->avg;\n }", "public function getAveragePointsFor()\n {\n return number_format((float) $this->getPointsFor() / $this->teams->count(), 2, '.', '');\n }", "public function getAverage(): float\n {\n return $this->average;\n }", "public function averageRate()\n {\n $movie = $this->getKey();\n return DB::table('movies_reviews')\n ->where('movies_id', '=', $movie)\n ->average('rate');\n }", "public function getAccumulatedScore()\n {\n return $this->score;\n }", "public function getAccumulatedScore()\n {\n return $this->score;\n }", "public function getAveragePointsAgainst()\n {\n return number_format((float) $this->getPointsAgainst() / $this->teams->count(), 2, '.', '');\n }", "public function avg_grade() {\n $avg = $this->assessments()->get()->avg('sa_assesment');\n\n return number_format((float)$avg, 2, '.', '');\n }", "function averageAge ( array $students) : float {\n\n\t$totalAge = 0;\n\n\tforeach ($students as $student) {\n\n\t\techo $student[\"name\"] . \" is \" . $student[\"age\"];\n\t\techo \"<br>\";\n\t\t$totalAge += $student[\"age\"];\n\n\t}\n\t//make sure $totalAge is the correct number\n\techo \"Total age is \" . $totalAge;\n\techo \"<br>\";\n\treturn ($totalAge/count($students));\n\n}", "public function averageRating() : float\n {\n return $this->ratings()->exists() ? $this->ratings()->avg('rating') : 0;\n }", "function ros_get_grades_average($grads)\n{\n $povprecje = array();\n $cnt = count($grads);\n $povprecje['mistakes'] = 0;\n $povprecje['timeinseconds'] = 0;\n $povprecje['hitsperminute'] = 0;\n $povprecje['precision'] = 0;\n foreach($grads as $grade)\n {\n $povprecje['mistakes'] = $povprecje['mistakes'] + $grade->mistakes; \n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] + $grade->timeinseconds;\n }\n if($cnt != 0){\n $povprecje['mistakes'] = $povprecje['mistakes'] / $cnt;\n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] / $cnt;\n }\n return $povprecje;\n}", "public function calculateAverage()\n {\n return 0.0;\n }", "public function getAvgRating(){\n if($this->ratings){\n return $this->ratings->avg('rating');\n }\n }", "public function getMeanGrade();", "abstract public function calculateAverage($grades);", "public function computeAvgRating()\n {\n return Doctrine_Query::create()\n ->select('AVG(value) as avg_val')\n ->from('Rate')\n ->where('record_model = ? AND record_id = ?', array(\n $this->getModel(),\n $this->getItemId(),\n ))\n ->fetchOne()\n ->avg_val;\n }", "public function getAverageTies()\n {\n return round($this->getTiesAttribute() / $this->teams->count());\n }", "public function getTotalScore()\n {\n $score = 0;\n for ($i = 1; $i <= 3; $i++) {\n $score += $this->getBaseScoreForShot($i) * $this->getMultiplierForShot($i);\n }\n\n return $score;\n }", "public function fetchAvgRating()\n {\n return number_format($this->ratings()->avg('rating'), 1);\n }", "public function mean() {\n $count = count($this->value);\n $sum = array_sum($this->value);\n return ((float) $sum) / $count;\n }", "function avg($s)\n{\n\tif (!$this->getSql()) return 0;\n\t$rows = $this->getClone()->select(\"avg($s) as n\");\n\treturn +$rows[0]['n'];\n}", "public function setAverageScore($averageScore) {\n\t\t$this->_setAverageScore($averageScore);\n\t\treturn $this;\n\t}", "public function getScoreSum()\n\t{\n\t\treturn (float) $this->score_mc + $this->score_case;\n\t}", "function gradeMean($grades)\n {\n if (count($grades) == 0) {\n return null;\n }\n return array_sum($grades) / count($grades);\n }", "public function getAvgRate()\n {\n $avg = 0;\n $nb = 0;\n if (!empty($this->getRates())) {\n foreach($this->getRates() as $rate) {\n $avg += $rate->getNbStar();\n $nb++;\n }\n $avg /= $nb;\n }\n return $avg;\n }", "public function getAvgRating()\n {\n $sum =0;\n foreach($this->comments as $comment)\n {\n $sum = $sum + $comment->getRating() ;\n }\n\n if(count($this->comments)) return $sum/count($this->comments);\n\n return 0 ;\n }", "public function studentAverageCalculation($sum_total, $no_of_items){\n\t\t\t$average=$sum_total/$no_of_items;\n\t\t\treturn $average;\n\t\t}", "function average($arr){\n return ($arr) ? array_sum($arr)/count($arr) : 0;\n }", "function getaverage(){\n\t\tinclude \"getpath.php\";\t\t\n\t\t//creating sql un and pass\n\t\tinclude $localhost.\"Matching-Game/assets/getconfig.php\";\n\t\t$conn=mysqli_connect(\"localhost\",$sqlun,$sqlp,$sqld);\n\t\tif($conn->connect_error){\n\t \tdie(\"Connection to database failed: \".$conn->connect_error);\n\t }\n\t\tif($result=$conn->query(\"select avg(score) from gamesplayed where playerusername='\".$_SESSION['username'].\"'\"))\n\t\t\tif($row=$result->fetch_assoc())\n\t\t\t\treturn \t$row['avg(score)'];\n\t}", "public function getPlayerAverages() : array\n {\n $average['shooting'] = 0;\n $average['skating'] = 0;\n $average['checking'] = 0;\n foreach ($this->players as $player) {\n $average['shooting'] += $player->shooting;\n $average['skating'] += $player->skating;\n $average['checking'] += $player->checking;\n }\n // Checks if zero players are on a squad to prevent division by zero\n if (count($this->players) !== 0) {\n $average['shooting'] = (int) ($average['shooting'] / count($this->players));\n $average['skating'] = (int) ($average['skating'] / count($this->players));\n $average['checking'] = (int) ($average['checking'] / count($this->players));\n }\n return $average;\n }", "public function groupScores()\n\t{\n\t $groups = array(\n\t 'northeast',\n 'central',\n 'southeast',\n 'ohio-valley',\n 'southwest',\n 'team-1',\n 'team-2',\n 'canada',\n 'northwest',\n 'team-3'\n\t );\n\t $scores = array();\n\t $averages = array();\n\t \n\t foreach ($groups as $group) \n\t {\n\t if (!isset($scores[$group])) \n\t {\n\t $scores[$group] = 0;\n\t }\n\t \n\t if (!isset($averages[$group]))\n\t {\n\t $averages[$group] = array(\n\t 'group' => ucwords( str_replace('-', ' ', $group) ),\n\t 'count' => 0,\n\t 'average' => 0,\n\t 'total' => 0\t \n\t );\n\t }\t \n\t \n\t // get all the users in this group\n\t $users = \\Users\\Models\\Users::collection()->find(array(\n\t 'triviagroup' => $group\n\t ));\n\t \n\t if (!empty($users)) \n\t {\n\t // for each user, get their score for this game, and add it to the running total\t \n\t foreach ($users as $doc) \n\t {\n\t if (!empty($doc['game']['trivia'][(string)$this->id]['score'])) \n\t {\n\t $scores[$group] = $scores[$group] + $doc['game']['trivia'][(string)$this->id]['score'];\n\t }\n\t }\n\t \n\t $count = count($users);\n\t $averages[$group]['count'] = $count;\n\t $averages[$group]['total'] = $scores[$group];\n\t if (!empty($scores[$group])) \n\t {\n\t $averages[$group]['average'] = number_format( $scores[$group] / $count, 2 );\n\t }\t \n\t }\n\t }\n\t \n\t $results = \\Dsc\\ArrayHelper::sortArrays($averages, 'average', -1);\n\t \n\t return $results;\n\t}", "public function getAverage() : float\n {\n if (is_array($this->numbers) && count($this->numbers)) {\n $sum = singleNumberMathFactory(0, 'sum');\n foreach ($this->numbers as $number) {\n $sum = (singleNumberMathFactory($sum->operate($number), 'sum'));\n }\n\n return singleNumberMathFactory($sum->operate(0), 'divide')->operate(count($this->numbers));\n }\n\n return 0;\n }", "function average($array)\n{\n $avg = array_sum($array) / (count($array));\n return $avg;\n}", "public function getTotalAverageRevenueConversion()\n {\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n $average = 0;\n\n $nbConvertedCarts= $resource->getSumNbConvertedCarts();\n if ($nbConvertedCarts) {\n $average = $resource->getSumAmountConvertedCarts() / $nbConvertedCarts;\n }\n\n return $average;\n }", "function calcAverage($scoreOne, $scoreTwo, $scoreThree): float { # function is a reserved word used to define functions.\n return ($scoreOne + $scoreTwo + $scoreThree) / 3;\n}", "public function getAverageWins()\n {\n return round($this->getWinsAttribute() / $this->teams->count());\n }", "public function average() {\n $avgEmployees = Employee::avg(\"age\");\n\n return response()->json([\"age\"=>round($avgEmployees, 0)]);\n }", "public function getAverage()\r\n {\r\n $fSum = 0.0;\r\n foreach ($this->aNotes as $fNote) {\r\n $fSum += $fNote;\r\n }\r\n $fAverage = $fSum / count($this->aNotes);\r\n // get only 2 digits after comma\r\n $fAverage = floatval(number_format($fAverage, 2));\r\n return $fAverage;\r\n }", "public function getScore() \n\t{\n\t\t$sql = 'SELECT COUNT(*) as nb, SUM(score) as total, MAX(SCORE) as max FROM '.$this->progressTable;\n\t\t$query = $this->db->query($sql, array());\n\t\treturn $query->row(); \n\t}", "public function getAverageLosses()\n {\n return round($this->getLossesAttribute() / $this->teams->count());\n }", "public function _getCalculatedScore() {\n\t\treturn $this->_calculatedScore;\n\t}", "public function calcSnowAvg() {\n\t\t$min = $this->snow['base'];\n\t\t$max = $this->snow['upperbase'];\n\t\treturn ($min + $max)/2;\n\t}", "function calculateAverage($values,$averageType='simple'){\n $average=array_sum($values)/count($values);\n return $average;\n}", "function by_avg($students, $average)\n {\n //first we need average\n $sum = 0;\n for($i=0; $i<count($students)-1; $i++)\n {\n $sum = $sum + $students[$i]['mark'];\n } \n $avg = $sum / count($students);\n //now we can use average mark\n if($average == 'alt')\n {\n do\n {\n $a = rand(0, 7);\n $mark = $students[$a]['mark'];\n }\n while($mark >= $avg);\n print $students[$a]['name'].'-'.$students[$a]['mark'];\n }\n else\n {\n do\n {\n $a = rand(0, 7);\n $mark = $students[$a]['mark'];\n }\n while($mark <= $avg);\n print $students[$a]['name'].'-'.$students[$a]['mark'];\n }\n }", "public function getScore();", "function getAverageStats() {\n return $this->averageNpsStats;\n }", "function avgT($a){\n\t\t\treturn array_sum($a) / count($a);\t\n\t\t}", "public static function calculateAverage(array $bucket, $precision = 4)\n {\n if (empty($bucket)) {\n return 0;\n }\n\n return round(array_sum($bucket) / count($bucket), $precision);\n }", "public function getScore(): int\n {\n return $this->score;\n }", "public function totalScore($scorePulls);", "public function getScore() : int{\n return $this->score;\n }", "public function averageRating()\n {\n $total = 0;\n $average = null;\n\n foreach ($this->notes as $n) {\n $total += $n->note;\n }\n\n $nbNotes = $this->notes->count();\n if ($total > 0 && $nbNotes > 0) {\n $average = $total / $nbNotes;\n }\n\n return $average;\n }", "public function getAverageRevenueConversion()\n {\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n $average = 0;\n\n $nbConvertedCarts = $resource->getSumNbConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n if ($nbConvertedCarts > 0) {\n $sumAmout = $resource->getSumAmountConvertedCarts(\n $this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod()\n );\n $average = $sumAmout / $nbConvertedCarts;\n }\n\n return $average;\n }", "function block_ranking_get_average_points_by_group() {\n global $COURSE, $DB;\n\n $groups = block_ranking_get_total_points_by_group();\n\n $groupsmembersnumber = block_ranking_get_total_students_by_group();\n\n foreach ($groups as $key => $value) {\n foreach ($groupsmembersnumber as $group) {\n if ($value->groupname == $group->groupname) {\n $groups[$key]->points = $value->points / $group->qtd;\n continue 2;\n }\n }\n }\n\n return $groups;\n}", "public function getAverageConfidence(): float\n {\n return RoadDamageReport::where('roaddamage_id', $this->id)\n ->avg('confidence');\n }", "function get_average_ranking($mysql, $wca, $event, $country, $my) {\n\t$query = sprintf(\"SELECT MIN(Average) as avg FROM Results WHERE Average > 0 AND Average < '%s' AND eventId='%s' %s GROUP BY personId ORDER BY avg\",\n\t\t$mysql->real_escape_string($my),\n\t\t$mysql->real_escape_string($event),\n\t\t$country != false ? ( \"AND personCountryId='\" . $mysql->real_escape_string($country) . \"'\" ) : \"\"\n\t);\n\t$result = $mysql->query($query);\n\treturn $result->num_rows + 1;\n}", "public function avg($avg=null)\n {\n $avg = LambdaUtils::toSelectCallable($avg);\n return ($this->sum($avg)/$this->length());\n }", "function bbconnect_kpi_calculate_average($count, $amount) {\n return $count > 0 ? $amount/$count : 0;\n}", "public function calculateAverageRating($data)\n {\n return ($data['product_rating'] + $data['operator_rating']\n + $data['marker_rating'] + $data['reliability_rating']) / 4;\n }", "public function getScore()\n {\n return $this->score;\n }", "public function getScore()\n {\n return $this->score;\n }", "public function getScore()\n {\n return $this->score;\n }", "public function getScore()\n {\n return $this->score;\n }", "public function testAverage()\n {\n $dice = new Dice();\n $dice->roll(100);\n $faceValues = $dice->getFaceValues();\n $res = $dice->average();\n $this->assertEquals(array_sum($faceValues) / 100, $res);\n }", "public function iaqScore();", "function get_average_marks()\n {\n $names = $this->input->post('names');\n $theclass = $this->input->post('theclass');\n $theyear = $this->input->post('theyear');\n $stream = $this->input->post('stream');\n $semester = $this->input->post('term');\n\n $this->db->select_avg('average_mark');\n $this->db->where('full_marks.student', $names);\n $this->db->where('full_marks.hisclass', $theclass);\n $this->db->where('full_marks.stream', $stream);\n $this->db->where('full_marks.term', $semester);\n $this->db->where('full_marks.theyear', $theyear);\n $query = $this->db->get('full_marks')->row();\n return $query->mark1;\n // Produces: SELECT AVG(age) as age FROM members\n }", "public function getAverageReviews()\n {\n /* code goes here */\n }", "function getAvgAuthor($a_id)\n{\n $sql = \"SELECT ROUND(AVG(CAST(CAST (review_author.rating AS char)AS INT)),2) FROM review_author WHERE a_id = $a_id\";\n $result = pg_query($sql);\n $avgscore = pg_fetch_row($result);\n if ($avgscore[0]!=0) echo \"&nbsp; <label class=\\\"label label-warning\\\"><span class=\\\"glyphicon glyphicon-star\\\"></span> \".$avgscore[0].\"</label>\"; \n}", "public function calc_score($stud_id = null)\r\n {\r\n \t$tbl_stats = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);\r\n \t$sql = 'SELECT * FROM '.$tbl_stats\r\n \t\t\t.\" WHERE exe_cours_id = '\".$this->get_course_code().\"'\"\r\n \t\t\t.' AND exe_exo_id = '.$this->get_ref_id();\r\n \t\r\n \tif (isset($stud_id))\r\n \t\t$sql .= ' AND exe_user_id = '.$stud_id;\r\n \t\t\r\n \t// order by id, that way the student's first attempt is accessed first\r\n\t\t$sql .= ' ORDER BY exe_id';\r\n\r\n \t$scores = api_sql_query($sql, __FILE__, __LINE__);\r\n\r\n\t\t// for 1 student\r\n \tif (isset($stud_id))\r\n \t{\r\n \t\tif ($data=mysql_fetch_array($scores))\r\n \t\t\treturn array ($data['exe_result'], $data['exe_weighting']);\r\n \t\telse\r\n \t\t\treturn null;\r\n \t}\r\n \t\r\n \t// all students -> get average\r\n \telse\r\n \t{\r\n \t\t$students=array(); // user list, needed to make sure we only\r\n \t\t\t\t\t\t\t// take first attempts into account\r\n\t\t\t$rescount = 0;\r\n\t\t\t$sum = 0;\r\n\r\n\t\t\twhile ($data=mysql_fetch_array($scores))\r\n\t\t\t{\r\n\t\t\t\tif (!(array_key_exists($data['exe_user_id'],$students)))\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($data['exe_weighting'] != 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$students[$data['exe_user_id']] = $data['exe_result'];\r\n\t\t\t\t\t\t$rescount++;\r\n\t\t\t\t\t\t$sum += ($data['exe_result'] / $data['exe_weighting']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ($rescount == 0)\r\n\t\t\t\treturn null;\r\n\t\t\telse\r\n\t\t\t\treturn array ($sum , $rescount);\r\n \t}\r\n }", "function get_ave($array) {\n\t\t\t// echo $ave;\n\t\t\treturn \"average of is \" . array_sum($array) / count($array);\n\t\t}", "private function avgGroupByTot($equation, $datasets) \n {\n $max = 0;\n $codebooks = $equation->meta->pluck('value')->first();\n $datasets = collect($datasets)->pluck('id');\n\n foreach($datasets as $dataset) {\n $max += Dataset::find($dataset)->meta_rows_max; // Find a Way to Reduce This. Possibly in the Graph\n }\n\n $query = DatasetMeta::query();\n $query->selectRaw(\"(COUNT(t1.value) / $max) AS result, COUNT(t2.value) as qty, t2.value AS grp\");\n $query->from('datasets_meta as t1');\n $query->join('datasets_meta as t2', function($q) {\n $q->on('t1.datasets_id', '=', 't2.datasets_id')\n ->on('t1.row', '=', 't2.row');\n });\n $query->when((count($datasets) === 1), function($q) use ($datasets) {\n return $q->where('t1.datasets_id', $datasets[0]);\n });\n $query->when((count($datasets) > 1), function($q) use ($datasets) {\n return $q->whereIn('t1.datasets_id', $datasets);\n });\n $query->where([\n ['t1.codebook_id', $codebooks],\n ['t2.codebook_id', $equation->value],\n ['t1.value', '!=', 'header']\n ]);\n $results = $query->groupBy('t2.value')->get()->sortBy(function($item, $key) {\n return $item['grp'];\n })->skipWhile(function ($item) {\n return $item['grp'] == null;\n });\n\n foreach($results as $result) {\n $result->result = ($result->result <= 1) ? round($result->result * 100, 2) : round($result->result , 2);\n }\n\n return $results;\n }", "function processScore($dbanswers, $useranswers){\n $total_questions = sizeof($dbanswers);\n $total_correct = getNumCorrect($dbanswers, $useranswers);\n \n //Calculate score to 0 decimal places\n if($total_questions === 0){\n return 0;\n } else {\n return floor($total_correct / $total_questions * 100);\n }\n }", "public function _setAverageScore($averageScore) {\n\t\t$this->_averageScore = $averageScore;\n\t}", "public function getScores() {\n\t\treturn $this->scores;\n\t}", "public function earned_score($answers, $attempt) {\n return $answers[$attempt->answerid]->score;\n }", "public function hasAvg() {\n return $this->_has(4);\n }", "public function getCompanyAverageRatings($ratings){\n\n\t\t$total=count($ratings);\n\t\t$culture=$management=$work_live_balance=$career_development=0;\n\n\t\tforeach($ratings as $rating){\n\t\t\t$culture += $rating['culture'];\n\t\t $management += $rating['management'];\n\t\t\t$work_live_balance += $rating['work_live_balance'];\n\t\t\t$career_development += $rating['career_development'];\t\n\t\t}\t\n\t\t\n\t\t$avgCulture = $culture/$total;\n\t\t$avgManagement = $management/$total;\n\t\t$avgWork_live = $work_live_balance/$total;\n\t\t$avgCareer_dev = $career_development/$total;\n\n\t\treturn array('culture'=>$avgCulture, 'management'=>$avgManagement, 'work_live_balance'=>$avgWork_live, 'career_development'=>$avgCareer_dev);\n\t}", "public function calculate()\n\t{\n\t\t$this->sold();\n\t\t$this->rank();\n\t\t$this->feedback();\n\t\t$this->storeActive();\n\t\t$this->cod();\n\t\t$this->accountAge();\n\t\t$this->imageCount();\n\n\t\treturn $this->score;\n\t}", "public function averageRatingAsPercentage() : float\n {\n $range = config('rateable.minimum') > 0 ? config('rateable.maximum') - config('rateable.minimum') : config('rateable.maximum');\n return ($this->ratings()->count() * $range) != 0 ? $this->sumRating() / ($this->ratings()->count() * $range) * 100 : 0;\n }", "public function getSumScore() {\n\t\treturn $this->sumScore;\n\t}", "public function getAverageFinish()\n {\n $total = $this->teams->reduce(function ($position, $team) {\n return $position + $team->position;\n });\n\n return round($total / $this->teams->count());\n }", "function getAverageAge($input) {\n global $sum; //'sum' was global gedeclareerd\n for($i=0; $i<count($input); $i++) { //$i moest '0' inhouden\n $sum += $input[$i];\n }\n\n return $sum / $i; //moest nog delen door aantal values van het array\n }", "public static function mean($values_arr){\r\n\t\treturn (float) (array_sum($values_arr) / count($values_arr));\r\n }", "public function getElderScore(){\n $this->db->select('ROUND(AVG(Answers.Score),2) avg_Score, Elder.FirstName FirstName, Elder.LastName LastName, Elder.RoomNumber RoomNumber, Elder.ID_Elder Elder_ID ');\n $this->db->where(\"Answers.Score !=\",6);\n $this->db->join('Elder','Elder.ID_Elder=Answers.ID_Elder');\n $this->db->group_by('Answers.ID_Elder');\n $this->db->order_by('AVG(Answers.Score)',\"asc\");\n $this->db->limit(10);\n $this->db->from('Answers');\n $query= $this->db->get();\n $data['avg_scores']=$query->result();\n return $data;\n }", "public static function average(array $data): float\n\t{\n\t\treturn self::mean($data);\n\t}", "function it_exchange_get_average_value_of_recovered_abandon_carts( $format_price=true ) {\n\t$carts = it_exchange_get_abandoned_carts( array( 'cart_status' => 'recovered' ) );\n\t$num_carts = count( $carts );\n\t$value = 0;\n\tforeach( $carts as $cart ) {\n\t\t$cart_value = it_exchange_convert_to_database_number( $cart->cart_value );\n\t\t$value = $value + $cart_value;\n\t}\n\n\t$value = it_exchange_convert_from_database_number( $value );\n\n\t$average = empty( $value ) || empty( $num_carts ) ? 0 : $value/$num_carts;\n\n\treturn empty( $format_price ) ? $average : it_exchange_format_price( $average );\n}", "public static function average()\n {\n //retrieve the arguments passed to the function, and extracts the reference to the execution environment\n $args = func_get_args();\n $self = array_shift($args);\n\n //return the average of the array\n return array_sum($args) / count($args); \n }", "protected function getCriterionsAverageScore(\\SimpleXMLElement $rating)\n {\n $criterions = array('criterion1', 'criterion2', 'criterion3', 'criterion4', 'criterion5', 'criterion6');\n $sum = 0;\n $divider = 0;\n foreach ($criterions as $criterion) {\n $criterionValue = (float) $rating->$criterion;\n if ($criterionValue > 0) {\n ++$divider;\n $sum += $criterionValue;\n }\n }\n $divider = (0 == $divider) ? count($criterions) : $divider;\n\n return $sum / $divider;\n }", "public function illustrationScore()\n {\n return $this->setRightOperand(PVar::ILLUSTRATION_SCORE);\n }", "static public function getAverageMonthPace() {\r\n\t\tif (self::$AverageMonthPace === false) {\r\n\t\t\t$AverageMonthPace = DB::getInstance()->query('SELECT AVG(`s`/60/`distance`) AS `avg` FROM `'.PREFIX.'training` WHERE `time` > '.(time()-30*DAY_IN_S).' AND `sportid`='.CONF_RUNNINGSPORT.' LIMIT 1')->fetch();\r\n\t\t\tself::$AverageMonthPace = $AverageMonthPace['avg'];\r\n\t\t}\r\n\r\n\t\treturn self::$AverageMonthPace;\r\n\t}", "public function score(): int;", "public function avg($matcher = null);", "public function calcAverageMileage()\n {\n $battles = $this->battles - $this->battles_old;\n \n return $battles > 0 \n ? (float)$this->mileage / $battles \n : null;\n }", "public function testGetMarkAverage()\n {\n $affectedProgram = $this->em->getRepository('AppBundle:AffectedProgram')->findOneBy(array('name' => 'Francais'));\n $sequence1 = $this->em->getRepository('AppBundle:Sequence')->findOneBy(array('name' => '1er Trimestre'));\n //Get marks of a student_1 6em from fixture and calculate their average\n $student_1_6em1 = $this->em->getRepository('AppBundle:Student')->findOneBy(array('name' => 'Eleve 6em 1'));\n $marks = $student_1_6em1->getMarksByAffectedProgramAndSequence($affectedProgram, $sequence1, 'Devoir');\n $average = $this->utils->getMarksAverage($marks);\n $this->assertEquals($average, 10.00);\n }" ]
[ "0.751052", "0.7431387", "0.7275573", "0.7019374", "0.6962624", "0.682391", "0.6817371", "0.67015743", "0.66648275", "0.66227645", "0.66029304", "0.66029304", "0.65378916", "0.65207016", "0.64842415", "0.6467828", "0.6467817", "0.6453052", "0.6439533", "0.6434357", "0.63349897", "0.6330618", "0.6313502", "0.6305231", "0.6287137", "0.62854415", "0.6272179", "0.6272151", "0.62445074", "0.6215073", "0.6211598", "0.61985064", "0.61962086", "0.61809033", "0.61784357", "0.6177721", "0.6160018", "0.61341083", "0.61261404", "0.61250573", "0.6119728", "0.6106703", "0.61034304", "0.6092404", "0.60880536", "0.6069236", "0.60615605", "0.6038608", "0.6026846", "0.60221106", "0.60162026", "0.5983813", "0.5967877", "0.5961658", "0.5958157", "0.5949108", "0.5934019", "0.59264743", "0.5920195", "0.5912317", "0.58880895", "0.5876221", "0.58747715", "0.58733475", "0.5871795", "0.58640844", "0.58640844", "0.58640844", "0.58640844", "0.58618474", "0.5860579", "0.58464575", "0.5835822", "0.5832495", "0.5827926", "0.5826785", "0.5822273", "0.58155656", "0.5808969", "0.5807239", "0.57912093", "0.577912", "0.57766014", "0.5775803", "0.5774378", "0.5768135", "0.5755071", "0.57492095", "0.57490766", "0.5748654", "0.5743976", "0.5743905", "0.5733899", "0.5727682", "0.572382", "0.5721202", "0.5715785", "0.57010186", "0.5692938", "0.567885" ]
0.73646176
2
/ Initialize action controller here
public function init() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "protected function initializeController() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initAction()\n {\n }", "protected function initializeAction() {\n\t\t/* Merge flexform and setup settings\n\t\t * \n\t\t */\n\t\t$this->settings['action'] = $this->actionMethodName;\n\t}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {\n\n\t}", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "protected function initializeAction() {\n\t\t$this->akismetService->setCurrentRequest($this->request->getHttpRequest());\n\t}", "public function __construct($controller,$action) {\n\t\tparent::__construct($controller, $action);\n\t\t\n\t}", "public function init()\n {\n $controller = $this->router->getController();\n $action = $this->router->getAction();\n $params = $this->router->getParams();\n\n $objController = registerObject($controller);\n\n call_user_func_array([$objController, $action], $params);\n }", "public function __construct($controller, $action) {\n parent::__construct($controller, $action); //parent is Controller.php\n }", "protected function initAction()\r\n {\r\n $return = false;\r\n\r\n // parse request URI\r\n $parts_url = parse_url(strtolower(trim($_SERVER['REQUEST_URI'], '/')));\r\n // @TODO: fix\r\n $parts_url_array = explode('/', $parts_url['path']);\r\n list($this->controllerName, $this->itemId) = $parts_url_array;\r\n\r\n // parse method\r\n $this->requestMethod = strtolower($_SERVER['REQUEST_METHOD']);\r\n\r\n switch ($this->requestMethod) {\r\n case 'get':\r\n // default actions for GET\r\n if ($this->controllerName == 'login' || $this->controllerName == 'logout') {\r\n $this->actionName = $this->controllerName;\r\n $this->controllerName = 'users';\r\n } elseif (is_null($this->itemId)) {\r\n $this->actionName = 'index';\r\n } else {\r\n $this->actionName = 'view';\r\n }\r\n break;\r\n case 'post':\r\n // default action for POST\r\n $this->actionName = 'add';\r\n break;\r\n case 'put':\r\n // default action for PUT\r\n $this->actionName = 'edit';\r\n break;\r\n case 'delete':\r\n // default action for DELETE\r\n $this->actionName = 'delete';\r\n break;\r\n }\r\n\r\n if (!$this->controllerName) {\r\n $this->controllerName = 'main';\r\n }\r\n if (!$this->actionName) {\r\n $this->actionName = 'index';\r\n }\r\n\r\n // get, check & requre class\r\n $className = sprintf('mob%s', ucfirst($this->controllerName));\r\n $className = 'pages\\\\' . $className;\r\n \r\n if (class_exists($className)) {\r\n //create a instance of the controller\r\n $this->controller = new $className();\r\n\r\n //check if the action exists in the controller. if not, throw an exception.\r\n $actionName = sprintf('action%s', ucfirst($this->actionName));\r\n if (method_exists($this->controller, $actionName) !== false) {\r\n $this->action = $actionName;\r\n // set request params\r\n if ($this->itemId) {\r\n $this->controller->setParams(array('id' => $this->itemId));\r\n }\r\n $this->controller->setRequestParams($this->requestMethod);\r\n\r\n $return = true;\r\n } else {\r\n $this->controller->httpStatusCode = HTTP_STATUS_METHOD_NOT_ALLOWED;\r\n// throw new \\Exception('Action is invalid.');\r\n }\r\n } else {\r\n $this->controller = new clsMobController();\r\n $this->controller->httpStatusCode = HTTP_STATUS_NOT_FOUND;\r\n// throw new \\Exception('Controller class is invalid.');\r\n }\r\n\r\n return $return;\r\n }", "public function __construct()\n {\n // Prepare the action for execution, leveraging constructor injection.\n }", "public function __construct() {\n // filter controller, action and params\n $url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL); // $_GET['url']\n $params = explode('/', trim($url, '/'));\n\n // store first and seccond params, removing them from params list\n $controller_name = ucfirst(array_shift($params)); // uppercase classname\n $action_name = array_shift($params);\n\n require_once APP . 'config.php';\n\n // default controller and action\n if (empty($controller_name)) {\n $controller_name = AppConfig::DEFAULT_CONTROLLER;\n }\n if (empty($action_name)) {\n $action_name = AppConfig::DEFAULT_ACTION;\n }\n\n // load requested controller\n if (file_exists(APP . \"Controller/$controller_name.php\")) {\n require CORE . \"Controller.php\";\n require CORE . \"Model.php\";\n require APP . \"Controller/$controller_name.php\";\n $controller = new $controller_name();\n\n // verify if action is valid\n if (method_exists($controller, $action_name)) {\n call_user_func_array(array($controller, $action_name), $params);\n $controller->render(\"$controller_name/$action_name\"); // skipped if already rendered\n } else {\n // action not found\n $this->notFound();\n }\n } else {\n // controller not found\n $this->notFound();\n }\n }", "public static function init() {\n\t\tself::setup_actions();\n\t}", "protected function initializeAction()\n\t{\n\t\tparent::init('Form');\n\t}", "public function initController()\n {\n $this->model = new AliveSettingServiceMeta();\n\n $this->middleware([\n\n ]);\n }", "public function init() {\n\n $this->jobs = new Hb_Jobs();\n if ($this->_request->getActionName() == 'view') {\n\n $this->_request->setActionName('index');\n }\n\n $this->searchParams = $this->_request->getParams();\n $this->view->searchParams = $this->searchParams;\n\n $this->view->actionName = $this->_request->getActionName();\n }", "protected function initializeAction()\n {\n $this->extKey = GeneralUtility::camelCaseToLowerCaseUnderscored('BwrkOnepage');\n /** @var LanguageAspect $languageAspect */\n $languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');\n $this->languageUid = $languageAspect->getId();\n }", "protected function initializeAction()\n {\n parent::initializeAction();\n $this->customer = SubjectResolver::get()\n ->forClassName(Customer::class)\n ->forPropertyName('user')\n ->resolve();\n }", "public function initialize()\n {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie');\n $this->cors();\n\n $currentController = $this->request->getParam('controller');\n // pr($currentController); die();\n if($currentController == 'Tenants'){\n $currentController = 'TenantUsers';\n }\n if($currentController == 'CorporateClients'){\n $currentController = 'CorporateClientUsers';\n // pr($currentController);die();\n }\n // $currentController = $this->request->params['controller'];\n $loginAction = $this->Cookie->read('loginAction');\n if(!$loginAction){\n $loginAction = ['controller' => $currentController,'action' => 'login'];\n }\n // pr($loginAction);die;\n $this->loadComponent('Auth',[\n 'loginAction' => ['controller' => $currentController,'action' => 'login'],\n 'authenticate' => [\n 'Form' =>\n [\n 'userModel' => $currentController,\n 'fields' => ['username' => 'email', 'password' => 'password']\n ]\n ],\n 'authorize'=> ['Controller'],\n 'loginAction' => $loginAction,\n 'loginRedirect' => $loginAction,\n 'logoutRedirect' => $loginAction \n\n ]);\n // $this->loadComponent('Auth', [\n\n // 'unauthorizedRedirect' => false,\n // 'checkAuthIn' => 'Controller.initialize',\n\n // // If you don't have a login action in your application set\n // // 'loginAction' to false to prevent getting a MissingRouteException.\n // 'loginAction' => false\n // ]);\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n }", "public function init() {\n\t\t$this->load_actions();\n\t}", "public function init()\r\n {\r\n\r\n /* Initialize action controller here */\r\n\r\n //=====================================must add in all Controller class constructor ===================================//\r\n if(defined('SITEURL')) $this->site_url = SITEURL;\r\n if(defined('SITEASSET')) $this->site_asset = SITEASSET;\r\n $this->view->site_url = $this->site_url;\r\n $this->view->site_asset = $this->site_asset;\r\n Zend_Loader::loadClass('Signup');\r\n Zend_Loader::loadClass('User');\r\n Zend_Loader::loadClass('Request');\r\n //Zend_Loader::loadClass('mailerphp');\r\n\t\t//Zend_Loader::loadClass('Permission');\r\n\r\n\r\n //-----------------------------------------------authenticate logged in user---------------------------------------------//\r\n Zend_Loader::loadClass('LoginAuth');\r\n $this->view->ob_LoginAuth = $this->sessionAuth = new LoginAuth();\r\n\r\n $this->sessionAuth->login_user_check();\r\n\r\n $this->sessionAuth->cookie_check();\r\n $this->view->server_msg = $this->sessionAuth->msg_centre();\r\n\r\n //-----------------------------------------------authenticate logged in user---------------------------------------------//\r\n unset($_SESSION['tranzgo_session']['export_list']);\r\n $this->view->ControllerName = $this->_request->getControllerName();\r\n $this->view->page_id = ($_SESSION['tranzgo_session']['role_id']==1)?'5':'7';\r\n //______________________________________must add in all Controller class constructor _____________________________________//\r\n\r\n\r\n }", "public function __construct() {\n\t\t\t$this->init_globals();\n\t\t\t$this->init_actions();\n\t\t}", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->resolution_summary = \"\";\n\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}", "function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t\t$this->_actionModel = new Action_Model();//khoi tao class\n\t\t}", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "protected function initializeAction() {\t\n\t\t$this->persdataRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_persdataRepository');\n\t}", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->media_values = array(\n\t\t\t101 => Kohana::lang('ui_main.all'),\n\t\t\t102 => Kohana::lang('actionable.actionable'),\n\t\t\t103 => Kohana::lang('actionable.urgent'),\n\t\t\t104 => Kohana::lang('actionable.action_taken')\n\t\t);\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct() {\n\n list($null,$controller, $action, $id) = explode(\"/\", $_SERVER['PATH_INFO']);\n \n $this->urlValues['base'] = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n $this->urlValues['controller'] = $controller ? $controller : \"home\";\n $this->urlValues['action'] = $action;\n $this->urlValues['id'] = $id;\n\n $this->controllerName = strtolower($this->urlValues['controller']);\n $this->controllerClass = ucfirst(strtolower($this->urlValues['controller'])) . \"Controller\";\n\n if ($this->urlValues['action'] == \"\") {\n $this->action = \"index\";\n } else {\n $this->action = $this->urlValues['action'];\n }\n }", "protected function _initControllers()\n\t{\n\t\treturn;\n\t}", "public function init()\n {\n $this->vars['CRUD']['Object'] = $this;\n $this->kernel = kernel();\n\n // Dynamic initialization\n if (! $this->modelName) {\n $modelRefl = new ReflectionClass($this->modelClass);\n $this->modelName = $modelRefl->getShortName();\n }\n\n\n if (! $this->crudId) {\n $this->crudId = \\Phifty\\Inflector::getInstance()->underscore($this->modelName);;\n }\n if (! $this->templateId) {\n $this->templateId = $this->crudId;\n }\n\n // Derive options from request\n if ($request = $this->getRequest()) {\n if ($useFormControls = $request->param('_form_controls')) {\n $this->actionViewOptions['submit_btn'] = true;\n $this->actionViewOptions['_form_controls'] = true;\n }\n }\n\n $this->reflect = new ReflectionClass($this);\n $this->namespace = $ns = $this->reflect->getNamespaceName();\n\n // XXX: currently we use FooBundle\\FooBundle as the main bundle class.\n $bundleClass = \"$ns\\\\$ns\";\n if (class_exists($bundleClass)) {\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n } else {\n $bundleClass = \"$ns\\\\Application\";\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n }\n\n $this->vars['Handler'] = $this;\n $this->vars['Controller'] = $this;\n\n // anyway, we have the model classname, and the namespace, \n // we should be able to registerRecordAction automatically, so we don't have to write the code.\n if ($this->registerRecordAction) {\n $self = $this;\n $this->kernel->event->register('phifty.before_action',function() use($self) {\n $self->kernel->action->registerAction('RecordActionTemplate', array(\n 'namespace' => $self->namespace,\n 'model' => $self->modelName,\n 'types' => (array) $self->registerRecordAction\n ));\n });\n }\n\n\n $this->initPermissions();\n\n /*\n * TODO: Move this to before render CRUD page, keep init method simple\n\n if ( $this->isI18NEnabled() ) {\n $this->primaryFields[] = 'lang';\n }\n */\n $this->initNavBar();\n }", "public function _initialize()\n {\n $this->cate=CONTROLLER_NAME;\n }", "protected function initializeActionEntries() {}", "protected function initializeAction() {\n\t\t$this->feusers = $this->feusersRepository->findByUid( $GLOBALS['TSFE']->fe_user->user['uid'] ) ;\n\t\t$this->schule = $this->feusers->getSchule();\n\t\n\t\t$this->extKey = $this->request->getControllerExtensionKey();\n\t\t$this->extPath = t3lib_extMgm::extPath($this->extKey);\n\t\n\t\t$this->importClassFile = $this->extPath.'Classes/tmp/class.importtext.php';\n\t\t$this->importClass = 'ImportText';\n\t \n\t\tif ( $this->settings[pidAjaxContainerKlassenuebersicht] > 0) $this->pidAjaxContainerKlassenuebersicht = (int) $this->settings[pidAjaxContainerKlassenuebersicht];\n\t\n\t}", "public function init(){\r\n\t$this->_helper->_acl->allow('public',NULL);\r\n\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\r\n\t$this->_contexts = array('xml','json');\r\n\t$this->_helper->contextSwitch()\r\n\t\t->setAutoDisableLayout(true)\r\n\t\t->addActionContext('oneto50k',$this->_contexts)\r\n\t\t->addActionContext('index',$this->_contexts)\r\n\t\t->initContext();\r\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function initBaseController();", "public function init() {\n $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t\t$this->_helper->acl->allow('public',null);\n\t\t$this->_helper->contextSwitch()\n\t\t\t ->setAutoDisableLayout(true)\n\t\t\t ->addActionContext('index', array('xml','json'))\n ->initContext();\n\t}", "public function __construct()\n {\n // Call the CI_Controller constructor\n parent::__construct();\n }", "public function __construct()\n\t{\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function initAction() : object\n {\n /**\n * Show all movies.\n */\n $response = $this->app->response;\n return $response->redirect(\"cms/posts\");\n }", "protected function initializeAction() {\n\t\t$this->frontendUserRepository = t3lib_div::makeInstance('Tx_GrbFeusermanager_Domain_Repository_FrontendUserRepository');\n\t}", "public function contentControllerInit()\n\t{\n\t}", "protected function initializeAction()\n {\n parent::initializeAction();\n\n $query = GeneralUtility::_GET('q');\n if ($query !== null) {\n $this->request->setArgument('q', $query);\n }\n }", "public function __construct()\n {\n $this->setAction('index', array('idle', 'toggleEnabled', 'expunge'));\n }", "public static function init() {\n\t\t$_GET = App::filterGET();\n\t\t\n\t\t// Checken of er params zijn meegegeven\n\t\ttry {\n\t\t\tif (count($_GET) == 0) {\n\t\t\t\t$_GET[0] = '';\n\t\t\t}\n\t\t\t\n\t\t\t// Is de eerste param een controller ? Anders een pageView\n\t\t\tif (self::isController($_GET[0])) {\n\t\t\t\t$controllerName = self::formatAsController($_GET[0]);\n\t\t\t\t$controller = self::loadController($controllerName);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Er is sprake van een pageview\n\t\t\t\t$controllerName = 'PagesController';\n\t\t\t\t$controller = self::loadController($controllerName);\n\t\t\t}\n\t\t\t\n\t\t\t$action = self::getAction($controller);\n\t\t\t$controller->setAction($action);\n\n\t\t\t// Try to exec the action\n\t\t\ttry {\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\tcatch(ActionDoesNotExistException $ex) {\n\n\t\t\t\techo $action;\n\t\t\t\t// Action bestaat niet\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\t\n\t\t\t\t// Als development is ingeschakeld, dan de ware error tonen, anders een 404 pagina\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('invalidAction');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\tcatch(MissingArgumentsException $ex) {\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\t\n\t\t\t\t// Als development is ingeschakeld, dan de ware error tonen, anders een 404 pagina\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('missingArguments');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\t\n\t\t\t// Try to render the view\n\t\t\ttry {\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t\tcatch(ViewDoesNotExistException $ex) {\n\t\t\t\t// View bestaat niet\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('invalidView');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t\t\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(NoValidTemplateException $ex) {\n\t\t\techo 'Invalid template';\n\t\t}\n\t\tcatch(IsNotControllerException $ex) {\n\t\t\techo 'Controller not found';\n\t\t}\n\t}", "public function init()\r\n { \r\n //date_default_timezone_set('America/Phoenix');\r\n $ajaxContext = $this->_helper->getHelper('AjaxContext');\r\n\t$ajaxContext->addActionContext('list', 'html')\r\n ->addActionContext('edit', 'html')\r\n ->addActionContext('dashboard', 'html')\r\n ->addActionContext('handler', 'html')\r\n ->initContext();\r\n $auth = Zend_Auth::getInstance();\r\n $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();\r\n $type = $this->getRequest()->getParam('type');\r\n if (!$auth->hasIdentity() && $action!='handler') {\r\n //echo \"THIS IS AN ERROR: \".$action;\r\n $this->_redirect('login', array('UseBaseUrl' => true));\r\n }\r\n }", "public function __construct()\n {\n $this->model = new MainModel();\n $this->params[\"pagination\"][\"totalItemsPerPage\"] = 5;\n view()->share ('controllerName', $this->controllerName);//đặt controllerName cho all action\n }", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function init() {\n $this->_temporizador = new Trf1_Admin_Timer ();\n $this->_temporizador->Inicio();\n\n /* Initialize action controller here */\n $this->view->titleBrowser = 'e-Sisad';\n }", "public function __construct()\n\t{\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "function __construct()\n {\n parent::Controller();\n }", "public function controller()\n\t{\n\t\n\t}", "public function init() {\n\t\t\t\t\t\t$this->view->controller = $this->_request->getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->action = $this->_request->getParam ( 'action' );\n\t\t\t\t\t\t$this->getLibBaseUrl = new Zend_View_Helper_BaseUrl ();\n\t\t\t\t\t\t$this->GetModelOrganize = new Application_Model_ModOrganizeDb ();\n\t\t\t\t\t\t$this->_helper->ajaxContext->addActionContext('deleteOrganisme1','json')->initContext();\n\t\t\t\t\t\t// call function for dynamic sidebar\n\t\t\t\t\t\t$this->_Categories = new Application_Model_ModCatTerm ();\n\t\t\t\t\t\t$parent_id = $this->_getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->secondSideBar = $this->_Categories->showCateParent ( $parent_id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public function initializeAction() {\t\t\n\t\t$this->contactRepository = t3lib_div::makeInstance('Tx_Addresses_Domain_Repository_ContactRepository');\t\n\t}", "public function init() {\n\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t$this->_helper->acl->allow('public',null);\n\t$this->_helper->contextSwitch()\n\t\t->setAutoDisableLayout(true)\n\t\t->addActionContext('index', array('xml','json'))\n\t\t->addActionContext('mint', array('xml','json'))\n\t\t->initContext();\n }", "public function __construct()\n {\n if (get_called_class() != 'ApplicationController') {\n $this->_set_default_layout();\n $this->_vars = new stdClass();\n $this->_init();\n }\n }", "public function initializeAction() {\n parent::initializeAction();\n $this->umDiv = new Tx_Magenerator_Domain_UserManagement_Div();\n }", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "public function actionInit()\n {\n $this->initRoles($this->roles);\n $this->initPermissions($this->permissions);\n $this->initDependencies($this->dependencies);\n }", "public function getControllerAction() {}", "public function __construct($action = '') {\n\t\t$this->app = Application::app();\n\t\t$this->setAction($action);\n\t}", "function initialize(Controller $controller) {\n $this->controller=&$controller;\n \t}", "public function __construct($controller, $action) {\n parent::__construct($controller, $action);\n $this->loadModel('Baskets');\n $this->loadModel('Orders');\n $this->loadModel('Messages');\n $this->loadModel('Products');\n\n if(Session::exists(BUYER_SESSION_NAME)) {\n $this->view->totalProductInBasket = $this->BasketsModel->countProductInBasket();\n $this->view->totalOrders = $this->OrdersModel->countSentOrder();\n $this->view->msgCount = $this->MessagesModel->unReadMessages();\n } elseif(Session::exists(STORE_SESSION_NAME)) {\n $this->view->msgCount = $this->MessagesModel->unReadMessages();\n $this->view->newOrders = $this->OrdersModel->newOrders(Session::get(STORE_SESSION_NAME));\n }\n\n $this->view->setLayout('details');\n }", "function initialize(Controller $controller) {\n $this->controller = $controller;\n }", "public function __construct() {\n if (isset($_GET['rc'])) {\n $this->url = rtrim($_GET['rc'], '/'); // We don't want no empty arg\n $this->args = explode('/', $this->url);\n }\n \n // Load index controller by default, or first arg if specified\n $controller = ($this->url === null) ? 'null' : array_shift($this->args);\n $this->controllerName = ucfirst($controller);\n\n // Create controller and call method\n $this->route();\n // Make the controller display something\n $this->controllerClass->render();\n }", "public function __construct() {\r\n\t\t\r\n\t\tSession::init();\n\t\tif (!Session::get('local'))\n\t\t\tSession::set('local', DEFAULT_LANGUAGE);\r\n\t\t\r\n\t\t$this->getUrl();\r\n\t\t\r\n\t\t//No controller is specified.\r\n\t\tif (empty($this->url[0])) {\r\n\t\t\t$this->loadDefaultController();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->loadCurrentController();\r\n\t\t$this->callControllerMethod();\r\n\r\n\t}", "public function __construct() {\n $this->urlValues = $_GET;\n if (!isset($this->urlValues['c'])) {\n $this->controllerName = \"home\";\n $this->controllerClass = \"HomeController\";\n } else {\n $this->controllerName = strtolower($this->urlValues['c']);\n $this->controllerClass = ucfirst(strtolower($this->urlValues['c'])) . \"Controller\";\n }\n \n if (!isset($this->urlValues['a'])) {\n $this->action = \"index\";\n } else {\n $this->action = $this->urlValues['a']; \n }\n }", "public function preAction() {\n $this->apiBrowser = new ApiBrowser();\n\n $basePath = $this->request->getBasePath();\n $this->namespaceAction = $basePath . '/namespace/';\n $this->classAction = $basePath . '/class/';\n $this->searchAction = $basePath . '/search';\n }", "public function init()\n {\n $this->ctrlModel = new Admin_Model_Acl_ControllersActions();\n $this->dbCtrl = new Admin_Model_DbTable_Acl_ModuleController();\n }", "function __construct($controller, $action)\n {\n global $inflect;\n\n $this->renderPage = true;\n $this->renderHeader = true;\n \t\n\t\t$this->requireUser = false;\n\t\t \n $this->_controller = ucfirst($controller);\n $this->_action = $action;\n \n $model = ucfirst($inflect->singularize($controller));\n $this->$model = new $model;\n\n $this->_template = new Template($controller, $action);\n }", "public function init(){\r\n\t\t$this->_data = $this->_request->getParams();\r\n $controller = $this->_data['controller']; //Get controller\r\n $action = $this->_data['action']; //Get action\r\n \r\n $loadfunction = new Default_Model_Common();\r\n foreach($loadfunction->loadFunction($controller) as $value){\r\n if($action == $value['action']){\r\n $load = new $value['model_load']();\r\n $this->view->$value['varname'] = $load->$value['function_load']();\r\n }\r\n }\r\n\r\n $this->view->lang = Zend_Registry::get(\"lang\"); //load language\r\n \r\n //List menu\r\n $listmenu = Zend_Registry::get(\"listmenu\");\r\n $this->view->listmenu = $listmenu;\r\n \r\n $this->view->selectaccount = ' class=\"selected\"';\r\n }", "function __construct() {\n\t\t\n\t\tparent::__construct();\n\t\t\n\t\t// skip the timestamp check for this app\n\t\tSession::check(true);\n\t\t$this->data[\"showActions\"] = true;\n\t\t$this->data[\"csrfToken\"] = CSRF::generateToken();\n\t\t\n\t}", "public function setup_actions() {}", "public function _construct($controller,$view){\r\n $this->controller = $controller;\r\n }", "abstract public function getControllerAction();", "public function initialize()\n { $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"notification\");\n }", "protected function __construct() {\n\t\t\tadd_action( 'init', array( $this, 'action__init' ), 11 );\n\t\t}", "public function init()\n {\n $this->ctrlActionModel = new Admin_Model_Acl_ControllersActions();\n $this->dbController = new Admin_Model_DbTable_Acl_ModuleController();\n $this->dbAction = new Admin_Model_DbTable_Acl_Action();\n }", "public function init()\n {\n $this->projectController->init();\n }", "function __construct() {\n\t\t\t$this->register_actions();\t\t\n\t\t\t$this->register_filters();\n\t\t}", "public function __construct() {\n // Call Module constructur\n parent::__construct();\n\n // Add additional route\n $this->_actions['GET']['/people/:id'] = 'people';\n }", "public function initialize()\n {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"refund\");\n }", "function Controller()\n\t{\t\t\n\t\t$this->method = \"showView\";\n\t\tif (array_key_exists(\"method\", $_REQUEST))\n\t\t\t$this->method = $_REQUEST[\"method\"];\n\t\t\t\t\n\t\t$this->icfTemplating = new IcfTemplating();\n\t\t$this->tpl =& $this->icfTemplating->getTpl();\n\t\t$this->text =& $this->icfTemplating->getText();\t\t\n\t\t$this->controllerMessageArray = array();\n\t\t$this->pageTitle = \"\";\n\t\t$this->dateFormat = DateFormatFactory::getDateFormat();\n\t\t$this->controllerData =& $this->newControllerData();\n\t}", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "function __construct($module,$controller,$action) {\n\t\t$this->action = $action;\n\t\t$this->controller = preg_replace('%Controller$%','',$controller);\n\t\t$this->module = $module;\n\n\t\t$jadeCacheDir = J::path(\"App/Cache/Jade/$this->module/$this->controller\");\n\t\t(is_dir($jadeCacheDir)) || mkdir($jadeCacheDir,0777,true);\n\t\t$this->cacheFile = J::path(\"$jadeCacheDir/$this->action.php\");\n\t\t$this->viewFile = J::path(\"App/Modules/$this->module/Views/$this->controller/$this->action.jade\");\n\t}", "public function __construct()\n {\n $url = $this->getUrl();\n // Look in controllers folder for first value and ucwords(); will capitalise first letter \n if (isset($url[0]) && file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n $this->currentController = ucwords($url[0]); // Setting the current controllers name to the name capitilised first letter\n unset($url[0]); \n }\n\n // Require the controller\n require_once '../app/controllers/' . $this->currentController . '.php';\n // Taking the current controller and instantiating the controller class \n $this->currentController = new $this->currentController;\n // This is checking for the second part of the URL\n if (isset($url[1])) {\n if (method_exists($this->currentController, $url[1])) { // Checking the seond part of the url which is the corresponding method from the controller class\n $this->currentMethod = $url[1];\n unset($url[1]);\n }\n }\n\n // Get params, if no params, keep it empty\n $this->params = $url ? array_values($url) : []; \n\n // Call a callback with array of params\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->view = new ViewController();\t\t\n\t}", "public function __construct()\n {\n $this->controller = new Controller;\n $this->error_message = 'bad request or duplicate data';\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }" ]
[ "0.8956196", "0.8956196", "0.8204862", "0.8002301", "0.8002301", "0.80022395", "0.7926747", "0.78016055", "0.77490765", "0.77490765", "0.77490765", "0.77490765", "0.77490765", "0.7740988", "0.7648692", "0.7542319", "0.7540251", "0.7458473", "0.7428959", "0.738266", "0.7347326", "0.73311657", "0.7321764", "0.73060554", "0.72953796", "0.72761834", "0.7253839", "0.7245967", "0.7213255", "0.72060937", "0.716701", "0.71539956", "0.71300983", "0.7115855", "0.70868677", "0.70816493", "0.70789033", "0.70656085", "0.70540476", "0.70482826", "0.7035047", "0.702867", "0.6994912", "0.6991222", "0.69841284", "0.69816774", "0.6977907", "0.6972056", "0.6965374", "0.6935039", "0.69344574", "0.69265664", "0.6922978", "0.6912095", "0.69094026", "0.68968254", "0.68907255", "0.68748915", "0.6870384", "0.6870384", "0.6863148", "0.6847468", "0.6843391", "0.6842448", "0.6806288", "0.6804903", "0.68029016", "0.67923963", "0.6770408", "0.6766326", "0.6765609", "0.67554075", "0.6724017", "0.67210335", "0.67202705", "0.6719092", "0.67095846", "0.6708893", "0.67073137", "0.6701156", "0.6699524", "0.66990834", "0.66945916", "0.6692783", "0.6692499", "0.66865385", "0.6685266", "0.6685089", "0.6673825", "0.6667688", "0.66592145", "0.6650796", "0.6642103", "0.6640653", "0.6634277", "0.6610608", "0.6608838", "0.66073966", "0.6606654", "0.66000974", "0.6598075" ]
0.0
-1
$Blog = new Application_Model_DbTable_Blog();
public function postAction() { // $this->view->blog = $Blog->fetchAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct(){\r\n\t\t$this->database = new Model;\r\n\t}", "function AAtribut()\r\n{\r\n\r\n$this->database = new Database();\r\n\r\n}", "public function __construct(Blog $blog)\n {\n $this->model = $blog;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Blogs');\n }", "public function __construct()\n {\n $this->table = 'tag';\n\t\t$this->model = $db = DB::table($this->table);\n }", "function __construct() {\r\n parent::__construct();\r\n $this->load->library('OracleModel');\r\n $this->DBObject = new OracleModel();\r\n }", "public function __construct(){\r\n\t\tparent::__construct(\"user\", \"blog\");\r\n\t\t\t\r\n\t}", "public function model() {\n require_once \"../app/models/model.php\";\n $this->model = new Model($this->db);\n }", "function test()\n{\n\n$this->database = new Database();\n\n}", "public function __construct(){\n $this->db = new Base;\n }", "protected function _construct()\n {\n $this->_init('truongcl_blog', 'id');\n }", "function Page_Model()\n\t{\n\t\tparent::__construct();\n\t}", "public function __construct(){\n $this->db = new Base;\n }", "public function __construct(){\n $this->db = new Database;\n }", "public function ormObject();", "public function __construct()\n {\n $this->model = new Post();\n }", "function __construct() {\n $this->sql = new Site_SQL;\n }", "public function __construct()\n\t{\n\t\t$this->db = new Database();\n\t}", "function __construct(){\n\t\t\t$this->db = new Database();\n\t\t}", "function __construct(){\n $this->connect(DB_HOST,DB_USER,DB_PASS,DB_NAME);\n $this->_model=get_class($this);\n $this->_table=strtolower($this->_model).\"s\";\n $this->watchdog=new Watchdog();\n }", "public function __construct(){\n $this->db = new Database;\n }", "public function __construct(){\n $this->_db = DB::getInstance();\n }", "function __construct(){\r\n $this->db=new ConnectDb();\r\n $this->connection=$this->db->open_connection();\r\n $this->db->setTable($this->tablename);\r\n}", "public function __construct()\n {\n $this->db = new Database();\n }", "public function __construct()\n {\n $this->db = new Database();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::Model();\n $this->load->database('default'); \n }", "function __construct()\n {\n // Call the Model constructor\n parent::Model();\n $this->load->database('default'); \n }", "function __construct()\n {\n // Call the Model constructor\n parent::Model();\n $this->load->database('default'); \n }", "public function __construct() {\n // Call the CI_Model constructor\n parent::__construct();\n $this->load->database();\n }", "function SiteRules()\n{\n\n$this->database = new Database();\n\n}", "public function __construct()\n{\nparent::__construct();\n\n//load database libray manually\n$this->load->database();\n\n//load Model\n$this->load->model('welcomemodel');\n}", "public function __construct()\n {\n $this->db = new DbController(\"mysql\");\n }", "public function __construct(){\n $this->db = DB::getInstance();\n }", "public function __construct()\n {\n $this->db = new DB();\n }", "function MyProfileArticleDAO()\r\n\t{\r\n\t\t$this->my_profiles = array();\r\n\t\t$this->_db = new DBClass();\r\n\t}", "public function __construct()\n {\n $this->db = new Database;\n }", "public function __construct()\n {\n $this->db = new Database;\n }", "public function __construct(){\n\t\t$this->db = new \\Model\\dal();\n\t}", "public function __construct(){\n $this->db = new Conexion_BD; \n }", "public function __construct() {\r\n $this->db = new Database;\r\n }", "public function __construct() {\r\n\t\t$this->_db = new DAL();\r\n\t}", "public function __construct(){\n\t\t$this->load->database();\n\t\t$this->_db_name = 'banner';\n\t}", "public function __construct()\t\n\t{\n $this->load->database();\n\t}", "public function __construct()\n {\n $this->db = Db::getInstance();\n }", "public function __construct(){\r\r\n\t\t//Database is aan te roepen als $this->db\r\r\n\t\t$this->load->database();\r\r\n\t}", "function getInsertPost() \r\n{\r\n $blogManager = new Writer\\Blog\\Model\\BlogManager;\r\n $descBlog = $blogManager->getBlog();\r\n \r\n \r\n require('view/backend/insertPost.php');\r\n}", "public function __construct()\n\t{\n\t\t$imgFileManager = new BlogImageManagerBuilder();\n\t\t$this->imgFileManager = $imgFileManager\n\t\t\t->setInputName(self::INPUT_NAME)->build();\n\n\t\t$this->model = new Blog();\n\t}", "function __construct() {\n $this->model = new HomeModel();\n }", "public function __construct() {\n//to make connection db \n//when you make object from class baseModel Or any child(extends) Class\n\n parent::__construct();\n $this->connecToDB();\n }", "public function __construct($dbName = 'bloggie', $modelName = 'NewsSubject', $modelAlias = null)\n {\n parent::__construct($dbName, $modelName, $modelAlias);\n }", "public function __construct()\n {\n // $this->load->database();\n\t}", "function __construct()\n\t\t{\n\t\t\t// Call the Model constructor\n\t\t\tparent::__construct();\n\t\t $this->load->database();\t\n\t\t}", "public function newBlogInstance()\n\t{\n\t\treturn $this->blog;\n\t}", "function __construct () {\n\t\t$this->_model = new Model();\n\t}", "function __construct()\n {\n parent::__construct();\n $this->load->database();\n //$this->load->model('Mod_aziende');\n }", "public function __construct()\r\n {\r\n $this->load->database();\r\n }", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('PluginzsBlogArticle');\r\n }", "public function __construct()\n\t\t{\n\t\t\t$this->_db = new Database();\n\t\t}", "function init_article($title, $content,$views, $publish_date, $update_date, $author) {\n $article = ORM::for_table('pw_article')->create();\n $article->art_title = $title;\n $article->art_content= $content;\n $article->art_views = $views;\n $article->art_publish_date= $publish_date;\n $article->art_update_date =$update_date;\n $article->art_author=$author;\n $article->save();\n return $article;\n}", "public function __construct() {\r\n\t\tparent::__construct();\r\n\t\t$this->load->model(\"bibliotecaModel\");\r\n\t}", "public function __construct(){\n //load constructor CI_Model\n parent::__construct();\n \n //load database\n $this->load->database();\n }", "public function __construct()\n { // langsung connect ke class databasenya.\n $this->db = new Database(); // instansiasi kelas database.\n }", "public function __construct() {\n\t\t$this->db = DB::getInstance();\n\t}", "public function __construct() \r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\tinclude APP_ROOT.'/Models/Author.php';\r\n\t\t$this->Author = new Author();\r\n\t}", "function __construct() \n {\n parent::__construct();\n $this->load->database(); \n $this->load->helper('date');\n\n\n //$this->load->model('modelsite');\n }", "public function __construct() {\n $this->load->database();\n\t}", "function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t\t$this->model->table=\"tb_dosen\";\n\t\t}", "function colores(){\n\n$this->database = new Database();\n\n}", "function __construct()\n {\n $this->_db = DB::getInstance();\n }", "public function __construct(){\n\t\t$this->AB = new About(); \n\t\t$this->AP = new AppModel();\n\n\t}", "public function __construct()\n {\n $this->_db_exam = new CTVExamDao();\n }", "public function __construct()\n {\n parent::__construct();\n $this->language->load('Home');\n $this->Database = new \\Models\\Db();\n }", "public function __construct() {\r\n\t\t$this->load->database();\r\n\t}", "public function __construct ()\n{\n $this->load->database();\n}", "public function __construct() {\n $this->mysql = new Mysql();\n }", "public function __construct(){\n $this->load->database();\n }", "public function __construct(){\n\t\t\t$this->load->database();\n\t\t}", "public function __construct(){\n //autoloading\n $this->db = new \\Konekta();\n\n }", "public function __construct()\t{\n\t\t$this->load->database();\n\t}", "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->database();\n\t}", "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->database();\n\t}", "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->database();\n\t}", "public function __construct(){\r\n \r\n $this->db = parent::getInstance(); \r\n }", "public function __construct()\n {\n $this->object = new DBAccess();\n }", "public function getBlog() {}", "function __construct() {\r\n parent::Model();\r\n }", "function __construct(){\r\n parent::__construct();\r\n $this->load->database();\r\n }", "public function __construct() {\n global $db;\n $this->db = $db;\n }", "public function __construct(){\n $this->dbConnection = new database_connection();\n }", "public function __construct() {\n\t\t$this->load->database();\n\t}", "public function __construct() {\n // $this->load->database(); \n }", "public function __construct(){\r\n\r\n // Create connection with data base\r\n $this->_db = DB::get_Instance();\r\n }", "public function __construct(){\n\t\t$mysql = MySQL::getInstance(array('localhost', 'root', '', 'amdb'));\n\t\t$this->bewertungsmodel = new Model($mysql, 'bewertung');\n\t\t$this->videomodel = new Model($mysql, 'lied');\n\t}", "public function __construct()\r\n\t{\r\n\tparent::__construct();\r\n\t\r\n\t//load database libray manually\r\n\t$this->load->database();\r\n\t\r\n\t//load Model\r\n\t$this->load->model('Hello_Model');\r\n\t}", "protected function _construct()\n {\n //$this->_init('OmniPro\\Blogv2\\Model\\blog', 'OmniPro\\Blogv2\\Model\\ResourceModel\\Blog');\n $this->_init(\\OmniPro\\Blogv2\\Model\\blog::class, \\OmniPro\\Blogv2\\Model\\ResourceModel\\Blog::class); // -- Constante que simboliza la ruta del string, como si fuera el namespace\n }", "public function __construct(){\n $this->__updatecache = array();\n $this->__conn = mysql_connect(DB_HOST.\":\".DB_PORT,DB_USER,DB_PSWD);\n $this->__table = strtolower(get_called_class());\t//assumes the table name same as the model name\n if(!($this->__conn)){\n $this->modelError(\"Error in connecting..\");\n }\n $this->__db_flag = mysql_select_db(DB_NAME,$this->__conn);\n if(!($this->__db_flag)){\n $this->modelError(\"Error on selecting db..\");\n }\n }", "function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t//$this->pdo_connect = new database_connection();\r\n\r\n\t\t//Declaration \r\n\t\t$accounts_tbl = new app_tables();\r\n\t\t$accounts_tbl->create_profile_table();\r\n\r\n\t}", "public function __construct () \n\t{\n\t\trequire_once(\"./inc/connect_pdo.php\");\n\t\t$this->dbo = $dbo;\n\t\t\n\t}", "public function __construct() {\n parent::__construct();\n $this->db = new Database();\n }", "public function __construct()\r\n\t{\r\n\t\t$this->db = SPDO::singleton();\r\n\t}", "public function __construct()\r\n {\r\n require_once 'libs/db.php';\r\n $this->db = Db::singleton();\r\n }" ]
[ "0.6987261", "0.69517696", "0.6784438", "0.6685778", "0.6569679", "0.6533535", "0.65251017", "0.6467599", "0.6446901", "0.642897", "0.6418964", "0.64068305", "0.6393154", "0.636851", "0.63550454", "0.63470155", "0.63452226", "0.63430625", "0.633916", "0.6330288", "0.633014", "0.6318446", "0.6302725", "0.6300934", "0.6300934", "0.62986207", "0.62986207", "0.62986207", "0.62785226", "0.62736726", "0.6259409", "0.6254534", "0.6251051", "0.6248896", "0.62381315", "0.6233888", "0.6233888", "0.62235373", "0.62223303", "0.62213147", "0.6220373", "0.62111884", "0.62067777", "0.61958915", "0.61833984", "0.61623913", "0.61539286", "0.61467046", "0.6128743", "0.612445", "0.6112909", "0.61100847", "0.6106247", "0.6104845", "0.60981077", "0.6096735", "0.609644", "0.6093303", "0.6089386", "0.60750884", "0.6072503", "0.60723794", "0.60689276", "0.6068315", "0.60655", "0.606391", "0.6061231", "0.6060416", "0.60581744", "0.6056634", "0.6053712", "0.60523033", "0.6050651", "0.60496026", "0.6048511", "0.60480654", "0.6044554", "0.6040236", "0.603925", "0.60346156", "0.60346156", "0.60346156", "0.6032284", "0.60308826", "0.6029895", "0.6028862", "0.602758", "0.60272145", "0.6026367", "0.6026077", "0.6025847", "0.60245454", "0.60224795", "0.6018313", "0.6014804", "0.60134614", "0.60127056", "0.6011164", "0.6008891", "0.6007633", "0.60063267" ]
0.0
-1
/$SQL = "SELECT list,username,icon,category,visibility,color,favoris,pin,fait,reminder,reminderTime FROM list_list INNER JOIN user_list ON list_list.uid = user_list.id INNER JOIN category_list ON category_list.cid = list_list.cid WHERE category = '$category' ORDER BY list_list.fait, list_list.pin DESC,list_list.creation";
function list_list3($category, $option, $value){ switch ($option) { case 'mnotes': $SQL = "SELECT list,username,icon,category,visibility,color,favoris,pin,fait,reminder,reminderTime FROM list_list INNER JOIN user_list ON list_list.uid = user_list.id INNER JOIN category_list ON category_list.cid = list_list.cid WHERE username = '$value' and category = '$category' ORDER BY list_list.fait, list_list.pin DESC, list_list.creation"; break; case 'snotes': $SQL = "SELECT list,username,icon,category,visibility,color,favoris,pin,fait,reminder,reminderTime FROM list_list INNER JOIN user_list ON list_list.uid = user_list.id INNER JOIN category_list ON category_list.cid = list_list.cid WHERE visibility = 'shared' and category = '$category' ORDER BY list_list.fait, list_list.pin DESC, list_list.creation"; break; case 'pnotes': $SQL = "SELECT list,username,icon,category,visibility,color,favoris,pin,fait,reminder,reminderTime FROM list_list INNER JOIN user_list ON list_list.uid = user_list.id INNER JOIN category_list ON category_list.cid = list_list.cid WHERE visibility = 'public' and category = '$category' ORDER BY list_list.fait, list_list.pin DESC, list_list.creation"; break; case 'fnotes': $SQL = "SELECT list,username,icon,category,visibility,color,favoris,pin,fait,reminder,reminderTime FROM list_list INNER JOIN user_list ON list_list.uid = user_list.id INNER JOIN category_list ON category_list.cid = list_list.cid WHERE favoris = 1 and category = '$category' ORDER BY list_list.fait, list_list.pin DESC, list_list.creation"; break; case 'dnotes': $SQL = "SELECT list,username,icon,category,visibility,color,favoris,pin,fait,reminder,reminderTime FROM list_list INNER JOIN user_list ON list_list.uid = user_list.id INNER JOIN category_list ON category_list.cid = list_list.cid WHERE fait = 1 and category = '$category' ORDER BY list_list.fait, list_list.pin DESC, list_list.creation"; break; default: # code... break; } global $db; $res = $db->prepare($SQL); $res->execute(); $response = $res->fetchAll(); //var_dump($response); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newsItem_BacaDataListing_ByKategori_Terkini_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategori_Pilihan_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND pilihan != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_Terkini_All( $tbl_news ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_All( $tbl_news , $offset , $dataPerPage){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategori_DiLampirkan_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND dilampirkan != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategori_Dikomentari_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND dikomentari != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function create_list_query($order_by, $where)\r\n\t{\r\n\t\t//$custom_join = $this->custom_fields->getJOIN();\r\n $custom_join = null;\r\n\t\t$query = \"\r\n\t\t\tSELECT DISTINCT \r\n\t\t\t\tmain_contract.contract_no as main_contract_name,\r\n\t\t\t\tmain_contract.created_by as main_contract_name_owner,\r\n\t\t\t\taccounts.id as account_id, accounts.name as account_name,\r\n\t\t\t\tcon_type.name as contract_type_name, '-1' AS contract_type_name_owner,\r\n\t\t\t\tCONCAT_WS(' ', if(employee.first_name = '', NULL, employee.first_name), employee.last_name) employee_contact_name,\r\n\t\t\t\temployee.user_name as employee_contact_user_name,\r\n\t\t\t\tCONCAT_WS(' ', if(customer.first_name = '', NULL, customer.first_name), customer.last_name) customer_contact_name,\r\n\t\t\t\tcustomer.assigned_user_id as customer_contact_name_owner,\r\n\t\t\t\tcustomer.phone_work as customer_contact_phone,\r\n\t\t\t\t\r\n\t\t\t\tCASE\r\n\t\t\t\t\tWHEN `$this->table_name`.is_active = 'no'\r\n\t\t\t\t\t\tTHEN 'grey'\r\n\t\t\t\t\tWHEN `$this->table_name`.date_expire = 0\r\n\t\t\t\t\t OR `$this->table_name`.date_expire > DATE_ADD(CURDATE(),INTERVAL 30 DAY)\r\n\t\t\t\t\t\tTHEN 'green'\r\n\t\t\t\t\tWHEN `$this->table_name`.date_expire > CURDATE()\r\n\t\t\t\t\t\tTHEN 'yellow'\r\n\t\t\t\t\tELSE\r\n\t\t\t\t\t\t'red'\r\n\t\t\t\tEND as status_colour,\r\n\r\n\t\t\t\t`\".$this->table_name.\"`.*,\r\n\t\t\t\tSUM(assets.purchase_usdollar * assets.quantity) AS total_purchase,\r\n\t\t\t\tSUM(assets.unit_support_price * assets.quantity) AS total_support_cost\r\n\t\t\";\r\n\t\tif($custom_join) $query .= $custom_join['select'];\r\n\t\t$query .= \" FROM `\".$this->table_name.\"` \";\r\n\t\tif($custom_join) $query .= $custom_join['join'];\r\n\t\t$query .= \"\r\n\t\t\tLEFT JOIN users employee ON (employee.id = employee_contact_id)\r\n\t\t\tLEFT JOIN contacts customer ON (customer.id = customer_contact_id)\r\n\t\t\tLEFT JOIN $this->types_table_name con_type ON (con_type.id = contract_type_id)\r\n\t\t\tLEFT JOIN service_maincontracts main_contract ON (main_contract.id = main_contract_id)\r\n\t\t\tLEFT JOIN accounts ON (accounts.id = main_contract.account_id)\r\n\t\t\tLEFT OUTER JOIN assets ON (`\".$this->table_name.\"`.id = assets.service_subcontract_id)\r\n\t\t\";\r\n\r\n\t\t$where_auto = \" \r\n\t\t\t`\".$this->table_name.\"`.deleted != 1\r\n\t\t\";\r\n\r\n\t\tif($where != \"\")\r\n\t\t\t$query .= \"WHERE $where AND \".$where_auto;\r\n\t\telse\r\n\t\t\t$query .= \"WHERE \".$where_auto;\r\n\r\n\t\t$query .= \"GROUP BY `\".$this->table_name.\"`.id\";\r\n\t\t\t\r\n\t\tif($order_by != \"\")\r\n\t\t\t$query .= \" ORDER BY $order_by\";\r\n\t\telse\r\n\t\t\t$query .= \" ORDER BY vendor_contract\";\r\n\t\t\t\r\n\t\treturn $query;\r\n\t\t\r\n\t}", "function newsItem_BacaDataListing_ByKategori_Tampil_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND statustampil != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategori_TidakTampil_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND statustampil == '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategori_Terpopuler_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND dilihat > '20' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function getListQuery()\n\t{\n\t\tglobal $jlistConfig; \n \n // Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n $user = JFactory::getUser();\n $groups = implode (',', $user->getAuthorisedViewLevels());\n \n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$this->getState(\n\t\t\t\t'list.select',\n\t\t\t\t'a.file_id, a.file_title, a.file_alias, a.description, a.description_long, a.file_pic, a.images, a.price, a.release, a.file_language, a.system, '.\n 'a.license, a.url_license, a.license_agree, a.size, a.date_added, a.file_date, a.publish_from, a.publish_to, a.use_timeframe, a.url_download, a.preview_filename, '.\n 'a.other_file_id, a.md5_value, a.sha1_value, a.extern_file, a.extern_site, a.mirror_1, a.mirror_2, a.extern_site_mirror_1, a.extern_site_mirror_2, '.\n 'a.url_home, a.author, a.url_author, a.created_id, a.created_mail, a.modified_id, a.modified_date, a.submitted_by, a.set_aup_points, a.downloads, '.\n 'a.cat_id, a.changelog, a.password, a.password_md5, a.views, a.metakey, a.metadesc, a.robots, a.update_active, a.custom_field_1, '.\n 'a.custom_field_2, a.custom_field_3, a.custom_field_4, a.custom_field_5, a.custom_field_6, a.custom_field_7, a.custom_field_8, a.custom_field_9, '.\n 'a.custom_field_10, a.custom_field_11, a.custom_field_12, a.custom_field_13, a.custom_field_14, a.access, a.language, a.ordering, a.featured, '. \n 'a.published, a.checked_out, a.checked_out_time, ' .\n\t\t\t\t// use date_added if modified_date is 0\n // 'CASE WHEN a.modified_date = 0 THEN a.date_added ELSE a.modified_date END as modified, ' .\n 'a.modified_date as modified, ' .\n \t\t\t\t'a.modified_id,' .\n\t\t\t\t// use date_added if publish_from is 0\n\t\t\t\t'CASE WHEN a.publish_from = 0 THEN a.date_added ELSE a.publish_from END as publish_from,' .\n\t\t\t\t\t'a.publish_to, a.images, a.metakey, a.metadesc, a.access, ' .\n\t\t\t\t\t'a.downloads,'.' '.$query->length('a.description_long').' AS readmore'\n\t\t\t)\n\t\t);\n\n\t\t// Process an Archived Download layout\n\t\tif ($this->getState('filter.published') == 2) {\n\t\t\t// If badcats is not null, this means that the download is inside an archived category\n\t\t\t// In this case, the state is set to 2 to indicate Archived (even if the download state is Published)\n\t\t\t$query->select($this->getState('list.select', 'CASE WHEN badcats.id is null THEN a.published ELSE 2 END AS state'));\n\t\t}\n\t\telse {\n\t\t\t// Process non-archived layout\n\t\t\t// If badcats is not null, this means that the download is inside an unpublished category\n\t\t\t// In this case, the state is set to 0 to indicate Unpublished (even if the download state is Published)\n\t\t\t$query->select($this->getState('list.select', 'CASE WHEN badcats.id is not null THEN 0 ELSE a.published END AS state'));\n\t\t}\n\n\t\t$query->from('#__jdownloads_files AS a');\n \n // Join on files table.\n $query->select('aa.url_download AS filename_from_other_download');\n $query->join('LEFT', '#__jdownloads_files AS aa on aa.file_id = a.other_file_id'); \n\n\t\t// Join over the categories.\n\t\t$query->select('c.title AS category_title, c.access AS category_access, c.alias AS category_alias, c.cat_dir AS category_cat_dir, c.cat_dir_parent AS category_cat_dir_parent');\n\t\t$query->join('LEFT', '#__jdownloads_categories AS c ON c.id = a.cat_id');\n \n\t\t$query->join('LEFT', '#__users AS ua ON ua.id = a.created_id');\n\t\t$query->join('LEFT', '#__users AS uam ON uam.id = a.modified_id');\n\n // Join on user table.\n if ($jlistConfig['use.real.user.name.in.frontend']){\n $query->select('u.name AS creator');\n } else {\n $query->select('u.username AS creator');\n } \n $query->join('LEFT', '#__users AS u on u.id = a.created_id');\n \n if ($jlistConfig['use.real.user.name.in.frontend']){\n $query->select('u2.name AS modifier');\n } else {\n $query->select('u2.username AS modifier');\n } \n $query->join('LEFT', '#__users AS u2 on u2.id = a.modified_id'); \n \n // Join on license table.\n $query->select('l.title AS license_title, l.url AS license_url, l.description AS license_text, l.id as lid');\n $query->join('LEFT', '#__jdownloads_licenses AS l on l.id = a.license');\n \n // Join on ratings table.\n $query->select('ROUND(r.rating_sum / r.rating_count, 0) AS rating, r.rating_count as rating_count, r.rating_sum as rating_sum');\n $query->join('LEFT', '#__jdownloads_ratings AS r on r.file_id = a.file_id'); \n \n\t\t// Join over the categories to get parent category titles\n\t\t$query->select('parent.title as parent_title, parent.id as parent_id, parent.alias as parent_alias');\n\t\t$query->join('LEFT', '#__jdownloads_categories as parent ON parent.id = c.parent_id');\n \n // Join on menu table. We need the single download menu itemid when exist \n $query->select('menuf.id AS menuf_itemid');\n $query->join('LEFT', '(SELECT id, link, access, published from #__menu GROUP BY link) AS menuf on menuf.link LIKE CONCAT(\\'index.php?option=com_jdownloads&view=download&id=\\',a.file_id) AND menuf.published = 1 AND menuf.access IN ('.$groups.')') ;\n\n\t\t// Join to check for category published state in parent categories up the tree\n\t\t$query->select('c.published, CASE WHEN badcats.id is null THEN c.published ELSE 0 END AS parents_published');\n\t\t$subquery = 'SELECT cat.id as id FROM #__jdownloads_categories AS cat JOIN #__jdownloads_categories AS parent ';\n\t\t$subquery .= 'ON cat.lft BETWEEN parent.lft AND parent.rgt ';\n\t\t// Find any up-path categories that are not published\n\t\t// If all categories are published, badcats.id will be null, and we just use the download state\n\t\t$subquery .= ' AND parent.published != 1 GROUP BY cat.id ';\n\t\t// Select state to unpublished if up-path category is unpublished\n\t\t$publishedWhere = 'CASE WHEN badcats.id is null THEN a.published ELSE 0 END';\n \n\t\t$query->join('LEFT OUTER', '(' . $subquery . ') AS badcats ON badcats.id = c.id');\n\n\t\t// Filter by user id\n $query->where('a.created_id = '.$db->Quote($user->id)); \n \n // Filter by access level.\n\t\tif ($access = $this->getState('filter.access')) {\n\t\t\t$query->where('a.access IN ('.$groups.')');\n\t\t\t$query->where('c.access IN ('.$groups.')');\n\t\t}\n\n\t\t// Filter by published state\n\t\t$published = $this->getState('filter.published');\n\n\t\tif (is_numeric($published)) {\n\t\t\t// Use download state if badcats.id is null, otherwise, force 0 for unpublished\n\t\t\t$query->where($publishedWhere . ' = ' . (int) $published);\n\t\t}\n\t\telseif (is_array($published)) {\n\t\t\tArrayHelper::toInteger($published);\n\t\t\t$published = implode(',', $published);\n\t\t\t// Use download state if badcats.id is null, otherwise, force 0 for unpublished\n\t\t\t$query->where($publishedWhere . ' IN ('.$published.')');\n\t\t}\n \n // Filter by a single category\n $categoryId = $this->getState('filter.category_id');\n\n if (is_numeric($categoryId)) {\n $type = $this->getState('filter.category_id.include', true) ? '= ' : '<> ';\n\n $categoryEquals = 'a.cat_id '.$type.(int) $categoryId;\n $query->where($categoryEquals);\n } else { \n if (is_array($categoryId) && (count($categoryId) > 0)) {\n ArrayHelper::toInteger($categoryId);\n $categoryId = implode(',', $categoryId);\n if (!empty($categoryId)) {\n $type = $this->getState('filter.category_id.include', true) ? 'IN' : 'NOT IN';\n $query->where('a.cat_id '.$type.' ('.$categoryId.')');\n }\n } \n } \n\n\t\t// Filter by author\n\t\t$authorId = $this->getState('filter.author_id');\n\t\t$authorWhere = '';\n\n\t\tif (is_numeric($authorId)) {\n\t\t\t$type = $this->getState('filter.author_id.include', true) ? '= ' : '<> ';\n\t\t\t$authorWhere = 'a.created_id '.$type.(int) $authorId;\n\t\t}\n\t\telseif (is_array($authorId)) {\n\t\t\tArrayHelper::toInteger($authorId);\n\t\t\t$authorId = implode(',', $authorId);\n\n\t\t\tif ($authorId) {\n\t\t\t\t$type = $this->getState('filter.author_id.include', true) ? 'IN' : 'NOT IN';\n\t\t\t\t$authorWhere = 'a.created_id '.$type.' ('.$authorId.')';\n\t\t\t}\n\t\t}\n \n\t\tif (!empty($authorWhere)) {\n\t\t\t$query->where('('.$authorWhere.')');\n\t\t}\n\t\t\n\t\t// Filter by start and end dates.\n\t\t$nullDate\t= $db->Quote($db->getNullDate());\n\t\t$nowDate = $db->Quote(JFactory::getDate()->toSql()); // True to return the date string in the local time zone, false to return it in GMT.\n\n\t\t$query->where('(a.publish_from = '.$nullDate.' OR a.publish_from <= '.$nowDate.')');\n\t\t$query->where('(a.publish_to = '.$nullDate.' OR a.publish_to >= '.$nowDate.')');\n\n\t\t// Filter by Date Range or Relative Date\n\t\t$dateFiltering = $this->getState('filter.date_filtering', 'off');\n\t\t$dateField = $this->getState('filter.date_field', 'a.date_added');\n\n\t\tswitch ($dateFiltering)\n\t\t{\n\t\t\tcase 'range':\n\t\t\t\t$startDateRange = $db->Quote($this->getState('filter.start_date_range', $nullDate));\n\t\t\t\t$endDateRange = $db->Quote($this->getState('filter.end_date_range', $nullDate));\n\t\t\t\t$query->where('('.$dateField.' >= '.$startDateRange.' AND '.$dateField .\n\t\t\t\t\t' <= '.$endDateRange.')');\n\t\t\t\tbreak;\n\n\t\t\tcase 'relative':\n\t\t\t\t$relativeDate = (int) $this->getState('filter.relative_date', 0);\n\t\t\t\t$query->where($dateField.' >= DATE_SUB('.$nowDate.', INTERVAL ' .\n\t\t\t\t\t$relativeDate.' DAY)');\n\t\t\t\tbreak;\n\n\t\t\tcase 'off':\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// process the filter for list views with user-entered filters\n\t\t$params = $this->getState('params');\n\n\t\tif ((is_object($params)) && ($params->get('filter_field') != 'hide') && ($filter = $this->getState('list.filter'))) {\n\t\t\t// clean filter variable\n\t\t\t$filter = JString::strtolower($filter);\n\t\t\t$hitsFilter = intval($filter);\n\t\t\t$filter = $db->Quote('%'.$db->escape($filter, true).'%', false);\n\n\t\t\tswitch ($params->get('filter_field'))\n\t\t\t{\n\t\t\t\tcase 'author':\n\t\t\t\t\t$query->where(\n\t\t\t\t\t\t'LOWER(ua.name) LIKE '.$filter.' '\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hits':\n\t\t\t\t\t$query->where('a.downloads >= '.$hitsFilter.' ');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'title':\n\t\t\t\tdefault: // default to 'title' if parameter is not valid\n\t\t\t\t\t$query->where('LOWER( a.file_title ) LIKE '.$filter);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Filter by language\n\t\tif ($this->getState('filter.language')) {\n\t\t\t$query->where('a.language in ('.$db->quote(JFactory::getLanguage()->getTag()).','.$db->quote('*').')');\n\t\t}\n \n // Filter by uncategorised (cat_id = 1 for 'root')\n if ($this->getState('only_uncategorised')) {\n $query->where('a.cat_id = 1');\n }\n\n // Filter by featured state\n $featured = $this->getState('filter.featured');\n\n switch ($featured)\n {\n case 'hide':\n $query->where('a.featured = 0');\n break;\n\n case 'only':\n $query->where('a.featured = 1');\n break;\n\n case 'show':\n default:\n break;\n } \n \n\t\t// Add the list ordering clause.\n $order = $this->getState('list.ordering', 'a.ordering').' '.$this->getState('list.direction', 'ASC');\n $order = str_replace('DESC DESC','DESC', $order);\n $query->order($order);\n\t\t\n\t\treturn $query;\n\t}", "function newsItem_BacaDataListing_ByKategori_TidakPopuler_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND dilihat < '10' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategori_Hotspot_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND hotspot != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategoriSub_Pilihan_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' AND pilihan != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function mentor_list($limit='',$start=0,$condition='')\n{\n\tglobal $DB;\n\t$sql =\"SELECT u.id,u.firstname,u.lastname,u.email,u.city,u.picture,u.department FROM {user} u left join {user_info_data} ud on ud.userid=u.id \";\n\t$sql.=\"WHERE ud.data='mentor data' and ud.acceptterms=1 and u.deleted=0 $condition order by u.timemodified desc limit $start,$limit\";\n\t//echo $sql;die;\n\t$result = $DB->get_records_sql($sql);\n\tif(count($result)>0){\n\t\tforeach($result as $mentordata)\n\t\t{\n\t\t\t$user = new stdClass();\n\t\t\t$user->id = $mentordata->id;\n\t\t\t//$picture = get_userprofilepic($user);\n\t\t\t$userurl = getuser_profilelink($user->id);\n\t\t\t$usrimg = get_userprofilepic($user);\n\t\t\t$picture ='<div class=\"left picture\"><a href=\"'.$userurl.'\" >'.$usrimg.'</a></div>'; \n\t\t\t$mentordata->picture = $picture;\n\t\t}\n\t}\n\treturn $result;\n}", "public static function category_listing($category_id,$limit = 15)\n {\n \n \n\n $query = \"SELECT id, category_id,created_by, title,description, url, featured_image, create_time,primary_phone,primary_email,\n\n (SELECT name FROM 9jb_locations WHERE 9jb_listings.city = 9jb_locations.id) AS city_name,\n (SELECT fa_icon FROM 9jb_categories WHERE 9jb_listings.category_id = 9jb_categories.id) AS icon,\n (SELECT color FROM 9jb_categories WHERE 9jb_listings.category_id = 9jb_categories.id) AS color,\n (SELECT title FROM 9jb_categories WHERE 9jb_listings.category_id = 9jb_categories.id) AS category_name,\n (SELECT name FROM 9jb_locations WHERE 9jb_listings.state = 9jb_locations.id) AS state_name,\n (SELECT count(*) FROM 9jb_reviews WHERE 9jb_reviews.listing_id = 9jb_listings.id) AS reviews\n\n FROM 9jb_listings\n WHERE category_id = ? AND status='activated'\n ORDER BY create_time DESC LIMIT $limit \";\n\n return \\DB::select($query,[$category_id]) ;\n }", "function newsItem_BacaDataListing_Pilihan_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE pilihan != '0' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategoriSub_Terkini_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategoriSub_DiLampirkan_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' AND dilampirkan != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "public function get_lists_meta( $user_id, $page, $list, $un, $limit=NULL ) {\n \n if ( $un == 1 ) {\n \n $args = ['user_id' => $user_id, 'list_id' => $list, 'active' => 0];\n \n } else {\n \n $args = ['user_id' => $user_id, 'list_id' => $list];\n \n }\n \n if ( $un == 3 ) {\n \n $this->db->select('lists_meta.meta_id,networks.network_id,networks.expires,networks.network_name,networks.user_id,networks.user_name');\n $this->db->from('lists_meta');\n $this->db->join('networks', 'lists_meta.body=networks.network_id', 'left');\n $this->db->where(['lists_meta.user_id' => $user_id, 'lists_meta.list_id' => $list, 'networks.user_id' => $user_id]);\n $this->db->order_by('lists_meta.meta_id', 'desc');\n \n } else if ( $un == 4 ) {\n \n $this->db->select('lists_meta.meta_id,networks.network_id,networks.expires,networks.network_name,networks.user_id,networks.user_name');\n $this->db->from('lists_meta');\n $this->db->join('networks', 'lists_meta.body=networks.network_id', 'left');\n $this->db->like(['lists_meta.user_id' => $user_id, 'lists_meta.list_id' => $list, 'user_name' => $limit]);\n $this->db->order_by('lists_meta.meta_id', 'desc');\n \n } else {\n \n $this->db->select('*');\n $this->db->from('lists_meta');\n $this->db->where($args);\n $this->db->order_by('meta_id', 'desc');\n \n }\n \n if ( $limit || ( $un == 3 ) || ( $un == 4 ) ) {\n \n $this->db->limit($limit, $page);\n \n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n $result = $query->result();\n return $result;\n \n } else {\n \n return false;\n \n }\n \n } else {\n \n $query = $this->db->get();\n return $query->num_rows();\n \n }\n \n }", "function newsItem_BacaDataListing_Tampil_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE statustampil = '0' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategoriSub_DiKomentari_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' AND dikomentari != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategoriSub_Tampil_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' AND statustampil != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function user_list($post)\r\n {\r\n $data = array();\r\n $filter = array();\r\n\r\n\r\n $this->db->select('Users.id');\r\n $this->db->from(db_prefix.'User_logs User_logs');\r\n $this->db->join(db_prefix.'Users Users','Users.id = User_logs.user_id','LEFT');\r\n\r\n if(isset($post['filter'][0]) && strlen($post['filter'][0]) > 0)\r\n {\r\n $filter[0] = convert_date($post[\"filter\"][0]) . ' 00:00:00';\r\n $data['filter'][0] = $post[\"filter\"][0];\r\n\r\n $this->db->where(\"User_logs.time >= STR_TO_DATE('\". $filter[0] .\"','%Y-%m-%d %H:%i:%s')\");\r\n }\r\n if(isset($post['filter'][1]) && strlen($post['filter'][1]) > 0)\r\n {\r\n $filter[1] = convert_date($post[\"filter\"][1]) . ' 23:59:59';\r\n $data['filter'][1] = $post[\"filter\"][1];\r\n $this->db->where(\"User_logs.time <= STR_TO_DATE('\" . $filter[1] . \"','%Y-%m-%d %H:%i:%s')\");\r\n }\r\n \r\n $count = $this->db->count_all_results();\r\n\r\n $data['pagers'] = pager_ex($post,$count,'time',2,'desc');\r\n $params = $data['pagers']['params'];\r\n\r\n\r\n $this->db->select('`time`');\r\n $this->db->select('IF(user.id, CONCAT(\"<a href=\\\"mailto:\",user.email,\"\\\">\",user.login,\"</a>\"), CONCAT(\"<{admin_msg_er_0019}>=\",log.user_id)) AS person');\r\n// $this->db->select('CONCAT(\"<a href=\\\"mailto:\",user.email,\"\\\">\",user.login,\"</a>\") AS person');\r\n// $this->db->select('CONCAT(\"<a href=\\\"\",log.url,\"\\\">link</a>\") AS urla');\r\n $this->db->select('url');\r\n $this->db->select('ip');\r\n $this->db->select('log.http_referer AS referer');\r\n \r\n if(isset($filter[0]))\r\n {\r\n $this->db->where(\"log.time >= STR_TO_DATE('\". $filter[0] .\"','%Y-%m-%d %H:%i:%s')\");\r\n }\r\n if(isset($filter[1]))\r\n {\r\n $this->db->where(\"log.time <= STR_TO_DATE('\" . $filter[1] . \"','%Y-%m-%d %H:%i:%s')\");\r\n }\r\n \r\n $this->db->from(db_prefix . 'User_logs log');\r\n $this->db->join(db_prefix . 'Users user','user.id = log.user_id','LEFT');\r\n\r\n\r\n $this->db->limit($params['limit'],$params['offset']);\r\n $this->db->order_by($params['column'],$params['order']);\r\n\r\n $query = $this->db->get();\r\n $data['log'] = $query->result_array();\r\n return $data;\r\n }", "function newsItem_BacaDataListing_ByKategoriSub_TidakTampil_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' AND statustampil == '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function enquery_view_sql()\n\t{\n\t\t$view_enquery=mysqli_query($this->con,\"SELECT enquery.*,categories.c_name FROM enquery,categories where enquery.c_id=categories.c_id order by enquery.id desc\");\n\t\treturn $view_enquery;\n\t}", "function view_categories_sql()\n\t{\n\t\t$view_cat=mysqli_query($this->con,\"SELECT * FROM categories where status=1 order by c_id desc\");\n\t\treturn $view_cat;\n\t}", "function view_categories_sql()\n\t{\n\t\t$view_cat=mysqli_query($this->con,\"SELECT * FROM categories order by c_id desc\");\n\t\treturn $view_cat;\n\t}", "function portfolio_view_sql()\n\t{\n\t\t$view_port=mysqli_query($this->con,\"SELECT portfolio.*,categories.c_name FROM portfolio,categories where portfolio.c_id=categories.c_id order by portfolio.p_id desc\");\n\t\treturn $view_port;\n\t}", "function newsItem_BacaDataListing_ByKategoriSub_Hotspot_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' AND hotspot != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategoriSub_TidakPopuler_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' AND dilihat < '10' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_TidakTampil_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE statustampil != '1' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_ByKategori_Headline_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND headline != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_DiLampirkan_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE dilampirkan != '0' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function getPersonalInboxQueries($connection,$userId,$inboxMessageSearch){\n $query = \"SELECT fpd.*,fu.name AS user_name,fu.profile_pic AS user_profile,fpd.datetime as posted_time FROM forum_personal_discussion fpd LEFT JOIN forum_users fu on fu.user_id=fpd.user_id WHERE fpd.person_id='$userId' \";\n\n // echo $query;\n if ($inboxMessageSearch){\n $query .= \" AND ( fpd.discussion_title LIKE '%{$inboxMessageSearch}%' OR fpd.message LIKE '%{$inboxMessageSearch}%' OR fu.name LIKE '%{$inboxMessageSearch}%') \";\n }\n $query .= ' ORDER BY datetime DESC';\n $result = $connection->query($query);\n return $result;\n }", "private function show(){\r\n\r\n global $language;\r\n $arr = array();\r\n\r\n $res = mysql_query(\"\r\n\r\n\r\n SELECT `picture`,\r\n `user_id`,\r\n `user_na`,\r\n `body`,\r\n `dates`,\r\n `ID`\r\n FROM \".USERS_SQLTBL_MAIN.\"\r\n\r\n INNER JOIN `\".PREFIX.\"comments_content` ON\r\n\r\n \".PREFIX.\"comments_content.`user_id`=`\".USERS_SQLTBL_MAIN.\"`.`userid`\r\n\r\n WHERE uri_request='{$this->request}'\r\n\r\n ORDER BY `\".PREFIX.\"comments_content`.`ID` DESC;\r\n\r\n \") or die(mysql_error());\r\n\r\n\r\n\r\n if((bool)$res) {\r\n $i=0;\r\n while( $r = mysql_fetch_array($res)){\r\n /*\r\n $arr['user_na'] = $row['user_na'];\r\n $arr['user_id'] = $row['user_id'];\r\n $arr['dates'] = $row['dates'];\r\n $arr['body'] = $row['body'];\r\n */\r\n $image = kernel::base_tag(\"/{publicfiles}users/{$r['user_na']}/{thumbs}/\".$r['picture']);\r\n\r\n if(!file_exists(ROOT.$image)){\r\n $image = kernel::base_tag(\"/{design}/users/{thumbs}/dp4-noavatar.png\");\r\n }\r\n $first=\" \";\r\n if($i ==0){$first='class=\"first\"';}\r\n\r\n\r\n $row['first'] = ($i ==0) ? 'class=\"first\"': \" \" ;\r\n $row['achor'] = \"<a name=\\\"{$row['ID']}\\\" ></a>\";\r\n $row['user_na'] = $r['user_na'];\r\n $row['user_pi'] = $image;\r\n $row['user_id'] = kernel::base_tag(\"{users}/view?id={$r['user_id']}\");\r\n $row['body'] = str_replace('\\n','<br />' ,nl2br( stripslashes($r['body']) ) );\r\n $row['dates'] = $this->admin_form($r['ID']).$r['dates'];\r\n $row['ID'] = \"\";\r\n $row['ttl_da'] = $language['md.ttl.da'];\r\n $this->output[] = theme::custom_template(\"comments\",$row) ;\r\n\r\n $i++; }\r\n\r\n }else{\r\n\r\n $this->output[] = '<p align=\"center\">' . $this->msg('md.empty.comm') .'</p>';\r\n\r\n }\r\n\r\n\r\n\r\n }", "function complaint_msg_list($ads,$user_id,$chat_user){\n $query=$this->db->query(\"SELECT tc.*,ml.lbcontactId,ml.title FROM `table_complaint` tc INNER JOIN module_lbcontacts ml on ml.lbcontactId=tc.cmp_adsid WHERE ((cmp_adsuser='$user_id' and `cmp_userid`='$chat_user') or (cmp_adsuser='$chat_user' and `cmp_userid`='$user_id')) and cmp_adsid='$ads' GROUP by cmp_id ORDER BY cmp_id asc\")->result();\n // return $this->db->last_query();\n \n return $query;\n }", "public function search_list_latest_chats($post_data){\n $userId = $post_data['loginUserId'];\n $keyword = $post_data['keyword'];\n $latitude = $post_data['latitude'];\n $longitude = $post_data['longitude'];\n $limit = $post_data['limit'];\n $offset = $post_data['offset'];\n // $filter = $post_data['filter']; //fav_teacher/all\n // $type = $post_data['type']; // upcoming/past\n \n\n if(!empty($keyword)){\n $keyword = \"AND (s.searchName LIKE '%$keyword%' OR s.idealMovingDate LIKE '%$keyword%' OR s.houseType LIKE '%$keyword%' OR s.priceRange LIKE '%$keyword%' OR s.bedroom LIKE '%$keyword%')\";\n }\n\n if(!empty($latitude) && !empty($longitude))\n {\n $distance_in_km = \"( 6371 * acos( cos( radians($latitude) ) * cos( radians( lc.latitude) ) \n * cos( radians( lc.longitude ) - radians($longitude) ) + \n sin( radians($latitude) ) * sin( radians( lc.latitude ) ) ) ) \n AS distance_in_km\";\n }\n\n if (!empty($latitude) && !empty($longitude)) {\n $sql = \"SELECT s.*,c.chatId,c.userId as chatUserId,u.firstName,u.lastName,c.searchId as chatSearchId,c.chatText,c.deleteFlag,c.createdAt as chatDateTime\n FROM searchcriteria s \n LEFT JOIN tribe t ON s.searchId = t.searchId AND t.fromuserId = $userId\n LEFT JOIN shortlistedproperty p ON s.searchId = p.searchId \n LEFT JOIN chat c ON s.searchId = c.searchId AND c.createdAt = (SELECT MAX(createdAt) FROM chat WHERE chat.searchId = s.searchId) AND c.searchId IS NOT NULL AND c.deleteFlag !=1\n LEFT JOIN users u ON c.userId = u.userId \n WHERE s.searchId IN (SELECT t.searchId FROM tribe t WHERE (t.touserId =$userId OR t.fromuserId =$userId) AND t.status = 'accept' AND t.deleteFlag != 1) OR s.userId =$userId \n $keyword GROUP BY s.searchId \n\t\t\t\t\t ORDER BY CASE WHEN c.createdAt IS NOT NULL THEN c.createdAt ELSE s.createdAt END DESC\n\t\t\t\t\t LIMIT $offset, $limit\";\n }else{\n\n $sql = \"SELECT s.*,c.chatId,c.userId as chatUserId,u.firstName,u.lastName,c.searchId as chatSearchId,c.chatText,c.deleteFlag,c.createdAt as chatDateTime\n FROM searchcriteria s \n LEFT JOIN tribe t ON s.searchId = t.searchId AND t.fromuserId = $userId\n LEFT JOIN shortlistedproperty p ON s.searchId = p.searchId \n LEFT JOIN chat c ON s.searchId = c.searchId AND c.createdAt = (SELECT MAX(createdAt) FROM chat WHERE chat.searchId = s.searchId) AND c.searchId IS NOT NULL AND c.deleteFlag !=1\n LEFT JOIN users u ON c.userId = u.userId \n WHERE s.searchId IN (SELECT t.searchId FROM tribe t WHERE (t.touserId =$userId OR t.fromuserId =$userId) AND t.status = 'accept' AND t.deleteFlag != 1) OR s.userId =$userId \n $keyword GROUP BY s.searchId \n\t\t\t\t\t ORDER BY CASE WHEN c.createdAt IS NOT NULL THEN c.createdAt ELSE s.createdAt END DESC\n\t\t\t\t\t LIMIT $offset, $limit\";\n }\n //echo $sql;exit();\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n return $record->result_array();\n } \n }", "function newsItem_BacaDataListing_DiKomentari_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE dikomentari != '0' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_Terpopuler_All( $tbl_news ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news ORDER BY dilihat DESC\");\n\treturn $sql;\n}", "public function showLastByDateForLastCategory()//pokazuje wszystkie fotki sprzed miesiaca\n {\n $con = $this->connectDb();\n //pokazuje fotki ze wszystkich kategorii\n $q = $con->query(\"SELECT * FROM `photos` LEFT JOIN `category` ON photos.`category` = category.`c_id` WHERE category.`c_visibility` = '1' AND photos.`p_visibility` = '1' AND DATE(photos.`add_data`) > DATE_SUB(CURRENT_DATE, INTERVAL \".$this->interval.\") ORDER BY photos.`p_id` \".$this->order.\" \");/*zwraca false jesli tablica nie istnieje*/\n $q = $q->fetchAll(PDO::FETCH_ASSOC);\n return $q;\n\t}", "function fetchall() {\n $SQL = \"SELECT ID, Username, Password, Fname, Lname, Phone, Email, LastLogin, Type, LabID, Active \".\n \"FROM User \".\n \"ORDER BY Active, LabID, Fname\";\n //\"ORDER BY Active desc , LabID, Fname\";\n $i = 0; \n $sqlResult = mysqli_query($this->db_link, $SQL);\n $this->count = mysqli_num_rows($sqlResult);\n while ($row = mysqli_fetch_row($sqlResult) ) {\n \n list($this->ID[$i], \n $this->Username[$i],\n $this->Password[$i],\n $this->Fname[$i],\n $this->Lname[$i],\n $this->Phone[$i],\n $this->Email[$i],\n $this->LastLogin[$i],\n $this->Type[$i],\n \n $this->LabID[$i],\n $this->Active[$i]) = $row;\n $i++;\n } \n \n }", "function get_category_by_position_sort(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_category\n\t\t\t\tLEFT JOIN evs_database.evs_identification\n\t\t\t\tON idf_ctg_id = ctg_id\n\t\t\t\tLEFT JOIN evs_database.evs_set_form_attitude\n\t\t\t\tON sft_ctg_id = idf_ctg_id\n\t\t\t\twhere sft_pos_id=? AND sft_pay_id = ?\n\t\t\t\tgroup by ctg_category_detail_en\n\t\t\t\torder by ctg_category_detail_en ASC \";\n $query = $this->db->query($sql, array($this->sft_pos_id, $this->sft_pay_id));\n\t\treturn $query;\n\n\t}", "function news_view_sql()\n {\n \t$news_view=mysqli_query($this->con,\"SELECT * FROM `news` order by id desc\");\n \treturn $news_view;\n }", "public static function frontCategoryNews(){\n $odisha_category_id = \\Config::get('constants.ODISHA_CATEGORY_ID');\n $query = \"SELECT b.id,b.name,b.slug,b.tags,b.featured_image,b.short_description,b.cat_id,b.file_path,b.approved_date AS approved_date,\n b.position,c.name AS categoryname,b.is_video,b.is_image,b.file_path,c.slug AS categoryslug,d.name AS username, b.journalist_name\n FROM\n (SELECT a.cat_id AS catid, MAX(a.approved_date) AS appdate FROM news a \n WHERE a.is_hot=1 AND a.is_approved=1 AND a.is_featured=0 AND a.is_top_story=0 AND a.is_archive=0 AND a.is_enable=1 AND a.is_trash=0 AND a.is_trash=0\n AND a.cat_id != $odisha_category_id GROUP BY a.cat_id) AS x \n INNER JOIN news b ON x.catid=b.cat_id AND x.appdate=b.approved_date\n LEFT JOIN news_categories c ON b.cat_id=c.id\n LEFT JOIN users d ON b.user_id=d.id\n WHERE c.is_active=1\n GROUP BY b.cat_id\n ORDER BY c.order ASC\";\n // ORDER BY b.cat_id ASC,b.position ASC,c.order ASC\";\n $categoryNews = DB::select(DB::raw($query));\n return $categoryNews; \n }", "function note_list_cat($userId){\n\t\n\t$query = \"select * from note_data where status = '1' and userId = '$userId' group by catId order by id desc\";\n\t\n\t//echo \"select * from note_data where status = '1' and userId = '$userId' group by catId order by id desc\";\n\t\n\t$report_data = $GLOBALS['user']->getResult($query);\n\t$i = 0 ; \n\t$count = count($report_data) ;\n\twhile ($i < $count) {\n\t\t$catId = $report_data[$i]['catId'] ; \n\t\t$tresult[] = array(\n\t \"catId\" => checkData($report_data[$i]['catId']),\n\t \"catName\" => checkData(catName($catId)),\n\t \"noteList\" => note_list($userId,$catId),\n\t);\n\t$i++; \n}\t\t\t\n\n\tif(empty($tresult)){\n\t$tresult=array();\n\t\t\t\t}\n\treturn $tresult;\n}", "protected function getListQuery() {\r\n $db = $this->getDbo();\r\n $query = $db->getQuery(true);\r\n $user = JFactory::getUser();\r\n \r\n // Select the required field from the table.\r\n $query->select(\r\n $this->getState(\r\n 'list.select',\r\n 'a.id, a.hospital, a.turno'.\r\n ', a.created, a.created_by'\r\n )\r\n );\r\n $query->from('#__auditoria AS a');\r\n \r\n // Join over the users for the author.\r\n $query->select('ua.name AS author_name');\r\n $query->join('LEFT', '#__users AS ua ON ua.id = a.created_by');\r\n \r\n // Join over the hospitals.\r\n $query->select('h.name AS hospital_name');\r\n $query->join('LEFT', '#__hospitals AS h ON h.id = a.hospital');\r\n \r\n // Join over the turnos.\r\n $query->select('t.name AS turno_name');\r\n $query->join('LEFT', '#__hospital_shifts AS t ON t.id = a.turno');\r\n \r\n // Filter by author\r\n\t$authorId = $this->getState('filter.author_id');\r\n\tif (is_numeric($authorId)) {\r\n $type = $this->getState('filter.author_id.include', true) ? '= ' : '<>';\r\n $query->where('a.created_by '.$type.(int) $authorId);\r\n\t}\r\n \r\n // Filter by hospital\r\n $hospitalId = $this->getState('filter.hospital_id');\r\n if (is_numeric($hospitalId)) {\r\n $query->where('a.hospital ='.(int) $hospitalId);\r\n }\r\n \r\n // Filter by turno\r\n $turnoId = $this->getState('filter.turno_id');\r\n if (is_numeric($turnoId)) {\r\n $query->where('a.turno ='.(int) $turnoId);\r\n }\r\n \r\n // Add the list ordering clause.\r\n $orderCol = $this->state->get('list.ordering');\r\n $orderDirn = $this->state->get('list.direction');\r\n \r\n $query->order($db->getEscaped($orderCol.' '.$orderDirn));\r\n \r\n return $query;\r\n }", "public static function getlist(){\n $sql = new Sql();\n \n return $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogin\");\n }", "function candidatosXLista($id){\n\t\t $sql = \"SELECT C.idlista, L.nombrelista,nombrecandidato, apellidocandidato, cargocandidato, imagencandidato\n\t\t FROM candidato C LEFT JOIN LISTA L ON C.idlista = L.idlista\n\t\t WHERE C.idlista = \".$id.\"order by cargocandidato ASC ;\";\n\t\treturn $sql;\n\t }", "function product_category_list(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\t$product_category_list = mysql_q(\"SELECT *\n\t\t\tFROM product_category\n\t\t\tORDER BY id\");\n\t\t$tpl->assign(\"product_category_list\", $product_category_list);\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_list.tpl\");\n\t\tdisplay($main);\n\t}", "function getComments($where , $value, $and = NULL)\n{\n global $conn;\n $getComments = $conn->prepare(\"SELECT comments.* , users.username, items.name AS item_name \n FROM comments\n INNER JOIN users ON users.user_id = comments.user_id \n INNER JOIN items ON items.item_id = comments.item_id \n WHERE $where = ? $and\n ORDER BY created_at DESC\");\n $getComments->execute(array($value));\n $comments = $getComments->fetchAll();\n return $comments;\n}", "function newsItem_BacaDataListing_ByKategoriSub_Headline_All( $tbl_news , $idkategori, $idkategorisub ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub' AND headline != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function zanblog_latest_comments_list($list_number, $avatar_size, $cut_length) {\r\n global $wpdb;\r\n\r\n $sql = \"SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url,comment_author_email, comment_content AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND comment_author != 'zwwooooo' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT $list_number\" ;\r\n \r\n $comments = $wpdb->get_results($sql);\r\n \r\n foreach ($comments as $comment) {\r\n $output .= \"\\n<li class=\\\"list-group-item\\\">\" . get_avatar(get_comment_author_email(), $avatar_size) . \"<span class=\\\"comment-log\\\"> <a href=\\\"\" . htmlspecialchars(get_comment_link( $comment->comment_ID )) . \"\\\" title=\\\"on \" .$comment->post_title . \"\\\">\" . zanblog_cut_string(strip_tags($comment->com_excerpt), $cut_length).\"&nbsp;</a></span></li>\";\r\n }\r\n\r\n $output = convert_smilies($output);\r\n\r\n return $output;\r\n}", "function trainer_view_sql()\n\t{\n\t\t$view_trainer=mysqli_query($this->con,\"SELECT trainer.*,categories.c_name FROM trainer,categories where trainer.c_id=categories.c_id and trainer.status=1 order by trainer.t_id desc\");\n\t\treturn $view_trainer\t;\n\t}", "function list_all_publish_item_news_bykategoriAja_idexception( $tbl_news, $idkategori, $id_excp1 ){ \n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE \n\t\t\tid NOT IN ( $id_excp1 ) AND\n\t\t\tstatustampil = '1' AND\n\t\t\tidkategori ='$idkategori'\n\t\tORDER BY timeunix DESC \"); \n \t\treturn $sql;\n}", "function todayActivityList($userId,$data){\n\n $activityData = array();\n $activityImg = base_url().ACTIVITY_IMAGE;\n $defaultActivityImg = base_url().DEFAULT_ACTIVITY_IMAGE;\n if(empty($data['limit']) && empty($data['offset'])){\n $data['offset'] = 0; $data['limit']= 5; \n }\n $where1 = array('ae.status'=>'1','c.status'=>'1','cc.status'=>'1','a.status'=>'1','a.creator_id !='=>$userId,'a.is_hide'=>0,'cum.club_user_status'=>'1','cum.member_status'=>'1','cum.user_id'=>$userId);\n $where2 = \"ae.event_date = CAST(CURRENT_TIMESTAMP AS DATE)\";\n $this->db->select('IF(a.image IS NULL or a.image = \"\",\"'.$defaultActivityImg.'\",concat(\"'.$activityImg.'\",a.image)) as image,a.name as activityName,a.activityId,c.club_name,IF(aj.activityJoinId IS NULL,0,1) as is_like');\n $this->db->from(CLUB_USER_MAPPING.' as cum');\n $this->db->join(CLUBS.' as c','cum.club_id = c.clubId');\n $this->db->join(CLUB_CATEGORY.' as cc','c.club_category_id = cc.clubCategoryId'); \n $this->db->join(ACTIVITIES.' as a','cum.club_id = a.club_id'); \n $this->db->join(ACTIVITY_EVENTS.' as ae','a.activityId = ae.activity_id');\n $this->db->join(ACTIVITY_JOIN.' as aj','a.activityId = aj.activity_id AND aj.user_id = \"'.$userId.'\"','left');\n $this->db->where($where1);\n $this->db->where($where2);\n $this->db->group_by('a.activityId');\n $this->db->order_by(\"ae.event_time asc,a.activityId desc\");\n $this->db->limit($data['limit'],$data['offset']);\n $query = $this->db->get();\n if($query->num_rows() >0){\n $activityData = $query->result();\n }\n return $activityData;\n\n }", "function newsItem_BacaDataListing_Hotspot_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE hotspot != '0' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function afficherArticles(){\n global $connexion;\n $requete = $connexion -> prepare('SELECT articles.*, categories.title AS categoryTitle\n FROM articles\n INNER JOIN categories on articles.category_id = categories.id\n ORDER BY articles.created_at DESC');\n $requete -> execute();\n return $requete -> fetchAll(PDO::FETCH_ASSOC);\n /*var_dump($articles);*/\n}", "function career_view_sql()\n\t{\n\t\t$view_career=mysqli_query($this->con,\"SELECT * FROM career order by career_id desc\");\n\t\treturn $view_career;\n\t}", "function career_view_sql()\n\t{\n\t\t$view_career=mysqli_query($this->con,\"SELECT * FROM career order by career_id desc\");\n\t\treturn $view_career;\n\t}", "function get_list()\n {\n \tif($this->table_name === null)\n \t\treturn false;\n \t\n \t$select = \"{$this->table_name}.*\";\n $select .= \", deposito.no_rekening, nasabah.NAMA_NASABAH, nasabah.ALAMAT,\";\n \t\n\t\t// ADD YOUR SELECT FROM JOIN HERE <------------------------------------------------------\n\t\t// for example $select .= \", user_log.created_date, user_log.update_date\";\n\t\t\n \tif(!empty($this->relation))\n \t\tforeach($this->relation as $relation)\n \t\t{\n \t\t\tlist($field_name , $related_table , $related_field_title) = $relation;\n \t\t\t$unique_join_name = $this->_unique_join_name($field_name);\n \t\t\t$unique_field_name = $this->_unique_field_name($field_name);\n \t\t\t\n\t\t\t\tif(strstr($related_field_title,'{'))\n \t\t\t\t$select .= \", CONCAT('\".str_replace(array('{','}'),array(\"',COALESCE({$unique_join_name}.\",\", ''),'\"),str_replace(\"'\",\"\\\\'\",$related_field_title)).\"') as $unique_field_name\";\n \t\t\telse \t\t\t\n \t\t\t\t$select .= \", $unique_join_name.$related_field_title as $unique_field_name\";\n \t\t\t\n \t\t\tif($this->field_exists($related_field_title))\n \t\t\t\t$select .= \", {$this->table_name}.$related_field_title as '{$this->table_name}.$related_field_title'\";\n \t\t}\n \t\t\n \t$this->db->select($select, false);\n \t\n // ADD YOUR JOIN HERE for example: <------------------------------------------------------\n // $this->db->join('user_log','user_log.user_id = users.id');\n $this->db->join('nasabah','nasabah.NASABAH_ID = '.$this->table_name.'.NASABAH_ID');\n \t$results = $this->db->get($this->table_name)->result();\n \t\n \treturn $results;\n }", "function userNotificationList(){\n $this->check_admin_user_session();\n if($_SESSION[ADMIN_USER_SESS_KEY]['UserRole']=='admin'){\n $userid = $_SESSION[ADMIN_USER_SESS_KEY]['userId'];\n $where = array('notificationFor'=>$userid);\n $field_first ='notificationBy';\n $field_second ='id';\n $field_val ='*';\n $limit=20;\n $data['notifiList'] = $this->common_model->GetJoinRecord(NOTIFICATIONS, $field_first,USERS,$field_second,$field_val='',$where,$group_by='',$order_fld='createdOn',$order_type='DESC',$limit);\n $res =$this->load->view('notificationList',$data,true);\n echo json_encode(array('data'=>$res,'status'=>1));die();\n }else{\n $userid = $_SESSION[ADMIN_USER_SESS_KEY]['userId'];\n $where = array('notificationFor'=>$userid);\n $field_first ='notificationFor';\n $field_second ='id';\n $field_val ='*';\n $limit=20;\n\n $data['notifiList'] = $this->common_model->GetJoinRecord(NOTIFICATIONS, $field_first,USERS,$field_second,$field_val='',$where,$group_by='',$order_fld='createdOn',$order_type='DESC',$limit);\n $res =$this->load->view('notificationList',$data,true);\n echo json_encode(array('data'=>$res,'status'=>1));die(); \n }\n }", "public function get_users_comments_list($offset = \"\", $record = \"\", $firstname = \"\",$deal_type = \"\")\n {\n\n $contitions = \"discussion.type = $deal_type \";\n if($firstname){\n $contitions .= ' AND (users.firstname like \"%'.mysql_real_escape_string($firstname).'%\"';\n $contitions .= 'OR deals.deal_title like \"%'.mysql_real_escape_string($firstname).'%\"';\n $contitions .= 'OR discussion.comments like \"%'.mysql_real_escape_string($firstname).'%\")';\n }\n $result = $this->db->query(\"select *, discussion.created_date as dis_create from discussion join users on users.user_id=discussion.user_id join deals on deals.deal_id=discussion.deal_id where $contitions order by discussion_id DESC limit $offset, $record\");\n return $result;\n }", "function afficherachats(){\n\t\t$sql=\"SElECT * From achat order by ref\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n\t catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "function get_all_comments() {\n global $db;\n $query = \"SELECT c.comment_id, c.comment, c.user_id, c.created, u.userName FROM comments c\n JOIN users u on u.user_id = c.user_id\n ORDER BY created DESC\";\n $statement = $db->prepare($query);\n $statement->execute();\n $comments = $statement->fetchAll();\n $statement->closeCursor();\n return $comments; \n }", "public function gettopDbeeusers($limit=2,$dbeeID='',$datefrom='', $dateto='') \n { \n $db = $this->getDbTable();\n $select = $db->select();\n /*$select->distinct('dbee.User')->from( array('dbee' => 'tblDbees'), array('DbeeID'=>'dbee.DbeeID',new Zend_Db_Expr(\"COUNT(dbee.DbeeID) AS total\") ));\n $select->join( array('u' => 'tblUsers'), 'u.UserID=dbee.User', array( 'UserID' => 'u.UserID','username' => 'u.Name','lname' => 'u.lname','image' =>'u.ProfilePic','uname' =>'u.Username') );\n $select->setIntegrityCheck( false ); \n $select->where('u.Status = ?', '1');\n $select->where(\"dbee.clientID = ?\", clientID);\n\n if(!empty($datefrom) && !empty($dateto)){\n $select->where(\"dbee.PostDate >= ?\", date('Y-m-d H:i:s',strtotime($datefrom)));\n $select->where(\"dbee.PostDate <= ?\", date('Y-m-d H:i:s',strtotime($dateto)));\n } \n $select->group ( array (\"dbee.User\") );\n $select->order('total DESC');*/\n\n $select->distinct('act.act_userId')->from( array('act' => 'tblactivity'), array('DbeeID'=>'act.act_userId',new Zend_Db_Expr(\"COUNT(act.act_id) AS total\"), new Zend_Db_Expr(\" sum( case when act_type=1 then 1 else 0 end) as postCount\" ), new Zend_Db_Expr(\" sum( case when act_type=2 then 1 else 0 end) as commentCount\" )));\n $select->join( array('u' => 'tblUsers'), 'u.UserID=act.act_userId', array( 'UserID' => 'u.UserID','username' => 'u.Name','lname' => 'u.lname','image' =>'u.ProfilePic','uname' =>'u.Username') );\n $select->setIntegrityCheck( false ); \n $select->where('u.Status = ?', '1');\n $select->where('u.Role != ?', '1');\n $select->where(\"act.clientID = ?\", clientID);\n $select->where(\"act.act_type = 1 OR act.act_type = 2\" );\n\n /*SELECT DISTINCT `act`.`act_userId` AS `DbeeID`, COUNT(act.act_id) AS total,sum(case when act_type=1 then 1 else 0 end) postCount,sum(case when act_type=2 then 1 else 0 end) commentCount ,`u`.`UserID`, `u`.`Name` AS `username`, `u`.`lname`, `u`.`ProfilePic` AS `image`, `u`.`Username` AS `uname` FROM `tblactivity` AS `act` INNER JOIN `tblUsers` AS `u` ON u.UserID=act.act_userId WHERE (u.Status = '1') AND (u.Role != '1') AND (act.clientID = '1') AND (act.act_type = 1 OR act.act_type = 2) GROUP BY `act`.`act_userId` ORDER BY `total` DESC*/\n\n if(!empty($datefrom) && !empty($dateto)){\n $select->where(\"act.act_date >= ?\", date('Y-m-d H:i:s',strtotime($datefrom)));\n $select->where(\"act.act_date <= ?\", date('Y-m-d H:i:s',strtotime($dateto)));\n } \n $select->group ( array (\"act.act_userId\") );\n $select->order('total DESC');\n if($limit!='all')\n $select->LIMIT($limit, 0);\n //echo $select; exit;\n $result= $db->fetchAll($select); \n return $result; \n }", "function getArticles() {\n global $db;\n $query = $db->query('SELECT * FROM article, auteur\n WHERE article.auteur_id = auteur.id ORDER BY article.id DESC');\n return $query->fetchAll();\n \n}", "function displayOrganismList($db, &$annot_list){\n $query=\"select distinct o.organism_name as name,ucsc_db as version,\";\n $query.=\" o.organism_id,ov.organism_version_id as version_id\";\n $query.=\" from organism o,organism_version ov\";\n $query.=\" where o.organism_id=ov.organism_id \";\n if(!empty($db)){\n $list=array(); $list=explode(\",\",$db);$query.=\" and ucsc_db in(\";$i=0;\n while($i<count($list)){$db=$list[$i];\n if($i==0)$query.=\"'$db'\";else $query.=\",'$db'\";++$i;\n }$query.=\")\";\n }$query.=\" order by organism_name\";global $con;\n if(!$con)$con=getConnection();$result =mysql_query(\"$query\",$con);$data= array();\n if($result){\n while($row = mysql_fetch_assoc($result))\n { $name=$row[\"name\"];$version=$row[\"version\"];$org_id=$row[\"organism_id\"];$version_id=$row[\"version_id\"];\n $annot_list[]=array('organism'=>array('name'=>$name,'version'=>$version,'organism_id'=>$org_id,'version_id'=>$version_id));\n }mysql_free_result($result);\n } \n}", "function get_categories() {\n global $db;\n $query = \n ' SELECT * FROM categories\n ORDER BY cat_categoryID'; \n $statement = $db->prepare($query);\n $statement->execute();\n return $statement; \n}", "function list_all_publish_item_news_bysubkategori_list_indexarticle($tbl_news, $tanggalhariini, $idkategori ){ \n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE \n\t\t\tstatustampil = '1' AND\n\t\t\ttgltampil <='$tanggalhariini' AND\n\t\t\tidkategorisub ='$idkategori' \n\t\t\tORDER BY urutan DESC \n\t\t\"); \n \t\treturn $sql;\n}", "public function getDetalles()\n {\n $sql = \"select z.id,z.nombre, z.identificacion, z.estado_excluido, y.descripcion, w.categoria , (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'aeo'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as 'aeo' ,\n (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'alim'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as alim,\n (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'pare'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as pare\n from appexamenisw2.estudiantes z, appexamenisw2.beneficios y, appexamenisw2.categorias w,\n appexamenisw2.beneficio__estudiantes v\n where z.id = v.estudiante_id\n and y.id = v.beneficio_id\n and w.id = y.categoria_id\n group by z.id,z.nombre, z.identificacion, z.id, z.estado_excluido, y.descripcion,w.categoria\n order by z.id;\";\n\n $arrayDetalles = DB::connection('mysql')->select($sql);\n $ab = array();\n $ab = $arrayDetalles;\n foreach($ab as $t){\n $t->aeo = Crypt::decrypt($t->aeo);\n $t->alim = Crypt::decrypt($t->alim);\n $t->pare = Crypt::decrypt($t->pare);\n //$t->categoria = Crypt::decrypt($t->categoria);\n //$t->monto = Crypt::decrypt($t->monto);\n //return $t->monto;\n }\n return json_encode($ab);\n }", "public function getLatestPosts()\r\n{\r\n $query_string = \"SELECT categoryid, postid, postsubject, postdate FROM categories, posts \";\r\n $query_string .= \"WHERE postid IN ( \";\r\n $query_string .= \"SELECT MAX(postid) \";\r\n $query_string .= \"FROM posts GROUP BY postcategory \";\r\n $query_string .= \") AND categoryid = postcategory\";\r\n\r\n return $query_string;\r\n}", "function list_all_publish_item_news_bysubkategori_list_idexception($tbl_news, $tanggalhariini, $idkategori, $idkategorisub, $id_excp1 ){ \n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE \n\t\t\tid NOT IN ( $id_excp1 ) AND\n\t\t\tstatustampil = '1' AND\n\t\t\tidkategori ='$idkategori' AND\n\t\t\tidkategorisub = '$idkategorisub' \n\t\tORDER BY timeunix DESC \"); \n \t\treturn $sql;\n}", "function getList( &$pListHash ) {\n\t\tLibertyContent::prepGetList( $pListHash );\n\t\t\n\t\t$whereSql = $joinSql = $selectSql = '';\n\t\t$bindVars = array();\n// Update to more flexible date management later\n\t\tarray_push( $bindVars, 'TODAY' );\n\t\tarray_push( $bindVars, 'TOMORROW' );\n//\t\t$this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars );\n\n\t\tif ( isset($pListHash['queue_id']) ) {\n\t\t\t$whereSql .= \" AND ti.`room` = 80 + ? \";\n\t\t\tarray_push( $bindVars, $pListHash['queue_id'] );\n\t\t}\n\n// init_id and staff_id will map to creator_user_id and modifier_user_id when fully converted to LC\n// , lc.* \t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = ci.`content_id` )\n\n\t\t$query = \"SELECT ti.*, ci.*, tr.`title` as reason,\n\t\t\t\tuue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name,\n\t\t\t\tuuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name $selectSql\n\t\t\t\tFROM `\".BIT_DB_PREFIX.\"task_ticket` ti \n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uue ON (uue.`user_id` = ti.`staff_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uuc ON (uuc.`user_id` = ti.`init_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"citizen` ci ON (ci.`usn` = ti.`usn`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"task_reason` tr ON (tr.`reason` = ti.`tags`)\n\t\t\t\t$joinSql\n\t\t\t\tWHERE ti.`ticket_ref` BETWEEN ? AND ? $whereSql \n\t\t\t\torder by ti.`ticket_ref`\";\n\t\t$query_cant = \"SELECT COUNT(ti.`ticket_no`) FROM `\".BIT_DB_PREFIX.\"task_ticket` ti\n\t\t\t\t$joinSql\n\t\t\t\tWHERE ti.`ticket_ref` BETWEEN ? AND ? $whereSql\";\n\n\t\t$ret = array();\n\t\t$this->mDb->StartTrans();\n\t\t$result = $this->mDb->query( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );\n\t\t$cant = $this->mDb->getOne( $query_cant, $bindVars );\n\t\t$this->mDb->CompleteTrans();\n\n\t\twhile ($res = $result->fetchRow()) {\n\t\t\t$res['ticket_url'] = $this->getDisplayUrlFromHasH( $res );\n\t\t\t$ret[] = $res;\n\t\t}\n\n\t\t$pListHash['cant'] = $cant;\n\t\tLibertyContent::postGetList( $pListHash );\n\t\treturn $ret;\n\t}", "function tomorrowActivityList($userId,$data){\n\n $activityData = array();\n $activityImg = base_url().ACTIVITY_IMAGE;\n $defaultActivityImg = base_url().DEFAULT_ACTIVITY_IMAGE;\n if(empty($data['limit']) && empty($data['offset'])){\n $data['offset'] = 0; $data['limit']= 5; \n }\n $where1 = array('ae.status'=>'1','c.status'=>'1','cc.status'=>'1','a.status'=>'1','a.creator_id !='=>$userId,'a.is_hide'=>0,'cum.club_user_status'=>'1','cum.member_status'=>'1','cum.user_id'=>$userId);\n $where2 = \"ae.event_date = DATE_ADD(CURDATE(), INTERVAL 1 DAY)\"; \n $this->db->select('IF(a.image IS NULL or a.image = \"\",\"'.$defaultActivityImg.'\",concat(\"'.$activityImg.'\",a.image)) as image,a.name as activityName,a.activityId,c.club_name,IF(aj.activityJoinId IS NULL,0,1) as is_like');\n $this->db->from(CLUB_USER_MAPPING.' as cum');\n $this->db->join(CLUBS.' as c','cum.club_id = c.clubId');\n $this->db->join(CLUB_CATEGORY.' as cc','c.club_category_id = cc.clubCategoryId'); \n $this->db->join(ACTIVITIES.' as a','cum.club_id = a.club_id'); \n $this->db->join(ACTIVITY_EVENTS.' as ae','a.activityId = ae.activity_id');\n $this->db->join(ACTIVITY_JOIN.' as aj','a.activityId = aj.activity_id AND aj.user_id = \"'.$userId.'\"','left');\n $this->db->where($where1);\n $this->db->where($where2);\n $this->db->group_by('a.activityId');\n $this->db->order_by(\"ae.event_time asc,a.activityId desc\");\n $this->db->limit($data['limit'],$data['offset']);\n $query = $this->db->get();\n if($query->num_rows() >0){\n $activityData = $query->result();\n }\n return $activityData;\n }", "function fetch($table, $campos=\"*\", $where=\"\", $order=\"\", $tipo=\"\", $limite=\"\"){\n\n\t\t$sql = \"SELECT DISTINCT \";\n\n\t\tif(is_array($campos)){\n\n\t\t\tforeach ($campos as $value){\n\t\t\t\t$sql .= \"'$value' ,\";\n\t\t\t}\n\n\t\t\t$strCut = strlen($sql) -1;\n\t\t\t$sql = substr($sql,0,$strCut);\n\n\t\t}else{\n\n\t\t\t$sql .= \" $campos \";\n\n\t\t}\n\n\t\tif ( strstr($table, \"|\") ) {\n\n\t\t\t$fromTable = substr($table,0,strpos($table,\"|\"));\n\n\t\t\t$leftJoin = substr($table,strpos($table,\"|\"),strlen($table));\n\n\t\t\t$leftJoin = explode(\"|\",$leftJoin);\n\n\t\t\t$sql .= \" FROM \".$fromTable;\n\n\t\t\tforeach ($leftJoin as $ex){\n\n\t\t\t\t$leftEx = explode(\">\", $ex );\n\n\t\t\t\t@list($left_table, $on_condition) = $leftEx;\n\n\t\t\t\tif(!empty($left_table)){\n\t\t\t\t\t$sql .= \" LEFT JOIN \" . $left_table;\n\t\t\t\t}\n\t\t\t\tif(!empty($on_condition)){\n\t\t\t\t\t$sql .= \" ON \" . $on_condition;\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t$sql .= \" FROM $table \";\n\n\t\t}\n\n\n\t\tif(!empty($where)) $sql .= \" WHERE \";\n\n\n\t\tif(is_array($where)){\n\n\t\t\tforeach ($where as $key => $value){\n\n\t\t\t\tif( strstr($value,\"!\") ){\n\t\t\t\t\t\t$value = substr($value, 1);\n\t\t\t\t\t\tif (strtolower($value) == \"empty\"){\n\t\t\t\t\t\t\t\t$sql .= \" $key <> '' OR $key <> 0 OR $key <> NULL AND\";\n\t\t\t\t\t\t}else if(is_int($value)){\n\t\t\t\t\t\t\t\t$sql .= \" $key <> $value OR $key <> 0 OR $key <> NULL AND\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$sql .= \" $key <> '$value' OR $key <> 0 OR $key <> NULL AND\";\n\t\t\t\t\t\t}\n\n\t\t\t\t}elseif( strstr($value,\"!<\") ){\n\t\t\t\t\t\t$value = substr($value, 2);\n\t\t\t\t\t\tif (strtolower($value) == \"empty\"){\n\t\t\t\t\t\t\t\t$sql .= \" $key <= '' AND\";\n\t\t\t\t\t\t}else if(is_int($value)){\n\t\t\t\t\t\t\t\t$sql .= \" $key <= $value AND\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$sql .= \" $key <= '$value' AND\";\n\t\t\t\t\t\t}\n\n\t\t\t\t}elseif( strstr($value,\"!>\") ){\n\t\t\t\t\t\t$value = substr($value, 2);\n\t\t\t\t\t\tif (strtolower($value) == \"empty\"){\n\t\t\t\t\t\t\t\t$sql .= \" $key >= '' AND\";\n\t\t\t\t\t\t}else if(is_int($value)){\n\t\t\t\t\t\t\t\t$sql .= \" $key >= $value AND\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$sql .= \" $key >= '$value' AND\";\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_int($value)){\n\t\t\t\t\t\t$sql .= \" $key LIKE $value AND\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t$sql .= \" $key LIKE '$value' AND\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$strCut = strlen($sql)-3;\n\t\t\t$sql = substr($sql,0,$strCut);\n\n\t\t}else{\n\n\t\t\t$sql .= \" $where \";\n\n\t\t}\n\n\t\t//envia sql para total rows\n\t\t$this->sql = $sql;\n\n\t\tif(!empty($order)) $sql .= \" ORDER BY \";\n\n\n\t\tif(is_array($order)){\n\n\t\t\tforeach ($order as $value){\n\t\t\t\t$sql .= \"$value ,\";\n\t\t\t}\n\n\t\t\t$strCut = strlen($sql)-1;\n\t\t\t$sql = substr($sql,0,$strCut);\n\n\t\t}else{\n\n\t\t\t$sql .= \" $order \";\n\n\t\t}\n\n\t\tif(!empty($tipo)) $sql .= \" $tipo \";\n\n\t\tif(!empty($limite)) $sql .= \" LIMIT $limite \";\n\n\t\t$qr = mysql_query($sql) or die($sql . \" <hr> \" . mysql_error());\n\t\t$rows = mysql_num_rows($qr);\n\n\t if($rows){\n\n\t\t\twhile ($rs = mysql_fetch_array($qr) ) {\n\n\t\t\t\t$exFetch[] = $rs;\n\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t\t$exFetch = false;\n\t\t}\n\n\t\treturn $exFetch;\n\n\t}", "public function getFeedList($company_id, $category){\r\n\t\t//format datetime into \"time ago\"\r\n\t\t$body = \"\";\r\n\t\t//get first and last name of the person who posted this\r\n\t\t$this->load->model(\"general\");\r\n\t\t//$query = $this->db->get_where(\"sc_accounts_feeds\", array(\"company_id\"=>$company_id));\r\n\t\t$query = $this\r\n\t\t\t\t->db\r\n\t\t\t\t->where(\"company_id\", $company_id)\r\n\t\t\t\t->where(\"category\", $category)\r\n\t\t\t\t->order_by(\"id\", \"desc\")\r\n\t\t\t\t->get(\"sc_feeds\", 5, 0);\r\n\r\n\t\t$num_rows = $query->num_rows();\r\n\t if ($num_rows > 0){\r\n\t\t\t$results = $query->result();\r\n\t\t\tforeach($results as $row){\r\n\t\t\t\t$date_entered = 0;\r\n\t\t\t\t$user_name = $this->general->getFirstLastName($row->by_uacc_id);\r\n\t\t\t\t$date_entered = $this->general->timeAgo(date('Y-m-d H:i:s', strtotime($row->date_entered.' UTC')));\r\n\t\t\t\t$feed_user_image_name = $this->general->getProfilePictureName($row->by_uacc_id);\r\n\t\t\t\t$feed_user_icon = $this->general->DisplayOtherUserIcon($feed_user_image_name->upro_filename_original);\r\n\t\t\t\t$body .= '\r\n\t\t\t\t\t\t\t<div class=\"feed-item feed-item-bookmark\">\r\n\r\n\t\t\t\t\t\t\t<div class=\"feed-icon\">\r\n\t\t\t\t\t\t\t\t\t'.$feed_user_icon.'\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<!-- /.feed-icon -->\r\n\t\t\t\t\t\t\t<div class=\"feed-headline\">\r\n\t\t\t\t\t\t\t\t<span class=\"feed-subject\">' . $user_name->upro_first_name . \" \" . $user_name->upro_last_name . '</span><br/>\r\n\r\n\t\t\t\t\t\t\t\t<i class=\"fa fa-clock-o\"></i> <span class=\"feed-time\">' . $date_entered . '</span>\r\n\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"feed-content\">' . $row->description . '</div>\r\n\t\t\t\t\t\t\t\t<!-- /.feed-content -->\r\n\t\t\t\t\t\t\t\t<!-- /.feed-actions -->\r\n\t\t\t\t\t\t\t</div>';\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\tif($num_rows > 4)\r\n\t\t\t\t$body .= '<div class=\"feed-more feed-item-idea\"><span>Load More</span></div>';\r\n\r\n\t\t}\r\n\t\treturn $body;\r\n\t}", "function feedback_view_sql()\n {\n \t$feedback_view=mysqli_query($this->con,\"SELECT * FROM `feedback` where status=1 order by id desc\");\n \treturn $feedback_view;\n }", "function myActivityList($userId,$data){\n\n $activityData = array();\n $activityImg = base_url().ACTIVITY_IMAGE;\n $defaultActivityImg = base_url().DEFAULT_ACTIVITY_IMAGE;\n if(empty($data['limit']) && empty($data['offset'])){\n $data['offset'] = 0; $data['limit']= 5; \n }\n $where = array('c.status'=>'1','cc.status'=>'1','a.status'=>'1','a.creator_id'=>$userId);\n \n $this->db->select('IF(a.image IS NULL or a.image = \"\",\"'.$defaultActivityImg.'\",concat(\"'.$activityImg.'\",a.image)) as image,a.name as activityName,a.is_hide,a.activityId,c.club_name');\n $this->db->from(ACTIVITIES.' as a'); \n $this->db->join(CLUBS.' as c','a.club_id = c.clubId');\n $this->db->join(CLUB_CATEGORY.' as cc','c.club_category_id = cc.clubCategoryId'); \n $this->db->join(ACTIVITY_EVENTS.' as ae','a.activityId = ae.activity_id AND ae.status = \"1\"','left');\n \n $this->db->where($where);\n $this->db->group_by('a.activityId');\n $this->db->order_by(\"a.activityId desc\");\n $this->db->limit($data['limit'],$data['offset']);\n $query = $this->db->get();\n if($query->num_rows() >0){\n $activityData = $query->result();\n foreach ($activityData as $key => $value) {\n $activityId = $value->activityId;\n $activityData[$key]->events = $this->getActivityEvents($userId,$activityId);\n }\n }\n return $activityData;\n }", "function clientListing()\n {\n $this->db->select('BaseTbl.userId , BaseTbl.email , BaseTbl.nom , BaseTbl.raisonSocial , BaseTbl.prenom , BaseTbl.cin , BaseTbl.ville , BaseTbl.mobile,BaseTbl.mobile2, BaseTbl.createdDtm, Role.role');\n $this->db->from('tbl_users as BaseTbl');\n $this->db->join('tbl_roles as Role', 'Role.roleId = BaseTbl.roleId','left');\n $this->db->where('BaseTbl.roleId =',4 );\n $this->db->order_by('BaseTbl.userId', 'DESC');\n $query = $this->db->get();\n \n $result = $query->result(); \n return $result;\n }", "public function pagadaall(){\n$sql = $this->db->query(\"SELECT pago_factura.*, facturas.id_factura FROM pago_factura INNER JOIN facturas ON pago_factura.factura_id = facturas.id\");\nreturn $sql;\n}", "public function like_list()\n {\n $this->pushpin_id = $_GET['pushpinId'];\n\n $query = \"SELECT u.user_name, u.email\nFROM LikeList l\nLEFT JOIN User u ON u.email = l.user_email\nWHERE pushpin_ID= '$this->pushpin_id'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "function get_display_list($dataBaseHandle,$username,$index_id,$per_page,$get_deleted){\n\t\t//echo '<br>list index = '.$index_id;\n\t\t//$table = ($get_deleted)?$username.'_deleted':$username;\n\n\t\t$SqlQuery = '';\n\t\tif ($get_deleted == true){\t\t\n\t\t\t$SqlQuery .= 'SELECT '.$username.'.*,'.$username.'_sorted.id \n\t\t\t\t\t\tFROM '.$username.'_sorted \n\t\t\t\t\t\tINNER JOIN '.$username.' ON ('.$username.'_sorted.task_id = '.$username.'.task_id) AND ('.$username.'_sorted.id > '.$index_id.') \n\t\t\t\t\t\tLIMIT '.$per_page;\t\t\t\n\t\t} else {\n\t\t\t$SqlQuery .= 'SELECT * FROM '.$username.'_deleted LIMIT '.$per_page;\n\t\t}\t\t\t\n\t\treturn $dataBaseHandle->query($SqlQuery);\n\t}", "public function lists(){\n\n $raw = $this->RxData;\n $head = C('PREURL');\n $ret = ['total' => 0, 'page_start' => 0, 'page_n' => 0, 'data' => []];\n\n $page = $raw['page_start']?$raw['page_start']:1;\n $num = $raw['page_limit']? $raw['page_limit']:10;\n $limit = $num*($page-1).','.$num;\n\n\n if(!$this->out['teacher_uid'])\n goto END;\n $time = time();\n\n $where['a.check']= PASS;\n $where['a.submit']= 1;\n\n $where['a.uid'] = $this->out['teacher_uid'];\n $where['a.suid'] = ['like','%,'.$this->out['uid'].',%'];\n\n\n if($raw['level_id'])\n $where['a.level_id']= $raw['level_id'];\n if(isset($raw['title']))\n $where['a.title']= ['like','%'.$raw['title'].'%'];\n\n if($raw['status_all'])\n $where['a.atime']= ['lt',$time];\n\n $raw['status'] = $raw['status_all']?$raw['status_all']:$raw['status_mine'];\n\n if(isset($raw['status'])){\n switch($raw['status']){\n case 1:\n $where['b.status']= HWK_DID;\n break;\n case 2:\n $where['b.status']= HWK_UNDO;\n break;\n case 3:\n $where['b.status']= HWK_UNCOT;\n break;\n case 4:\n $where['b.uid']= ['eq',$this->out['uid']];\n break;\n case 5:\n// $where['b.uid']= ['neq',$this->out['uid']];\n break;\n case 6:\n// $where['b.uid']= ['neq',$this->out['uid']];\n break;\n default:\n break;\n }\n }\n\n if($raw['time_start'] && $raw['time_end']){\n $where['a.atime'] = [\n ['egt',$raw['time_start']],\n ['lt',$raw['time_end']]\n ];\n }elseif($raw['time_start'] ) {\n $where['a.atime'] = ['egt', $raw['time_start']];\n }elseif($raw['time_end'] ){\n $where['a.atime'] = ['lt',$raw['time_end']];\n }\n\n $column = 'a.id,a.hwk_id,a.title,b.status as stu_status,c.name as level,a.mtime as atime';\n\n $order = 'a.mtime desc,id desc';\n\n\n if(isset($raw['status_mine'])){\n $join = 'RIGHT JOIN';\n $where['b.uid']= $this->out['uid'];\n\n $total = $this->model->selectHomeworkByRec('count(*) total',$where,'','');\n $res = $this->model->selectHomeworkByRec(\n $column,\n $where,\n $limit,\n $order\n\n );\n }else {\n //默认为作业池\n if ($raw['status_all'] == 5) {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n } elseif ($raw['status_all'] == 4) {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n } else {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n }\n }\n\n if(!$res)\n goto END;\n\n $result = [] ;\n $chk_sub = false;\n foreach($res as $k=>&$v){\n\n\n if($v['level_id'] > $this->out['level_id']){\n unset($res[$k]);\n continue;\n }\n $v['etime'] = $v['atime'] + C('EXPIRE_HWK');\n if($raw['status_all'] == 5){\n if($v['stu_status']){\n continue;\n }\n }\n $v['status'] = $v['stu_status']?$v['stu_status']:HWK_REV;\n if(isset($raw['status_all']) && $v['stu_status']){\n $v['status'] = HWK_NOT_REV;\n }\n//过期\n if(!$v['stu_status'] && time() > ($v['atime']+C('EXPIRE_HWK')))\n $v['status'] = HWK_EXIPRE;\n//逾期\n if($v['stu_status'] == HWK_UNDO && (time()>($v['atime']+C('EXPIRE_SUB'))))\n $chk_sub = true;\n\n $result[] = $v;\n }\n\n $ret['total'] = $total[0]['total'];\n $ret['page_n'] = count($result);\n $ret['page_start'] = $page;\n $ret['data'] = $result;\n $ret['expire'] = $chk_sub?HWK_EXPIRE:HWK_OK;\n\n //已完成列表 不提示\n if($raw['status'] == 1 )\n $ret['expire'] = HWK_OK;\n\n\nEND:\n\n $this->retReturn($ret);\n\n }", "function feedback_view_sql()\n {\n \t$feedback_view=mysqli_query($this->con,\"SELECT * FROM `feedback` order by id desc\");\n \treturn $feedback_view;\n }", "function fetch_article_list($article_type,$limit){\n $query=\"SELECT * FROM articles_list where article_type=\\\"\";\n $query.=\"{$article_type}\";\n $query.=\"\\\" ORDER BY published_date DESC LIMIT \";\n $query.=\"{$limit}\";\n //echo $query;\n global $connection;\n $result=mysqli_query($connection,$query);\n return $result;\n }", "public function get_movie_list($limit=NULL, $offset='', $order=array('field' => 'mrelease_date', 'sort' => 'DESC')) {\n\n $query = $this->make_query('mtitle\n , user_id\n , mtitle_identifier\n , msinopsis\n , mtags\n , mrelease_date'\n , 'srt_movie'\n , array()\n , $limit\n , $offset\n , $order);\n\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $value) {\n $user_id = $value->user_id;\n $key_identifi = $value->mtitle_identifier;\n\n $query2 = $this->make_query('username, email', 'users', array('id =' => $user_id));\n\n $thepizzais = trim($value->mtags);\n $pieces = explode(\" \", $thepizzais);\n if (count($pieces) === 5) {\n $show_tags = '<i class=icon-tags></i>\n <span class=label>' . $pieces[0] . '</span>\n <span class=label>' . $pieces[1] . '</span>\n <span class=label>' . $pieces[2] . '</span>\n <span class=label>' . $pieces[3] . '</span>\n <span class=label>' . $pieces[4] . '</span>\n ';\n } elseif (count($pieces) === 4) {\n $show_tags = '<i class=icon-tags></i>\n <span class=label>' . $pieces[0] . '</span>\n <span class=label>' . $pieces[1] . '</span>\n <span class=label>' . $pieces[2] . '</span>\n <span class=label>' . $pieces[3] . '</span>\n ';\n } elseif (count($pieces) === 3) {\n $show_tags = '<i class=icon-tags></i>\n <span class=label>' . $pieces[0] . '</span>\n <span class=label>' . $pieces[1] . '</span>\n <span class=label>' . $pieces[2] . '</span>\n ';\n } elseif (count($pieces) === 2) {\n $show_tags = '<i class=icon-tags></i>\n <span class=label>' . $pieces[0] . '</span>\n <span class=label>' . $pieces[1] . '</span>\n ';\n } elseif (count($pieces) === 1) {\n $show_tags = '<i class=icon-tag></i>\n <span class=label>' . $pieces[0] . '</span>\n ';\n }\n\n foreach ($query2->result() as $key) {\n $username = $key->username;\n $profile_pic = $this->gravatar->get_gravatar($key->email);\n }\n\n $release_date = dnull_to_default($value->mrelease_date);\n if (!$release_date) {\n $release_date = strftime('%d/%b/%Y', strtotime\n ($value->mrelease_date));\n }\n $wordtime = $this->wordtime->relative_date(strtotime($value->mrelease_date));\n $this->table->add_row(\n '<blockquote class=pull-left>\n <div class=rata_kiri scroll-pane><i class=\"icon-question-sign\"></i>\n <h3><abbr title=attribute>'\n . anchor('data/detail/' . $value->mtitle_identifier, $value->mtitle . '</abbr>') . '\n ' . word_limiter($value->msinopsis, 25) . '</div>\n <small><div class=rata_kiri>' . $show_tags . ' <i class=icon-time></i>' . $wordtime .\n \"<small>\n <div class=pagination>\n <ul>\n <li><a href=#><i class=icon-heart></i><b>\" . $this->hits->get_hits_view($key_identifi) . \"</b></a></li>\n <li><a href=#><i class=icon-comment></i><b>\" . $this->hits->get_hits_lilcomment($key_identifi) . \"</b></a></li>\n <li><a href=#><i class=icon-check></i><b>\" . $this->hits->get_hits_answer($key_identifi) . \"</b></a></li>\n </ul>\n </div>\n <img src='$profile_pic' width='35' title='user picture' alt='user picture' />\" . 'Designer @<cite title=\"Source Title\">Kodepath</cite>\n </small></div></small>\n </blockquote>');\n $this->output_table .=$this->table->generate();\n $this->output_table .='<br/>';\n $this->table->clear();\n }\n return $this->output_table;\n } else {\n return FALSE;\n }\n }", "public function listing()\n\t{\n\n if(isset($_POST['dosubmit']) && $_POST['dosubmit']=='删除'){\n if( empty($_POST['id']) ){\n $this->error(L('请选择要删除的数据!'));\n }\n\n if(is_array($_POST['id'])){\n $ids = $_POST['id'];\n $in = implode(\",\",$_POST['id']);\n }else{\n $ids[] = $_POST['id'];\n $in = $_POST['id'];\n }\n\n //删除连带数据\n\n //删除自身数据\n $contactMod = M('contact');\n $sql=\" id in (\".$in.\") \";\n $contactMod->where($sql)->delete();\n\n $this->success('删除成功', U('contact/listing'));\n exit;\n }\n \n\n\n /// 载入 lk_cunction. (使用其 LkHTML::ListSort 函数)\n load(\"@.lk_function\");\n\n\t\t///列表过滤\n\t\t$sqlWhere = \"status < 250\";\n\t\t//$sqlWhere .= \" and mobile!='' and score_jia!='' and wx_headpic_path!='' \";\n\t\t//$sqlWhere .= \" and is_prize>=0 and openid!='' \";\n\t\t//$sqlWhere .= \" and user_id_crm!='' \";\n\t\t$sqlOrder = \" id DESC\";\n\t\t\n\t\t//$sqlWhere .= \" and (headpic!='' or voice!='') and mobile!='' \";\n\t\t\n\t\t\n\t\t$s_time=time()-(SHENHE_CROSS_TIME*3600); //超过4小时自动审核通过\n\t\t\n\t\t\n\n\t\t$filter_role = $this->REQUEST('_filter_role');\n\t\tif( $filter_role != '' ){\n\t\t\t$sqlWhere .= \" and role = '\". $this->fixSQL($filter_role).\"' \";\n\t\t}\n\n\t\t$filter_state = $this->REQUEST('_filter_state');\n\t\tif( $filter_state != '' ){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif ($filter_state=='0'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" \";\n\t\t\t}\n\t\t\tif ($filter_state=='1'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time<'\".$s_time.\"' \";\n\t\t\t}\n\t\t\tif ($filter_state=='1_4h'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time>='\".$s_time.\"' \";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n \n //新搜索\n $f_search = $this->REQUEST('_f_search');\n $filter_fieldname = $this->REQUEST('_filter_fieldname');\n\t\tif( $f_search != '' ){\n\t\t\tif($filter_fieldname=='realname'){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='mobile'){\n\t\t\t\t$sqlWhere .= \" and (mobile like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='summary'){\n\t\t\t\t$sqlWhere .= \" and (summary like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\t//elseif($filter_fieldname=='wx_nickname'){\n\t\t\t//\t$sqlWhere .= \" and (wx_nickname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='openid'){\n\t\t\t//\t$sqlWhere .= \" and (openid like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='user_id_crm'){\n\t\t\t//\t$sqlWhere .= \" and (user_id_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='username_crm'){\n\t\t\t//\t$sqlWhere .= \" and (username_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='realname_crm'){\n\t\t\t//\t$sqlWhere .= \" and (realname_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='is_prize'){\n\t\t\t//\t$sqlWhere .= \" and (is_prize = '\". $this->fixSQL($f_search).\"') \";\n\t\t\t//}\n\t\t\telseif($filter_fieldname==''){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%' or mobile like '%\". $this->fixSQL($f_search).\"%' or summary like '%\". $this->fixSQL($f_search).\"%' )\";\n\t\t\t}\n\t\t\telse{\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$filter_starttime = $this->REQUEST('_filter_starttime');\n\t\t$filter_endtime = $this->REQUEST('_filter_endtime');\n\t\tif( $filter_starttime != '' ){\n\t\t\t$sql_starttime=strtotime($filter_starttime);\n\t\t\t$sqlWhere .= \" and create_time >= \". $sql_starttime.\" \";\n\t\t}\n\t\tif( $filter_endtime != '' ){\n\t\t\t$sql_endtime=strtotime($filter_endtime)+(24*3600);\n\t\t\t$sqlWhere .= \" and create_time < \". $sql_endtime.\" \";\n\t\t}\n\t\t\n\t\t\n\t\t//echo $sqlWhere;exit;\n\t\t\n\t\t\n\t\t\n\t\t\n\n $this->ModManager = M('contact');\n $f_order = $this->REQUEST('_f_order', 'modify_time');\n $fields = $this->ModManager->getDbFields();\n if( in_array($f_order, $fields) ){\n $sqlOrder = $f_order . ' ';\n }else{\n $sqlOrder = 'modify_time ';\n }\n \n $f_direc = strtoupper($this->REQUEST('_f_direc'));if($f_direc==\"\"){$f_direc='DESC';}\n if( $f_direc != 'DESC' ){\n $sqlOrder .= 'ASC';\n }else{\n $sqlOrder .= 'DESC';\n }\n \n $sqlOrder = ' id DESC ';\n \n //echo $sqlOrder;exit;\n\n\t\t///回传过滤条件\n\t\t$this->assign('filter_fieldname', $filter_fieldname);\n\t\t$this->assign('filter_starttime', $filter_starttime);\n\t\t$this->assign('filter_endtime', $filter_endtime);\n\n\n\n $this->assign('filter_role', $filter_role);\n $this->assign('filter_state', $filter_state);\n $this->assign('f_search', $f_search);\n $this->assign('f_order', $f_order);\n $this->assign('f_direc', $f_direc );\n\n\t\t///获取列表数据集\n\t\tif(isset($_POST['do_search']) && $_POST['do_search']==1){\n\t\t\t$paginglimit=1000000;\n\t\t}\n\t\telse{\n\t\t\t$paginglimit='';\n }\n //$rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, '', 'M');\n $rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, $paginglimit, 'M');\n //echo \"<pre>\";print_r($rst);exit;\n\t\t\n\t\t\n\t\t//过滤搜索条件\n\t\t//$UserinfoMod = M('user');\n\t\t\n //if(isset($rst['dataset'])){\n // foreach($rst['dataset'] as $k => $v){\n\t\t\t\t\n \t\t/*\n \t\t$user = $UserinfoMod->field('id,username,realname,point_total')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t$user=$user[0];\n \t\t\n \t\t$rst['dataset'][$k]['user_id'] = $user['id'];\n \t$rst['dataset'][$k]['username'] = $user['username'];\n $rst['dataset'][$k]['realname'] = $user['realname'];\n $rst['dataset'][$k]['point_total'] = $user['point_total'];\n */\n \n \n /*\n if($v['status']==0){\n \t$rst['dataset'][$k]['status_now']='审核拒绝';\n }\n if($v['status']==1){\n \tif($v['create_time']<$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核通过';\n \t}\n \tif($v['create_time']>=$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核中';\n \t}\n }\n */\n \n //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t//$user=$user[0];\n \t\t\n //\t\t$rst['dataset'][$k]['user_province'] = $user['province'];\n // \t$rst['dataset'][$k]['user_city'] = $user['city'];\n \n \n \n // }\n // $this->assign('dataset', $rst['dataset']);// 赋值数据集\n //}\n //echo \"<pre>\";print_r($rst['dataset']);exit;\n\t\t\n\t\t$this->assign('dataset', $rst['dataset']);// 赋值数据集\n\t\t\n\t\t\n\t\t\n if(isset($_POST['do_search']) && $_POST['do_search']==1){\n \t//echo \"export\";exit;\n \t\n \t$toShow['banner']=$rst['dataset'];\n \t\n\t $start=0;\n\t $pagenum=1000000;\n\n\t $downloadfilename='ExportData.csv';\n\t $output=\"\";\n\t $expstr=\"\\t\";\n\t $expenter=\"\\t\\n\";\n\t $output .= \"流水ID编号\"\n \t.$expstr.\"提交时间\"\n .$expstr.\"姓名\"\n .$expstr.\"性别(1男2女)\"\n .$expstr.\"联系电话\"\n .$expstr.\"电子邮箱\"\n .$expstr.\"反馈标题\"\n .$expstr.\"反馈内容\"\n .$expenter;\n\n \t\n \t$UserinfoMod = M('user');\n \t\n\t if (!empty($toShow['banner'])){\n\t $k=0;\n\t do{\n\t \n\t $v=$toShow['banner'][$k];\n\t \n\t \n\t //if(isset($allProductList[$v['class_id']])){\n\t // $toShow['banner'][$k]['class_name']=$allProductList[$v['class_id']]['title'];\n\t //}\n\t //else{\n\t // $toShow['banner'][$k]['class_name']=\"\";\n\t //}\n\t \n\t \n\t \n\t //$myword=$toShow['banner'][$k]['myword'];\n\t //$myword=str_replace(\"\\r\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\r\",\"\",$myword);\n\t\t\t\t\t\n\t\t\t\t\t\n\t //if ($toShow['banner'][$k]['device']==\"0\"){\n\t // $device_show=\"PC端\";\n\t //}\n\t //if ($toShow['banner'][$k]['device']==\"1\"){\n\t // $device_show=\"手机端\";\n\t //}\n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/web_headpic/\".$v['headpic'];\n\t //$voice=empty($v['voice'])?\"\":BASE_URL_FRONT.\"/public/web_voice/\".$v['voice'];\n\t //$wx_headpic=empty($v['wx_headpic_path'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t /*\n\t if($v['status']==0){\n\t \t$status_now='审核拒绝';\n\t }\n\t if($v['status']==1){\n\t \tif($v['create_time']<$s_time){\n\t \t\t$status_now='审核通过';\n\t \t}\n\t \tif($v['create_time']>=$s_time){\n\t \t\t$status_now='审核中';\n\t \t}\n\t }\n\t */\n\t \n\t \n\t \n\t $summary=str_replace(\"\\r\\n\",\" [Enter] \",$toShow['banner'][$k]['summary']);\n\t $summary=str_replace(\"\\n\",\" [Enter] \",$summary);\n\t $summary=str_replace(\"\\r\",\"\",$summary);\n\t \n\t \n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n\t \t\t//$user=$user[0];\n\t \t\t\n\t\t \t//\t$user_province = $user['province'];\n\t\t //\t$user_city = $user['city'];\n\t \n\t \n\n\t $output .= $toShow['banner'][$k]['id']\n\t \t.$expstr.$toShow['banner'][$k]['addtime']\n\t \t.$expstr.$toShow['banner'][$k]['realname']\n\t \t.$expstr.$toShow['banner'][$k]['sex']\n\t \t.$expstr.$toShow['banner'][$k]['mobile']\n\t \t.$expstr.$toShow['banner'][$k]['email']\n\t \t.$expstr.$toShow['banner'][$k]['title']\n\t \t.$expstr.$summary\n\t .$expenter;\n\n\n\t $k=$k+1;\n\t }while($k<count($toShow['banner']));\n\t }\n\n\t $T_text=$output;\n\n\t\t\t//exit;\n\n\n\t\t\theader('Cache-control: private');\n\t header('Content-Disposition: attachment; filename='.$downloadfilename);\n\n\n\n\t//如果mb_convert_encoding函数存在则用此函数来转编码,前提是需要安装mbstring包\n\t if(function_exists('mb_convert_encoding')){\n\t header('Content-type: text/csv; charset=UTF-16LE');\n\t echo(chr(255).chr(254));\n\t echo(mb_convert_encoding($T_text,\"UTF-16LE\",\"UTF-8\"));\n\t }\n\t//如果iconv函数存在则用此函数来转编码\n\t elseif(function_exists('iconv')){\n\t header('Content-type: text/csv');\n\t echo(chr(255).chr(254));\n\t echo(iconv(\"UTF-8\",\"UTF-16LE\",$T_text));\n\t }\n\t//直接从utf-8转,这个貌似不灵...\n\t else{\n\t header('Content-type: text/csv; charset=UTF-8');\n\t echo(chr(239).chr(187).chr(191));\n\t echo($T_text);\n\t }\n\t exit;\n\t \n \n }\n\t\t\n\t\t\n\t\t$PageTitle = L('信息反馈列表');\n\t\t$PageMenu = array(\n\t\t\t//array( U('contact/create'), L('信息反馈') ),\n //array( U('contact/export'), L('导出信息反馈') ),\n\t\t);\n\t\t$this->setPagething( $PageTitle, $PageMenu, true);\n\t\t$this->display();\n\t}", "private function _get_users_data(){ \r\n $this->db->select('*'); \r\n $this->db->from('suggestions');\r\n\t\t$this->db->order_by('suggestion_id', 'desc');\t\r\n }", "function follow_up_list($utype, $uid) {\n $mysqli = $this->mysqli;\n if ($utype == \"Tester\") {\n $sql = \"SELECT * FROM bug_follow_up WHERE bug_id IN (SELECT `bug_id` FROM bug_report WHERE app_mod_id IN (SELECT app_mod_id FROM application_module_list WHERE app_id IN (SELECT app_id FROM application where app_tester='$uid'))) ORDER BY follow_up_date, follow_up_time DESC;\";\n }\n if ($utype == \"Developer\") {\n $sql = \"SELECT * FROM bug_follow_up WHERE bug_id IN (SELECT `bug_id` FROM bug_report WHERE app_mod_id IN (SELECT app_mod_id FROM application_module_list WHERE app_id IN (SELECT app_id FROM application where app_dev='$uid'))) ORDER BY follow_up_date, follow_up_time DESC;\";\n }\n if ($utype == \"admin\") {\n $sql = \"SELECT * FROM bug_follow_up WHERE bug_id IN (SELECT `bug_id` FROM bug_report WHERE app_mod_id IN (SELECT app_mod_id FROM application_module_list WHERE app_id IN (SELECT app_id FROM application))) ORDER BY follow_up_date, follow_up_time DESC;\";\n }\n if ($val = $mysqli->query($sql)) {\n return $val;\n }\n else {\n echo $mysqli->error;\n }\n }", "function school_list($limit='',$start=0,$condition='')\n{\n\tglobal $DB;\n\t$sql =\"SELECT ms.*,mus.userid,mus.schoolid,mu.firstname,mu.lastname FROM {school} ms left join \";\n\t$sql.=\"(select * from {user_school} where role='incharge') mus on mus.schoolid=ms.id left join {user} mu on mu.id=mus.userid\";\n\t$sql.=\" WHERE ms.activestatus=1 and mu.deleted=0 $condition group by ms.id order by ms.id desc limit $start,$limit \";\n\t$result = $DB->get_records_sql($sql);\n\treturn $result;\n}", "public function read(){\n //create query\n $query = 'SELECT\n c.category_name as category_name,\n l.language_name as language_name,\n i.name as instructor_name,\n p.id,\n p.title,\n p.category_id,\n p.description,\n p.language_medium_id,\n p.image,\n p.instructor_id,\n p.created_at\n \n \n FROM\n ' .$this->table . ' p\n LEFT JOIN course_categories c ON p.category_id = c.id \n LEFT JOIN users i ON p.instructor_id = i.id \n LEFT JOIN language_mediums l ON p.language_medium_id = l.id\n ORDER BY p.created_at DESC'; \n \n\n //prepare statement\n $stmt = $this->conn->prepare($query);\n //execute query\n $stmt->execute();\n\n return $stmt;\n\n }", "public function get_popular_list()\n\t{\n\t\t$result = $this->db->from(\"blog\")\n\t\t\t\t\t\t->join(\"category\",\"category.category_id\",\"blog.category_id\")\n\t\t\t\t\t\t->where(array(\"blog.publish_status\"=> 1, \"blog.blog_status\" => 1))\n\t\t\t\t\t\t->orderby(\"blog.blog_views\", \"DESC\")\n\t\t\t\t\t\t->limit(5)\n\t\t\t\t\t\t->get();\t\n\t\treturn $result;\n\t}", "function listatpodocubaja(){\n\t\tinclude(\"application/config/conexdb_db2.php\");\n\t\t$codcia=$this->session->userdata('codcia');\n\t\t$sql=\"select DISTINCT(a.YHTIPDOC) AS TIPODOCU,e.EUDSCCOR FROM LIBPRDDAT.MMYHREL0 a INNER JOIN LIBPRDDAT.MMEUREL0 e ON a.YHTIPDOC=e.EUCODELE WHERE a.YHTIPDOC!='' AND e.EUCODTBL='AG' and a.YHSTS='I' AND a.YHCODCIA='\".$codcia.\"' and a.YHFECDOC>='20170101' order by TIPODOCU asc\";\t\t\n\t\t$dato = odbc_exec($dbconect, $sql)or die(\"<p>\" . odbc_errormsg());\n\t\tif (!$dato) {\n\t\t\t$data = FALSE;\n\t\t} else { \n\t\t\t$data = $dato; \n\t\t} \n\t\treturn $data;\n\t\tcerrar_odbc();\n\t}", "function immagini_get($id_imm=\"\"){\n $db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t\n\t$q_foto=\"SELECT immagine.* FROM imm_img JOIN immagine on immagine.id_img=imm_img.id_img WHERE imm_img.id_imm =$id_imm ORDER BY `ordine` ASC\";\n \n\t$r_foto=$db->query($q_foto);\n while($row_foto = mysql_fetch_assoc($r_foto))\n {\n $rows_foto[] = $row_foto;\n }\n \n return $rows_foto;\n\n \n}", "function newsItem_BacaDataListing_Headline_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE headline != '0' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "public function get_category()\n {\n $this->db->where(\"deleted\", 0);\n //$this->db->order_by(\"created_on\", \"DESC\");\n return $result = $this->db->get(\"category\");\n\n }", "function listInOrder()\n {\n global $BD3;\n global $BD1;\n global $ANO_REF;\n $res_sql=\"select $BD3.final.id,\n $BD3.final.matr,\n $BD1.empregados.nome,\n $BD3.final.cargo,\n $BD3.final.agrup\n from $BD3.final,$BD1.empregados\n where $BD1.empregados.matr=$BD3.final.matr\n AND $BD3.final.ano='$ANO_REF'\n order by $BD1.empregados.nome;\";\n return sql(\"$BD3\",$res_sql);\n }", "function join_product_table(){\n global $db;\n $sql =\" SELECT p.id,p.name,p.keywords,p.quantity,p.url,p.buy_price,p.sale_price,p.media_id,p.date,c.name\";\n $sql .=\" AS categorie,m.file_name AS image\";\n $sql .=\" FROM products p\";\n $sql .=\" LEFT JOIN categories c ON c.id = p.categorie_id\";\n $sql .=\" LEFT JOIN media m ON m.id = p.media_id\";\n $sql .=\" ORDER BY p.id ASC\";\n return find_by_sql($sql);\n\n }", "function top_produit()\n{\n\t$sql = \"SELECT produit.id_produit,nom_produit,description_produit,desc_courte_produit,prix,qte,images from produit inner join commande_produit on produit.id_produit = commande_produit.id_produit\n\tinner join commande on commande_produit.id_commande = commande.id_commande limit 1\";\n\tglobal $connection;\n\treturn mysqli_query($connection, $sql);\n}" ]
[ "0.6313369", "0.6288349", "0.6257846", "0.62045074", "0.6173538", "0.6172497", "0.616926", "0.6148213", "0.61351436", "0.6113645", "0.6062299", "0.6057591", "0.6019796", "0.5959687", "0.5956248", "0.59359527", "0.59162086", "0.591609", "0.5915513", "0.59144366", "0.5902786", "0.58622706", "0.5837014", "0.58132374", "0.57993954", "0.5798353", "0.579377", "0.577639", "0.5775349", "0.5769771", "0.57656795", "0.574081", "0.57269096", "0.5722792", "0.57114065", "0.56852585", "0.5678156", "0.56762314", "0.5662062", "0.56582975", "0.5641865", "0.55978197", "0.55973506", "0.55908525", "0.55633634", "0.55558366", "0.5553285", "0.553713", "0.55289084", "0.55232567", "0.551906", "0.5505966", "0.55029607", "0.5487784", "0.547984", "0.5477557", "0.5475343", "0.54723936", "0.5470985", "0.5470985", "0.5459931", "0.5459862", "0.54463786", "0.54452306", "0.5429338", "0.5428298", "0.5424362", "0.54209095", "0.54150355", "0.5414711", "0.54142183", "0.5406476", "0.5400746", "0.5395017", "0.5393296", "0.53860855", "0.538592", "0.5382816", "0.5373815", "0.53723466", "0.53709006", "0.53636014", "0.5360872", "0.5360782", "0.5355803", "0.5355068", "0.53460485", "0.534502", "0.53395104", "0.5339258", "0.5337634", "0.5336404", "0.53362167", "0.532263", "0.53214574", "0.5321274", "0.53195786", "0.5311345", "0.5310428", "0.530414" ]
0.6664699
0
trouver le id de list dans list_list
function supp_list($list){ $lid = get_id($list); //supp if ($lid!=-1){ //supprimer element de la liste $SQL = "DELETE FROM element_list WHERE list='$lid'"; global $db; $res = $db->prepare($SQL); $res->execute(); //supprimer list $SQL = "DELETE FROM list_list WHERE list='$list'"; global $db; $res = $db->prepare($SQL); $res->execute(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_id()\n\t{\n\t\treturn $this->list;\n\t}", "public function getListId();", "public abstract static function getListID();", "protected function IdUserListReproduction ()\n {\n $lista = Model_listas::find('all', array\n (\n 'where' => array\n (\n array('id_usuario'=>$this->userID()),\n array('titulo'=>'reproducidas')\n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n } \n return $id; \n }\n }", "function wp_parse_id_list($input_list)\n {\n }", "public function getListID()\n\t{\n\t\treturn $this->get('ListID');\n\t}", "public function getId()\n {\n return $this->_list->getId();\n }", "static function getListID($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_id_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (is_numeric($pm_list_name_or_id)) {\n\t\t\t$vn_list_id = intval($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load(array('list_code' => $pm_list_name_or_id))) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id] = $vn_list_id;\n\t}", "public abstract function get_default_list_id();", "public function sanitize_list_id( $maybe_list_id = '' ) {\n if ( ! $maybe_list_id ) {\n return $this->get_site_list_id();\n }\n $lists = $this->get_lists();\n foreach ( $lists->lists as $list ) {\n if ( ! $list || ! isset( $list->id ) ) {\n continue;\n }\n if ( $maybe_list_id == $list->id || $maybe_list_id == $list->name ) {\n return $list->id;\n }\n }\n\n return $maybe_list_id;\n }", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "protected function getListId($strList)\n\t{\n\n\t\t$arrLists = $this->api->lists();\n\t\tforeach($arrLists['data'] as $list)\n\t\t{\n\t\t\tif ($list['name']==$strList)\n\t\t\t\treturn $list['id'];\n\t\t}\n\t\treturn null;\n\n\t}", "function set_list_id($list_id) {\n $this->_subscribers_base_route = $this->_base_route.'subscribers/'.$list_id;\n }", "protected function idNameList($nombreLista)\n {\n $lista = Model_Listas::find('all', array\n (\n 'where' => array\n (\n array('titulo'=>$nombreLista) \n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n }\n return $id; \n }\n }", "function _list($lp_n, $a, $p){\r\n global $conn; // Jadikan global\r\n \r\n // Buat sql untuk cek apakah row sudah ada atau belum\r\n $sql = \"SELECT * FROM data_list WHERE id_sntr = $a AND nama_lprn = '$lp_n'\";\r\n $cek = mysqli_num_rows( mysqli_query($conn, $sql) );\r\n\r\n // Dapatkan id dari row yang diinginkan\r\n $id_list = mysqli_fetch_assoc(mysqli_query($conn, $sql))[\"id_list\"];\r\n\r\n // Cek ttd_pembina diceklis atau tidak\r\n if ( $p === \"0000-00-00 00:00:00\" ) {\r\n // Jika tidak diceklism, hapus row lama atau biarkan\r\n $sql = \"DELETE FROM data_list WHERE id_list = $id_list\";\r\n } else {\r\n // Jiak diceklis, cek apakah row sudah ada atau belum\r\n if ( $cek > 0 ) {\r\n // Jika sudah ada maka update row dengan data baru\r\n $sql = \"UPDATE data_list SET\r\n id_list = $id_list,\r\n id_sntr = $a,\r\n nama_lprn = '$lp_n',\r\n wktu_lprn = '$p'\r\n WHERE id_list = $id_list\";\r\n } else {\r\n // Jika belum, buat row baru dan masukkan data \r\n $sql = \"INSERT INTO data_list (id_list, id_sntr, nama_lprn, wktu_lprn)\r\n VALUE ('', $a, '$lp_n', '$p')\";\r\n }\r\n }\r\n\r\n // Ambil data sql dan update\r\n mysqli_query($conn, $sql);\r\n}", "private function _setListId()\r\n { \r\n if (Mage::getSingleton('admin/session')->isLoggedIn()) {\r\n $storeId = Mage::app()->getRequest()->getParam('store_id');\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId', $storeId); \r\n } else {\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId');\r\n }\r\n }", "function list_get($id) {\n\n //$id = $this->get('id');\n\n if (!$id) {\n\n $this->response(\"No item ID specified!\", 400);\n\n exit;\n }\n\n $list = $this->List_model->getListById($id);\n\n if ($list) {\n\n //$list = $this->appendItems($list);\n //Put owner's name instead of user ID\n //$list['owner'] = $this->User_model->getName($list['owner'])['name'];\n unset($list['owner']);\n\n $this->response($list, 200);\n\n exit;\n } else {\n\n $this->response(\"Invalid ID\", 404);\n\n exit;\n }\n }", "public function loadListItemsByListId() {\n $sql = \"SELECT ListText, ListItemID, ListItemColor, ListItemDone\"\n FROM list_items\n WHERE ListID=(\n SELECT ListID\n FROM lists\n WHERE ListURL=:list\n )\n ORDER BY ListItemPosition\";\n if($stmt = $this->_db->prepare($sql)) {\n $stmt->bindParam(':list', $_GET['list'], PDO::PARAM_STR);\n $stmt->execute();\n $order = 1;\n while($row = $stmt->fetch()) {\n echo $this->formatListItems($row, $order);\n $order;\n }\n $stmt->closeCursor();\n }\n else {\n echo \"<li> Something went wrong. \", $db->error, \"</li>\";\n }", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d = New AlbumTable($this->dbAdapter); \n // bucar id de parametro\n $datos = $d->getGeneral1(\"select idTdoc from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n $d->modGeneral(\"delete from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'i/'.$datos['idTdoc']);\n } \n }", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d=new AlbumTable($this->dbAdapter);\n\n $d->modGeneral(\"delete from a_empleados_rete_d where idEret=\".$id); \n $d->modGeneral(\"delete from a_empleados_rete where id=\".$id); \n //$u=new Retefuente($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n //$u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "protected function prepareTemplateToList($list)\n {\n return $list;\n }", "function add_element_list($newlist, $l, $username, $description, $ecolor, $priority, $creation){\n $l_id = get_id($l);\n $uid = get_userid($username);\n //insÚrer\n if ($l_id!=-1){\n \t$SQL = \"INSERT INTO element_list VALUES (DEFAULT,'$l_id',$uid,'$newlist', '$description', $ecolor, $priority, $creation, $creation, 0)\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "function checkIDList($table, $fixedQuery, &$IDList)\n{\n\tglobal $sitePosition;\n\n\t$IDs = array();\n\t$rs = query('Select `ID` from `' . $sitePosition . '.' . $table . '` where ' . ($fixedQuery != '' ? ('(' . $fixedQuery . ') and ') : '') . '`ID` in (' . $IDList . ')', false);\n\twhile(true)\n\t{\n\t\t$rsInfo = fetchRow($rs);\n\t\tif($rsInfo === null) break;\n\t\t$IDs[] = $rsInfo[0];\n\t}\n\tfreeResult($rs);\n\t$IDList = implode(',', $IDs);\n}", "public function remove_list_from_table($list){\n\t\t$query = \"DELETE * FROM \" . $this->table . \" WHERE \" . $this->column_name . \"=\";\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function __construct($listId, $list)\n\t{\n\t\t$this->listId = $listId;\n\t\t$this->list = $list;\n\t}", "function supp_element_list($supp, $list){\n $lid = get_id($list);\n //supprimer\n if ($lid!=-1){\n \t$SQL = \"DELETE FROM element_list WHERE element = '$supp' and list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "function candidatosXLista($id){\n\t\t $sql = \"SELECT C.idlista, L.nombrelista,nombrecandidato, apellidocandidato, cargocandidato, imagencandidato\n\t\t FROM candidato C LEFT JOIN LISTA L ON C.idlista = L.idlista\n\t\t WHERE C.idlista = \".$id.\"order by cargocandidato ASC ;\";\n\t\treturn $sql;\n\t }", "public function dissociateList(Request $request, $id, $list)\n {\n $person = $this->modelPath::findOrFail($id);\n\n $person->retractListById($list);\n\n $this->notify('lists.dissociated');\n\n return redirect()->back();\n }", "public function get_site_list_id() {\n $list = $this->get_site_list();\n if ( isset( $list->id ) ) {\n return $list->id;\n }\n return false;\n }", "function update_list( $id, $name, $can_delete, $items )\n\t{\n\t\t$this->db->set('name', $name );\n if( $can_delete !== NULL ) {\n $this->db->set('can_delete', $can_delete );\n } \n $this->db->where( 'id', $id );\n\t\t$this->db->update('lists');\n\t\t\n // Save the list items\n\t\t$this->db->where( 'list_id', $id );\n\t\t$this->db->delete( 'list_items' );\n\t\tfor( $i = 0; $i < count($items); $i++ ) {\n $this->db->set('list_id', $id );\n $this->db->set('data_id', $items[$i]['id']);\n\t\t\t$this->db->set('title', $items[$i]['title']);\n\t\t\t$this->db->set('type', $items[$i]['type']);\n\t\t\t$this->db->set('sort_order', $i + 1);\n\t\t\t$this->db->insert('list_items');\n }\n\t}", "public function listId() {\n\t\treturn $this->academic_session->all()->pluck('id')->all();\n\t}", "public function getWishlistId();", "function is_in_elementlist($element, $l){\n $l_id = get_id($l);\n //trouver\n if ($l_id == -1) return false;\n else {\n $SQL = \"SELECT * FROM element_list WHERE element = '$element' and list='$l_id'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n \tif($res->rowCount() == 0) return false;\n \telse return true;\n }\n}", "public static function getGatewayListID(){\n $row = Gateway::where(array('Status'=>1))->lists('Title', 'GatewayID');\n if(!empty($row)){\n $row = array(\"\"=> \"Select a Gateway\")+$row;\n }\n return $row;\n }", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "public function add_list_to_table($list){\n\t\t$query = \"SELECT $this->column_name FROM \" . $this->table;\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function listIdOfListStaffId($listStaffId)\n {\n return QcCompanyStaffWork::whereIn('staff_id', $listStaffId)->pluck('work_id');\n }", "protected function carregarListaOneToMany($object_list,$addParametros) {\n $query = \"SELECT id FROM \".get_class($object_list).\" WHERE id\".get_class($this).\"=$this->id $addParametros\";\n return bd::executeSqlParaArraySimples($query);\n }", "public function testGetListOfSpecificIds()\n {\n $itemIds = [];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n\n $search = 'ids:'.implode(',', $itemIds);\n\n $response = $this->api->getList($search);\n $this->assertErrors($response);\n $this->assertEquals(count($itemIds), $response['total']);\n\n foreach ($response['lists'] as $item) {\n $this->assertTrue(in_array($item['id'], $itemIds));\n $this->api->delete($item['id']);\n $this->assertErrors($response);\n }\n }", "public function edit($id,$list_id)\n {\n if (Gate::allows('isadmin')){\n $menu = Menu::find($id);\n $status = $menu->listts->where('id',$list_id)->all();\n $menu = Menu::find($id)->name;\n if (count($status)>0){\n $list = Listt::find($list_id);\n return view('dashboard.editlist',compact('list','menu'));\n }\n }\n abort(404);\n }", "public function getMultipleWishlistId();", "private function getTargetListId($list_id) {\n $where = array(\n 'equals' => array(\n 'mailchimp_list' => $list_id\n )\n );\n $result = $this->runSugarQuery('ProspectLists', array('id'), $where, 1);\n if($result) {\n return $result[0]['id'];\n }\n return false;\n }", "public function delete_list($val){\n if(get_instance()->ecl('Instance')->mod('lists', 'delete_list', [get_instance()->ecl('Instance')->user(),$val])) {\n echo 1;\n } else {\n echo 0;\n }\n }", "static function get_ids_from_list ($list_video_ids){\r\n\r\n if(empty($list_video_ids)){\r\n return;\r\n }\r\n\r\n $buffy = array();\r\n\r\n //this is needed because we could have more space between each movie id\r\n $remove_spaces = trim(str_replace(array('&nbsp;', ' '),array(''), htmlentities($list_video_ids, ENT_QUOTES)));\r\n\r\n if(!empty($remove_spaces)) {\r\n\r\n $video_id_explode = explode(',', $remove_spaces);\r\n $video_id_explode_map = array_map('trim',$video_id_explode);//extra trim just in case\r\n\r\n //make an array of video id's'\r\n foreach($video_id_explode_map as $video_id) {\r\n $trim_video_id = trim($video_id);\r\n\r\n //check to prevent duplicates id's\r\n if (!in_array($trim_video_id, $buffy)) {\r\n $buffy[] = $trim_video_id;\r\n }\r\n }\r\n }\r\n\r\n return $buffy;\r\n }", "public function listing()\n\t{\n\n if(isset($_POST['dosubmit']) && $_POST['dosubmit']=='删除'){\n if( empty($_POST['id']) ){\n $this->error(L('请选择要删除的数据!'));\n }\n\n if(is_array($_POST['id'])){\n $ids = $_POST['id'];\n $in = implode(\",\",$_POST['id']);\n }else{\n $ids[] = $_POST['id'];\n $in = $_POST['id'];\n }\n\n //删除连带数据\n\n //删除自身数据\n $contactMod = M('contact');\n $sql=\" id in (\".$in.\") \";\n $contactMod->where($sql)->delete();\n\n $this->success('删除成功', U('contact/listing'));\n exit;\n }\n \n\n\n /// 载入 lk_cunction. (使用其 LkHTML::ListSort 函数)\n load(\"@.lk_function\");\n\n\t\t///列表过滤\n\t\t$sqlWhere = \"status < 250\";\n\t\t//$sqlWhere .= \" and mobile!='' and score_jia!='' and wx_headpic_path!='' \";\n\t\t//$sqlWhere .= \" and is_prize>=0 and openid!='' \";\n\t\t//$sqlWhere .= \" and user_id_crm!='' \";\n\t\t$sqlOrder = \" id DESC\";\n\t\t\n\t\t//$sqlWhere .= \" and (headpic!='' or voice!='') and mobile!='' \";\n\t\t\n\t\t\n\t\t$s_time=time()-(SHENHE_CROSS_TIME*3600); //超过4小时自动审核通过\n\t\t\n\t\t\n\n\t\t$filter_role = $this->REQUEST('_filter_role');\n\t\tif( $filter_role != '' ){\n\t\t\t$sqlWhere .= \" and role = '\". $this->fixSQL($filter_role).\"' \";\n\t\t}\n\n\t\t$filter_state = $this->REQUEST('_filter_state');\n\t\tif( $filter_state != '' ){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif ($filter_state=='0'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" \";\n\t\t\t}\n\t\t\tif ($filter_state=='1'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time<'\".$s_time.\"' \";\n\t\t\t}\n\t\t\tif ($filter_state=='1_4h'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time>='\".$s_time.\"' \";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n \n //新搜索\n $f_search = $this->REQUEST('_f_search');\n $filter_fieldname = $this->REQUEST('_filter_fieldname');\n\t\tif( $f_search != '' ){\n\t\t\tif($filter_fieldname=='realname'){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='mobile'){\n\t\t\t\t$sqlWhere .= \" and (mobile like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='summary'){\n\t\t\t\t$sqlWhere .= \" and (summary like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\t//elseif($filter_fieldname=='wx_nickname'){\n\t\t\t//\t$sqlWhere .= \" and (wx_nickname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='openid'){\n\t\t\t//\t$sqlWhere .= \" and (openid like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='user_id_crm'){\n\t\t\t//\t$sqlWhere .= \" and (user_id_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='username_crm'){\n\t\t\t//\t$sqlWhere .= \" and (username_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='realname_crm'){\n\t\t\t//\t$sqlWhere .= \" and (realname_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='is_prize'){\n\t\t\t//\t$sqlWhere .= \" and (is_prize = '\". $this->fixSQL($f_search).\"') \";\n\t\t\t//}\n\t\t\telseif($filter_fieldname==''){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%' or mobile like '%\". $this->fixSQL($f_search).\"%' or summary like '%\". $this->fixSQL($f_search).\"%' )\";\n\t\t\t}\n\t\t\telse{\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$filter_starttime = $this->REQUEST('_filter_starttime');\n\t\t$filter_endtime = $this->REQUEST('_filter_endtime');\n\t\tif( $filter_starttime != '' ){\n\t\t\t$sql_starttime=strtotime($filter_starttime);\n\t\t\t$sqlWhere .= \" and create_time >= \". $sql_starttime.\" \";\n\t\t}\n\t\tif( $filter_endtime != '' ){\n\t\t\t$sql_endtime=strtotime($filter_endtime)+(24*3600);\n\t\t\t$sqlWhere .= \" and create_time < \". $sql_endtime.\" \";\n\t\t}\n\t\t\n\t\t\n\t\t//echo $sqlWhere;exit;\n\t\t\n\t\t\n\t\t\n\t\t\n\n $this->ModManager = M('contact');\n $f_order = $this->REQUEST('_f_order', 'modify_time');\n $fields = $this->ModManager->getDbFields();\n if( in_array($f_order, $fields) ){\n $sqlOrder = $f_order . ' ';\n }else{\n $sqlOrder = 'modify_time ';\n }\n \n $f_direc = strtoupper($this->REQUEST('_f_direc'));if($f_direc==\"\"){$f_direc='DESC';}\n if( $f_direc != 'DESC' ){\n $sqlOrder .= 'ASC';\n }else{\n $sqlOrder .= 'DESC';\n }\n \n $sqlOrder = ' id DESC ';\n \n //echo $sqlOrder;exit;\n\n\t\t///回传过滤条件\n\t\t$this->assign('filter_fieldname', $filter_fieldname);\n\t\t$this->assign('filter_starttime', $filter_starttime);\n\t\t$this->assign('filter_endtime', $filter_endtime);\n\n\n\n $this->assign('filter_role', $filter_role);\n $this->assign('filter_state', $filter_state);\n $this->assign('f_search', $f_search);\n $this->assign('f_order', $f_order);\n $this->assign('f_direc', $f_direc );\n\n\t\t///获取列表数据集\n\t\tif(isset($_POST['do_search']) && $_POST['do_search']==1){\n\t\t\t$paginglimit=1000000;\n\t\t}\n\t\telse{\n\t\t\t$paginglimit='';\n }\n //$rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, '', 'M');\n $rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, $paginglimit, 'M');\n //echo \"<pre>\";print_r($rst);exit;\n\t\t\n\t\t\n\t\t//过滤搜索条件\n\t\t//$UserinfoMod = M('user');\n\t\t\n //if(isset($rst['dataset'])){\n // foreach($rst['dataset'] as $k => $v){\n\t\t\t\t\n \t\t/*\n \t\t$user = $UserinfoMod->field('id,username,realname,point_total')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t$user=$user[0];\n \t\t\n \t\t$rst['dataset'][$k]['user_id'] = $user['id'];\n \t$rst['dataset'][$k]['username'] = $user['username'];\n $rst['dataset'][$k]['realname'] = $user['realname'];\n $rst['dataset'][$k]['point_total'] = $user['point_total'];\n */\n \n \n /*\n if($v['status']==0){\n \t$rst['dataset'][$k]['status_now']='审核拒绝';\n }\n if($v['status']==1){\n \tif($v['create_time']<$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核通过';\n \t}\n \tif($v['create_time']>=$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核中';\n \t}\n }\n */\n \n //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t//$user=$user[0];\n \t\t\n //\t\t$rst['dataset'][$k]['user_province'] = $user['province'];\n // \t$rst['dataset'][$k]['user_city'] = $user['city'];\n \n \n \n // }\n // $this->assign('dataset', $rst['dataset']);// 赋值数据集\n //}\n //echo \"<pre>\";print_r($rst['dataset']);exit;\n\t\t\n\t\t$this->assign('dataset', $rst['dataset']);// 赋值数据集\n\t\t\n\t\t\n\t\t\n if(isset($_POST['do_search']) && $_POST['do_search']==1){\n \t//echo \"export\";exit;\n \t\n \t$toShow['banner']=$rst['dataset'];\n \t\n\t $start=0;\n\t $pagenum=1000000;\n\n\t $downloadfilename='ExportData.csv';\n\t $output=\"\";\n\t $expstr=\"\\t\";\n\t $expenter=\"\\t\\n\";\n\t $output .= \"流水ID编号\"\n \t.$expstr.\"提交时间\"\n .$expstr.\"姓名\"\n .$expstr.\"性别(1男2女)\"\n .$expstr.\"联系电话\"\n .$expstr.\"电子邮箱\"\n .$expstr.\"反馈标题\"\n .$expstr.\"反馈内容\"\n .$expenter;\n\n \t\n \t$UserinfoMod = M('user');\n \t\n\t if (!empty($toShow['banner'])){\n\t $k=0;\n\t do{\n\t \n\t $v=$toShow['banner'][$k];\n\t \n\t \n\t //if(isset($allProductList[$v['class_id']])){\n\t // $toShow['banner'][$k]['class_name']=$allProductList[$v['class_id']]['title'];\n\t //}\n\t //else{\n\t // $toShow['banner'][$k]['class_name']=\"\";\n\t //}\n\t \n\t \n\t \n\t //$myword=$toShow['banner'][$k]['myword'];\n\t //$myword=str_replace(\"\\r\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\r\",\"\",$myword);\n\t\t\t\t\t\n\t\t\t\t\t\n\t //if ($toShow['banner'][$k]['device']==\"0\"){\n\t // $device_show=\"PC端\";\n\t //}\n\t //if ($toShow['banner'][$k]['device']==\"1\"){\n\t // $device_show=\"手机端\";\n\t //}\n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/web_headpic/\".$v['headpic'];\n\t //$voice=empty($v['voice'])?\"\":BASE_URL_FRONT.\"/public/web_voice/\".$v['voice'];\n\t //$wx_headpic=empty($v['wx_headpic_path'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t /*\n\t if($v['status']==0){\n\t \t$status_now='审核拒绝';\n\t }\n\t if($v['status']==1){\n\t \tif($v['create_time']<$s_time){\n\t \t\t$status_now='审核通过';\n\t \t}\n\t \tif($v['create_time']>=$s_time){\n\t \t\t$status_now='审核中';\n\t \t}\n\t }\n\t */\n\t \n\t \n\t \n\t $summary=str_replace(\"\\r\\n\",\" [Enter] \",$toShow['banner'][$k]['summary']);\n\t $summary=str_replace(\"\\n\",\" [Enter] \",$summary);\n\t $summary=str_replace(\"\\r\",\"\",$summary);\n\t \n\t \n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n\t \t\t//$user=$user[0];\n\t \t\t\n\t\t \t//\t$user_province = $user['province'];\n\t\t //\t$user_city = $user['city'];\n\t \n\t \n\n\t $output .= $toShow['banner'][$k]['id']\n\t \t.$expstr.$toShow['banner'][$k]['addtime']\n\t \t.$expstr.$toShow['banner'][$k]['realname']\n\t \t.$expstr.$toShow['banner'][$k]['sex']\n\t \t.$expstr.$toShow['banner'][$k]['mobile']\n\t \t.$expstr.$toShow['banner'][$k]['email']\n\t \t.$expstr.$toShow['banner'][$k]['title']\n\t \t.$expstr.$summary\n\t .$expenter;\n\n\n\t $k=$k+1;\n\t }while($k<count($toShow['banner']));\n\t }\n\n\t $T_text=$output;\n\n\t\t\t//exit;\n\n\n\t\t\theader('Cache-control: private');\n\t header('Content-Disposition: attachment; filename='.$downloadfilename);\n\n\n\n\t//如果mb_convert_encoding函数存在则用此函数来转编码,前提是需要安装mbstring包\n\t if(function_exists('mb_convert_encoding')){\n\t header('Content-type: text/csv; charset=UTF-16LE');\n\t echo(chr(255).chr(254));\n\t echo(mb_convert_encoding($T_text,\"UTF-16LE\",\"UTF-8\"));\n\t }\n\t//如果iconv函数存在则用此函数来转编码\n\t elseif(function_exists('iconv')){\n\t header('Content-type: text/csv');\n\t echo(chr(255).chr(254));\n\t echo(iconv(\"UTF-8\",\"UTF-16LE\",$T_text));\n\t }\n\t//直接从utf-8转,这个貌似不灵...\n\t else{\n\t header('Content-type: text/csv; charset=UTF-8');\n\t echo(chr(239).chr(187).chr(191));\n\t echo($T_text);\n\t }\n\t exit;\n\t \n \n }\n\t\t\n\t\t\n\t\t$PageTitle = L('信息反馈列表');\n\t\t$PageMenu = array(\n\t\t\t//array( U('contact/create'), L('信息反馈') ),\n //array( U('contact/export'), L('导出信息反馈') ),\n\t\t);\n\t\t$this->setPagething( $PageTitle, $PageMenu, true);\n\t\t$this->display();\n\t}", "static public function getItemIDsFromList($pm_list_name_or_id, $pa_idnos, $pa_options=null) {\n\t\tif(isset($pa_options['dontIncludeSubItems']) && (!isset($pa_options['dont_include_sub_items']) || !$pa_options['dont_include_sub_items'])) { $pa_options['dont_include_sub_items'] = $pa_options['dontIncludeSubItems']; }\n\t \t\n\t\tif (isset($pa_options['dont_include_sub_items']) && $pa_options['dont_include_sub_items']) {\n\t\t\t$pa_options['noChildren'] = true;\n\t\t}\n\t\t$t_list = new ca_lists();\n\t\t$t_item = new ca_list_items();\n\t\t$va_item_ids = array();\n\t\tforeach($pa_idnos as $vs_idno) {\n\t\t\t$vn_item_id = null;\n\t\t\tif (is_numeric($vs_idno)) { \n\t\t\t\t$vn_item_id = (int)$vs_idno; \n\t\t\t} else {\n\t\t\t\t$vn_item_id = (int)$t_list->getItemIDFromList($pm_list_name_or_id, $vs_idno);\n\t\t\t}\n\t\t\t\n\t\t\tif ($vn_item_id && !(isset($pa_options['noChildren']) || $pa_options['noChildren'])) {\n\t\t\t\tif ($qr_children = $t_item->getHierarchy($vn_item_id, array())) {\n\t\t\t\t\twhile($qr_children->nextRow()) {\n\t\t\t\t\t\t$va_item_ids[$qr_children->get('item_id')] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($vn_item_id) {\n\t\t\t\t\t$va_item_ids[$vn_item_id] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array_keys($va_item_ids);\n\t}", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function adicionarRepetidos($list){\n\n /*echo('<pre>');\n var_dump($list);\n echo('</pre>');*/\n\n for($i = 0; $i < count($list); $i++){\n for($j = $i+1; $j < count($list); $j++){\n if($list[$i][0] -> getIngrediente() == $list[$j][0] -> getIngrediente()){\n $list[$i][1] += $list[$j][1];\n array_splice($list, $j,1);\n }\n }\n }\n return $list;\n }", "protected function IdCancionEnLista ($nombreCancion,$nombreLista)\n {\n $cancionEnLista = Model_tiene::find('all', array\n (\n 'where' => array\n (\n array('id_cancion'=>$this->idNameSong($nombreCancion)),\n array('id_lista'=>$this->idNameList($nombreLista))\n )\n ));\n if(!empty($cancionEnLista))\n {\n $id=0;\n foreach ($cancionEnLista as $key => $value)\n {\n $id = $cancionEnLista[$key]->id_cancion;\n }\n return $id; \n }\n }", "public function updateExternalList($newlist, $idtype)\n {\n $updatelist = [];\n $updskipped = 0;\n $countnewlistspotterid = 0;\n $countdellistspotterid = 0;\n\n if ($idtype == 'black') {\n $idtype = 1;\n } elseif ($idtype == 'white') {\n $idtype = 2;\n } else {\n throw new Exception('Invalid list type specified for updateExternalList: '.$idtype);\n } // else\n\n /* Retrieve the current list */\n $oldlist = $this->_conn->arrayQuery(\"SELECT spotterid,idtype\n\t\t\t\t\t\t\t\t\t\t\t\tFROM spotteridblacklist \n\t\t\t\t\t\t\t\t\t\t\t\tWHERE ouruserid = -1 AND origin = 'external'\");\n foreach ($oldlist as $obl) {\n $islisted = (($obl['idtype'] == $idtype) > 0);\n $updatelist[$obl['spotterid']] = 3 - $islisted; \t// Put \"old\" spotterids (current ones) on the to-delete list\n }\n /* verwerk de nieuwe lijst */\n foreach ($newlist as $nwl) {\n $nwl = trim($nwl);\n //if ($idtype == 2) {\n // $ex = explode(',', $nwl);\n // if (isset($ex[1])) {\n // $nwl = $ex[1];\n // } else {\n // $nwl = '';\n // }\n //}\n $nwl = $this->_util->calculateSpotterId($nwl);\n if ((strlen($nwl) >= 3) && (strlen($nwl) <= 6)) {\t// Spotterids are between 2 and 7 characters long\n if (empty($updatelist[$nwl])) {\n $updatelist[$nwl] = 1;\t\t\t\t\t\t// We want to add this spotterid\n } elseif ($updatelist[$nwl] == 2) {\n $updatelist[$nwl] = 5;\t\t\t\t\t\t// SpotterID is on the list already, dont remove it\n } elseif ($updatelist[$nwl] == 3) {\n if ($idtype == 1) {\n $updatelist[$nwl] = 4;\t\t\t\t\t// Spotterid is on another kind of list, change the idtype\n } else {\n $updskipped++;\t\t\t\t\t\t\t// Spotter is already on the list, dont remove it\n $updatelist[$nwl] = 5;\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t// double spotterid in xxxxxlist.txt.\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t\t// Spotterid did not pass the sanity check\n }\n }\n $updlist = array_keys($updatelist);\n $this->_conn->beginTransaction();\n foreach ($updlist as $updl) {\n if ($updatelist[$updl] == 1) {\n // Add new spotterid's to the list\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"INSERT INTO spotteridblacklist (spotterid,ouruserid,idtype,origin) VALUES (:spotterid, '-1', :idtype,'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 2) {\n // Remove spotters which aren't on the list\n $countdellistspotterid++;\n $this->_conn->modify(\n \"DELETE FROM spotteridblacklist WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 4) {\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"UPDATE spotteridblacklist SET idtype = 1 WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = (idtype = :idtype) WHERE spotterid = :spotterid AND ouruserid != -1 ',\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } // elseif\n } // foreach\n $this->_conn->commit();\n\n return ['added' => $countnewlistspotterid,\n 'removed' => $countdellistspotterid,\n 'skipped' => $updskipped,\n 'total' => count($newlist), ];\n }", "function decodeList($list);", "public function add($listid\t= NULL)\r\r\n\t{\r\r\n\t\tif($listid)\r\r\n\t\t{\r\r\n\t\t\t$this->_data['single_list']\t=\t$this->listing->get_single_record($listid);\t\r\r\n\t\t}\r\r\n\t\tif($this->input->post())\r\r\n\t\t{\r\r\n\t\t\t\r\r\n\t\t\t$data\t\t=\t$this->input->post();\r\r\n\t\t\t\r\r\n\t\t\t// UNSET ARRAY key\r\r\n\t\t\tunset($data['submit']);\r\r\n\t\t\t\r\r\n\t\t\tif($this->input->post('list_id'))\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->update_list($this->input->post('list_id'),$data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم تحديث تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t\t\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->add_list($data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم إضافة تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\tif($listid)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t$listid;\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t'';\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t$this->load->view('add', $this->_data);\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "public function getRootListItemID($pm_list_name_or_id=null) {\n\t\tif($pm_list_name_or_id) {\n\t\t\t$vn_list_id = $this->_getListID($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$vn_list_id = $this->getPrimaryKey();\n\t\t}\n\t\tif (!$vn_list_id) { return null; }\n\t\t\n\t\t$t_items = new ca_list_items();\n\t\t$t_items->load(array('list_id' => $vn_list_id, 'parent_id' => null));\n\t\t\n\t\treturn $t_items->getPrimaryKey();\n\t}", "public function model_id_list()\r\n {\r\n $this->set_error(\"MBE-\".$this->model_code.\"-MIL-1\", \r\n \"Internal error, please contact admin\", \r\n \"Missing model_id_list API for this model \".$this->model_name);\r\n $model_id_list = array();\r\n /*\r\n $model_id_list = array (\r\n array(\r\n \"table\" => \"dummy_table\", \r\n \"editable\" => false,\r\n \"id_column\" => \"dummy_id\",\r\n \"data_column\" => array(\r\n array(\"data\" => \"dummy_name\", \"column\" => \"dummy_column\"),\r\n ),\r\n ),\r\n );\r\n */\r\n return $model_id_list;\r\n }", "public function destroyList($id)\n\t{\n\t\tDB::table('list_items')->where('list_id', $id)->delete();\n\t\tDB::table('lists')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function edit(UserList $list)\n {\n \n }", "public function listId()\n {\n return $this->contractor->all()->pluck('id')->all();\n }", "public function syncToRemote($list_id);", "public function destroyListItem($id)\n\t{\n\t\tDB::table('list_items')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function saveList($list, &$m_order = 0)\n {\n foreach ($list as $item) {\n $m_order++;\n $this->updateOrder($m_order, $item['id']);\n }\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "function privList(&$p_list)\n {\n }", "public function setListID($ListID)\n\t{\n\t\treturn $this->set('ListID', $ListID);\n\t}", "function get_list($listid)\n\t{\n\t\t$xml = $this->load_url(\"lists/$listid\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t$list = false;\n\t\t$_list = (isset($xml['entry'])) ? $xml['entry'] : false;\n\n\t\t// parse into nicer array\n\t\tif(is_array($_list)):\n\t\t\t$id = $this->get_id_from_link($_list['link_attr']['href']);\n\n\t\t\t$list = array(\n\t\t\t\t'id' => $id,\n\t\t\t\t'Name' => $_list['content']['ContactList']['Name'],\n\t\t\t\t'ShortName' => $_list['content']['ContactList']['ShortName'],\n\t\t\t\t'OptInDefault' => $_list['content']['ContactList']['OptInDefault'],\n\t\t\t\t'SortOrder' => $_list['content']['ContactList']['SortOrder'],\n\t\t\t);\n\t\tendif;\n\n\t\treturn $list;\n\t}", "public function listId() {\n\t\treturn $this->employee->get()->pluck('id')->all();\n\t}", "function mod_element_list($newElement, $list, $lastElement, $description, $ecolor, $priority, $modified){\n $lid = get_id($list);\n //modifier\n if ($lid!=-1){\n $SQL = \"UPDATE element_list SET element = '$newElement', description = '$description', ecolor = $ecolor, priority = $priority, modified = $modified \n WHERE element = '$lastElement' and list='$lid'\";\n global $db;\n $res = $db->prepare($SQL);\n $res->execute();\n }\n}", "public function getIdMaillist($instance=false){\n if ($instance && !is_object($this->_data['id_maillist'])){\n $this->setIdMaillist('',array('required'=>false));\n }\n return $this->_data['id_maillist'];\n }", "function SetBidList(&$list)\n\t{\n\t\t$this->_bidList = array();\n\t\t$existingBidList = $this->GetBidList();\n\t\tforeach ($existingBidList as $bid)\n\t\t{\n\t\t\t$bid->supplierId = '';\n\t\t\t$bid->Save(false);\n\t\t}\n\t\t$this->_bidList = $list;\n\t}", "abstract protected function displayList($list);", "public function followup_lists($l_id)\n {\n \n $result = $this->db->query(\"call lead_followup_lists('\".$l_id.\"')\")->result_array();\n save_query_in_log();\n \n return $result;\n }", "public function setList($list)\n {\n if (is_string($list)) {\n htmlspecialchars($list);\n $this->_list = $list;\n }\n }", "public function loadTagsByList($listId = array()) {\n $tmpTags = array ();\n $query = \"SELECT dct.* FROM [|PREFIX|]dynamic_content_tags dct, [|PREFIX|]list_tags dcl \";\n if (is_array($listId) && sizeof($listId)) {\n $query .= \" WHERE dct.tagid = dcl.tagid AND dcl.listid in ('\".implode($listId, \"','\").\"')\";\n }\n\n $result = $this->db->Query ( $query );\n while ( $row = $this->db->Fetch ( $result ) ) {\n $tmpTags [] = new DynamicContentTag_Api_Tag ( $row ['tagid'], $row ['name'], $row ['createdate'], $row ['ownerid'], array (), array () );\n }\n $this->setTags ( $tmpTags );\n }", "public function listIdOfListCompanyAndListStaff($listCompanyId, $listStaffId = null)\n {\n $hFunction = new \\Hfunction();\n if ($hFunction->checkEmpty($listStaffId)) {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->pluck('work_id');\n } else {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->whereIn('staff_id', $listStaffId)->pluck('work_id');\n }\n\n }", "public function getSimpleList($ids=''){\n\n\n }", "function getItemsOfList($listID) {\n\t\tglobal $dbh;\n $stmt = $dbh->prepare('SELECT itemID, content, image, checked\n\t\t\t \t\t\t\t\tFROM ITEM WHERE listID = ?');\n\t\t$stmt->execute(array($listID));\n\t\treturn $stmt->fetchAll();\n\t}", "function showid(){\n $sql=\"SElECT * From article ORDER BY id DESC LIMIT 1 \";\n $db = config::getConnexion();\n try{\n $list=$db->query($sql);\n return $list;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "public function editList($id)\n\t{\n\t\t$edit = \"list\";\n\t\t$list = DB::table('lists')->where('id', $id)\n\t\t->get();\n\n\t\treturn view('edit', compact(\"list\", \"edit\"));\n\t}", "public function removeList(array $list): void\n {\n foreach ($list as $id) {\n $this->remove($id);\n }\n }", "public function do_delete_record()\n {\n $v_list_delete = get_post_var('hdn_item_id_list','');\n $this->model->do_delete_record($v_list_delete);\n }", "private function listsDetails(){\n\t\t\t$idRecepcion = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRecepcion!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRecepcion))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('recepcionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "static function getListCode($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_code_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_code_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (!is_numeric($pm_list_name_or_id)) {\n\t\t\treturn $pm_list_name_or_id;\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load((int)$pm_list_name_or_id)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t\t$vs_list_code = $t_list->get('list_code');\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_code_cache[$vn_list_id] = $vs_list_code;\n\t}", "function update_tel_list_name() {\n\t\tif (empty($this->data) || empty($this->data['callListId']) || empty($this->data['listName'])) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\t\t$list_name = $this->data['listName'];\n\t\t$call_list_id = $this->data['callListId'];\n\t\t$item_main = $this->data['item_main'];\n\n\t\t$info_list = $this->T16InboundCallList->getListInfoById($call_list_id);\n\t\tif (!isset($info_list[\"T16InboundCallList\"][\"id\"]) || empty($info_list[\"T16InboundCallList\"][\"id\"])) {\n\t\t\techo \"err_not_exist\";\n\t\t\texit;\n\t\t}\n\t\t$check_lock = $this->T92Lock->getInfoLock('inbound_call_list', $this->ESession->getCallListId($this));\n\t\tif (!empty($check_lock)) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$lock_new = $this->create_lock('inbound_call_list', $this->ESession->getCallListId($this), __FUNCTION__);\n\t\tif (!$lock_new) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\tif ($this->data['listTestFlag'] == 'true') {\n\t\t\t$list_test_flag = 1;\n\t\t} else {\n\t\t\t$list_test_flag = 0;\n\t\t}\n\n\t\t//Save data to DB\n\t\t$dsT16InboundCallList = $this->T16InboundCallList->getDataSource();\n\t\t$dsT16InboundCallList->begin($this);\n\n\t\t$data_call_list['T16InboundCallList']['id'] = $call_list_id;\n\t\t$data_call_list['T16InboundCallList']['list_name'] = $list_name;\n\t\t$data_call_list['T16InboundCallList']['item_main'] = $item_main;\n\t\t$data_call_list['T16InboundCallList']['list_test_flag'] = $list_test_flag;\n\t\t$data_call_list['T16InboundCallList']['update_user'] = $this->ESession->getUserId($this);\n\t\t$data_call_list['T16InboundCallList']['update_program'] = $this->name.'_'.__FUNCTION__;\n\n\t\t$call_list = $this->T16InboundCallList->save($data_call_list['T16InboundCallList']);\n\n\t\tif(!$call_list || (isset($lock_new) && !empty($lock_new) && !$this->update_lock($lock_new, __FUNCTION__))){\n\t\t\t$dsT16InboundCallList->rollback($this);\n\t\t\t$this->log(\"発信規制番号登録:失敗\");\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$dsT16InboundCallList->commit($this);\n\t\t$results = Array();\n\t\t$results['status'] = 'save';\n\t\t$item_column = $this->T13InboundListItem->getColumnListByItemName($call_list_id, $item_main);\n\t\t$item_column = $item_column['T13InboundListItem']['column'];\n\t\t$results['item_column'] = $item_column;\n\t\techo json_encode($results);\n\t\texit;\n\t}", "public function show_list($p_obj_id)\n {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id__master, isys_catg_relation_list__isys_obj__id__slave, obj.isys_obj__isys_obj_type__id, obj.isys_obj__title AS title\n FROM isys_catg_relation_list\n INNER JOIN isys_obj AS obj ON isys_catg_relation_list__isys_obj__id__slave = obj.isys_obj__id\n INNER JOIN isys_obj AS relObj ON isys_catg_relation_list__isys_obj__id = relObj.isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND obj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND relObj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id__slave ';\n\n $l_res = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row = $l_res->get_row()) {\n if ($l_row[\"isys_catg_relation_list__isys_obj__id__master\"] == $p_obj_id &&\n (is_null($this->m_obj_arr) || !in_array($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $this->m_obj_arr))) {\n if ($l_row[\"isys_obj__isys_obj_type__id\"] == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n $this->m_its_arr[$l_row[\"isys_catg_relation_list__isys_obj__id__slave\"]] = $l_row[\"title\"];\n }\n\n if (in_array($this->m_dao_rel->get_objTypeID($l_row['isys_catg_relation_list__isys_obj__id__slave']), $this->m_software_obj_types)) {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id\n FROM isys_catg_relation_list\n INNER JOIN isys_obj ON isys_obj__id = isys_catg_relation_list__isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND isys_catg_relation_list__isys_obj__id__slave = ' . $this->m_dao_rel->convert_sql_id($l_row['isys_catg_relation_list__isys_obj__id__slave']) . '\n AND isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id';\n\n $l_res_app = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row_app = $l_res_app->get_row()) {\n $l_its_data = $this->m_dao_its_comp\n ->get_data(null, null, \"AND isys_connection__isys_obj__id = \" . $this->m_dao_rel->convert_sql_id($l_row_app[\"isys_catg_relation_list__isys_obj__id\"]), null, C__RECORD_STATUS__NORMAL)\n ->get_row();\n\n // Check in it service components\n if (isset($l_its_data['isys_obj__id']) &&\n $this->m_dao_rel->get_objTypeID($l_its_data['isys_obj__id']) == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n if (!array_key_exists($l_its_data['isys_obj__id'], $this->m_its_arr)) {\n $this->m_its_arr[$l_its_data['isys_obj__id']] = $l_its_data['isys_obj__title'];\n }\n }\n }\n }\n\n $this->m_obj_arr[] = $l_row[\"isys_catg_relation_list__isys_obj__id__slave\"];\n $this->new_recurse_relation($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $p_obj_id);\n unset($this->m_obj_arr);\n }\n }\n\n return $this;\n }", "function initPidList() {\n\t\t// pidList is the pid/list of pids from where to fetch the news items.\n\t\t$pidList = $this->conf['pidList'];\n\t\t$pidList = $pidList ? implode(t3lib_div::intExplode(',', $pidList), ',') : $GLOBALS['TSFE']->id;\n\t\t$recursive = $this->conf['recursive'];\n\n\t\t// extend the pid_list by recursive levels\n\t\t$this->pidList = $this->pi_getPidList($pidList, $recursive);\n\t\t$this->pidList = $this->pidList ? $this->pidList : 0;\n\t\tif (!$this->pidList) {\n\t\t\t$this->errors[] = 'No pidList defined';\n\t\t}\n\t}", "function delete_list( $ids = array()) {\n \t\t\n \t\t// where clause\n\t\t$this->db->where_in( $this->primary_key, $id );\n\n\t\t// delete the record\n\t\treturn $this->db->delete( $this->table_name );\n \t}", "private function listsDetails(){\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRemision!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRemision))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new TurnosG($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n }\n \n }", "function SetWeddingList(&$list)\n\t{\n\t\t$this->_weddingList = array();\n\t\t$existingWeddingList = $this->GetWeddingList();\n\t\tforeach ($existingWeddingList as $wedding)\n\t\t{\n\t\t\t$wedding->supplierId = '';\n\t\t\t$wedding->Save(false);\n\t\t}\n\t\t$this->_weddingList = $list;\n\t}", "function get_Parent_list($result, $parent_list){\n\t\tglobal $parent_list;\n\t\tif($result){\n\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t\t$parent_list[]=$row[0];\n\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'pages.pid',\t\t\t \t\t\t\t\t\t\t// SELECT ...\n\t\t\t\t'pages',\t\t\t\t\t\t\t\t\t// FROM ...\n\t\t\t\t'pages.uid = '.$row[0].\n\t\t\t\t$this->cObj->enableFields('pages'),\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// GROUP BY...\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// ORDER BY...\n\t\t\t\t'' \t\t\t\t\t\t\t\t\t\t\t// LIMIT to 10 rows, starting with number 5 (MySQL compat.)\n\t\t\t\t);\n\t\t\t$this->get_parent_list($res2, $liste);\n\t\t\t}\n\t\t}\n\t\treturn $parent_list;\n\t}", "public function concatPostIdList($list)\n {\n $param = null;\n\n foreach ($list as $item) {\n $param = $param . ', ' . $item;\n }\n\n return trim($param, ', ');\n }", "public function setList(string $a_list) : void\n {\n $list = explode(\",\", $a_list);\n $accounts = array();\n foreach ($list as $l) {\n if (ilObjUser::_lookupId(trim($l)) > 0) {\n $accounts[] = trim($l);\n }\n }\n\n $this->set(\"email_recipient\", implode(\",\", $accounts));\n }", "function adiHijo($lista) {\n\t\t$this->listas[] = $lista;\n\t}", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "public function delete_from_aweber_list($post_data = array(),$list_id = null ){\n\n \t\t$aweber = new AWeberAPI($this->aweber_consumerKey, $this->aweber_consumerSecret);\n // dd($aweber);\n\n\t\ttry {\n\n\t\t $account = $aweber->getAccount($this->aweber_accessKey , $this->aweber_accessSecret);\n\t\t $lists = $account->lists->find(array('name' => $list_id));\n\t\t $list = $lists[0];\n\n\t\t # lets create some custom fields on your list!\n\t\t $custom_fields = $list->custom_fields;\n\t\t $params = array(\n\t\t 'email' => $post_data['email']\n\n\t\t );\n\n\t\t $subscribers = $list->subscribers;\n\t\t $found_subscribers = $subscribers->find($params);\n\t\t foreach ($found_subscribers as $subscriber) {\n\t\t $subscriber->delete();\n\t\t }\n\n\t\t # success!\n\t\t //print \"A new subscriber was added to the $list->name list!\";\n\t\t return true;\n\n\t\t} catch(AWeberAPIException $exc) {\n\t\t return false;\n\t\t}\n\n}", "function update_palabra_catalogador_tmp($id_palabra,$PickList) {\t\n\t\t\n\t\t$qDelete = \"DELETE FROM palabra_subtema_tmp WHERE id_palabra='$id_palabra'\";\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result3 = mysql_query($qDelete,$connection); \n\t\t\n\t\t\tif (isset($PickList)) {\n \t\t\t\tforeach ($PickList as $indice=>$valor){ \n\t\t\t\t\t$subtema=$this->datos_subtema_tmp($valor);\n\t\t\t\t\t$id_tema=$subtema['id_tema'];\n\t\t\t\t\t$ssql2= \"INSERT INTO palabra_subtema_tmp (id_palabra, id_subtema, tema_id) \n\t\t\t\t\t\t\tVALUES ('$id_palabra','$valor','$id_tema')\";\n\t\t\t\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\t\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\t\t\t$result2 = mysql_query($ssql2,$connection); \n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tmysql_close($connection);\n\t\t\t\t\t\n\t}", "public function delete_lists($id){\n\t\t$this->db->where(array(\n\t\t\t'pi_percentage_id'\t\t=>\t$id\n\t\t));\t\t\n\t\t$query = $this->db->get(\"payroll_pagibig_percentage_table\");\n\t\treturn $query->row();\n\t}", "public function genListId(){\n $id = $this->genRandNum(10);\n $IdExists = Group::find($id); \n if($IdExists){\n return $this->genListId();\n }\n return $id;\n }", "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new tipdocontrol($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "protected function setListIndexKey(): void\n {\n $this->listIndexKey = $this->index . (empty($this->indexType)\n ? self::LIST_INDEX_GLUE\n : (self::LIST_INDEX_GLUE . $this->indexType . self::LIST_INDEX_GLUE));\n }", "public abstract function get_ids();" ]
[ "0.72772706", "0.719209", "0.70797575", "0.69099426", "0.6729013", "0.6645162", "0.6541066", "0.6511383", "0.64325595", "0.6428578", "0.6379175", "0.6300763", "0.628258", "0.627507", "0.62324923", "0.61865616", "0.6158922", "0.61413866", "0.61361253", "0.6094415", "0.60407", "0.59775656", "0.5973852", "0.59056425", "0.58735347", "0.58714265", "0.58360267", "0.5786603", "0.57862765", "0.57560635", "0.57535344", "0.57057816", "0.56926525", "0.56773275", "0.56707484", "0.56601167", "0.5653036", "0.5650499", "0.5643018", "0.5621223", "0.5586185", "0.5577462", "0.5557354", "0.5543158", "0.5535689", "0.55343", "0.55047524", "0.550179", "0.5494757", "0.5494093", "0.5484171", "0.54683936", "0.5465374", "0.5460151", "0.5455437", "0.54508173", "0.54454917", "0.5445129", "0.54409", "0.5433021", "0.5430639", "0.5429664", "0.54266286", "0.5416035", "0.5399712", "0.53768986", "0.53682774", "0.5348563", "0.5345846", "0.5345094", "0.533611", "0.53340304", "0.53321695", "0.5322203", "0.5315542", "0.53150326", "0.53093654", "0.53064674", "0.5295799", "0.5290946", "0.5289946", "0.52845466", "0.5280727", "0.52761734", "0.527566", "0.5252266", "0.524629", "0.5243612", "0.5238607", "0.52340245", "0.52333087", "0.5232949", "0.52295154", "0.52185327", "0.52154475", "0.52136964", "0.5211496", "0.52082276", "0.52081573", "0.520812" ]
0.64849836
8
trouver le id de l dans list_list
function add_element_list($newlist, $l, $username, $description, $ecolor, $priority, $creation){ $l_id = get_id($l); $uid = get_userid($username); //insÚrer if ($l_id!=-1){ $SQL = "INSERT INTO element_list VALUES (DEFAULT,'$l_id',$uid,'$newlist', '$description', $ecolor, $priority, $creation, $creation, 0)"; global $db; $res = $db->prepare($SQL); $res->execute(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_id()\n\t{\n\t\treturn $this->list;\n\t}", "public function getListId();", "protected function IdUserListReproduction ()\n {\n $lista = Model_listas::find('all', array\n (\n 'where' => array\n (\n array('id_usuario'=>$this->userID()),\n array('titulo'=>'reproducidas')\n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n } \n return $id; \n }\n }", "public abstract static function getListID();", "public function getId()\n {\n return $this->_list->getId();\n }", "function wp_parse_id_list($input_list)\n {\n }", "public function getListID()\n\t{\n\t\treturn $this->get('ListID');\n\t}", "protected function getListId($strList)\n\t{\n\n\t\t$arrLists = $this->api->lists();\n\t\tforeach($arrLists['data'] as $list)\n\t\t{\n\t\t\tif ($list['name']==$strList)\n\t\t\t\treturn $list['id'];\n\t\t}\n\t\treturn null;\n\n\t}", "static function getListID($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_id_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (is_numeric($pm_list_name_or_id)) {\n\t\t\t$vn_list_id = intval($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load(array('list_code' => $pm_list_name_or_id))) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id] = $vn_list_id;\n\t}", "public abstract function get_default_list_id();", "public function sanitize_list_id( $maybe_list_id = '' ) {\n if ( ! $maybe_list_id ) {\n return $this->get_site_list_id();\n }\n $lists = $this->get_lists();\n foreach ( $lists->lists as $list ) {\n if ( ! $list || ! isset( $list->id ) ) {\n continue;\n }\n if ( $maybe_list_id == $list->id || $maybe_list_id == $list->name ) {\n return $list->id;\n }\n }\n\n return $maybe_list_id;\n }", "function supp_list($list){\n $lid = get_id($list);\n //supp\n if ($lid!=-1){\n //supprimer element de la liste\n\t$SQL = \"DELETE FROM element_list WHERE list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n //supprimer list\n \t$SQL = \"DELETE FROM list_list WHERE list='$list'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute(); }\n}", "protected function idNameList($nombreLista)\n {\n $lista = Model_Listas::find('all', array\n (\n 'where' => array\n (\n array('titulo'=>$nombreLista) \n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n }\n return $id; \n }\n }", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "function set_list_id($list_id) {\n $this->_subscribers_base_route = $this->_base_route.'subscribers/'.$list_id;\n }", "function list_get($id) {\n\n //$id = $this->get('id');\n\n if (!$id) {\n\n $this->response(\"No item ID specified!\", 400);\n\n exit;\n }\n\n $list = $this->List_model->getListById($id);\n\n if ($list) {\n\n //$list = $this->appendItems($list);\n //Put owner's name instead of user ID\n //$list['owner'] = $this->User_model->getName($list['owner'])['name'];\n unset($list['owner']);\n\n $this->response($list, 200);\n\n exit;\n } else {\n\n $this->response(\"Invalid ID\", 404);\n\n exit;\n }\n }", "private function _setListId()\r\n { \r\n if (Mage::getSingleton('admin/session')->isLoggedIn()) {\r\n $storeId = Mage::app()->getRequest()->getParam('store_id');\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId', $storeId); \r\n } else {\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId');\r\n }\r\n }", "function _list($lp_n, $a, $p){\r\n global $conn; // Jadikan global\r\n \r\n // Buat sql untuk cek apakah row sudah ada atau belum\r\n $sql = \"SELECT * FROM data_list WHERE id_sntr = $a AND nama_lprn = '$lp_n'\";\r\n $cek = mysqli_num_rows( mysqli_query($conn, $sql) );\r\n\r\n // Dapatkan id dari row yang diinginkan\r\n $id_list = mysqli_fetch_assoc(mysqli_query($conn, $sql))[\"id_list\"];\r\n\r\n // Cek ttd_pembina diceklis atau tidak\r\n if ( $p === \"0000-00-00 00:00:00\" ) {\r\n // Jika tidak diceklism, hapus row lama atau biarkan\r\n $sql = \"DELETE FROM data_list WHERE id_list = $id_list\";\r\n } else {\r\n // Jiak diceklis, cek apakah row sudah ada atau belum\r\n if ( $cek > 0 ) {\r\n // Jika sudah ada maka update row dengan data baru\r\n $sql = \"UPDATE data_list SET\r\n id_list = $id_list,\r\n id_sntr = $a,\r\n nama_lprn = '$lp_n',\r\n wktu_lprn = '$p'\r\n WHERE id_list = $id_list\";\r\n } else {\r\n // Jika belum, buat row baru dan masukkan data \r\n $sql = \"INSERT INTO data_list (id_list, id_sntr, nama_lprn, wktu_lprn)\r\n VALUE ('', $a, '$lp_n', '$p')\";\r\n }\r\n }\r\n\r\n // Ambil data sql dan update\r\n mysqli_query($conn, $sql);\r\n}", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d=new AlbumTable($this->dbAdapter);\n\n $d->modGeneral(\"delete from a_empleados_rete_d where idEret=\".$id); \n $d->modGeneral(\"delete from a_empleados_rete where id=\".$id); \n //$u=new Retefuente($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n //$u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "public function getWishlistId();", "public function listId() {\n\t\treturn $this->academic_session->all()->pluck('id')->all();\n\t}", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d = New AlbumTable($this->dbAdapter); \n // bucar id de parametro\n $datos = $d->getGeneral1(\"select idTdoc from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n $d->modGeneral(\"delete from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'i/'.$datos['idTdoc']);\n } \n }", "public function get_site_list_id() {\n $list = $this->get_site_list();\n if ( isset( $list->id ) ) {\n return $list->id;\n }\n return false;\n }", "function checkIDList($table, $fixedQuery, &$IDList)\n{\n\tglobal $sitePosition;\n\n\t$IDs = array();\n\t$rs = query('Select `ID` from `' . $sitePosition . '.' . $table . '` where ' . ($fixedQuery != '' ? ('(' . $fixedQuery . ') and ') : '') . '`ID` in (' . $IDList . ')', false);\n\twhile(true)\n\t{\n\t\t$rsInfo = fetchRow($rs);\n\t\tif($rsInfo === null) break;\n\t\t$IDs[] = $rsInfo[0];\n\t}\n\tfreeResult($rs);\n\t$IDList = implode(',', $IDs);\n}", "function supp_element_list($supp, $list){\n $lid = get_id($list);\n //supprimer\n if ($lid!=-1){\n \t$SQL = \"DELETE FROM element_list WHERE element = '$supp' and list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "function candidatosXLista($id){\n\t\t $sql = \"SELECT C.idlista, L.nombrelista,nombrecandidato, apellidocandidato, cargocandidato, imagencandidato\n\t\t FROM candidato C LEFT JOIN LISTA L ON C.idlista = L.idlista\n\t\t WHERE C.idlista = \".$id.\"order by cargocandidato ASC ;\";\n\t\treturn $sql;\n\t }", "public function loadListItemsByListId() {\n $sql = \"SELECT ListText, ListItemID, ListItemColor, ListItemDone\"\n FROM list_items\n WHERE ListID=(\n SELECT ListID\n FROM lists\n WHERE ListURL=:list\n )\n ORDER BY ListItemPosition\";\n if($stmt = $this->_db->prepare($sql)) {\n $stmt->bindParam(':list', $_GET['list'], PDO::PARAM_STR);\n $stmt->execute();\n $order = 1;\n while($row = $stmt->fetch()) {\n echo $this->formatListItems($row, $order);\n $order;\n }\n $stmt->closeCursor();\n }\n else {\n echo \"<li> Something went wrong. \", $db->error, \"</li>\";\n }", "private function getTargetListId($list_id) {\n $where = array(\n 'equals' => array(\n 'mailchimp_list' => $list_id\n )\n );\n $result = $this->runSugarQuery('ProspectLists', array('id'), $where, 1);\n if($result) {\n return $result[0]['id'];\n }\n return false;\n }", "protected function prepareTemplateToList($list)\n {\n return $list;\n }", "function is_in_elementlist($element, $l){\n $l_id = get_id($l);\n //trouver\n if ($l_id == -1) return false;\n else {\n $SQL = \"SELECT * FROM element_list WHERE element = '$element' and list='$l_id'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n \tif($res->rowCount() == 0) return false;\n \telse return true;\n }\n}", "public function getMultipleWishlistId();", "public function dissociateList(Request $request, $id, $list)\n {\n $person = $this->modelPath::findOrFail($id);\n\n $person->retractListById($list);\n\n $this->notify('lists.dissociated');\n\n return redirect()->back();\n }", "public function listIdOfListStaffId($listStaffId)\n {\n return QcCompanyStaffWork::whereIn('staff_id', $listStaffId)->pluck('work_id');\n }", "public static function getGatewayListID(){\n $row = Gateway::where(array('Status'=>1))->lists('Title', 'GatewayID');\n if(!empty($row)){\n $row = array(\"\"=> \"Select a Gateway\")+$row;\n }\n return $row;\n }", "public function getRootListItemID($pm_list_name_or_id=null) {\n\t\tif($pm_list_name_or_id) {\n\t\t\t$vn_list_id = $this->_getListID($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$vn_list_id = $this->getPrimaryKey();\n\t\t}\n\t\tif (!$vn_list_id) { return null; }\n\t\t\n\t\t$t_items = new ca_list_items();\n\t\t$t_items->load(array('list_id' => $vn_list_id, 'parent_id' => null));\n\t\t\n\t\treturn $t_items->getPrimaryKey();\n\t}", "public function remove_list_from_table($list){\n\t\t$query = \"DELETE * FROM \" . $this->table . \" WHERE \" . $this->column_name . \"=\";\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function edit($id,$list_id)\n {\n if (Gate::allows('isadmin')){\n $menu = Menu::find($id);\n $status = $menu->listts->where('id',$list_id)->all();\n $menu = Menu::find($id)->name;\n if (count($status)>0){\n $list = Listt::find($list_id);\n return view('dashboard.editlist',compact('list','menu'));\n }\n }\n abort(404);\n }", "public function listId() {\n\t\treturn $this->employee->get()->pluck('id')->all();\n\t}", "public function listId()\n {\n return $this->contractor->all()->pluck('id')->all();\n }", "public function __construct($listId, $list)\n\t{\n\t\t$this->listId = $listId;\n\t\t$this->list = $list;\n\t}", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "static function get_ids_from_list ($list_video_ids){\r\n\r\n if(empty($list_video_ids)){\r\n return;\r\n }\r\n\r\n $buffy = array();\r\n\r\n //this is needed because we could have more space between each movie id\r\n $remove_spaces = trim(str_replace(array('&nbsp;', ' '),array(''), htmlentities($list_video_ids, ENT_QUOTES)));\r\n\r\n if(!empty($remove_spaces)) {\r\n\r\n $video_id_explode = explode(',', $remove_spaces);\r\n $video_id_explode_map = array_map('trim',$video_id_explode);//extra trim just in case\r\n\r\n //make an array of video id's'\r\n foreach($video_id_explode_map as $video_id) {\r\n $trim_video_id = trim($video_id);\r\n\r\n //check to prevent duplicates id's\r\n if (!in_array($trim_video_id, $buffy)) {\r\n $buffy[] = $trim_video_id;\r\n }\r\n }\r\n }\r\n\r\n return $buffy;\r\n }", "public function delete_list($val){\n if(get_instance()->ecl('Instance')->mod('lists', 'delete_list', [get_instance()->ecl('Instance')->user(),$val])) {\n echo 1;\n } else {\n echo 0;\n }\n }", "protected function IdCancionEnLista ($nombreCancion,$nombreLista)\n {\n $cancionEnLista = Model_tiene::find('all', array\n (\n 'where' => array\n (\n array('id_cancion'=>$this->idNameSong($nombreCancion)),\n array('id_lista'=>$this->idNameList($nombreLista))\n )\n ));\n if(!empty($cancionEnLista))\n {\n $id=0;\n foreach ($cancionEnLista as $key => $value)\n {\n $id = $cancionEnLista[$key]->id_cancion;\n }\n return $id; \n }\n }", "public function getId() {\n if($this->items!==false)\n return @current($this->items)->id_str;\n return false;\n }", "function update_list( $id, $name, $can_delete, $items )\n\t{\n\t\t$this->db->set('name', $name );\n if( $can_delete !== NULL ) {\n $this->db->set('can_delete', $can_delete );\n } \n $this->db->where( 'id', $id );\n\t\t$this->db->update('lists');\n\t\t\n // Save the list items\n\t\t$this->db->where( 'list_id', $id );\n\t\t$this->db->delete( 'list_items' );\n\t\tfor( $i = 0; $i < count($items); $i++ ) {\n $this->db->set('list_id', $id );\n $this->db->set('data_id', $items[$i]['id']);\n\t\t\t$this->db->set('title', $items[$i]['title']);\n\t\t\t$this->db->set('type', $items[$i]['type']);\n\t\t\t$this->db->set('sort_order', $i + 1);\n\t\t\t$this->db->insert('list_items');\n }\n\t}", "protected function carregarListaOneToMany($object_list,$addParametros) {\n $query = \"SELECT id FROM \".get_class($object_list).\" WHERE id\".get_class($this).\"=$this->id $addParametros\";\n return bd::executeSqlParaArraySimples($query);\n }", "public function adicionarRepetidos($list){\n\n /*echo('<pre>');\n var_dump($list);\n echo('</pre>');*/\n\n for($i = 0; $i < count($list); $i++){\n for($j = $i+1; $j < count($list); $j++){\n if($list[$i][0] -> getIngrediente() == $list[$j][0] -> getIngrediente()){\n $list[$i][1] += $list[$j][1];\n array_splice($list, $j,1);\n }\n }\n }\n return $list;\n }", "function showid(){\n $sql=\"SElECT * From article ORDER BY id DESC LIMIT 1 \";\n $db = config::getConnexion();\n try{\n $list=$db->query($sql);\n return $list;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "public function destroyListItem($id)\n\t{\n\t\tDB::table('list_items')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function genListId(){\n $id = $this->genRandNum(10);\n $IdExists = Group::find($id); \n if($IdExists){\n return $this->genListId();\n }\n return $id;\n }", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "public function getIdMaillist($instance=false){\n if ($instance && !is_object($this->_data['id_maillist'])){\n $this->setIdMaillist('',array('required'=>false));\n }\n return $this->_data['id_maillist'];\n }", "public function testGetListOfSpecificIds()\n {\n $itemIds = [];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n\n $search = 'ids:'.implode(',', $itemIds);\n\n $response = $this->api->getList($search);\n $this->assertErrors($response);\n $this->assertEquals(count($itemIds), $response['total']);\n\n foreach ($response['lists'] as $item) {\n $this->assertTrue(in_array($item['id'], $itemIds));\n $this->api->delete($item['id']);\n $this->assertErrors($response);\n }\n }", "public function followup_lists($l_id)\n {\n \n $result = $this->db->query(\"call lead_followup_lists('\".$l_id.\"')\")->result_array();\n save_query_in_log();\n \n return $result;\n }", "public function updateExternalList($newlist, $idtype)\n {\n $updatelist = [];\n $updskipped = 0;\n $countnewlistspotterid = 0;\n $countdellistspotterid = 0;\n\n if ($idtype == 'black') {\n $idtype = 1;\n } elseif ($idtype == 'white') {\n $idtype = 2;\n } else {\n throw new Exception('Invalid list type specified for updateExternalList: '.$idtype);\n } // else\n\n /* Retrieve the current list */\n $oldlist = $this->_conn->arrayQuery(\"SELECT spotterid,idtype\n\t\t\t\t\t\t\t\t\t\t\t\tFROM spotteridblacklist \n\t\t\t\t\t\t\t\t\t\t\t\tWHERE ouruserid = -1 AND origin = 'external'\");\n foreach ($oldlist as $obl) {\n $islisted = (($obl['idtype'] == $idtype) > 0);\n $updatelist[$obl['spotterid']] = 3 - $islisted; \t// Put \"old\" spotterids (current ones) on the to-delete list\n }\n /* verwerk de nieuwe lijst */\n foreach ($newlist as $nwl) {\n $nwl = trim($nwl);\n //if ($idtype == 2) {\n // $ex = explode(',', $nwl);\n // if (isset($ex[1])) {\n // $nwl = $ex[1];\n // } else {\n // $nwl = '';\n // }\n //}\n $nwl = $this->_util->calculateSpotterId($nwl);\n if ((strlen($nwl) >= 3) && (strlen($nwl) <= 6)) {\t// Spotterids are between 2 and 7 characters long\n if (empty($updatelist[$nwl])) {\n $updatelist[$nwl] = 1;\t\t\t\t\t\t// We want to add this spotterid\n } elseif ($updatelist[$nwl] == 2) {\n $updatelist[$nwl] = 5;\t\t\t\t\t\t// SpotterID is on the list already, dont remove it\n } elseif ($updatelist[$nwl] == 3) {\n if ($idtype == 1) {\n $updatelist[$nwl] = 4;\t\t\t\t\t// Spotterid is on another kind of list, change the idtype\n } else {\n $updskipped++;\t\t\t\t\t\t\t// Spotter is already on the list, dont remove it\n $updatelist[$nwl] = 5;\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t// double spotterid in xxxxxlist.txt.\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t\t// Spotterid did not pass the sanity check\n }\n }\n $updlist = array_keys($updatelist);\n $this->_conn->beginTransaction();\n foreach ($updlist as $updl) {\n if ($updatelist[$updl] == 1) {\n // Add new spotterid's to the list\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"INSERT INTO spotteridblacklist (spotterid,ouruserid,idtype,origin) VALUES (:spotterid, '-1', :idtype,'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 2) {\n // Remove spotters which aren't on the list\n $countdellistspotterid++;\n $this->_conn->modify(\n \"DELETE FROM spotteridblacklist WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 4) {\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"UPDATE spotteridblacklist SET idtype = 1 WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = (idtype = :idtype) WHERE spotterid = :spotterid AND ouruserid != -1 ',\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } // elseif\n } // foreach\n $this->_conn->commit();\n\n return ['added' => $countnewlistspotterid,\n 'removed' => $countdellistspotterid,\n 'skipped' => $updskipped,\n 'total' => count($newlist), ];\n }", "function messageid($list) {\n\t\t$uid = 0;\n\t\t$mid = array();\n\t\t\n\t\tforeach($list as $line) {\n\t\t\tif(preg_match('#^\\* ([0-9]+) FETCH#', $line)) {\n\t\t\t\t$temp = explode(' ', $line);\n\t\t\t\t$uid = $temp[4];\n\t\t\t}\n\t\t\t\n\t\t\t$temp = strtoupper($line);\n\t\t\t\n\t\t\tif(substr($temp, 0, 12) == 'MESSAGE-ID: ')\n\t\t\t\t$mid[$line] = $uid;\n\t\t}\n\t\t\n\t\treturn $mid;\n\t}", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "static public function getItemIDsFromList($pm_list_name_or_id, $pa_idnos, $pa_options=null) {\n\t\tif(isset($pa_options['dontIncludeSubItems']) && (!isset($pa_options['dont_include_sub_items']) || !$pa_options['dont_include_sub_items'])) { $pa_options['dont_include_sub_items'] = $pa_options['dontIncludeSubItems']; }\n\t \t\n\t\tif (isset($pa_options['dont_include_sub_items']) && $pa_options['dont_include_sub_items']) {\n\t\t\t$pa_options['noChildren'] = true;\n\t\t}\n\t\t$t_list = new ca_lists();\n\t\t$t_item = new ca_list_items();\n\t\t$va_item_ids = array();\n\t\tforeach($pa_idnos as $vs_idno) {\n\t\t\t$vn_item_id = null;\n\t\t\tif (is_numeric($vs_idno)) { \n\t\t\t\t$vn_item_id = (int)$vs_idno; \n\t\t\t} else {\n\t\t\t\t$vn_item_id = (int)$t_list->getItemIDFromList($pm_list_name_or_id, $vs_idno);\n\t\t\t}\n\t\t\t\n\t\t\tif ($vn_item_id && !(isset($pa_options['noChildren']) || $pa_options['noChildren'])) {\n\t\t\t\tif ($qr_children = $t_item->getHierarchy($vn_item_id, array())) {\n\t\t\t\t\twhile($qr_children->nextRow()) {\n\t\t\t\t\t\t$va_item_ids[$qr_children->get('item_id')] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($vn_item_id) {\n\t\t\t\t\t$va_item_ids[$vn_item_id] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array_keys($va_item_ids);\n\t}", "public function edit(UserList $list)\n {\n \n }", "public function syncToRemote($list_id);", "public function add($listid\t= NULL)\r\r\n\t{\r\r\n\t\tif($listid)\r\r\n\t\t{\r\r\n\t\t\t$this->_data['single_list']\t=\t$this->listing->get_single_record($listid);\t\r\r\n\t\t}\r\r\n\t\tif($this->input->post())\r\r\n\t\t{\r\r\n\t\t\t\r\r\n\t\t\t$data\t\t=\t$this->input->post();\r\r\n\t\t\t\r\r\n\t\t\t// UNSET ARRAY key\r\r\n\t\t\tunset($data['submit']);\r\r\n\t\t\t\r\r\n\t\t\tif($this->input->post('list_id'))\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->update_list($this->input->post('list_id'),$data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم تحديث تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t\t\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->add_list($data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم إضافة تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\tif($listid)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t$listid;\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t'';\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t$this->load->view('add', $this->_data);\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "public function add_list_to_table($list){\n\t\t$query = \"SELECT $this->column_name FROM \" . $this->table;\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "abstract public function getId();", "public function getId($item);", "abstract function getId();", "function mod_element_list($newElement, $list, $lastElement, $description, $ecolor, $priority, $modified){\n $lid = get_id($list);\n //modifier\n if ($lid!=-1){\n $SQL = \"UPDATE element_list SET element = '$newElement', description = '$description', ecolor = $ecolor, priority = $priority, modified = $modified \n WHERE element = '$lastElement' and list='$lid'\";\n global $db;\n $res = $db->prepare($SQL);\n $res->execute();\n }\n}", "public function destroyList($id)\n\t{\n\t\tDB::table('list_items')->where('list_id', $id)->delete();\n\t\tDB::table('lists')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function listing()\n\t{\n\n if(isset($_POST['dosubmit']) && $_POST['dosubmit']=='删除'){\n if( empty($_POST['id']) ){\n $this->error(L('请选择要删除的数据!'));\n }\n\n if(is_array($_POST['id'])){\n $ids = $_POST['id'];\n $in = implode(\",\",$_POST['id']);\n }else{\n $ids[] = $_POST['id'];\n $in = $_POST['id'];\n }\n\n //删除连带数据\n\n //删除自身数据\n $contactMod = M('contact');\n $sql=\" id in (\".$in.\") \";\n $contactMod->where($sql)->delete();\n\n $this->success('删除成功', U('contact/listing'));\n exit;\n }\n \n\n\n /// 载入 lk_cunction. (使用其 LkHTML::ListSort 函数)\n load(\"@.lk_function\");\n\n\t\t///列表过滤\n\t\t$sqlWhere = \"status < 250\";\n\t\t//$sqlWhere .= \" and mobile!='' and score_jia!='' and wx_headpic_path!='' \";\n\t\t//$sqlWhere .= \" and is_prize>=0 and openid!='' \";\n\t\t//$sqlWhere .= \" and user_id_crm!='' \";\n\t\t$sqlOrder = \" id DESC\";\n\t\t\n\t\t//$sqlWhere .= \" and (headpic!='' or voice!='') and mobile!='' \";\n\t\t\n\t\t\n\t\t$s_time=time()-(SHENHE_CROSS_TIME*3600); //超过4小时自动审核通过\n\t\t\n\t\t\n\n\t\t$filter_role = $this->REQUEST('_filter_role');\n\t\tif( $filter_role != '' ){\n\t\t\t$sqlWhere .= \" and role = '\". $this->fixSQL($filter_role).\"' \";\n\t\t}\n\n\t\t$filter_state = $this->REQUEST('_filter_state');\n\t\tif( $filter_state != '' ){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif ($filter_state=='0'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" \";\n\t\t\t}\n\t\t\tif ($filter_state=='1'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time<'\".$s_time.\"' \";\n\t\t\t}\n\t\t\tif ($filter_state=='1_4h'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time>='\".$s_time.\"' \";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n \n //新搜索\n $f_search = $this->REQUEST('_f_search');\n $filter_fieldname = $this->REQUEST('_filter_fieldname');\n\t\tif( $f_search != '' ){\n\t\t\tif($filter_fieldname=='realname'){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='mobile'){\n\t\t\t\t$sqlWhere .= \" and (mobile like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='summary'){\n\t\t\t\t$sqlWhere .= \" and (summary like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\t//elseif($filter_fieldname=='wx_nickname'){\n\t\t\t//\t$sqlWhere .= \" and (wx_nickname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='openid'){\n\t\t\t//\t$sqlWhere .= \" and (openid like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='user_id_crm'){\n\t\t\t//\t$sqlWhere .= \" and (user_id_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='username_crm'){\n\t\t\t//\t$sqlWhere .= \" and (username_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='realname_crm'){\n\t\t\t//\t$sqlWhere .= \" and (realname_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='is_prize'){\n\t\t\t//\t$sqlWhere .= \" and (is_prize = '\". $this->fixSQL($f_search).\"') \";\n\t\t\t//}\n\t\t\telseif($filter_fieldname==''){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%' or mobile like '%\". $this->fixSQL($f_search).\"%' or summary like '%\". $this->fixSQL($f_search).\"%' )\";\n\t\t\t}\n\t\t\telse{\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$filter_starttime = $this->REQUEST('_filter_starttime');\n\t\t$filter_endtime = $this->REQUEST('_filter_endtime');\n\t\tif( $filter_starttime != '' ){\n\t\t\t$sql_starttime=strtotime($filter_starttime);\n\t\t\t$sqlWhere .= \" and create_time >= \". $sql_starttime.\" \";\n\t\t}\n\t\tif( $filter_endtime != '' ){\n\t\t\t$sql_endtime=strtotime($filter_endtime)+(24*3600);\n\t\t\t$sqlWhere .= \" and create_time < \". $sql_endtime.\" \";\n\t\t}\n\t\t\n\t\t\n\t\t//echo $sqlWhere;exit;\n\t\t\n\t\t\n\t\t\n\t\t\n\n $this->ModManager = M('contact');\n $f_order = $this->REQUEST('_f_order', 'modify_time');\n $fields = $this->ModManager->getDbFields();\n if( in_array($f_order, $fields) ){\n $sqlOrder = $f_order . ' ';\n }else{\n $sqlOrder = 'modify_time ';\n }\n \n $f_direc = strtoupper($this->REQUEST('_f_direc'));if($f_direc==\"\"){$f_direc='DESC';}\n if( $f_direc != 'DESC' ){\n $sqlOrder .= 'ASC';\n }else{\n $sqlOrder .= 'DESC';\n }\n \n $sqlOrder = ' id DESC ';\n \n //echo $sqlOrder;exit;\n\n\t\t///回传过滤条件\n\t\t$this->assign('filter_fieldname', $filter_fieldname);\n\t\t$this->assign('filter_starttime', $filter_starttime);\n\t\t$this->assign('filter_endtime', $filter_endtime);\n\n\n\n $this->assign('filter_role', $filter_role);\n $this->assign('filter_state', $filter_state);\n $this->assign('f_search', $f_search);\n $this->assign('f_order', $f_order);\n $this->assign('f_direc', $f_direc );\n\n\t\t///获取列表数据集\n\t\tif(isset($_POST['do_search']) && $_POST['do_search']==1){\n\t\t\t$paginglimit=1000000;\n\t\t}\n\t\telse{\n\t\t\t$paginglimit='';\n }\n //$rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, '', 'M');\n $rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, $paginglimit, 'M');\n //echo \"<pre>\";print_r($rst);exit;\n\t\t\n\t\t\n\t\t//过滤搜索条件\n\t\t//$UserinfoMod = M('user');\n\t\t\n //if(isset($rst['dataset'])){\n // foreach($rst['dataset'] as $k => $v){\n\t\t\t\t\n \t\t/*\n \t\t$user = $UserinfoMod->field('id,username,realname,point_total')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t$user=$user[0];\n \t\t\n \t\t$rst['dataset'][$k]['user_id'] = $user['id'];\n \t$rst['dataset'][$k]['username'] = $user['username'];\n $rst['dataset'][$k]['realname'] = $user['realname'];\n $rst['dataset'][$k]['point_total'] = $user['point_total'];\n */\n \n \n /*\n if($v['status']==0){\n \t$rst['dataset'][$k]['status_now']='审核拒绝';\n }\n if($v['status']==1){\n \tif($v['create_time']<$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核通过';\n \t}\n \tif($v['create_time']>=$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核中';\n \t}\n }\n */\n \n //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t//$user=$user[0];\n \t\t\n //\t\t$rst['dataset'][$k]['user_province'] = $user['province'];\n // \t$rst['dataset'][$k]['user_city'] = $user['city'];\n \n \n \n // }\n // $this->assign('dataset', $rst['dataset']);// 赋值数据集\n //}\n //echo \"<pre>\";print_r($rst['dataset']);exit;\n\t\t\n\t\t$this->assign('dataset', $rst['dataset']);// 赋值数据集\n\t\t\n\t\t\n\t\t\n if(isset($_POST['do_search']) && $_POST['do_search']==1){\n \t//echo \"export\";exit;\n \t\n \t$toShow['banner']=$rst['dataset'];\n \t\n\t $start=0;\n\t $pagenum=1000000;\n\n\t $downloadfilename='ExportData.csv';\n\t $output=\"\";\n\t $expstr=\"\\t\";\n\t $expenter=\"\\t\\n\";\n\t $output .= \"流水ID编号\"\n \t.$expstr.\"提交时间\"\n .$expstr.\"姓名\"\n .$expstr.\"性别(1男2女)\"\n .$expstr.\"联系电话\"\n .$expstr.\"电子邮箱\"\n .$expstr.\"反馈标题\"\n .$expstr.\"反馈内容\"\n .$expenter;\n\n \t\n \t$UserinfoMod = M('user');\n \t\n\t if (!empty($toShow['banner'])){\n\t $k=0;\n\t do{\n\t \n\t $v=$toShow['banner'][$k];\n\t \n\t \n\t //if(isset($allProductList[$v['class_id']])){\n\t // $toShow['banner'][$k]['class_name']=$allProductList[$v['class_id']]['title'];\n\t //}\n\t //else{\n\t // $toShow['banner'][$k]['class_name']=\"\";\n\t //}\n\t \n\t \n\t \n\t //$myword=$toShow['banner'][$k]['myword'];\n\t //$myword=str_replace(\"\\r\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\r\",\"\",$myword);\n\t\t\t\t\t\n\t\t\t\t\t\n\t //if ($toShow['banner'][$k]['device']==\"0\"){\n\t // $device_show=\"PC端\";\n\t //}\n\t //if ($toShow['banner'][$k]['device']==\"1\"){\n\t // $device_show=\"手机端\";\n\t //}\n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/web_headpic/\".$v['headpic'];\n\t //$voice=empty($v['voice'])?\"\":BASE_URL_FRONT.\"/public/web_voice/\".$v['voice'];\n\t //$wx_headpic=empty($v['wx_headpic_path'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t /*\n\t if($v['status']==0){\n\t \t$status_now='审核拒绝';\n\t }\n\t if($v['status']==1){\n\t \tif($v['create_time']<$s_time){\n\t \t\t$status_now='审核通过';\n\t \t}\n\t \tif($v['create_time']>=$s_time){\n\t \t\t$status_now='审核中';\n\t \t}\n\t }\n\t */\n\t \n\t \n\t \n\t $summary=str_replace(\"\\r\\n\",\" [Enter] \",$toShow['banner'][$k]['summary']);\n\t $summary=str_replace(\"\\n\",\" [Enter] \",$summary);\n\t $summary=str_replace(\"\\r\",\"\",$summary);\n\t \n\t \n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n\t \t\t//$user=$user[0];\n\t \t\t\n\t\t \t//\t$user_province = $user['province'];\n\t\t //\t$user_city = $user['city'];\n\t \n\t \n\n\t $output .= $toShow['banner'][$k]['id']\n\t \t.$expstr.$toShow['banner'][$k]['addtime']\n\t \t.$expstr.$toShow['banner'][$k]['realname']\n\t \t.$expstr.$toShow['banner'][$k]['sex']\n\t \t.$expstr.$toShow['banner'][$k]['mobile']\n\t \t.$expstr.$toShow['banner'][$k]['email']\n\t \t.$expstr.$toShow['banner'][$k]['title']\n\t \t.$expstr.$summary\n\t .$expenter;\n\n\n\t $k=$k+1;\n\t }while($k<count($toShow['banner']));\n\t }\n\n\t $T_text=$output;\n\n\t\t\t//exit;\n\n\n\t\t\theader('Cache-control: private');\n\t header('Content-Disposition: attachment; filename='.$downloadfilename);\n\n\n\n\t//如果mb_convert_encoding函数存在则用此函数来转编码,前提是需要安装mbstring包\n\t if(function_exists('mb_convert_encoding')){\n\t header('Content-type: text/csv; charset=UTF-16LE');\n\t echo(chr(255).chr(254));\n\t echo(mb_convert_encoding($T_text,\"UTF-16LE\",\"UTF-8\"));\n\t }\n\t//如果iconv函数存在则用此函数来转编码\n\t elseif(function_exists('iconv')){\n\t header('Content-type: text/csv');\n\t echo(chr(255).chr(254));\n\t echo(iconv(\"UTF-8\",\"UTF-16LE\",$T_text));\n\t }\n\t//直接从utf-8转,这个貌似不灵...\n\t else{\n\t header('Content-type: text/csv; charset=UTF-8');\n\t echo(chr(239).chr(187).chr(191));\n\t echo($T_text);\n\t }\n\t exit;\n\t \n \n }\n\t\t\n\t\t\n\t\t$PageTitle = L('信息反馈列表');\n\t\t$PageMenu = array(\n\t\t\t//array( U('contact/create'), L('信息反馈') ),\n //array( U('contact/export'), L('导出信息反馈') ),\n\t\t);\n\t\t$this->setPagething( $PageTitle, $PageMenu, true);\n\t\t$this->display();\n\t}", "static function getListCode($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_code_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_code_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (!is_numeric($pm_list_name_or_id)) {\n\t\t\treturn $pm_list_name_or_id;\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load((int)$pm_list_name_or_id)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t\t$vs_list_code = $t_list->get('list_code');\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_code_cache[$vn_list_id] = $vs_list_code;\n\t}", "public function do_delete_record()\n {\n $v_list_delete = get_post_var('hdn_item_id_list','');\n $this->model->do_delete_record($v_list_delete);\n }", "function getId();", "public function listIdOfListCompanyAndListStaff($listCompanyId, $listStaffId = null)\n {\n $hFunction = new \\Hfunction();\n if ($hFunction->checkEmpty($listStaffId)) {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->pluck('work_id');\n } else {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->whereIn('staff_id', $listStaffId)->pluck('work_id');\n }\n\n }", "public function getLoveId($loveArray=null,$key=\"item_id\"){\n if($loveArray !=null ){\n $list_id=array_map(function($value) use($key){\n return $value[$key];\n },$loveArray);\n return $list_id;\n }\n }", "function delete_list( $ids = array()) {\n \t\t\n \t\t// where clause\n\t\t$this->db->where_in( $this->primary_key, $id );\n\n\t\t// delete the record\n\t\treturn $this->db->delete( $this->table_name );\n \t}", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "function addToListM($listname,$entry){\n $sql= \"INSERT INTO `all_list`(`$listname`) VALUES ('$entry')\";\n $result= $this-> db-> query($sql);\n if (!$result) {\n echo \"Duplicate Entry Exist !\";\n } else {\n echo \"Entry Added to List !\";\n }\n }", "public function delete_lists($id){\n\t\t$this->db->where(array(\n\t\t\t'pi_percentage_id'\t\t=>\t$id\n\t\t));\t\t\n\t\t$query = $this->db->get(\"payroll_pagibig_percentage_table\");\n\t\treturn $query->row();\n\t}", "public function concatPostIdList($list)\n {\n $param = null;\n\n foreach ($list as $item) {\n $param = $param . ', ' . $item;\n }\n\n return trim($param, ', ');\n }", "function decodeList($list);", "function listar_inscrito($id) {\n $this->db->distinct ('distinct evento.id_evento');\n\t\t$this->db->select ( 'evento.*' );\n\t\t$this->db->from ( 'evento,participacao,usuario' );\n\t\t$this->db->where ( 'participacao.id_evento = evento.id_evento' );\n\t\t$this->db->where ( 'participacao.id_face = usuario.id_face' );\n\t\t$this->db->where ( 'participacao.id_face = ' . \"'\" . $id . \"'\" );\n\t\n\t\t$query = $this->db->get ();\n\t\n\t\tif ($query->num_rows () != 0) {\n\t\t\treturn $query->result ();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function model_id_list()\r\n {\r\n $this->set_error(\"MBE-\".$this->model_code.\"-MIL-1\", \r\n \"Internal error, please contact admin\", \r\n \"Missing model_id_list API for this model \".$this->model_name);\r\n $model_id_list = array();\r\n /*\r\n $model_id_list = array (\r\n array(\r\n \"table\" => \"dummy_table\", \r\n \"editable\" => false,\r\n \"id_column\" => \"dummy_id\",\r\n \"data_column\" => array(\r\n array(\"data\" => \"dummy_name\", \"column\" => \"dummy_column\"),\r\n ),\r\n ),\r\n );\r\n */\r\n return $model_id_list;\r\n }", "function get_Parent_list($result, $parent_list){\n\t\tglobal $parent_list;\n\t\tif($result){\n\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t\t$parent_list[]=$row[0];\n\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'pages.pid',\t\t\t \t\t\t\t\t\t\t// SELECT ...\n\t\t\t\t'pages',\t\t\t\t\t\t\t\t\t// FROM ...\n\t\t\t\t'pages.uid = '.$row[0].\n\t\t\t\t$this->cObj->enableFields('pages'),\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// GROUP BY...\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// ORDER BY...\n\t\t\t\t'' \t\t\t\t\t\t\t\t\t\t\t// LIMIT to 10 rows, starting with number 5 (MySQL compat.)\n\t\t\t\t);\n\t\t\t$this->get_parent_list($res2, $liste);\n\t\t\t}\n\t\t}\n\t\treturn $parent_list;\n\t}", "public function editList($id)\n\t{\n\t\t$edit = \"list\";\n\t\t$list = DB::table('lists')->where('id', $id)\n\t\t->get();\n\n\t\treturn view('edit', compact(\"list\", \"edit\"));\n\t}", "function update_tel_list_name() {\n\t\tif (empty($this->data) || empty($this->data['callListId']) || empty($this->data['listName'])) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\t\t$list_name = $this->data['listName'];\n\t\t$call_list_id = $this->data['callListId'];\n\t\t$item_main = $this->data['item_main'];\n\n\t\t$info_list = $this->T16InboundCallList->getListInfoById($call_list_id);\n\t\tif (!isset($info_list[\"T16InboundCallList\"][\"id\"]) || empty($info_list[\"T16InboundCallList\"][\"id\"])) {\n\t\t\techo \"err_not_exist\";\n\t\t\texit;\n\t\t}\n\t\t$check_lock = $this->T92Lock->getInfoLock('inbound_call_list', $this->ESession->getCallListId($this));\n\t\tif (!empty($check_lock)) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$lock_new = $this->create_lock('inbound_call_list', $this->ESession->getCallListId($this), __FUNCTION__);\n\t\tif (!$lock_new) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\tif ($this->data['listTestFlag'] == 'true') {\n\t\t\t$list_test_flag = 1;\n\t\t} else {\n\t\t\t$list_test_flag = 0;\n\t\t}\n\n\t\t//Save data to DB\n\t\t$dsT16InboundCallList = $this->T16InboundCallList->getDataSource();\n\t\t$dsT16InboundCallList->begin($this);\n\n\t\t$data_call_list['T16InboundCallList']['id'] = $call_list_id;\n\t\t$data_call_list['T16InboundCallList']['list_name'] = $list_name;\n\t\t$data_call_list['T16InboundCallList']['item_main'] = $item_main;\n\t\t$data_call_list['T16InboundCallList']['list_test_flag'] = $list_test_flag;\n\t\t$data_call_list['T16InboundCallList']['update_user'] = $this->ESession->getUserId($this);\n\t\t$data_call_list['T16InboundCallList']['update_program'] = $this->name.'_'.__FUNCTION__;\n\n\t\t$call_list = $this->T16InboundCallList->save($data_call_list['T16InboundCallList']);\n\n\t\tif(!$call_list || (isset($lock_new) && !empty($lock_new) && !$this->update_lock($lock_new, __FUNCTION__))){\n\t\t\t$dsT16InboundCallList->rollback($this);\n\t\t\t$this->log(\"発信規制番号登録:失敗\");\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$dsT16InboundCallList->commit($this);\n\t\t$results = Array();\n\t\t$results['status'] = 'save';\n\t\t$item_column = $this->T13InboundListItem->getColumnListByItemName($call_list_id, $item_main);\n\t\t$item_column = $item_column['T13InboundListItem']['column'];\n\t\t$results['item_column'] = $item_column;\n\t\techo json_encode($results);\n\t\texit;\n\t}", "public function getById($idList) {\n\t\n\t\treturn $this->find($idList);\n\t}", "function privList(&$p_list)\n {\n }", "public abstract function get_ids();", "public function saveList($list, &$m_order = 0)\n {\n foreach ($list as $item) {\n $m_order++;\n $this->updateOrder($m_order, $item['id']);\n }\n }", "function listItem($view, $id, $value='') {\n\t\tif(!$value) { $value = implode(', ',$id) ; }\n\t\t$str = '<tr><td><a href=\"?view='.$view.'&amp;do=view&amp;pks='.implode(',',$id).'\">'.$value.'</a></td><td><a class=\"edit\" href=\"?view='.$view.'&amp;do=edit&amp;pks='.implode(',',$id).'\"><span class=\"icon has-text-grey\"><i class=\"fas fa-edit\"></i></span></a></td><td><a class=\"open-modal\" data-do=\"delete\" data-view=\"'.$view.'\" data-pks=\"'.implode(',',$id).'\" data-modal-id=\"#my-modal\"><span class=\"icon has-text-danger\"><i class=\"fas fa-ban\"></i></span></a></td></tr>';\n\t\treturn $str;\n\t}", "public function show_list($p_obj_id)\n {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id__master, isys_catg_relation_list__isys_obj__id__slave, obj.isys_obj__isys_obj_type__id, obj.isys_obj__title AS title\n FROM isys_catg_relation_list\n INNER JOIN isys_obj AS obj ON isys_catg_relation_list__isys_obj__id__slave = obj.isys_obj__id\n INNER JOIN isys_obj AS relObj ON isys_catg_relation_list__isys_obj__id = relObj.isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND obj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND relObj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id__slave ';\n\n $l_res = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row = $l_res->get_row()) {\n if ($l_row[\"isys_catg_relation_list__isys_obj__id__master\"] == $p_obj_id &&\n (is_null($this->m_obj_arr) || !in_array($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $this->m_obj_arr))) {\n if ($l_row[\"isys_obj__isys_obj_type__id\"] == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n $this->m_its_arr[$l_row[\"isys_catg_relation_list__isys_obj__id__slave\"]] = $l_row[\"title\"];\n }\n\n if (in_array($this->m_dao_rel->get_objTypeID($l_row['isys_catg_relation_list__isys_obj__id__slave']), $this->m_software_obj_types)) {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id\n FROM isys_catg_relation_list\n INNER JOIN isys_obj ON isys_obj__id = isys_catg_relation_list__isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND isys_catg_relation_list__isys_obj__id__slave = ' . $this->m_dao_rel->convert_sql_id($l_row['isys_catg_relation_list__isys_obj__id__slave']) . '\n AND isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id';\n\n $l_res_app = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row_app = $l_res_app->get_row()) {\n $l_its_data = $this->m_dao_its_comp\n ->get_data(null, null, \"AND isys_connection__isys_obj__id = \" . $this->m_dao_rel->convert_sql_id($l_row_app[\"isys_catg_relation_list__isys_obj__id\"]), null, C__RECORD_STATUS__NORMAL)\n ->get_row();\n\n // Check in it service components\n if (isset($l_its_data['isys_obj__id']) &&\n $this->m_dao_rel->get_objTypeID($l_its_data['isys_obj__id']) == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n if (!array_key_exists($l_its_data['isys_obj__id'], $this->m_its_arr)) {\n $this->m_its_arr[$l_its_data['isys_obj__id']] = $l_its_data['isys_obj__title'];\n }\n }\n }\n }\n\n $this->m_obj_arr[] = $l_row[\"isys_catg_relation_list__isys_obj__id__slave\"];\n $this->new_recurse_relation($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $p_obj_id);\n unset($this->m_obj_arr);\n }\n }\n\n return $this;\n }", "abstract public function get_id();", "function ler_id($id) {\n $x = (int)$id;\n if($x >= $this->bd[0][0] || $x <= 0) {return false;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\n return true;\n }", "function generarId (){\n $usuarios = traerTodos();\n\n if (count($usuarios) == 0) {\n return 1;\n }\n $elUltimo = array_pop($usuarios);\n $id = $elUltimo['id'];\n return $id + 1;\n}", "public function addToDoList() {\n try {\n if (!($this->toDoList instanceof Base_Model_ObtorLib_App_Core_Crm_Entity_ToDoList)) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception(\" ToDoList Entity not intialized\");\n } else {\n $data = array(\n 'list_title' => $this->toDoList->getListTitle(),\n 'list_description' => $this->toDoList->getListDescription(),\n 'added_on' => $this->toDoList->getAddedOn(),\n 'added_by' => $this->toDoList->getAddedBy(),\n 'added_user_type' => $this->toDoList->getAddedByUserObject(),\n 'reminder_on' => $this->toDoList->getReminderOn(),\n 'reminder_date' => $this->toDoList->getReminderDate(),\n 'reminder_time' => $this->toDoList->getReminderTime(),\n 'current_status' => $this->toDoList->getStatus());\n $last_inserted_id = $this->insert($data);\n return $last_inserted_id;\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception($ex);\n }\n }", "public function delete_from_aweber_list($post_data = array(),$list_id = null ){\n\n \t\t$aweber = new AWeberAPI($this->aweber_consumerKey, $this->aweber_consumerSecret);\n // dd($aweber);\n\n\t\ttry {\n\n\t\t $account = $aweber->getAccount($this->aweber_accessKey , $this->aweber_accessSecret);\n\t\t $lists = $account->lists->find(array('name' => $list_id));\n\t\t $list = $lists[0];\n\n\t\t # lets create some custom fields on your list!\n\t\t $custom_fields = $list->custom_fields;\n\t\t $params = array(\n\t\t 'email' => $post_data['email']\n\n\t\t );\n\n\t\t $subscribers = $list->subscribers;\n\t\t $found_subscribers = $subscribers->find($params);\n\t\t foreach ($found_subscribers as $subscriber) {\n\t\t $subscriber->delete();\n\t\t }\n\n\t\t # success!\n\t\t //print \"A new subscriber was added to the $list->name list!\";\n\t\t return true;\n\n\t\t} catch(AWeberAPIException $exc) {\n\t\t return false;\n\t\t}\n\n}", "function listarres_one($id)\n\t{\n\t\t$sql = \"call sp_s_restaurante_one(?)\";\n\t\ttry {\n\t\t\t$PrepareStatement = $this->cnn->getPrepareStatement($sql);\n\t\t\t$PrepareStatement->bindValue(1, $id, PDO::PARAM_INT);\n\t\t\t$PrepareStatement->execute();\n\t\t\treturn $PrepareStatement->fetch();\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error: \" . $e;\n\t\t\treturn false;\n\t\t}\n\t}", "private function getParentListItemDefinitionIds() {\n\t\tif ($this->parentListItemDefinitionIds === null) {\n\t\t\t$this->parentListItemDefinitionIds =\n\t\t\t\t$this->selectParentListItemDefinitionIds();\n\t\t}\n\t\treturn $this->parentListItemDefinitionIds;\n\t}", "abstract protected function displayList($list);", "public function setListID($ListID)\n\t{\n\t\treturn $this->set('ListID', $ListID);\n\t}" ]
[ "0.72761893", "0.7250978", "0.71314716", "0.7048672", "0.6796208", "0.6633367", "0.65968823", "0.6547712", "0.6539432", "0.6494794", "0.6492902", "0.63299084", "0.6301222", "0.61845607", "0.61154604", "0.61082935", "0.609848", "0.60324395", "0.59625006", "0.59311056", "0.588717", "0.5881866", "0.5879294", "0.58203816", "0.5782391", "0.5748283", "0.5744269", "0.5731671", "0.5727865", "0.57094026", "0.5704132", "0.56743085", "0.5648148", "0.5641866", "0.5620036", "0.5614978", "0.5559631", "0.5540778", "0.5526125", "0.5506126", "0.5493916", "0.5492541", "0.54780114", "0.54776406", "0.54775375", "0.5470055", "0.5468269", "0.5464452", "0.542986", "0.5411628", "0.54033285", "0.5400189", "0.5379603", "0.5376674", "0.53683764", "0.5367252", "0.5360862", "0.534926", "0.53362876", "0.53322893", "0.5328085", "0.53186536", "0.53119", "0.5306896", "0.5293584", "0.5292443", "0.52854294", "0.5280918", "0.52779454", "0.5270148", "0.52697396", "0.5254461", "0.5245343", "0.5220396", "0.52141434", "0.5212229", "0.52105165", "0.5184777", "0.5177196", "0.5170882", "0.51577646", "0.5157738", "0.5155054", "0.5146743", "0.51463", "0.5145872", "0.5143674", "0.5131892", "0.5130421", "0.51303977", "0.5126831", "0.5125376", "0.51215166", "0.5116118", "0.5114694", "0.5107844", "0.5104873", "0.5104346", "0.5100808", "0.510026" ]
0.5813559
24
trouver le id de list dans list_list
function mod_element_list($newElement, $list, $lastElement, $description, $ecolor, $priority, $modified){ $lid = get_id($list); //modifier if ($lid!=-1){ $SQL = "UPDATE element_list SET element = '$newElement', description = '$description', ecolor = $ecolor, priority = $priority, modified = $modified WHERE element = '$lastElement' and list='$lid'"; global $db; $res = $db->prepare($SQL); $res->execute(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_id()\n\t{\n\t\treturn $this->list;\n\t}", "public function getListId();", "public abstract static function getListID();", "protected function IdUserListReproduction ()\n {\n $lista = Model_listas::find('all', array\n (\n 'where' => array\n (\n array('id_usuario'=>$this->userID()),\n array('titulo'=>'reproducidas')\n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n } \n return $id; \n }\n }", "function wp_parse_id_list($input_list)\n {\n }", "public function getListID()\n\t{\n\t\treturn $this->get('ListID');\n\t}", "public function getId()\n {\n return $this->_list->getId();\n }", "static function getListID($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_id_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (is_numeric($pm_list_name_or_id)) {\n\t\t\t$vn_list_id = intval($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load(array('list_code' => $pm_list_name_or_id))) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id] = $vn_list_id;\n\t}", "function supp_list($list){\n $lid = get_id($list);\n //supp\n if ($lid!=-1){\n //supprimer element de la liste\n\t$SQL = \"DELETE FROM element_list WHERE list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n //supprimer list\n \t$SQL = \"DELETE FROM list_list WHERE list='$list'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute(); }\n}", "public abstract function get_default_list_id();", "public function sanitize_list_id( $maybe_list_id = '' ) {\n if ( ! $maybe_list_id ) {\n return $this->get_site_list_id();\n }\n $lists = $this->get_lists();\n foreach ( $lists->lists as $list ) {\n if ( ! $list || ! isset( $list->id ) ) {\n continue;\n }\n if ( $maybe_list_id == $list->id || $maybe_list_id == $list->name ) {\n return $list->id;\n }\n }\n\n return $maybe_list_id;\n }", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "protected function getListId($strList)\n\t{\n\n\t\t$arrLists = $this->api->lists();\n\t\tforeach($arrLists['data'] as $list)\n\t\t{\n\t\t\tif ($list['name']==$strList)\n\t\t\t\treturn $list['id'];\n\t\t}\n\t\treturn null;\n\n\t}", "function set_list_id($list_id) {\n $this->_subscribers_base_route = $this->_base_route.'subscribers/'.$list_id;\n }", "protected function idNameList($nombreLista)\n {\n $lista = Model_Listas::find('all', array\n (\n 'where' => array\n (\n array('titulo'=>$nombreLista) \n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n }\n return $id; \n }\n }", "function _list($lp_n, $a, $p){\r\n global $conn; // Jadikan global\r\n \r\n // Buat sql untuk cek apakah row sudah ada atau belum\r\n $sql = \"SELECT * FROM data_list WHERE id_sntr = $a AND nama_lprn = '$lp_n'\";\r\n $cek = mysqli_num_rows( mysqli_query($conn, $sql) );\r\n\r\n // Dapatkan id dari row yang diinginkan\r\n $id_list = mysqli_fetch_assoc(mysqli_query($conn, $sql))[\"id_list\"];\r\n\r\n // Cek ttd_pembina diceklis atau tidak\r\n if ( $p === \"0000-00-00 00:00:00\" ) {\r\n // Jika tidak diceklism, hapus row lama atau biarkan\r\n $sql = \"DELETE FROM data_list WHERE id_list = $id_list\";\r\n } else {\r\n // Jiak diceklis, cek apakah row sudah ada atau belum\r\n if ( $cek > 0 ) {\r\n // Jika sudah ada maka update row dengan data baru\r\n $sql = \"UPDATE data_list SET\r\n id_list = $id_list,\r\n id_sntr = $a,\r\n nama_lprn = '$lp_n',\r\n wktu_lprn = '$p'\r\n WHERE id_list = $id_list\";\r\n } else {\r\n // Jika belum, buat row baru dan masukkan data \r\n $sql = \"INSERT INTO data_list (id_list, id_sntr, nama_lprn, wktu_lprn)\r\n VALUE ('', $a, '$lp_n', '$p')\";\r\n }\r\n }\r\n\r\n // Ambil data sql dan update\r\n mysqli_query($conn, $sql);\r\n}", "private function _setListId()\r\n { \r\n if (Mage::getSingleton('admin/session')->isLoggedIn()) {\r\n $storeId = Mage::app()->getRequest()->getParam('store_id');\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId', $storeId); \r\n } else {\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId');\r\n }\r\n }", "function list_get($id) {\n\n //$id = $this->get('id');\n\n if (!$id) {\n\n $this->response(\"No item ID specified!\", 400);\n\n exit;\n }\n\n $list = $this->List_model->getListById($id);\n\n if ($list) {\n\n //$list = $this->appendItems($list);\n //Put owner's name instead of user ID\n //$list['owner'] = $this->User_model->getName($list['owner'])['name'];\n unset($list['owner']);\n\n $this->response($list, 200);\n\n exit;\n } else {\n\n $this->response(\"Invalid ID\", 404);\n\n exit;\n }\n }", "public function loadListItemsByListId() {\n $sql = \"SELECT ListText, ListItemID, ListItemColor, ListItemDone\"\n FROM list_items\n WHERE ListID=(\n SELECT ListID\n FROM lists\n WHERE ListURL=:list\n )\n ORDER BY ListItemPosition\";\n if($stmt = $this->_db->prepare($sql)) {\n $stmt->bindParam(':list', $_GET['list'], PDO::PARAM_STR);\n $stmt->execute();\n $order = 1;\n while($row = $stmt->fetch()) {\n echo $this->formatListItems($row, $order);\n $order;\n }\n $stmt->closeCursor();\n }\n else {\n echo \"<li> Something went wrong. \", $db->error, \"</li>\";\n }", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d = New AlbumTable($this->dbAdapter); \n // bucar id de parametro\n $datos = $d->getGeneral1(\"select idTdoc from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n $d->modGeneral(\"delete from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'i/'.$datos['idTdoc']);\n } \n }", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d=new AlbumTable($this->dbAdapter);\n\n $d->modGeneral(\"delete from a_empleados_rete_d where idEret=\".$id); \n $d->modGeneral(\"delete from a_empleados_rete where id=\".$id); \n //$u=new Retefuente($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n //$u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "protected function prepareTemplateToList($list)\n {\n return $list;\n }", "function add_element_list($newlist, $l, $username, $description, $ecolor, $priority, $creation){\n $l_id = get_id($l);\n $uid = get_userid($username);\n //insÚrer\n if ($l_id!=-1){\n \t$SQL = \"INSERT INTO element_list VALUES (DEFAULT,'$l_id',$uid,'$newlist', '$description', $ecolor, $priority, $creation, $creation, 0)\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "function checkIDList($table, $fixedQuery, &$IDList)\n{\n\tglobal $sitePosition;\n\n\t$IDs = array();\n\t$rs = query('Select `ID` from `' . $sitePosition . '.' . $table . '` where ' . ($fixedQuery != '' ? ('(' . $fixedQuery . ') and ') : '') . '`ID` in (' . $IDList . ')', false);\n\twhile(true)\n\t{\n\t\t$rsInfo = fetchRow($rs);\n\t\tif($rsInfo === null) break;\n\t\t$IDs[] = $rsInfo[0];\n\t}\n\tfreeResult($rs);\n\t$IDList = implode(',', $IDs);\n}", "public function remove_list_from_table($list){\n\t\t$query = \"DELETE * FROM \" . $this->table . \" WHERE \" . $this->column_name . \"=\";\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function __construct($listId, $list)\n\t{\n\t\t$this->listId = $listId;\n\t\t$this->list = $list;\n\t}", "function supp_element_list($supp, $list){\n $lid = get_id($list);\n //supprimer\n if ($lid!=-1){\n \t$SQL = \"DELETE FROM element_list WHERE element = '$supp' and list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "function candidatosXLista($id){\n\t\t $sql = \"SELECT C.idlista, L.nombrelista,nombrecandidato, apellidocandidato, cargocandidato, imagencandidato\n\t\t FROM candidato C LEFT JOIN LISTA L ON C.idlista = L.idlista\n\t\t WHERE C.idlista = \".$id.\"order by cargocandidato ASC ;\";\n\t\treturn $sql;\n\t }", "public function dissociateList(Request $request, $id, $list)\n {\n $person = $this->modelPath::findOrFail($id);\n\n $person->retractListById($list);\n\n $this->notify('lists.dissociated');\n\n return redirect()->back();\n }", "public function get_site_list_id() {\n $list = $this->get_site_list();\n if ( isset( $list->id ) ) {\n return $list->id;\n }\n return false;\n }", "function update_list( $id, $name, $can_delete, $items )\n\t{\n\t\t$this->db->set('name', $name );\n if( $can_delete !== NULL ) {\n $this->db->set('can_delete', $can_delete );\n } \n $this->db->where( 'id', $id );\n\t\t$this->db->update('lists');\n\t\t\n // Save the list items\n\t\t$this->db->where( 'list_id', $id );\n\t\t$this->db->delete( 'list_items' );\n\t\tfor( $i = 0; $i < count($items); $i++ ) {\n $this->db->set('list_id', $id );\n $this->db->set('data_id', $items[$i]['id']);\n\t\t\t$this->db->set('title', $items[$i]['title']);\n\t\t\t$this->db->set('type', $items[$i]['type']);\n\t\t\t$this->db->set('sort_order', $i + 1);\n\t\t\t$this->db->insert('list_items');\n }\n\t}", "public function listId() {\n\t\treturn $this->academic_session->all()->pluck('id')->all();\n\t}", "public function getWishlistId();", "function is_in_elementlist($element, $l){\n $l_id = get_id($l);\n //trouver\n if ($l_id == -1) return false;\n else {\n $SQL = \"SELECT * FROM element_list WHERE element = '$element' and list='$l_id'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n \tif($res->rowCount() == 0) return false;\n \telse return true;\n }\n}", "public static function getGatewayListID(){\n $row = Gateway::where(array('Status'=>1))->lists('Title', 'GatewayID');\n if(!empty($row)){\n $row = array(\"\"=> \"Select a Gateway\")+$row;\n }\n return $row;\n }", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "public function add_list_to_table($list){\n\t\t$query = \"SELECT $this->column_name FROM \" . $this->table;\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function listIdOfListStaffId($listStaffId)\n {\n return QcCompanyStaffWork::whereIn('staff_id', $listStaffId)->pluck('work_id');\n }", "protected function carregarListaOneToMany($object_list,$addParametros) {\n $query = \"SELECT id FROM \".get_class($object_list).\" WHERE id\".get_class($this).\"=$this->id $addParametros\";\n return bd::executeSqlParaArraySimples($query);\n }", "public function testGetListOfSpecificIds()\n {\n $itemIds = [];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n\n $search = 'ids:'.implode(',', $itemIds);\n\n $response = $this->api->getList($search);\n $this->assertErrors($response);\n $this->assertEquals(count($itemIds), $response['total']);\n\n foreach ($response['lists'] as $item) {\n $this->assertTrue(in_array($item['id'], $itemIds));\n $this->api->delete($item['id']);\n $this->assertErrors($response);\n }\n }", "public function edit($id,$list_id)\n {\n if (Gate::allows('isadmin')){\n $menu = Menu::find($id);\n $status = $menu->listts->where('id',$list_id)->all();\n $menu = Menu::find($id)->name;\n if (count($status)>0){\n $list = Listt::find($list_id);\n return view('dashboard.editlist',compact('list','menu'));\n }\n }\n abort(404);\n }", "public function getMultipleWishlistId();", "private function getTargetListId($list_id) {\n $where = array(\n 'equals' => array(\n 'mailchimp_list' => $list_id\n )\n );\n $result = $this->runSugarQuery('ProspectLists', array('id'), $where, 1);\n if($result) {\n return $result[0]['id'];\n }\n return false;\n }", "public function delete_list($val){\n if(get_instance()->ecl('Instance')->mod('lists', 'delete_list', [get_instance()->ecl('Instance')->user(),$val])) {\n echo 1;\n } else {\n echo 0;\n }\n }", "static function get_ids_from_list ($list_video_ids){\r\n\r\n if(empty($list_video_ids)){\r\n return;\r\n }\r\n\r\n $buffy = array();\r\n\r\n //this is needed because we could have more space between each movie id\r\n $remove_spaces = trim(str_replace(array('&nbsp;', ' '),array(''), htmlentities($list_video_ids, ENT_QUOTES)));\r\n\r\n if(!empty($remove_spaces)) {\r\n\r\n $video_id_explode = explode(',', $remove_spaces);\r\n $video_id_explode_map = array_map('trim',$video_id_explode);//extra trim just in case\r\n\r\n //make an array of video id's'\r\n foreach($video_id_explode_map as $video_id) {\r\n $trim_video_id = trim($video_id);\r\n\r\n //check to prevent duplicates id's\r\n if (!in_array($trim_video_id, $buffy)) {\r\n $buffy[] = $trim_video_id;\r\n }\r\n }\r\n }\r\n\r\n return $buffy;\r\n }", "public function listing()\n\t{\n\n if(isset($_POST['dosubmit']) && $_POST['dosubmit']=='删除'){\n if( empty($_POST['id']) ){\n $this->error(L('请选择要删除的数据!'));\n }\n\n if(is_array($_POST['id'])){\n $ids = $_POST['id'];\n $in = implode(\",\",$_POST['id']);\n }else{\n $ids[] = $_POST['id'];\n $in = $_POST['id'];\n }\n\n //删除连带数据\n\n //删除自身数据\n $contactMod = M('contact');\n $sql=\" id in (\".$in.\") \";\n $contactMod->where($sql)->delete();\n\n $this->success('删除成功', U('contact/listing'));\n exit;\n }\n \n\n\n /// 载入 lk_cunction. (使用其 LkHTML::ListSort 函数)\n load(\"@.lk_function\");\n\n\t\t///列表过滤\n\t\t$sqlWhere = \"status < 250\";\n\t\t//$sqlWhere .= \" and mobile!='' and score_jia!='' and wx_headpic_path!='' \";\n\t\t//$sqlWhere .= \" and is_prize>=0 and openid!='' \";\n\t\t//$sqlWhere .= \" and user_id_crm!='' \";\n\t\t$sqlOrder = \" id DESC\";\n\t\t\n\t\t//$sqlWhere .= \" and (headpic!='' or voice!='') and mobile!='' \";\n\t\t\n\t\t\n\t\t$s_time=time()-(SHENHE_CROSS_TIME*3600); //超过4小时自动审核通过\n\t\t\n\t\t\n\n\t\t$filter_role = $this->REQUEST('_filter_role');\n\t\tif( $filter_role != '' ){\n\t\t\t$sqlWhere .= \" and role = '\". $this->fixSQL($filter_role).\"' \";\n\t\t}\n\n\t\t$filter_state = $this->REQUEST('_filter_state');\n\t\tif( $filter_state != '' ){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif ($filter_state=='0'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" \";\n\t\t\t}\n\t\t\tif ($filter_state=='1'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time<'\".$s_time.\"' \";\n\t\t\t}\n\t\t\tif ($filter_state=='1_4h'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time>='\".$s_time.\"' \";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n \n //新搜索\n $f_search = $this->REQUEST('_f_search');\n $filter_fieldname = $this->REQUEST('_filter_fieldname');\n\t\tif( $f_search != '' ){\n\t\t\tif($filter_fieldname=='realname'){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='mobile'){\n\t\t\t\t$sqlWhere .= \" and (mobile like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='summary'){\n\t\t\t\t$sqlWhere .= \" and (summary like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\t//elseif($filter_fieldname=='wx_nickname'){\n\t\t\t//\t$sqlWhere .= \" and (wx_nickname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='openid'){\n\t\t\t//\t$sqlWhere .= \" and (openid like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='user_id_crm'){\n\t\t\t//\t$sqlWhere .= \" and (user_id_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='username_crm'){\n\t\t\t//\t$sqlWhere .= \" and (username_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='realname_crm'){\n\t\t\t//\t$sqlWhere .= \" and (realname_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='is_prize'){\n\t\t\t//\t$sqlWhere .= \" and (is_prize = '\". $this->fixSQL($f_search).\"') \";\n\t\t\t//}\n\t\t\telseif($filter_fieldname==''){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%' or mobile like '%\". $this->fixSQL($f_search).\"%' or summary like '%\". $this->fixSQL($f_search).\"%' )\";\n\t\t\t}\n\t\t\telse{\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$filter_starttime = $this->REQUEST('_filter_starttime');\n\t\t$filter_endtime = $this->REQUEST('_filter_endtime');\n\t\tif( $filter_starttime != '' ){\n\t\t\t$sql_starttime=strtotime($filter_starttime);\n\t\t\t$sqlWhere .= \" and create_time >= \". $sql_starttime.\" \";\n\t\t}\n\t\tif( $filter_endtime != '' ){\n\t\t\t$sql_endtime=strtotime($filter_endtime)+(24*3600);\n\t\t\t$sqlWhere .= \" and create_time < \". $sql_endtime.\" \";\n\t\t}\n\t\t\n\t\t\n\t\t//echo $sqlWhere;exit;\n\t\t\n\t\t\n\t\t\n\t\t\n\n $this->ModManager = M('contact');\n $f_order = $this->REQUEST('_f_order', 'modify_time');\n $fields = $this->ModManager->getDbFields();\n if( in_array($f_order, $fields) ){\n $sqlOrder = $f_order . ' ';\n }else{\n $sqlOrder = 'modify_time ';\n }\n \n $f_direc = strtoupper($this->REQUEST('_f_direc'));if($f_direc==\"\"){$f_direc='DESC';}\n if( $f_direc != 'DESC' ){\n $sqlOrder .= 'ASC';\n }else{\n $sqlOrder .= 'DESC';\n }\n \n $sqlOrder = ' id DESC ';\n \n //echo $sqlOrder;exit;\n\n\t\t///回传过滤条件\n\t\t$this->assign('filter_fieldname', $filter_fieldname);\n\t\t$this->assign('filter_starttime', $filter_starttime);\n\t\t$this->assign('filter_endtime', $filter_endtime);\n\n\n\n $this->assign('filter_role', $filter_role);\n $this->assign('filter_state', $filter_state);\n $this->assign('f_search', $f_search);\n $this->assign('f_order', $f_order);\n $this->assign('f_direc', $f_direc );\n\n\t\t///获取列表数据集\n\t\tif(isset($_POST['do_search']) && $_POST['do_search']==1){\n\t\t\t$paginglimit=1000000;\n\t\t}\n\t\telse{\n\t\t\t$paginglimit='';\n }\n //$rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, '', 'M');\n $rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, $paginglimit, 'M');\n //echo \"<pre>\";print_r($rst);exit;\n\t\t\n\t\t\n\t\t//过滤搜索条件\n\t\t//$UserinfoMod = M('user');\n\t\t\n //if(isset($rst['dataset'])){\n // foreach($rst['dataset'] as $k => $v){\n\t\t\t\t\n \t\t/*\n \t\t$user = $UserinfoMod->field('id,username,realname,point_total')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t$user=$user[0];\n \t\t\n \t\t$rst['dataset'][$k]['user_id'] = $user['id'];\n \t$rst['dataset'][$k]['username'] = $user['username'];\n $rst['dataset'][$k]['realname'] = $user['realname'];\n $rst['dataset'][$k]['point_total'] = $user['point_total'];\n */\n \n \n /*\n if($v['status']==0){\n \t$rst['dataset'][$k]['status_now']='审核拒绝';\n }\n if($v['status']==1){\n \tif($v['create_time']<$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核通过';\n \t}\n \tif($v['create_time']>=$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核中';\n \t}\n }\n */\n \n //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t//$user=$user[0];\n \t\t\n //\t\t$rst['dataset'][$k]['user_province'] = $user['province'];\n // \t$rst['dataset'][$k]['user_city'] = $user['city'];\n \n \n \n // }\n // $this->assign('dataset', $rst['dataset']);// 赋值数据集\n //}\n //echo \"<pre>\";print_r($rst['dataset']);exit;\n\t\t\n\t\t$this->assign('dataset', $rst['dataset']);// 赋值数据集\n\t\t\n\t\t\n\t\t\n if(isset($_POST['do_search']) && $_POST['do_search']==1){\n \t//echo \"export\";exit;\n \t\n \t$toShow['banner']=$rst['dataset'];\n \t\n\t $start=0;\n\t $pagenum=1000000;\n\n\t $downloadfilename='ExportData.csv';\n\t $output=\"\";\n\t $expstr=\"\\t\";\n\t $expenter=\"\\t\\n\";\n\t $output .= \"流水ID编号\"\n \t.$expstr.\"提交时间\"\n .$expstr.\"姓名\"\n .$expstr.\"性别(1男2女)\"\n .$expstr.\"联系电话\"\n .$expstr.\"电子邮箱\"\n .$expstr.\"反馈标题\"\n .$expstr.\"反馈内容\"\n .$expenter;\n\n \t\n \t$UserinfoMod = M('user');\n \t\n\t if (!empty($toShow['banner'])){\n\t $k=0;\n\t do{\n\t \n\t $v=$toShow['banner'][$k];\n\t \n\t \n\t //if(isset($allProductList[$v['class_id']])){\n\t // $toShow['banner'][$k]['class_name']=$allProductList[$v['class_id']]['title'];\n\t //}\n\t //else{\n\t // $toShow['banner'][$k]['class_name']=\"\";\n\t //}\n\t \n\t \n\t \n\t //$myword=$toShow['banner'][$k]['myword'];\n\t //$myword=str_replace(\"\\r\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\r\",\"\",$myword);\n\t\t\t\t\t\n\t\t\t\t\t\n\t //if ($toShow['banner'][$k]['device']==\"0\"){\n\t // $device_show=\"PC端\";\n\t //}\n\t //if ($toShow['banner'][$k]['device']==\"1\"){\n\t // $device_show=\"手机端\";\n\t //}\n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/web_headpic/\".$v['headpic'];\n\t //$voice=empty($v['voice'])?\"\":BASE_URL_FRONT.\"/public/web_voice/\".$v['voice'];\n\t //$wx_headpic=empty($v['wx_headpic_path'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t /*\n\t if($v['status']==0){\n\t \t$status_now='审核拒绝';\n\t }\n\t if($v['status']==1){\n\t \tif($v['create_time']<$s_time){\n\t \t\t$status_now='审核通过';\n\t \t}\n\t \tif($v['create_time']>=$s_time){\n\t \t\t$status_now='审核中';\n\t \t}\n\t }\n\t */\n\t \n\t \n\t \n\t $summary=str_replace(\"\\r\\n\",\" [Enter] \",$toShow['banner'][$k]['summary']);\n\t $summary=str_replace(\"\\n\",\" [Enter] \",$summary);\n\t $summary=str_replace(\"\\r\",\"\",$summary);\n\t \n\t \n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n\t \t\t//$user=$user[0];\n\t \t\t\n\t\t \t//\t$user_province = $user['province'];\n\t\t //\t$user_city = $user['city'];\n\t \n\t \n\n\t $output .= $toShow['banner'][$k]['id']\n\t \t.$expstr.$toShow['banner'][$k]['addtime']\n\t \t.$expstr.$toShow['banner'][$k]['realname']\n\t \t.$expstr.$toShow['banner'][$k]['sex']\n\t \t.$expstr.$toShow['banner'][$k]['mobile']\n\t \t.$expstr.$toShow['banner'][$k]['email']\n\t \t.$expstr.$toShow['banner'][$k]['title']\n\t \t.$expstr.$summary\n\t .$expenter;\n\n\n\t $k=$k+1;\n\t }while($k<count($toShow['banner']));\n\t }\n\n\t $T_text=$output;\n\n\t\t\t//exit;\n\n\n\t\t\theader('Cache-control: private');\n\t header('Content-Disposition: attachment; filename='.$downloadfilename);\n\n\n\n\t//如果mb_convert_encoding函数存在则用此函数来转编码,前提是需要安装mbstring包\n\t if(function_exists('mb_convert_encoding')){\n\t header('Content-type: text/csv; charset=UTF-16LE');\n\t echo(chr(255).chr(254));\n\t echo(mb_convert_encoding($T_text,\"UTF-16LE\",\"UTF-8\"));\n\t }\n\t//如果iconv函数存在则用此函数来转编码\n\t elseif(function_exists('iconv')){\n\t header('Content-type: text/csv');\n\t echo(chr(255).chr(254));\n\t echo(iconv(\"UTF-8\",\"UTF-16LE\",$T_text));\n\t }\n\t//直接从utf-8转,这个貌似不灵...\n\t else{\n\t header('Content-type: text/csv; charset=UTF-8');\n\t echo(chr(239).chr(187).chr(191));\n\t echo($T_text);\n\t }\n\t exit;\n\t \n \n }\n\t\t\n\t\t\n\t\t$PageTitle = L('信息反馈列表');\n\t\t$PageMenu = array(\n\t\t\t//array( U('contact/create'), L('信息反馈') ),\n //array( U('contact/export'), L('导出信息反馈') ),\n\t\t);\n\t\t$this->setPagething( $PageTitle, $PageMenu, true);\n\t\t$this->display();\n\t}", "static public function getItemIDsFromList($pm_list_name_or_id, $pa_idnos, $pa_options=null) {\n\t\tif(isset($pa_options['dontIncludeSubItems']) && (!isset($pa_options['dont_include_sub_items']) || !$pa_options['dont_include_sub_items'])) { $pa_options['dont_include_sub_items'] = $pa_options['dontIncludeSubItems']; }\n\t \t\n\t\tif (isset($pa_options['dont_include_sub_items']) && $pa_options['dont_include_sub_items']) {\n\t\t\t$pa_options['noChildren'] = true;\n\t\t}\n\t\t$t_list = new ca_lists();\n\t\t$t_item = new ca_list_items();\n\t\t$va_item_ids = array();\n\t\tforeach($pa_idnos as $vs_idno) {\n\t\t\t$vn_item_id = null;\n\t\t\tif (is_numeric($vs_idno)) { \n\t\t\t\t$vn_item_id = (int)$vs_idno; \n\t\t\t} else {\n\t\t\t\t$vn_item_id = (int)$t_list->getItemIDFromList($pm_list_name_or_id, $vs_idno);\n\t\t\t}\n\t\t\t\n\t\t\tif ($vn_item_id && !(isset($pa_options['noChildren']) || $pa_options['noChildren'])) {\n\t\t\t\tif ($qr_children = $t_item->getHierarchy($vn_item_id, array())) {\n\t\t\t\t\twhile($qr_children->nextRow()) {\n\t\t\t\t\t\t$va_item_ids[$qr_children->get('item_id')] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($vn_item_id) {\n\t\t\t\t\t$va_item_ids[$vn_item_id] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array_keys($va_item_ids);\n\t}", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function adicionarRepetidos($list){\n\n /*echo('<pre>');\n var_dump($list);\n echo('</pre>');*/\n\n for($i = 0; $i < count($list); $i++){\n for($j = $i+1; $j < count($list); $j++){\n if($list[$i][0] -> getIngrediente() == $list[$j][0] -> getIngrediente()){\n $list[$i][1] += $list[$j][1];\n array_splice($list, $j,1);\n }\n }\n }\n return $list;\n }", "protected function IdCancionEnLista ($nombreCancion,$nombreLista)\n {\n $cancionEnLista = Model_tiene::find('all', array\n (\n 'where' => array\n (\n array('id_cancion'=>$this->idNameSong($nombreCancion)),\n array('id_lista'=>$this->idNameList($nombreLista))\n )\n ));\n if(!empty($cancionEnLista))\n {\n $id=0;\n foreach ($cancionEnLista as $key => $value)\n {\n $id = $cancionEnLista[$key]->id_cancion;\n }\n return $id; \n }\n }", "public function updateExternalList($newlist, $idtype)\n {\n $updatelist = [];\n $updskipped = 0;\n $countnewlistspotterid = 0;\n $countdellistspotterid = 0;\n\n if ($idtype == 'black') {\n $idtype = 1;\n } elseif ($idtype == 'white') {\n $idtype = 2;\n } else {\n throw new Exception('Invalid list type specified for updateExternalList: '.$idtype);\n } // else\n\n /* Retrieve the current list */\n $oldlist = $this->_conn->arrayQuery(\"SELECT spotterid,idtype\n\t\t\t\t\t\t\t\t\t\t\t\tFROM spotteridblacklist \n\t\t\t\t\t\t\t\t\t\t\t\tWHERE ouruserid = -1 AND origin = 'external'\");\n foreach ($oldlist as $obl) {\n $islisted = (($obl['idtype'] == $idtype) > 0);\n $updatelist[$obl['spotterid']] = 3 - $islisted; \t// Put \"old\" spotterids (current ones) on the to-delete list\n }\n /* verwerk de nieuwe lijst */\n foreach ($newlist as $nwl) {\n $nwl = trim($nwl);\n //if ($idtype == 2) {\n // $ex = explode(',', $nwl);\n // if (isset($ex[1])) {\n // $nwl = $ex[1];\n // } else {\n // $nwl = '';\n // }\n //}\n $nwl = $this->_util->calculateSpotterId($nwl);\n if ((strlen($nwl) >= 3) && (strlen($nwl) <= 6)) {\t// Spotterids are between 2 and 7 characters long\n if (empty($updatelist[$nwl])) {\n $updatelist[$nwl] = 1;\t\t\t\t\t\t// We want to add this spotterid\n } elseif ($updatelist[$nwl] == 2) {\n $updatelist[$nwl] = 5;\t\t\t\t\t\t// SpotterID is on the list already, dont remove it\n } elseif ($updatelist[$nwl] == 3) {\n if ($idtype == 1) {\n $updatelist[$nwl] = 4;\t\t\t\t\t// Spotterid is on another kind of list, change the idtype\n } else {\n $updskipped++;\t\t\t\t\t\t\t// Spotter is already on the list, dont remove it\n $updatelist[$nwl] = 5;\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t// double spotterid in xxxxxlist.txt.\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t\t// Spotterid did not pass the sanity check\n }\n }\n $updlist = array_keys($updatelist);\n $this->_conn->beginTransaction();\n foreach ($updlist as $updl) {\n if ($updatelist[$updl] == 1) {\n // Add new spotterid's to the list\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"INSERT INTO spotteridblacklist (spotterid,ouruserid,idtype,origin) VALUES (:spotterid, '-1', :idtype,'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 2) {\n // Remove spotters which aren't on the list\n $countdellistspotterid++;\n $this->_conn->modify(\n \"DELETE FROM spotteridblacklist WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 4) {\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"UPDATE spotteridblacklist SET idtype = 1 WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = (idtype = :idtype) WHERE spotterid = :spotterid AND ouruserid != -1 ',\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } // elseif\n } // foreach\n $this->_conn->commit();\n\n return ['added' => $countnewlistspotterid,\n 'removed' => $countdellistspotterid,\n 'skipped' => $updskipped,\n 'total' => count($newlist), ];\n }", "function decodeList($list);", "public function add($listid\t= NULL)\r\r\n\t{\r\r\n\t\tif($listid)\r\r\n\t\t{\r\r\n\t\t\t$this->_data['single_list']\t=\t$this->listing->get_single_record($listid);\t\r\r\n\t\t}\r\r\n\t\tif($this->input->post())\r\r\n\t\t{\r\r\n\t\t\t\r\r\n\t\t\t$data\t\t=\t$this->input->post();\r\r\n\t\t\t\r\r\n\t\t\t// UNSET ARRAY key\r\r\n\t\t\tunset($data['submit']);\r\r\n\t\t\t\r\r\n\t\t\tif($this->input->post('list_id'))\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->update_list($this->input->post('list_id'),$data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم تحديث تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t\t\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->add_list($data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم إضافة تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\tif($listid)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t$listid;\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t'';\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t$this->load->view('add', $this->_data);\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "public function getRootListItemID($pm_list_name_or_id=null) {\n\t\tif($pm_list_name_or_id) {\n\t\t\t$vn_list_id = $this->_getListID($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$vn_list_id = $this->getPrimaryKey();\n\t\t}\n\t\tif (!$vn_list_id) { return null; }\n\t\t\n\t\t$t_items = new ca_list_items();\n\t\t$t_items->load(array('list_id' => $vn_list_id, 'parent_id' => null));\n\t\t\n\t\treturn $t_items->getPrimaryKey();\n\t}", "public function model_id_list()\r\n {\r\n $this->set_error(\"MBE-\".$this->model_code.\"-MIL-1\", \r\n \"Internal error, please contact admin\", \r\n \"Missing model_id_list API for this model \".$this->model_name);\r\n $model_id_list = array();\r\n /*\r\n $model_id_list = array (\r\n array(\r\n \"table\" => \"dummy_table\", \r\n \"editable\" => false,\r\n \"id_column\" => \"dummy_id\",\r\n \"data_column\" => array(\r\n array(\"data\" => \"dummy_name\", \"column\" => \"dummy_column\"),\r\n ),\r\n ),\r\n );\r\n */\r\n return $model_id_list;\r\n }", "public function destroyList($id)\n\t{\n\t\tDB::table('list_items')->where('list_id', $id)->delete();\n\t\tDB::table('lists')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function edit(UserList $list)\n {\n \n }", "public function listId()\n {\n return $this->contractor->all()->pluck('id')->all();\n }", "public function syncToRemote($list_id);", "public function destroyListItem($id)\n\t{\n\t\tDB::table('list_items')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function saveList($list, &$m_order = 0)\n {\n foreach ($list as $item) {\n $m_order++;\n $this->updateOrder($m_order, $item['id']);\n }\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "function privList(&$p_list)\n {\n }", "public function setListID($ListID)\n\t{\n\t\treturn $this->set('ListID', $ListID);\n\t}", "function get_list($listid)\n\t{\n\t\t$xml = $this->load_url(\"lists/$listid\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t$list = false;\n\t\t$_list = (isset($xml['entry'])) ? $xml['entry'] : false;\n\n\t\t// parse into nicer array\n\t\tif(is_array($_list)):\n\t\t\t$id = $this->get_id_from_link($_list['link_attr']['href']);\n\n\t\t\t$list = array(\n\t\t\t\t'id' => $id,\n\t\t\t\t'Name' => $_list['content']['ContactList']['Name'],\n\t\t\t\t'ShortName' => $_list['content']['ContactList']['ShortName'],\n\t\t\t\t'OptInDefault' => $_list['content']['ContactList']['OptInDefault'],\n\t\t\t\t'SortOrder' => $_list['content']['ContactList']['SortOrder'],\n\t\t\t);\n\t\tendif;\n\n\t\treturn $list;\n\t}", "public function listId() {\n\t\treturn $this->employee->get()->pluck('id')->all();\n\t}", "public function getIdMaillist($instance=false){\n if ($instance && !is_object($this->_data['id_maillist'])){\n $this->setIdMaillist('',array('required'=>false));\n }\n return $this->_data['id_maillist'];\n }", "function SetBidList(&$list)\n\t{\n\t\t$this->_bidList = array();\n\t\t$existingBidList = $this->GetBidList();\n\t\tforeach ($existingBidList as $bid)\n\t\t{\n\t\t\t$bid->supplierId = '';\n\t\t\t$bid->Save(false);\n\t\t}\n\t\t$this->_bidList = $list;\n\t}", "abstract protected function displayList($list);", "public function followup_lists($l_id)\n {\n \n $result = $this->db->query(\"call lead_followup_lists('\".$l_id.\"')\")->result_array();\n save_query_in_log();\n \n return $result;\n }", "public function setList($list)\n {\n if (is_string($list)) {\n htmlspecialchars($list);\n $this->_list = $list;\n }\n }", "public function loadTagsByList($listId = array()) {\n $tmpTags = array ();\n $query = \"SELECT dct.* FROM [|PREFIX|]dynamic_content_tags dct, [|PREFIX|]list_tags dcl \";\n if (is_array($listId) && sizeof($listId)) {\n $query .= \" WHERE dct.tagid = dcl.tagid AND dcl.listid in ('\".implode($listId, \"','\").\"')\";\n }\n\n $result = $this->db->Query ( $query );\n while ( $row = $this->db->Fetch ( $result ) ) {\n $tmpTags [] = new DynamicContentTag_Api_Tag ( $row ['tagid'], $row ['name'], $row ['createdate'], $row ['ownerid'], array (), array () );\n }\n $this->setTags ( $tmpTags );\n }", "public function listIdOfListCompanyAndListStaff($listCompanyId, $listStaffId = null)\n {\n $hFunction = new \\Hfunction();\n if ($hFunction->checkEmpty($listStaffId)) {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->pluck('work_id');\n } else {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->whereIn('staff_id', $listStaffId)->pluck('work_id');\n }\n\n }", "public function getSimpleList($ids=''){\n\n\n }", "function showid(){\n $sql=\"SElECT * From article ORDER BY id DESC LIMIT 1 \";\n $db = config::getConnexion();\n try{\n $list=$db->query($sql);\n return $list;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "function getItemsOfList($listID) {\n\t\tglobal $dbh;\n $stmt = $dbh->prepare('SELECT itemID, content, image, checked\n\t\t\t \t\t\t\t\tFROM ITEM WHERE listID = ?');\n\t\t$stmt->execute(array($listID));\n\t\treturn $stmt->fetchAll();\n\t}", "public function editList($id)\n\t{\n\t\t$edit = \"list\";\n\t\t$list = DB::table('lists')->where('id', $id)\n\t\t->get();\n\n\t\treturn view('edit', compact(\"list\", \"edit\"));\n\t}", "public function removeList(array $list): void\n {\n foreach ($list as $id) {\n $this->remove($id);\n }\n }", "public function do_delete_record()\n {\n $v_list_delete = get_post_var('hdn_item_id_list','');\n $this->model->do_delete_record($v_list_delete);\n }", "static function getListCode($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_code_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_code_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (!is_numeric($pm_list_name_or_id)) {\n\t\t\treturn $pm_list_name_or_id;\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load((int)$pm_list_name_or_id)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t\t$vs_list_code = $t_list->get('list_code');\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_code_cache[$vn_list_id] = $vs_list_code;\n\t}", "private function listsDetails(){\n\t\t\t$idRecepcion = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRecepcion!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRecepcion))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('recepcionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function update_tel_list_name() {\n\t\tif (empty($this->data) || empty($this->data['callListId']) || empty($this->data['listName'])) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\t\t$list_name = $this->data['listName'];\n\t\t$call_list_id = $this->data['callListId'];\n\t\t$item_main = $this->data['item_main'];\n\n\t\t$info_list = $this->T16InboundCallList->getListInfoById($call_list_id);\n\t\tif (!isset($info_list[\"T16InboundCallList\"][\"id\"]) || empty($info_list[\"T16InboundCallList\"][\"id\"])) {\n\t\t\techo \"err_not_exist\";\n\t\t\texit;\n\t\t}\n\t\t$check_lock = $this->T92Lock->getInfoLock('inbound_call_list', $this->ESession->getCallListId($this));\n\t\tif (!empty($check_lock)) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$lock_new = $this->create_lock('inbound_call_list', $this->ESession->getCallListId($this), __FUNCTION__);\n\t\tif (!$lock_new) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\tif ($this->data['listTestFlag'] == 'true') {\n\t\t\t$list_test_flag = 1;\n\t\t} else {\n\t\t\t$list_test_flag = 0;\n\t\t}\n\n\t\t//Save data to DB\n\t\t$dsT16InboundCallList = $this->T16InboundCallList->getDataSource();\n\t\t$dsT16InboundCallList->begin($this);\n\n\t\t$data_call_list['T16InboundCallList']['id'] = $call_list_id;\n\t\t$data_call_list['T16InboundCallList']['list_name'] = $list_name;\n\t\t$data_call_list['T16InboundCallList']['item_main'] = $item_main;\n\t\t$data_call_list['T16InboundCallList']['list_test_flag'] = $list_test_flag;\n\t\t$data_call_list['T16InboundCallList']['update_user'] = $this->ESession->getUserId($this);\n\t\t$data_call_list['T16InboundCallList']['update_program'] = $this->name.'_'.__FUNCTION__;\n\n\t\t$call_list = $this->T16InboundCallList->save($data_call_list['T16InboundCallList']);\n\n\t\tif(!$call_list || (isset($lock_new) && !empty($lock_new) && !$this->update_lock($lock_new, __FUNCTION__))){\n\t\t\t$dsT16InboundCallList->rollback($this);\n\t\t\t$this->log(\"発信規制番号登録:失敗\");\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$dsT16InboundCallList->commit($this);\n\t\t$results = Array();\n\t\t$results['status'] = 'save';\n\t\t$item_column = $this->T13InboundListItem->getColumnListByItemName($call_list_id, $item_main);\n\t\t$item_column = $item_column['T13InboundListItem']['column'];\n\t\t$results['item_column'] = $item_column;\n\t\techo json_encode($results);\n\t\texit;\n\t}", "public function show_list($p_obj_id)\n {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id__master, isys_catg_relation_list__isys_obj__id__slave, obj.isys_obj__isys_obj_type__id, obj.isys_obj__title AS title\n FROM isys_catg_relation_list\n INNER JOIN isys_obj AS obj ON isys_catg_relation_list__isys_obj__id__slave = obj.isys_obj__id\n INNER JOIN isys_obj AS relObj ON isys_catg_relation_list__isys_obj__id = relObj.isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND obj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND relObj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id__slave ';\n\n $l_res = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row = $l_res->get_row()) {\n if ($l_row[\"isys_catg_relation_list__isys_obj__id__master\"] == $p_obj_id &&\n (is_null($this->m_obj_arr) || !in_array($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $this->m_obj_arr))) {\n if ($l_row[\"isys_obj__isys_obj_type__id\"] == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n $this->m_its_arr[$l_row[\"isys_catg_relation_list__isys_obj__id__slave\"]] = $l_row[\"title\"];\n }\n\n if (in_array($this->m_dao_rel->get_objTypeID($l_row['isys_catg_relation_list__isys_obj__id__slave']), $this->m_software_obj_types)) {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id\n FROM isys_catg_relation_list\n INNER JOIN isys_obj ON isys_obj__id = isys_catg_relation_list__isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND isys_catg_relation_list__isys_obj__id__slave = ' . $this->m_dao_rel->convert_sql_id($l_row['isys_catg_relation_list__isys_obj__id__slave']) . '\n AND isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id';\n\n $l_res_app = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row_app = $l_res_app->get_row()) {\n $l_its_data = $this->m_dao_its_comp\n ->get_data(null, null, \"AND isys_connection__isys_obj__id = \" . $this->m_dao_rel->convert_sql_id($l_row_app[\"isys_catg_relation_list__isys_obj__id\"]), null, C__RECORD_STATUS__NORMAL)\n ->get_row();\n\n // Check in it service components\n if (isset($l_its_data['isys_obj__id']) &&\n $this->m_dao_rel->get_objTypeID($l_its_data['isys_obj__id']) == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n if (!array_key_exists($l_its_data['isys_obj__id'], $this->m_its_arr)) {\n $this->m_its_arr[$l_its_data['isys_obj__id']] = $l_its_data['isys_obj__title'];\n }\n }\n }\n }\n\n $this->m_obj_arr[] = $l_row[\"isys_catg_relation_list__isys_obj__id__slave\"];\n $this->new_recurse_relation($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $p_obj_id);\n unset($this->m_obj_arr);\n }\n }\n\n return $this;\n }", "function delete_list( $ids = array()) {\n \t\t\n \t\t// where clause\n\t\t$this->db->where_in( $this->primary_key, $id );\n\n\t\t// delete the record\n\t\treturn $this->db->delete( $this->table_name );\n \t}", "function initPidList() {\n\t\t// pidList is the pid/list of pids from where to fetch the news items.\n\t\t$pidList = $this->conf['pidList'];\n\t\t$pidList = $pidList ? implode(t3lib_div::intExplode(',', $pidList), ',') : $GLOBALS['TSFE']->id;\n\t\t$recursive = $this->conf['recursive'];\n\n\t\t// extend the pid_list by recursive levels\n\t\t$this->pidList = $this->pi_getPidList($pidList, $recursive);\n\t\t$this->pidList = $this->pidList ? $this->pidList : 0;\n\t\tif (!$this->pidList) {\n\t\t\t$this->errors[] = 'No pidList defined';\n\t\t}\n\t}", "private function listsDetails(){\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRemision!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRemision))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new TurnosG($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n }\n \n }", "function SetWeddingList(&$list)\n\t{\n\t\t$this->_weddingList = array();\n\t\t$existingWeddingList = $this->GetWeddingList();\n\t\tforeach ($existingWeddingList as $wedding)\n\t\t{\n\t\t\t$wedding->supplierId = '';\n\t\t\t$wedding->Save(false);\n\t\t}\n\t\t$this->_weddingList = $list;\n\t}", "function get_Parent_list($result, $parent_list){\n\t\tglobal $parent_list;\n\t\tif($result){\n\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t\t$parent_list[]=$row[0];\n\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'pages.pid',\t\t\t \t\t\t\t\t\t\t// SELECT ...\n\t\t\t\t'pages',\t\t\t\t\t\t\t\t\t// FROM ...\n\t\t\t\t'pages.uid = '.$row[0].\n\t\t\t\t$this->cObj->enableFields('pages'),\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// GROUP BY...\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// ORDER BY...\n\t\t\t\t'' \t\t\t\t\t\t\t\t\t\t\t// LIMIT to 10 rows, starting with number 5 (MySQL compat.)\n\t\t\t\t);\n\t\t\t$this->get_parent_list($res2, $liste);\n\t\t\t}\n\t\t}\n\t\treturn $parent_list;\n\t}", "public function concatPostIdList($list)\n {\n $param = null;\n\n foreach ($list as $item) {\n $param = $param . ', ' . $item;\n }\n\n return trim($param, ', ');\n }", "function adiHijo($lista) {\n\t\t$this->listas[] = $lista;\n\t}", "public function setList(string $a_list) : void\n {\n $list = explode(\",\", $a_list);\n $accounts = array();\n foreach ($list as $l) {\n if (ilObjUser::_lookupId(trim($l)) > 0) {\n $accounts[] = trim($l);\n }\n }\n\n $this->set(\"email_recipient\", implode(\",\", $accounts));\n }", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "public function delete_from_aweber_list($post_data = array(),$list_id = null ){\n\n \t\t$aweber = new AWeberAPI($this->aweber_consumerKey, $this->aweber_consumerSecret);\n // dd($aweber);\n\n\t\ttry {\n\n\t\t $account = $aweber->getAccount($this->aweber_accessKey , $this->aweber_accessSecret);\n\t\t $lists = $account->lists->find(array('name' => $list_id));\n\t\t $list = $lists[0];\n\n\t\t # lets create some custom fields on your list!\n\t\t $custom_fields = $list->custom_fields;\n\t\t $params = array(\n\t\t 'email' => $post_data['email']\n\n\t\t );\n\n\t\t $subscribers = $list->subscribers;\n\t\t $found_subscribers = $subscribers->find($params);\n\t\t foreach ($found_subscribers as $subscriber) {\n\t\t $subscriber->delete();\n\t\t }\n\n\t\t # success!\n\t\t //print \"A new subscriber was added to the $list->name list!\";\n\t\t return true;\n\n\t\t} catch(AWeberAPIException $exc) {\n\t\t return false;\n\t\t}\n\n}", "function update_palabra_catalogador_tmp($id_palabra,$PickList) {\t\n\t\t\n\t\t$qDelete = \"DELETE FROM palabra_subtema_tmp WHERE id_palabra='$id_palabra'\";\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result3 = mysql_query($qDelete,$connection); \n\t\t\n\t\t\tif (isset($PickList)) {\n \t\t\t\tforeach ($PickList as $indice=>$valor){ \n\t\t\t\t\t$subtema=$this->datos_subtema_tmp($valor);\n\t\t\t\t\t$id_tema=$subtema['id_tema'];\n\t\t\t\t\t$ssql2= \"INSERT INTO palabra_subtema_tmp (id_palabra, id_subtema, tema_id) \n\t\t\t\t\t\t\tVALUES ('$id_palabra','$valor','$id_tema')\";\n\t\t\t\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\t\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\t\t\t$result2 = mysql_query($ssql2,$connection); \n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tmysql_close($connection);\n\t\t\t\t\t\n\t}", "public function delete_lists($id){\n\t\t$this->db->where(array(\n\t\t\t'pi_percentage_id'\t\t=>\t$id\n\t\t));\t\t\n\t\t$query = $this->db->get(\"payroll_pagibig_percentage_table\");\n\t\treturn $query->row();\n\t}", "public function genListId(){\n $id = $this->genRandNum(10);\n $IdExists = Group::find($id); \n if($IdExists){\n return $this->genListId();\n }\n return $id;\n }", "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new tipdocontrol($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "public abstract function get_ids();", "protected function setListIndexKey(): void\n {\n $this->listIndexKey = $this->index . (empty($this->indexType)\n ? self::LIST_INDEX_GLUE\n : (self::LIST_INDEX_GLUE . $this->indexType . self::LIST_INDEX_GLUE));\n }" ]
[ "0.72769886", "0.7192766", "0.7079907", "0.6909959", "0.6727917", "0.6645016", "0.65416956", "0.65117097", "0.6484189", "0.643304", "0.6428332", "0.63778234", "0.63006103", "0.62822294", "0.62752384", "0.62315196", "0.618643", "0.61593527", "0.6140391", "0.6136385", "0.60946995", "0.60387605", "0.59765726", "0.5972693", "0.59039056", "0.58725363", "0.5870673", "0.58362234", "0.57863075", "0.5785834", "0.575533", "0.5753841", "0.57063043", "0.56918794", "0.5676606", "0.56700534", "0.5657961", "0.565238", "0.56494254", "0.56422985", "0.5621286", "0.5586094", "0.5577793", "0.5557137", "0.5541417", "0.5535013", "0.55337864", "0.5503949", "0.5500848", "0.54948664", "0.54932237", "0.54827774", "0.5467765", "0.5465709", "0.5459328", "0.5454742", "0.5450269", "0.54455274", "0.54437745", "0.5440754", "0.5431254", "0.5429986", "0.54286003", "0.5425308", "0.54151964", "0.53996205", "0.53673565", "0.53466797", "0.5344463", "0.53440386", "0.53347623", "0.5333222", "0.53311807", "0.53219146", "0.53154755", "0.5313884", "0.5309701", "0.5304809", "0.5295092", "0.5290556", "0.5290343", "0.5283572", "0.52807057", "0.52753186", "0.52745694", "0.5251347", "0.52460945", "0.52419114", "0.52370226", "0.52325875", "0.5232158", "0.52320427", "0.52298146", "0.5217599", "0.5215235", "0.5213492", "0.52120084", "0.5208033", "0.5207898", "0.52077734" ]
0.53763604
66
trouver le id de list dans list_list
function supp_element_list($supp, $list){ $lid = get_id($list); //supprimer if ($lid!=-1){ $SQL = "DELETE FROM element_list WHERE element = '$supp' and list='$lid'"; global $db; $res = $db->prepare($SQL); $res->execute(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_id()\n\t{\n\t\treturn $this->list;\n\t}", "public function getListId();", "public abstract static function getListID();", "protected function IdUserListReproduction ()\n {\n $lista = Model_listas::find('all', array\n (\n 'where' => array\n (\n array('id_usuario'=>$this->userID()),\n array('titulo'=>'reproducidas')\n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n } \n return $id; \n }\n }", "function wp_parse_id_list($input_list)\n {\n }", "public function getListID()\n\t{\n\t\treturn $this->get('ListID');\n\t}", "public function getId()\n {\n return $this->_list->getId();\n }", "static function getListID($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_id_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (is_numeric($pm_list_name_or_id)) {\n\t\t\t$vn_list_id = intval($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load(array('list_code' => $pm_list_name_or_id))) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id] = $vn_list_id;\n\t}", "function supp_list($list){\n $lid = get_id($list);\n //supp\n if ($lid!=-1){\n //supprimer element de la liste\n\t$SQL = \"DELETE FROM element_list WHERE list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n //supprimer list\n \t$SQL = \"DELETE FROM list_list WHERE list='$list'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute(); }\n}", "public abstract function get_default_list_id();", "public function sanitize_list_id( $maybe_list_id = '' ) {\n if ( ! $maybe_list_id ) {\n return $this->get_site_list_id();\n }\n $lists = $this->get_lists();\n foreach ( $lists->lists as $list ) {\n if ( ! $list || ! isset( $list->id ) ) {\n continue;\n }\n if ( $maybe_list_id == $list->id || $maybe_list_id == $list->name ) {\n return $list->id;\n }\n }\n\n return $maybe_list_id;\n }", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "protected function getListId($strList)\n\t{\n\n\t\t$arrLists = $this->api->lists();\n\t\tforeach($arrLists['data'] as $list)\n\t\t{\n\t\t\tif ($list['name']==$strList)\n\t\t\t\treturn $list['id'];\n\t\t}\n\t\treturn null;\n\n\t}", "function set_list_id($list_id) {\n $this->_subscribers_base_route = $this->_base_route.'subscribers/'.$list_id;\n }", "protected function idNameList($nombreLista)\n {\n $lista = Model_Listas::find('all', array\n (\n 'where' => array\n (\n array('titulo'=>$nombreLista) \n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n }\n return $id; \n }\n }", "function _list($lp_n, $a, $p){\r\n global $conn; // Jadikan global\r\n \r\n // Buat sql untuk cek apakah row sudah ada atau belum\r\n $sql = \"SELECT * FROM data_list WHERE id_sntr = $a AND nama_lprn = '$lp_n'\";\r\n $cek = mysqli_num_rows( mysqli_query($conn, $sql) );\r\n\r\n // Dapatkan id dari row yang diinginkan\r\n $id_list = mysqli_fetch_assoc(mysqli_query($conn, $sql))[\"id_list\"];\r\n\r\n // Cek ttd_pembina diceklis atau tidak\r\n if ( $p === \"0000-00-00 00:00:00\" ) {\r\n // Jika tidak diceklism, hapus row lama atau biarkan\r\n $sql = \"DELETE FROM data_list WHERE id_list = $id_list\";\r\n } else {\r\n // Jiak diceklis, cek apakah row sudah ada atau belum\r\n if ( $cek > 0 ) {\r\n // Jika sudah ada maka update row dengan data baru\r\n $sql = \"UPDATE data_list SET\r\n id_list = $id_list,\r\n id_sntr = $a,\r\n nama_lprn = '$lp_n',\r\n wktu_lprn = '$p'\r\n WHERE id_list = $id_list\";\r\n } else {\r\n // Jika belum, buat row baru dan masukkan data \r\n $sql = \"INSERT INTO data_list (id_list, id_sntr, nama_lprn, wktu_lprn)\r\n VALUE ('', $a, '$lp_n', '$p')\";\r\n }\r\n }\r\n\r\n // Ambil data sql dan update\r\n mysqli_query($conn, $sql);\r\n}", "private function _setListId()\r\n { \r\n if (Mage::getSingleton('admin/session')->isLoggedIn()) {\r\n $storeId = Mage::app()->getRequest()->getParam('store_id');\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId', $storeId); \r\n } else {\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId');\r\n }\r\n }", "function list_get($id) {\n\n //$id = $this->get('id');\n\n if (!$id) {\n\n $this->response(\"No item ID specified!\", 400);\n\n exit;\n }\n\n $list = $this->List_model->getListById($id);\n\n if ($list) {\n\n //$list = $this->appendItems($list);\n //Put owner's name instead of user ID\n //$list['owner'] = $this->User_model->getName($list['owner'])['name'];\n unset($list['owner']);\n\n $this->response($list, 200);\n\n exit;\n } else {\n\n $this->response(\"Invalid ID\", 404);\n\n exit;\n }\n }", "public function loadListItemsByListId() {\n $sql = \"SELECT ListText, ListItemID, ListItemColor, ListItemDone\"\n FROM list_items\n WHERE ListID=(\n SELECT ListID\n FROM lists\n WHERE ListURL=:list\n )\n ORDER BY ListItemPosition\";\n if($stmt = $this->_db->prepare($sql)) {\n $stmt->bindParam(':list', $_GET['list'], PDO::PARAM_STR);\n $stmt->execute();\n $order = 1;\n while($row = $stmt->fetch()) {\n echo $this->formatListItems($row, $order);\n $order;\n }\n $stmt->closeCursor();\n }\n else {\n echo \"<li> Something went wrong. \", $db->error, \"</li>\";\n }", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d = New AlbumTable($this->dbAdapter); \n // bucar id de parametro\n $datos = $d->getGeneral1(\"select idTdoc from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n $d->modGeneral(\"delete from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'i/'.$datos['idTdoc']);\n } \n }", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d=new AlbumTable($this->dbAdapter);\n\n $d->modGeneral(\"delete from a_empleados_rete_d where idEret=\".$id); \n $d->modGeneral(\"delete from a_empleados_rete where id=\".$id); \n //$u=new Retefuente($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n //$u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "protected function prepareTemplateToList($list)\n {\n return $list;\n }", "function add_element_list($newlist, $l, $username, $description, $ecolor, $priority, $creation){\n $l_id = get_id($l);\n $uid = get_userid($username);\n //insÚrer\n if ($l_id!=-1){\n \t$SQL = \"INSERT INTO element_list VALUES (DEFAULT,'$l_id',$uid,'$newlist', '$description', $ecolor, $priority, $creation, $creation, 0)\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "function checkIDList($table, $fixedQuery, &$IDList)\n{\n\tglobal $sitePosition;\n\n\t$IDs = array();\n\t$rs = query('Select `ID` from `' . $sitePosition . '.' . $table . '` where ' . ($fixedQuery != '' ? ('(' . $fixedQuery . ') and ') : '') . '`ID` in (' . $IDList . ')', false);\n\twhile(true)\n\t{\n\t\t$rsInfo = fetchRow($rs);\n\t\tif($rsInfo === null) break;\n\t\t$IDs[] = $rsInfo[0];\n\t}\n\tfreeResult($rs);\n\t$IDList = implode(',', $IDs);\n}", "public function remove_list_from_table($list){\n\t\t$query = \"DELETE * FROM \" . $this->table . \" WHERE \" . $this->column_name . \"=\";\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function __construct($listId, $list)\n\t{\n\t\t$this->listId = $listId;\n\t\t$this->list = $list;\n\t}", "function candidatosXLista($id){\n\t\t $sql = \"SELECT C.idlista, L.nombrelista,nombrecandidato, apellidocandidato, cargocandidato, imagencandidato\n\t\t FROM candidato C LEFT JOIN LISTA L ON C.idlista = L.idlista\n\t\t WHERE C.idlista = \".$id.\"order by cargocandidato ASC ;\";\n\t\treturn $sql;\n\t }", "public function dissociateList(Request $request, $id, $list)\n {\n $person = $this->modelPath::findOrFail($id);\n\n $person->retractListById($list);\n\n $this->notify('lists.dissociated');\n\n return redirect()->back();\n }", "public function get_site_list_id() {\n $list = $this->get_site_list();\n if ( isset( $list->id ) ) {\n return $list->id;\n }\n return false;\n }", "function update_list( $id, $name, $can_delete, $items )\n\t{\n\t\t$this->db->set('name', $name );\n if( $can_delete !== NULL ) {\n $this->db->set('can_delete', $can_delete );\n } \n $this->db->where( 'id', $id );\n\t\t$this->db->update('lists');\n\t\t\n // Save the list items\n\t\t$this->db->where( 'list_id', $id );\n\t\t$this->db->delete( 'list_items' );\n\t\tfor( $i = 0; $i < count($items); $i++ ) {\n $this->db->set('list_id', $id );\n $this->db->set('data_id', $items[$i]['id']);\n\t\t\t$this->db->set('title', $items[$i]['title']);\n\t\t\t$this->db->set('type', $items[$i]['type']);\n\t\t\t$this->db->set('sort_order', $i + 1);\n\t\t\t$this->db->insert('list_items');\n }\n\t}", "public function listId() {\n\t\treturn $this->academic_session->all()->pluck('id')->all();\n\t}", "public function getWishlistId();", "function is_in_elementlist($element, $l){\n $l_id = get_id($l);\n //trouver\n if ($l_id == -1) return false;\n else {\n $SQL = \"SELECT * FROM element_list WHERE element = '$element' and list='$l_id'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n \tif($res->rowCount() == 0) return false;\n \telse return true;\n }\n}", "public static function getGatewayListID(){\n $row = Gateway::where(array('Status'=>1))->lists('Title', 'GatewayID');\n if(!empty($row)){\n $row = array(\"\"=> \"Select a Gateway\")+$row;\n }\n return $row;\n }", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "public function add_list_to_table($list){\n\t\t$query = \"SELECT $this->column_name FROM \" . $this->table;\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function listIdOfListStaffId($listStaffId)\n {\n return QcCompanyStaffWork::whereIn('staff_id', $listStaffId)->pluck('work_id');\n }", "protected function carregarListaOneToMany($object_list,$addParametros) {\n $query = \"SELECT id FROM \".get_class($object_list).\" WHERE id\".get_class($this).\"=$this->id $addParametros\";\n return bd::executeSqlParaArraySimples($query);\n }", "public function testGetListOfSpecificIds()\n {\n $itemIds = [];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n\n $search = 'ids:'.implode(',', $itemIds);\n\n $response = $this->api->getList($search);\n $this->assertErrors($response);\n $this->assertEquals(count($itemIds), $response['total']);\n\n foreach ($response['lists'] as $item) {\n $this->assertTrue(in_array($item['id'], $itemIds));\n $this->api->delete($item['id']);\n $this->assertErrors($response);\n }\n }", "public function edit($id,$list_id)\n {\n if (Gate::allows('isadmin')){\n $menu = Menu::find($id);\n $status = $menu->listts->where('id',$list_id)->all();\n $menu = Menu::find($id)->name;\n if (count($status)>0){\n $list = Listt::find($list_id);\n return view('dashboard.editlist',compact('list','menu'));\n }\n }\n abort(404);\n }", "public function getMultipleWishlistId();", "private function getTargetListId($list_id) {\n $where = array(\n 'equals' => array(\n 'mailchimp_list' => $list_id\n )\n );\n $result = $this->runSugarQuery('ProspectLists', array('id'), $where, 1);\n if($result) {\n return $result[0]['id'];\n }\n return false;\n }", "public function delete_list($val){\n if(get_instance()->ecl('Instance')->mod('lists', 'delete_list', [get_instance()->ecl('Instance')->user(),$val])) {\n echo 1;\n } else {\n echo 0;\n }\n }", "static function get_ids_from_list ($list_video_ids){\r\n\r\n if(empty($list_video_ids)){\r\n return;\r\n }\r\n\r\n $buffy = array();\r\n\r\n //this is needed because we could have more space between each movie id\r\n $remove_spaces = trim(str_replace(array('&nbsp;', ' '),array(''), htmlentities($list_video_ids, ENT_QUOTES)));\r\n\r\n if(!empty($remove_spaces)) {\r\n\r\n $video_id_explode = explode(',', $remove_spaces);\r\n $video_id_explode_map = array_map('trim',$video_id_explode);//extra trim just in case\r\n\r\n //make an array of video id's'\r\n foreach($video_id_explode_map as $video_id) {\r\n $trim_video_id = trim($video_id);\r\n\r\n //check to prevent duplicates id's\r\n if (!in_array($trim_video_id, $buffy)) {\r\n $buffy[] = $trim_video_id;\r\n }\r\n }\r\n }\r\n\r\n return $buffy;\r\n }", "public function listing()\n\t{\n\n if(isset($_POST['dosubmit']) && $_POST['dosubmit']=='删除'){\n if( empty($_POST['id']) ){\n $this->error(L('请选择要删除的数据!'));\n }\n\n if(is_array($_POST['id'])){\n $ids = $_POST['id'];\n $in = implode(\",\",$_POST['id']);\n }else{\n $ids[] = $_POST['id'];\n $in = $_POST['id'];\n }\n\n //删除连带数据\n\n //删除自身数据\n $contactMod = M('contact');\n $sql=\" id in (\".$in.\") \";\n $contactMod->where($sql)->delete();\n\n $this->success('删除成功', U('contact/listing'));\n exit;\n }\n \n\n\n /// 载入 lk_cunction. (使用其 LkHTML::ListSort 函数)\n load(\"@.lk_function\");\n\n\t\t///列表过滤\n\t\t$sqlWhere = \"status < 250\";\n\t\t//$sqlWhere .= \" and mobile!='' and score_jia!='' and wx_headpic_path!='' \";\n\t\t//$sqlWhere .= \" and is_prize>=0 and openid!='' \";\n\t\t//$sqlWhere .= \" and user_id_crm!='' \";\n\t\t$sqlOrder = \" id DESC\";\n\t\t\n\t\t//$sqlWhere .= \" and (headpic!='' or voice!='') and mobile!='' \";\n\t\t\n\t\t\n\t\t$s_time=time()-(SHENHE_CROSS_TIME*3600); //超过4小时自动审核通过\n\t\t\n\t\t\n\n\t\t$filter_role = $this->REQUEST('_filter_role');\n\t\tif( $filter_role != '' ){\n\t\t\t$sqlWhere .= \" and role = '\". $this->fixSQL($filter_role).\"' \";\n\t\t}\n\n\t\t$filter_state = $this->REQUEST('_filter_state');\n\t\tif( $filter_state != '' ){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif ($filter_state=='0'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" \";\n\t\t\t}\n\t\t\tif ($filter_state=='1'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time<'\".$s_time.\"' \";\n\t\t\t}\n\t\t\tif ($filter_state=='1_4h'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time>='\".$s_time.\"' \";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n \n //新搜索\n $f_search = $this->REQUEST('_f_search');\n $filter_fieldname = $this->REQUEST('_filter_fieldname');\n\t\tif( $f_search != '' ){\n\t\t\tif($filter_fieldname=='realname'){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='mobile'){\n\t\t\t\t$sqlWhere .= \" and (mobile like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='summary'){\n\t\t\t\t$sqlWhere .= \" and (summary like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\t//elseif($filter_fieldname=='wx_nickname'){\n\t\t\t//\t$sqlWhere .= \" and (wx_nickname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='openid'){\n\t\t\t//\t$sqlWhere .= \" and (openid like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='user_id_crm'){\n\t\t\t//\t$sqlWhere .= \" and (user_id_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='username_crm'){\n\t\t\t//\t$sqlWhere .= \" and (username_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='realname_crm'){\n\t\t\t//\t$sqlWhere .= \" and (realname_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='is_prize'){\n\t\t\t//\t$sqlWhere .= \" and (is_prize = '\". $this->fixSQL($f_search).\"') \";\n\t\t\t//}\n\t\t\telseif($filter_fieldname==''){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%' or mobile like '%\". $this->fixSQL($f_search).\"%' or summary like '%\". $this->fixSQL($f_search).\"%' )\";\n\t\t\t}\n\t\t\telse{\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$filter_starttime = $this->REQUEST('_filter_starttime');\n\t\t$filter_endtime = $this->REQUEST('_filter_endtime');\n\t\tif( $filter_starttime != '' ){\n\t\t\t$sql_starttime=strtotime($filter_starttime);\n\t\t\t$sqlWhere .= \" and create_time >= \". $sql_starttime.\" \";\n\t\t}\n\t\tif( $filter_endtime != '' ){\n\t\t\t$sql_endtime=strtotime($filter_endtime)+(24*3600);\n\t\t\t$sqlWhere .= \" and create_time < \". $sql_endtime.\" \";\n\t\t}\n\t\t\n\t\t\n\t\t//echo $sqlWhere;exit;\n\t\t\n\t\t\n\t\t\n\t\t\n\n $this->ModManager = M('contact');\n $f_order = $this->REQUEST('_f_order', 'modify_time');\n $fields = $this->ModManager->getDbFields();\n if( in_array($f_order, $fields) ){\n $sqlOrder = $f_order . ' ';\n }else{\n $sqlOrder = 'modify_time ';\n }\n \n $f_direc = strtoupper($this->REQUEST('_f_direc'));if($f_direc==\"\"){$f_direc='DESC';}\n if( $f_direc != 'DESC' ){\n $sqlOrder .= 'ASC';\n }else{\n $sqlOrder .= 'DESC';\n }\n \n $sqlOrder = ' id DESC ';\n \n //echo $sqlOrder;exit;\n\n\t\t///回传过滤条件\n\t\t$this->assign('filter_fieldname', $filter_fieldname);\n\t\t$this->assign('filter_starttime', $filter_starttime);\n\t\t$this->assign('filter_endtime', $filter_endtime);\n\n\n\n $this->assign('filter_role', $filter_role);\n $this->assign('filter_state', $filter_state);\n $this->assign('f_search', $f_search);\n $this->assign('f_order', $f_order);\n $this->assign('f_direc', $f_direc );\n\n\t\t///获取列表数据集\n\t\tif(isset($_POST['do_search']) && $_POST['do_search']==1){\n\t\t\t$paginglimit=1000000;\n\t\t}\n\t\telse{\n\t\t\t$paginglimit='';\n }\n //$rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, '', 'M');\n $rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, $paginglimit, 'M');\n //echo \"<pre>\";print_r($rst);exit;\n\t\t\n\t\t\n\t\t//过滤搜索条件\n\t\t//$UserinfoMod = M('user');\n\t\t\n //if(isset($rst['dataset'])){\n // foreach($rst['dataset'] as $k => $v){\n\t\t\t\t\n \t\t/*\n \t\t$user = $UserinfoMod->field('id,username,realname,point_total')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t$user=$user[0];\n \t\t\n \t\t$rst['dataset'][$k]['user_id'] = $user['id'];\n \t$rst['dataset'][$k]['username'] = $user['username'];\n $rst['dataset'][$k]['realname'] = $user['realname'];\n $rst['dataset'][$k]['point_total'] = $user['point_total'];\n */\n \n \n /*\n if($v['status']==0){\n \t$rst['dataset'][$k]['status_now']='审核拒绝';\n }\n if($v['status']==1){\n \tif($v['create_time']<$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核通过';\n \t}\n \tif($v['create_time']>=$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核中';\n \t}\n }\n */\n \n //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t//$user=$user[0];\n \t\t\n //\t\t$rst['dataset'][$k]['user_province'] = $user['province'];\n // \t$rst['dataset'][$k]['user_city'] = $user['city'];\n \n \n \n // }\n // $this->assign('dataset', $rst['dataset']);// 赋值数据集\n //}\n //echo \"<pre>\";print_r($rst['dataset']);exit;\n\t\t\n\t\t$this->assign('dataset', $rst['dataset']);// 赋值数据集\n\t\t\n\t\t\n\t\t\n if(isset($_POST['do_search']) && $_POST['do_search']==1){\n \t//echo \"export\";exit;\n \t\n \t$toShow['banner']=$rst['dataset'];\n \t\n\t $start=0;\n\t $pagenum=1000000;\n\n\t $downloadfilename='ExportData.csv';\n\t $output=\"\";\n\t $expstr=\"\\t\";\n\t $expenter=\"\\t\\n\";\n\t $output .= \"流水ID编号\"\n \t.$expstr.\"提交时间\"\n .$expstr.\"姓名\"\n .$expstr.\"性别(1男2女)\"\n .$expstr.\"联系电话\"\n .$expstr.\"电子邮箱\"\n .$expstr.\"反馈标题\"\n .$expstr.\"反馈内容\"\n .$expenter;\n\n \t\n \t$UserinfoMod = M('user');\n \t\n\t if (!empty($toShow['banner'])){\n\t $k=0;\n\t do{\n\t \n\t $v=$toShow['banner'][$k];\n\t \n\t \n\t //if(isset($allProductList[$v['class_id']])){\n\t // $toShow['banner'][$k]['class_name']=$allProductList[$v['class_id']]['title'];\n\t //}\n\t //else{\n\t // $toShow['banner'][$k]['class_name']=\"\";\n\t //}\n\t \n\t \n\t \n\t //$myword=$toShow['banner'][$k]['myword'];\n\t //$myword=str_replace(\"\\r\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\r\",\"\",$myword);\n\t\t\t\t\t\n\t\t\t\t\t\n\t //if ($toShow['banner'][$k]['device']==\"0\"){\n\t // $device_show=\"PC端\";\n\t //}\n\t //if ($toShow['banner'][$k]['device']==\"1\"){\n\t // $device_show=\"手机端\";\n\t //}\n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/web_headpic/\".$v['headpic'];\n\t //$voice=empty($v['voice'])?\"\":BASE_URL_FRONT.\"/public/web_voice/\".$v['voice'];\n\t //$wx_headpic=empty($v['wx_headpic_path'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t /*\n\t if($v['status']==0){\n\t \t$status_now='审核拒绝';\n\t }\n\t if($v['status']==1){\n\t \tif($v['create_time']<$s_time){\n\t \t\t$status_now='审核通过';\n\t \t}\n\t \tif($v['create_time']>=$s_time){\n\t \t\t$status_now='审核中';\n\t \t}\n\t }\n\t */\n\t \n\t \n\t \n\t $summary=str_replace(\"\\r\\n\",\" [Enter] \",$toShow['banner'][$k]['summary']);\n\t $summary=str_replace(\"\\n\",\" [Enter] \",$summary);\n\t $summary=str_replace(\"\\r\",\"\",$summary);\n\t \n\t \n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n\t \t\t//$user=$user[0];\n\t \t\t\n\t\t \t//\t$user_province = $user['province'];\n\t\t //\t$user_city = $user['city'];\n\t \n\t \n\n\t $output .= $toShow['banner'][$k]['id']\n\t \t.$expstr.$toShow['banner'][$k]['addtime']\n\t \t.$expstr.$toShow['banner'][$k]['realname']\n\t \t.$expstr.$toShow['banner'][$k]['sex']\n\t \t.$expstr.$toShow['banner'][$k]['mobile']\n\t \t.$expstr.$toShow['banner'][$k]['email']\n\t \t.$expstr.$toShow['banner'][$k]['title']\n\t \t.$expstr.$summary\n\t .$expenter;\n\n\n\t $k=$k+1;\n\t }while($k<count($toShow['banner']));\n\t }\n\n\t $T_text=$output;\n\n\t\t\t//exit;\n\n\n\t\t\theader('Cache-control: private');\n\t header('Content-Disposition: attachment; filename='.$downloadfilename);\n\n\n\n\t//如果mb_convert_encoding函数存在则用此函数来转编码,前提是需要安装mbstring包\n\t if(function_exists('mb_convert_encoding')){\n\t header('Content-type: text/csv; charset=UTF-16LE');\n\t echo(chr(255).chr(254));\n\t echo(mb_convert_encoding($T_text,\"UTF-16LE\",\"UTF-8\"));\n\t }\n\t//如果iconv函数存在则用此函数来转编码\n\t elseif(function_exists('iconv')){\n\t header('Content-type: text/csv');\n\t echo(chr(255).chr(254));\n\t echo(iconv(\"UTF-8\",\"UTF-16LE\",$T_text));\n\t }\n\t//直接从utf-8转,这个貌似不灵...\n\t else{\n\t header('Content-type: text/csv; charset=UTF-8');\n\t echo(chr(239).chr(187).chr(191));\n\t echo($T_text);\n\t }\n\t exit;\n\t \n \n }\n\t\t\n\t\t\n\t\t$PageTitle = L('信息反馈列表');\n\t\t$PageMenu = array(\n\t\t\t//array( U('contact/create'), L('信息反馈') ),\n //array( U('contact/export'), L('导出信息反馈') ),\n\t\t);\n\t\t$this->setPagething( $PageTitle, $PageMenu, true);\n\t\t$this->display();\n\t}", "static public function getItemIDsFromList($pm_list_name_or_id, $pa_idnos, $pa_options=null) {\n\t\tif(isset($pa_options['dontIncludeSubItems']) && (!isset($pa_options['dont_include_sub_items']) || !$pa_options['dont_include_sub_items'])) { $pa_options['dont_include_sub_items'] = $pa_options['dontIncludeSubItems']; }\n\t \t\n\t\tif (isset($pa_options['dont_include_sub_items']) && $pa_options['dont_include_sub_items']) {\n\t\t\t$pa_options['noChildren'] = true;\n\t\t}\n\t\t$t_list = new ca_lists();\n\t\t$t_item = new ca_list_items();\n\t\t$va_item_ids = array();\n\t\tforeach($pa_idnos as $vs_idno) {\n\t\t\t$vn_item_id = null;\n\t\t\tif (is_numeric($vs_idno)) { \n\t\t\t\t$vn_item_id = (int)$vs_idno; \n\t\t\t} else {\n\t\t\t\t$vn_item_id = (int)$t_list->getItemIDFromList($pm_list_name_or_id, $vs_idno);\n\t\t\t}\n\t\t\t\n\t\t\tif ($vn_item_id && !(isset($pa_options['noChildren']) || $pa_options['noChildren'])) {\n\t\t\t\tif ($qr_children = $t_item->getHierarchy($vn_item_id, array())) {\n\t\t\t\t\twhile($qr_children->nextRow()) {\n\t\t\t\t\t\t$va_item_ids[$qr_children->get('item_id')] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($vn_item_id) {\n\t\t\t\t\t$va_item_ids[$vn_item_id] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array_keys($va_item_ids);\n\t}", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function adicionarRepetidos($list){\n\n /*echo('<pre>');\n var_dump($list);\n echo('</pre>');*/\n\n for($i = 0; $i < count($list); $i++){\n for($j = $i+1; $j < count($list); $j++){\n if($list[$i][0] -> getIngrediente() == $list[$j][0] -> getIngrediente()){\n $list[$i][1] += $list[$j][1];\n array_splice($list, $j,1);\n }\n }\n }\n return $list;\n }", "protected function IdCancionEnLista ($nombreCancion,$nombreLista)\n {\n $cancionEnLista = Model_tiene::find('all', array\n (\n 'where' => array\n (\n array('id_cancion'=>$this->idNameSong($nombreCancion)),\n array('id_lista'=>$this->idNameList($nombreLista))\n )\n ));\n if(!empty($cancionEnLista))\n {\n $id=0;\n foreach ($cancionEnLista as $key => $value)\n {\n $id = $cancionEnLista[$key]->id_cancion;\n }\n return $id; \n }\n }", "public function updateExternalList($newlist, $idtype)\n {\n $updatelist = [];\n $updskipped = 0;\n $countnewlistspotterid = 0;\n $countdellistspotterid = 0;\n\n if ($idtype == 'black') {\n $idtype = 1;\n } elseif ($idtype == 'white') {\n $idtype = 2;\n } else {\n throw new Exception('Invalid list type specified for updateExternalList: '.$idtype);\n } // else\n\n /* Retrieve the current list */\n $oldlist = $this->_conn->arrayQuery(\"SELECT spotterid,idtype\n\t\t\t\t\t\t\t\t\t\t\t\tFROM spotteridblacklist \n\t\t\t\t\t\t\t\t\t\t\t\tWHERE ouruserid = -1 AND origin = 'external'\");\n foreach ($oldlist as $obl) {\n $islisted = (($obl['idtype'] == $idtype) > 0);\n $updatelist[$obl['spotterid']] = 3 - $islisted; \t// Put \"old\" spotterids (current ones) on the to-delete list\n }\n /* verwerk de nieuwe lijst */\n foreach ($newlist as $nwl) {\n $nwl = trim($nwl);\n //if ($idtype == 2) {\n // $ex = explode(',', $nwl);\n // if (isset($ex[1])) {\n // $nwl = $ex[1];\n // } else {\n // $nwl = '';\n // }\n //}\n $nwl = $this->_util->calculateSpotterId($nwl);\n if ((strlen($nwl) >= 3) && (strlen($nwl) <= 6)) {\t// Spotterids are between 2 and 7 characters long\n if (empty($updatelist[$nwl])) {\n $updatelist[$nwl] = 1;\t\t\t\t\t\t// We want to add this spotterid\n } elseif ($updatelist[$nwl] == 2) {\n $updatelist[$nwl] = 5;\t\t\t\t\t\t// SpotterID is on the list already, dont remove it\n } elseif ($updatelist[$nwl] == 3) {\n if ($idtype == 1) {\n $updatelist[$nwl] = 4;\t\t\t\t\t// Spotterid is on another kind of list, change the idtype\n } else {\n $updskipped++;\t\t\t\t\t\t\t// Spotter is already on the list, dont remove it\n $updatelist[$nwl] = 5;\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t// double spotterid in xxxxxlist.txt.\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t\t// Spotterid did not pass the sanity check\n }\n }\n $updlist = array_keys($updatelist);\n $this->_conn->beginTransaction();\n foreach ($updlist as $updl) {\n if ($updatelist[$updl] == 1) {\n // Add new spotterid's to the list\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"INSERT INTO spotteridblacklist (spotterid,ouruserid,idtype,origin) VALUES (:spotterid, '-1', :idtype,'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 2) {\n // Remove spotters which aren't on the list\n $countdellistspotterid++;\n $this->_conn->modify(\n \"DELETE FROM spotteridblacklist WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 4) {\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"UPDATE spotteridblacklist SET idtype = 1 WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = (idtype = :idtype) WHERE spotterid = :spotterid AND ouruserid != -1 ',\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } // elseif\n } // foreach\n $this->_conn->commit();\n\n return ['added' => $countnewlistspotterid,\n 'removed' => $countdellistspotterid,\n 'skipped' => $updskipped,\n 'total' => count($newlist), ];\n }", "function decodeList($list);", "public function add($listid\t= NULL)\r\r\n\t{\r\r\n\t\tif($listid)\r\r\n\t\t{\r\r\n\t\t\t$this->_data['single_list']\t=\t$this->listing->get_single_record($listid);\t\r\r\n\t\t}\r\r\n\t\tif($this->input->post())\r\r\n\t\t{\r\r\n\t\t\t\r\r\n\t\t\t$data\t\t=\t$this->input->post();\r\r\n\t\t\t\r\r\n\t\t\t// UNSET ARRAY key\r\r\n\t\t\tunset($data['submit']);\r\r\n\t\t\t\r\r\n\t\t\tif($this->input->post('list_id'))\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->update_list($this->input->post('list_id'),$data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم تحديث تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t\t\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->add_list($data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم إضافة تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\tif($listid)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t$listid;\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t'';\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t$this->load->view('add', $this->_data);\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "public function getRootListItemID($pm_list_name_or_id=null) {\n\t\tif($pm_list_name_or_id) {\n\t\t\t$vn_list_id = $this->_getListID($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$vn_list_id = $this->getPrimaryKey();\n\t\t}\n\t\tif (!$vn_list_id) { return null; }\n\t\t\n\t\t$t_items = new ca_list_items();\n\t\t$t_items->load(array('list_id' => $vn_list_id, 'parent_id' => null));\n\t\t\n\t\treturn $t_items->getPrimaryKey();\n\t}", "public function model_id_list()\r\n {\r\n $this->set_error(\"MBE-\".$this->model_code.\"-MIL-1\", \r\n \"Internal error, please contact admin\", \r\n \"Missing model_id_list API for this model \".$this->model_name);\r\n $model_id_list = array();\r\n /*\r\n $model_id_list = array (\r\n array(\r\n \"table\" => \"dummy_table\", \r\n \"editable\" => false,\r\n \"id_column\" => \"dummy_id\",\r\n \"data_column\" => array(\r\n array(\"data\" => \"dummy_name\", \"column\" => \"dummy_column\"),\r\n ),\r\n ),\r\n );\r\n */\r\n return $model_id_list;\r\n }", "public function destroyList($id)\n\t{\n\t\tDB::table('list_items')->where('list_id', $id)->delete();\n\t\tDB::table('lists')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function edit(UserList $list)\n {\n \n }", "public function listId()\n {\n return $this->contractor->all()->pluck('id')->all();\n }", "public function syncToRemote($list_id);", "public function destroyListItem($id)\n\t{\n\t\tDB::table('list_items')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function saveList($list, &$m_order = 0)\n {\n foreach ($list as $item) {\n $m_order++;\n $this->updateOrder($m_order, $item['id']);\n }\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "function privList(&$p_list)\n {\n }", "public function setListID($ListID)\n\t{\n\t\treturn $this->set('ListID', $ListID);\n\t}", "function get_list($listid)\n\t{\n\t\t$xml = $this->load_url(\"lists/$listid\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t$list = false;\n\t\t$_list = (isset($xml['entry'])) ? $xml['entry'] : false;\n\n\t\t// parse into nicer array\n\t\tif(is_array($_list)):\n\t\t\t$id = $this->get_id_from_link($_list['link_attr']['href']);\n\n\t\t\t$list = array(\n\t\t\t\t'id' => $id,\n\t\t\t\t'Name' => $_list['content']['ContactList']['Name'],\n\t\t\t\t'ShortName' => $_list['content']['ContactList']['ShortName'],\n\t\t\t\t'OptInDefault' => $_list['content']['ContactList']['OptInDefault'],\n\t\t\t\t'SortOrder' => $_list['content']['ContactList']['SortOrder'],\n\t\t\t);\n\t\tendif;\n\n\t\treturn $list;\n\t}", "public function listId() {\n\t\treturn $this->employee->get()->pluck('id')->all();\n\t}", "function mod_element_list($newElement, $list, $lastElement, $description, $ecolor, $priority, $modified){\n $lid = get_id($list);\n //modifier\n if ($lid!=-1){\n $SQL = \"UPDATE element_list SET element = '$newElement', description = '$description', ecolor = $ecolor, priority = $priority, modified = $modified \n WHERE element = '$lastElement' and list='$lid'\";\n global $db;\n $res = $db->prepare($SQL);\n $res->execute();\n }\n}", "public function getIdMaillist($instance=false){\n if ($instance && !is_object($this->_data['id_maillist'])){\n $this->setIdMaillist('',array('required'=>false));\n }\n return $this->_data['id_maillist'];\n }", "function SetBidList(&$list)\n\t{\n\t\t$this->_bidList = array();\n\t\t$existingBidList = $this->GetBidList();\n\t\tforeach ($existingBidList as $bid)\n\t\t{\n\t\t\t$bid->supplierId = '';\n\t\t\t$bid->Save(false);\n\t\t}\n\t\t$this->_bidList = $list;\n\t}", "abstract protected function displayList($list);", "public function followup_lists($l_id)\n {\n \n $result = $this->db->query(\"call lead_followup_lists('\".$l_id.\"')\")->result_array();\n save_query_in_log();\n \n return $result;\n }", "public function setList($list)\n {\n if (is_string($list)) {\n htmlspecialchars($list);\n $this->_list = $list;\n }\n }", "public function loadTagsByList($listId = array()) {\n $tmpTags = array ();\n $query = \"SELECT dct.* FROM [|PREFIX|]dynamic_content_tags dct, [|PREFIX|]list_tags dcl \";\n if (is_array($listId) && sizeof($listId)) {\n $query .= \" WHERE dct.tagid = dcl.tagid AND dcl.listid in ('\".implode($listId, \"','\").\"')\";\n }\n\n $result = $this->db->Query ( $query );\n while ( $row = $this->db->Fetch ( $result ) ) {\n $tmpTags [] = new DynamicContentTag_Api_Tag ( $row ['tagid'], $row ['name'], $row ['createdate'], $row ['ownerid'], array (), array () );\n }\n $this->setTags ( $tmpTags );\n }", "public function listIdOfListCompanyAndListStaff($listCompanyId, $listStaffId = null)\n {\n $hFunction = new \\Hfunction();\n if ($hFunction->checkEmpty($listStaffId)) {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->pluck('work_id');\n } else {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->whereIn('staff_id', $listStaffId)->pluck('work_id');\n }\n\n }", "public function getSimpleList($ids=''){\n\n\n }", "function getItemsOfList($listID) {\n\t\tglobal $dbh;\n $stmt = $dbh->prepare('SELECT itemID, content, image, checked\n\t\t\t \t\t\t\t\tFROM ITEM WHERE listID = ?');\n\t\t$stmt->execute(array($listID));\n\t\treturn $stmt->fetchAll();\n\t}", "function showid(){\n $sql=\"SElECT * From article ORDER BY id DESC LIMIT 1 \";\n $db = config::getConnexion();\n try{\n $list=$db->query($sql);\n return $list;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "public function editList($id)\n\t{\n\t\t$edit = \"list\";\n\t\t$list = DB::table('lists')->where('id', $id)\n\t\t->get();\n\n\t\treturn view('edit', compact(\"list\", \"edit\"));\n\t}", "public function removeList(array $list): void\n {\n foreach ($list as $id) {\n $this->remove($id);\n }\n }", "public function do_delete_record()\n {\n $v_list_delete = get_post_var('hdn_item_id_list','');\n $this->model->do_delete_record($v_list_delete);\n }", "private function listsDetails(){\n\t\t\t$idRecepcion = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRecepcion!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRecepcion))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('recepcionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "static function getListCode($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_code_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_code_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (!is_numeric($pm_list_name_or_id)) {\n\t\t\treturn $pm_list_name_or_id;\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load((int)$pm_list_name_or_id)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t\t$vs_list_code = $t_list->get('list_code');\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_code_cache[$vn_list_id] = $vs_list_code;\n\t}", "function update_tel_list_name() {\n\t\tif (empty($this->data) || empty($this->data['callListId']) || empty($this->data['listName'])) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\t\t$list_name = $this->data['listName'];\n\t\t$call_list_id = $this->data['callListId'];\n\t\t$item_main = $this->data['item_main'];\n\n\t\t$info_list = $this->T16InboundCallList->getListInfoById($call_list_id);\n\t\tif (!isset($info_list[\"T16InboundCallList\"][\"id\"]) || empty($info_list[\"T16InboundCallList\"][\"id\"])) {\n\t\t\techo \"err_not_exist\";\n\t\t\texit;\n\t\t}\n\t\t$check_lock = $this->T92Lock->getInfoLock('inbound_call_list', $this->ESession->getCallListId($this));\n\t\tif (!empty($check_lock)) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$lock_new = $this->create_lock('inbound_call_list', $this->ESession->getCallListId($this), __FUNCTION__);\n\t\tif (!$lock_new) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\tif ($this->data['listTestFlag'] == 'true') {\n\t\t\t$list_test_flag = 1;\n\t\t} else {\n\t\t\t$list_test_flag = 0;\n\t\t}\n\n\t\t//Save data to DB\n\t\t$dsT16InboundCallList = $this->T16InboundCallList->getDataSource();\n\t\t$dsT16InboundCallList->begin($this);\n\n\t\t$data_call_list['T16InboundCallList']['id'] = $call_list_id;\n\t\t$data_call_list['T16InboundCallList']['list_name'] = $list_name;\n\t\t$data_call_list['T16InboundCallList']['item_main'] = $item_main;\n\t\t$data_call_list['T16InboundCallList']['list_test_flag'] = $list_test_flag;\n\t\t$data_call_list['T16InboundCallList']['update_user'] = $this->ESession->getUserId($this);\n\t\t$data_call_list['T16InboundCallList']['update_program'] = $this->name.'_'.__FUNCTION__;\n\n\t\t$call_list = $this->T16InboundCallList->save($data_call_list['T16InboundCallList']);\n\n\t\tif(!$call_list || (isset($lock_new) && !empty($lock_new) && !$this->update_lock($lock_new, __FUNCTION__))){\n\t\t\t$dsT16InboundCallList->rollback($this);\n\t\t\t$this->log(\"発信規制番号登録:失敗\");\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$dsT16InboundCallList->commit($this);\n\t\t$results = Array();\n\t\t$results['status'] = 'save';\n\t\t$item_column = $this->T13InboundListItem->getColumnListByItemName($call_list_id, $item_main);\n\t\t$item_column = $item_column['T13InboundListItem']['column'];\n\t\t$results['item_column'] = $item_column;\n\t\techo json_encode($results);\n\t\texit;\n\t}", "public function show_list($p_obj_id)\n {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id__master, isys_catg_relation_list__isys_obj__id__slave, obj.isys_obj__isys_obj_type__id, obj.isys_obj__title AS title\n FROM isys_catg_relation_list\n INNER JOIN isys_obj AS obj ON isys_catg_relation_list__isys_obj__id__slave = obj.isys_obj__id\n INNER JOIN isys_obj AS relObj ON isys_catg_relation_list__isys_obj__id = relObj.isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND obj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND relObj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id__slave ';\n\n $l_res = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row = $l_res->get_row()) {\n if ($l_row[\"isys_catg_relation_list__isys_obj__id__master\"] == $p_obj_id &&\n (is_null($this->m_obj_arr) || !in_array($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $this->m_obj_arr))) {\n if ($l_row[\"isys_obj__isys_obj_type__id\"] == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n $this->m_its_arr[$l_row[\"isys_catg_relation_list__isys_obj__id__slave\"]] = $l_row[\"title\"];\n }\n\n if (in_array($this->m_dao_rel->get_objTypeID($l_row['isys_catg_relation_list__isys_obj__id__slave']), $this->m_software_obj_types)) {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id\n FROM isys_catg_relation_list\n INNER JOIN isys_obj ON isys_obj__id = isys_catg_relation_list__isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND isys_catg_relation_list__isys_obj__id__slave = ' . $this->m_dao_rel->convert_sql_id($l_row['isys_catg_relation_list__isys_obj__id__slave']) . '\n AND isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id';\n\n $l_res_app = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row_app = $l_res_app->get_row()) {\n $l_its_data = $this->m_dao_its_comp\n ->get_data(null, null, \"AND isys_connection__isys_obj__id = \" . $this->m_dao_rel->convert_sql_id($l_row_app[\"isys_catg_relation_list__isys_obj__id\"]), null, C__RECORD_STATUS__NORMAL)\n ->get_row();\n\n // Check in it service components\n if (isset($l_its_data['isys_obj__id']) &&\n $this->m_dao_rel->get_objTypeID($l_its_data['isys_obj__id']) == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n if (!array_key_exists($l_its_data['isys_obj__id'], $this->m_its_arr)) {\n $this->m_its_arr[$l_its_data['isys_obj__id']] = $l_its_data['isys_obj__title'];\n }\n }\n }\n }\n\n $this->m_obj_arr[] = $l_row[\"isys_catg_relation_list__isys_obj__id__slave\"];\n $this->new_recurse_relation($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $p_obj_id);\n unset($this->m_obj_arr);\n }\n }\n\n return $this;\n }", "function initPidList() {\n\t\t// pidList is the pid/list of pids from where to fetch the news items.\n\t\t$pidList = $this->conf['pidList'];\n\t\t$pidList = $pidList ? implode(t3lib_div::intExplode(',', $pidList), ',') : $GLOBALS['TSFE']->id;\n\t\t$recursive = $this->conf['recursive'];\n\n\t\t// extend the pid_list by recursive levels\n\t\t$this->pidList = $this->pi_getPidList($pidList, $recursive);\n\t\t$this->pidList = $this->pidList ? $this->pidList : 0;\n\t\tif (!$this->pidList) {\n\t\t\t$this->errors[] = 'No pidList defined';\n\t\t}\n\t}", "function delete_list( $ids = array()) {\n \t\t\n \t\t// where clause\n\t\t$this->db->where_in( $this->primary_key, $id );\n\n\t\t// delete the record\n\t\treturn $this->db->delete( $this->table_name );\n \t}", "private function listsDetails(){\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRemision!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRemision))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new TurnosG($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n }\n \n }", "function SetWeddingList(&$list)\n\t{\n\t\t$this->_weddingList = array();\n\t\t$existingWeddingList = $this->GetWeddingList();\n\t\tforeach ($existingWeddingList as $wedding)\n\t\t{\n\t\t\t$wedding->supplierId = '';\n\t\t\t$wedding->Save(false);\n\t\t}\n\t\t$this->_weddingList = $list;\n\t}", "function get_Parent_list($result, $parent_list){\n\t\tglobal $parent_list;\n\t\tif($result){\n\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t\t$parent_list[]=$row[0];\n\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'pages.pid',\t\t\t \t\t\t\t\t\t\t// SELECT ...\n\t\t\t\t'pages',\t\t\t\t\t\t\t\t\t// FROM ...\n\t\t\t\t'pages.uid = '.$row[0].\n\t\t\t\t$this->cObj->enableFields('pages'),\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// GROUP BY...\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// ORDER BY...\n\t\t\t\t'' \t\t\t\t\t\t\t\t\t\t\t// LIMIT to 10 rows, starting with number 5 (MySQL compat.)\n\t\t\t\t);\n\t\t\t$this->get_parent_list($res2, $liste);\n\t\t\t}\n\t\t}\n\t\treturn $parent_list;\n\t}", "public function setList(string $a_list) : void\n {\n $list = explode(\",\", $a_list);\n $accounts = array();\n foreach ($list as $l) {\n if (ilObjUser::_lookupId(trim($l)) > 0) {\n $accounts[] = trim($l);\n }\n }\n\n $this->set(\"email_recipient\", implode(\",\", $accounts));\n }", "public function concatPostIdList($list)\n {\n $param = null;\n\n foreach ($list as $item) {\n $param = $param . ', ' . $item;\n }\n\n return trim($param, ', ');\n }", "function adiHijo($lista) {\n\t\t$this->listas[] = $lista;\n\t}", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "public function delete_from_aweber_list($post_data = array(),$list_id = null ){\n\n \t\t$aweber = new AWeberAPI($this->aweber_consumerKey, $this->aweber_consumerSecret);\n // dd($aweber);\n\n\t\ttry {\n\n\t\t $account = $aweber->getAccount($this->aweber_accessKey , $this->aweber_accessSecret);\n\t\t $lists = $account->lists->find(array('name' => $list_id));\n\t\t $list = $lists[0];\n\n\t\t # lets create some custom fields on your list!\n\t\t $custom_fields = $list->custom_fields;\n\t\t $params = array(\n\t\t 'email' => $post_data['email']\n\n\t\t );\n\n\t\t $subscribers = $list->subscribers;\n\t\t $found_subscribers = $subscribers->find($params);\n\t\t foreach ($found_subscribers as $subscriber) {\n\t\t $subscriber->delete();\n\t\t }\n\n\t\t # success!\n\t\t //print \"A new subscriber was added to the $list->name list!\";\n\t\t return true;\n\n\t\t} catch(AWeberAPIException $exc) {\n\t\t return false;\n\t\t}\n\n}", "function update_palabra_catalogador_tmp($id_palabra,$PickList) {\t\n\t\t\n\t\t$qDelete = \"DELETE FROM palabra_subtema_tmp WHERE id_palabra='$id_palabra'\";\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result3 = mysql_query($qDelete,$connection); \n\t\t\n\t\t\tif (isset($PickList)) {\n \t\t\t\tforeach ($PickList as $indice=>$valor){ \n\t\t\t\t\t$subtema=$this->datos_subtema_tmp($valor);\n\t\t\t\t\t$id_tema=$subtema['id_tema'];\n\t\t\t\t\t$ssql2= \"INSERT INTO palabra_subtema_tmp (id_palabra, id_subtema, tema_id) \n\t\t\t\t\t\t\tVALUES ('$id_palabra','$valor','$id_tema')\";\n\t\t\t\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\t\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\t\t\t$result2 = mysql_query($ssql2,$connection); \n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tmysql_close($connection);\n\t\t\t\t\t\n\t}", "public function delete_lists($id){\n\t\t$this->db->where(array(\n\t\t\t'pi_percentage_id'\t\t=>\t$id\n\t\t));\t\t\n\t\t$query = $this->db->get(\"payroll_pagibig_percentage_table\");\n\t\treturn $query->row();\n\t}", "public function genListId(){\n $id = $this->genRandNum(10);\n $IdExists = Group::find($id); \n if($IdExists){\n return $this->genListId();\n }\n return $id;\n }", "protected function setListIndexKey(): void\n {\n $this->listIndexKey = $this->index . (empty($this->indexType)\n ? self::LIST_INDEX_GLUE\n : (self::LIST_INDEX_GLUE . $this->indexType . self::LIST_INDEX_GLUE));\n }", "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new tipdocontrol($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "public abstract function get_ids();" ]
[ "0.7276445", "0.71910024", "0.7078806", "0.6910576", "0.67282104", "0.66442317", "0.65401274", "0.65112746", "0.6484643", "0.6432499", "0.6428333", "0.6378204", "0.6299739", "0.6282814", "0.62746614", "0.62321764", "0.6187264", "0.6159193", "0.6141341", "0.61356217", "0.6094277", "0.6039588", "0.597691", "0.5973684", "0.5905831", "0.5873712", "0.5835445", "0.5787287", "0.57851243", "0.5756207", "0.57529736", "0.57053053", "0.5691912", "0.56765604", "0.5670645", "0.5660038", "0.5652456", "0.5651212", "0.5643477", "0.56206805", "0.5585981", "0.5577234", "0.5558042", "0.55423737", "0.55361766", "0.55350244", "0.55038786", "0.5501787", "0.54943943", "0.5493797", "0.5483102", "0.54674697", "0.546469", "0.54595333", "0.54555255", "0.54509974", "0.5444617", "0.54444975", "0.54409164", "0.5433018", "0.54309696", "0.5430017", "0.54266405", "0.54154295", "0.5398263", "0.53768307", "0.5367477", "0.53484476", "0.53454393", "0.5344771", "0.5335868", "0.5333679", "0.5331729", "0.53222317", "0.5314998", "0.53140104", "0.5309009", "0.530676", "0.5295443", "0.5290912", "0.5290399", "0.528463", "0.52809334", "0.527633", "0.5275901", "0.5252075", "0.52463", "0.5243314", "0.523852", "0.5233632", "0.52328897", "0.5232736", "0.52296853", "0.5218804", "0.5215644", "0.52131593", "0.52115333", "0.52083904", "0.52078515", "0.52077615" ]
0.58709127
26
trouver le id de l dans list_list
function is_in_elementlist($element, $l){ $l_id = get_id($l); //trouver if ($l_id == -1) return false; else { $SQL = "SELECT * FROM element_list WHERE element = '$element' and list='$l_id'"; global $db; $res = $db->prepare($SQL); $res->execute(); if($res->rowCount() == 0) return false; else return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_id()\n\t{\n\t\treturn $this->list;\n\t}", "public function getListId();", "protected function IdUserListReproduction ()\n {\n $lista = Model_listas::find('all', array\n (\n 'where' => array\n (\n array('id_usuario'=>$this->userID()),\n array('titulo'=>'reproducidas')\n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n } \n return $id; \n }\n }", "public abstract static function getListID();", "public function getId()\n {\n return $this->_list->getId();\n }", "function wp_parse_id_list($input_list)\n {\n }", "public function getListID()\n\t{\n\t\treturn $this->get('ListID');\n\t}", "protected function getListId($strList)\n\t{\n\n\t\t$arrLists = $this->api->lists();\n\t\tforeach($arrLists['data'] as $list)\n\t\t{\n\t\t\tif ($list['name']==$strList)\n\t\t\t\treturn $list['id'];\n\t\t}\n\t\treturn null;\n\n\t}", "static function getListID($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_id_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (is_numeric($pm_list_name_or_id)) {\n\t\t\t$vn_list_id = intval($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load(array('list_code' => $pm_list_name_or_id))) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id] = $vn_list_id;\n\t}", "public abstract function get_default_list_id();", "public function sanitize_list_id( $maybe_list_id = '' ) {\n if ( ! $maybe_list_id ) {\n return $this->get_site_list_id();\n }\n $lists = $this->get_lists();\n foreach ( $lists->lists as $list ) {\n if ( ! $list || ! isset( $list->id ) ) {\n continue;\n }\n if ( $maybe_list_id == $list->id || $maybe_list_id == $list->name ) {\n return $list->id;\n }\n }\n\n return $maybe_list_id;\n }", "function supp_list($list){\n $lid = get_id($list);\n //supp\n if ($lid!=-1){\n //supprimer element de la liste\n\t$SQL = \"DELETE FROM element_list WHERE list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n //supprimer list\n \t$SQL = \"DELETE FROM list_list WHERE list='$list'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute(); }\n}", "protected function idNameList($nombreLista)\n {\n $lista = Model_Listas::find('all', array\n (\n 'where' => array\n (\n array('titulo'=>$nombreLista) \n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n }\n return $id; \n }\n }", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "function set_list_id($list_id) {\n $this->_subscribers_base_route = $this->_base_route.'subscribers/'.$list_id;\n }", "function list_get($id) {\n\n //$id = $this->get('id');\n\n if (!$id) {\n\n $this->response(\"No item ID specified!\", 400);\n\n exit;\n }\n\n $list = $this->List_model->getListById($id);\n\n if ($list) {\n\n //$list = $this->appendItems($list);\n //Put owner's name instead of user ID\n //$list['owner'] = $this->User_model->getName($list['owner'])['name'];\n unset($list['owner']);\n\n $this->response($list, 200);\n\n exit;\n } else {\n\n $this->response(\"Invalid ID\", 404);\n\n exit;\n }\n }", "private function _setListId()\r\n { \r\n if (Mage::getSingleton('admin/session')->isLoggedIn()) {\r\n $storeId = Mage::app()->getRequest()->getParam('store_id');\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId', $storeId); \r\n } else {\r\n $this->_listId = Mage::getStoreConfig('remarketing/listraklistids/listrakListId');\r\n }\r\n }", "function _list($lp_n, $a, $p){\r\n global $conn; // Jadikan global\r\n \r\n // Buat sql untuk cek apakah row sudah ada atau belum\r\n $sql = \"SELECT * FROM data_list WHERE id_sntr = $a AND nama_lprn = '$lp_n'\";\r\n $cek = mysqli_num_rows( mysqli_query($conn, $sql) );\r\n\r\n // Dapatkan id dari row yang diinginkan\r\n $id_list = mysqli_fetch_assoc(mysqli_query($conn, $sql))[\"id_list\"];\r\n\r\n // Cek ttd_pembina diceklis atau tidak\r\n if ( $p === \"0000-00-00 00:00:00\" ) {\r\n // Jika tidak diceklism, hapus row lama atau biarkan\r\n $sql = \"DELETE FROM data_list WHERE id_list = $id_list\";\r\n } else {\r\n // Jiak diceklis, cek apakah row sudah ada atau belum\r\n if ( $cek > 0 ) {\r\n // Jika sudah ada maka update row dengan data baru\r\n $sql = \"UPDATE data_list SET\r\n id_list = $id_list,\r\n id_sntr = $a,\r\n nama_lprn = '$lp_n',\r\n wktu_lprn = '$p'\r\n WHERE id_list = $id_list\";\r\n } else {\r\n // Jika belum, buat row baru dan masukkan data \r\n $sql = \"INSERT INTO data_list (id_list, id_sntr, nama_lprn, wktu_lprn)\r\n VALUE ('', $a, '$lp_n', '$p')\";\r\n }\r\n }\r\n\r\n // Ambil data sql dan update\r\n mysqli_query($conn, $sql);\r\n}", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d=new AlbumTable($this->dbAdapter);\n\n $d->modGeneral(\"delete from a_empleados_rete_d where idEret=\".$id); \n $d->modGeneral(\"delete from a_empleados_rete where id=\".$id); \n //$u=new Retefuente($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n //$u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "public function getWishlistId();", "public function listId() {\n\t\treturn $this->academic_session->all()->pluck('id')->all();\n\t}", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d = New AlbumTable($this->dbAdapter); \n // bucar id de parametro\n $datos = $d->getGeneral1(\"select idTdoc from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n $d->modGeneral(\"delete from t_tip_docontrol_i where id=\".$id);// Listado de formularios \n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'i/'.$datos['idTdoc']);\n } \n }", "public function get_site_list_id() {\n $list = $this->get_site_list();\n if ( isset( $list->id ) ) {\n return $list->id;\n }\n return false;\n }", "function checkIDList($table, $fixedQuery, &$IDList)\n{\n\tglobal $sitePosition;\n\n\t$IDs = array();\n\t$rs = query('Select `ID` from `' . $sitePosition . '.' . $table . '` where ' . ($fixedQuery != '' ? ('(' . $fixedQuery . ') and ') : '') . '`ID` in (' . $IDList . ')', false);\n\twhile(true)\n\t{\n\t\t$rsInfo = fetchRow($rs);\n\t\tif($rsInfo === null) break;\n\t\t$IDs[] = $rsInfo[0];\n\t}\n\tfreeResult($rs);\n\t$IDList = implode(',', $IDs);\n}", "function add_element_list($newlist, $l, $username, $description, $ecolor, $priority, $creation){\n $l_id = get_id($l);\n $uid = get_userid($username);\n //insÚrer\n if ($l_id!=-1){\n \t$SQL = \"INSERT INTO element_list VALUES (DEFAULT,'$l_id',$uid,'$newlist', '$description', $ecolor, $priority, $creation, $creation, 0)\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "function supp_element_list($supp, $list){\n $lid = get_id($list);\n //supprimer\n if ($lid!=-1){\n \t$SQL = \"DELETE FROM element_list WHERE element = '$supp' and list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "function candidatosXLista($id){\n\t\t $sql = \"SELECT C.idlista, L.nombrelista,nombrecandidato, apellidocandidato, cargocandidato, imagencandidato\n\t\t FROM candidato C LEFT JOIN LISTA L ON C.idlista = L.idlista\n\t\t WHERE C.idlista = \".$id.\"order by cargocandidato ASC ;\";\n\t\treturn $sql;\n\t }", "public function loadListItemsByListId() {\n $sql = \"SELECT ListText, ListItemID, ListItemColor, ListItemDone\"\n FROM list_items\n WHERE ListID=(\n SELECT ListID\n FROM lists\n WHERE ListURL=:list\n )\n ORDER BY ListItemPosition\";\n if($stmt = $this->_db->prepare($sql)) {\n $stmt->bindParam(':list', $_GET['list'], PDO::PARAM_STR);\n $stmt->execute();\n $order = 1;\n while($row = $stmt->fetch()) {\n echo $this->formatListItems($row, $order);\n $order;\n }\n $stmt->closeCursor();\n }\n else {\n echo \"<li> Something went wrong. \", $db->error, \"</li>\";\n }", "private function getTargetListId($list_id) {\n $where = array(\n 'equals' => array(\n 'mailchimp_list' => $list_id\n )\n );\n $result = $this->runSugarQuery('ProspectLists', array('id'), $where, 1);\n if($result) {\n return $result[0]['id'];\n }\n return false;\n }", "protected function prepareTemplateToList($list)\n {\n return $list;\n }", "public function getMultipleWishlistId();", "public function dissociateList(Request $request, $id, $list)\n {\n $person = $this->modelPath::findOrFail($id);\n\n $person->retractListById($list);\n\n $this->notify('lists.dissociated');\n\n return redirect()->back();\n }", "public function listIdOfListStaffId($listStaffId)\n {\n return QcCompanyStaffWork::whereIn('staff_id', $listStaffId)->pluck('work_id');\n }", "public static function getGatewayListID(){\n $row = Gateway::where(array('Status'=>1))->lists('Title', 'GatewayID');\n if(!empty($row)){\n $row = array(\"\"=> \"Select a Gateway\")+$row;\n }\n return $row;\n }", "public function getRootListItemID($pm_list_name_or_id=null) {\n\t\tif($pm_list_name_or_id) {\n\t\t\t$vn_list_id = $this->_getListID($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$vn_list_id = $this->getPrimaryKey();\n\t\t}\n\t\tif (!$vn_list_id) { return null; }\n\t\t\n\t\t$t_items = new ca_list_items();\n\t\t$t_items->load(array('list_id' => $vn_list_id, 'parent_id' => null));\n\t\t\n\t\treturn $t_items->getPrimaryKey();\n\t}", "public function remove_list_from_table($list){\n\t\t$query = \"DELETE * FROM \" . $this->table . \" WHERE \" . $this->column_name . \"=\";\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function edit($id,$list_id)\n {\n if (Gate::allows('isadmin')){\n $menu = Menu::find($id);\n $status = $menu->listts->where('id',$list_id)->all();\n $menu = Menu::find($id)->name;\n if (count($status)>0){\n $list = Listt::find($list_id);\n return view('dashboard.editlist',compact('list','menu'));\n }\n }\n abort(404);\n }", "public function listId() {\n\t\treturn $this->employee->get()->pluck('id')->all();\n\t}", "public function listId()\n {\n return $this->contractor->all()->pluck('id')->all();\n }", "public function __construct($listId, $list)\n\t{\n\t\t$this->listId = $listId;\n\t\t$this->list = $list;\n\t}", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "static function get_ids_from_list ($list_video_ids){\r\n\r\n if(empty($list_video_ids)){\r\n return;\r\n }\r\n\r\n $buffy = array();\r\n\r\n //this is needed because we could have more space between each movie id\r\n $remove_spaces = trim(str_replace(array('&nbsp;', ' '),array(''), htmlentities($list_video_ids, ENT_QUOTES)));\r\n\r\n if(!empty($remove_spaces)) {\r\n\r\n $video_id_explode = explode(',', $remove_spaces);\r\n $video_id_explode_map = array_map('trim',$video_id_explode);//extra trim just in case\r\n\r\n //make an array of video id's'\r\n foreach($video_id_explode_map as $video_id) {\r\n $trim_video_id = trim($video_id);\r\n\r\n //check to prevent duplicates id's\r\n if (!in_array($trim_video_id, $buffy)) {\r\n $buffy[] = $trim_video_id;\r\n }\r\n }\r\n }\r\n\r\n return $buffy;\r\n }", "public function delete_list($val){\n if(get_instance()->ecl('Instance')->mod('lists', 'delete_list', [get_instance()->ecl('Instance')->user(),$val])) {\n echo 1;\n } else {\n echo 0;\n }\n }", "protected function IdCancionEnLista ($nombreCancion,$nombreLista)\n {\n $cancionEnLista = Model_tiene::find('all', array\n (\n 'where' => array\n (\n array('id_cancion'=>$this->idNameSong($nombreCancion)),\n array('id_lista'=>$this->idNameList($nombreLista))\n )\n ));\n if(!empty($cancionEnLista))\n {\n $id=0;\n foreach ($cancionEnLista as $key => $value)\n {\n $id = $cancionEnLista[$key]->id_cancion;\n }\n return $id; \n }\n }", "public function getId() {\n if($this->items!==false)\n return @current($this->items)->id_str;\n return false;\n }", "function update_list( $id, $name, $can_delete, $items )\n\t{\n\t\t$this->db->set('name', $name );\n if( $can_delete !== NULL ) {\n $this->db->set('can_delete', $can_delete );\n } \n $this->db->where( 'id', $id );\n\t\t$this->db->update('lists');\n\t\t\n // Save the list items\n\t\t$this->db->where( 'list_id', $id );\n\t\t$this->db->delete( 'list_items' );\n\t\tfor( $i = 0; $i < count($items); $i++ ) {\n $this->db->set('list_id', $id );\n $this->db->set('data_id', $items[$i]['id']);\n\t\t\t$this->db->set('title', $items[$i]['title']);\n\t\t\t$this->db->set('type', $items[$i]['type']);\n\t\t\t$this->db->set('sort_order', $i + 1);\n\t\t\t$this->db->insert('list_items');\n }\n\t}", "protected function carregarListaOneToMany($object_list,$addParametros) {\n $query = \"SELECT id FROM \".get_class($object_list).\" WHERE id\".get_class($this).\"=$this->id $addParametros\";\n return bd::executeSqlParaArraySimples($query);\n }", "public function adicionarRepetidos($list){\n\n /*echo('<pre>');\n var_dump($list);\n echo('</pre>');*/\n\n for($i = 0; $i < count($list); $i++){\n for($j = $i+1; $j < count($list); $j++){\n if($list[$i][0] -> getIngrediente() == $list[$j][0] -> getIngrediente()){\n $list[$i][1] += $list[$j][1];\n array_splice($list, $j,1);\n }\n }\n }\n return $list;\n }", "function showid(){\n $sql=\"SElECT * From article ORDER BY id DESC LIMIT 1 \";\n $db = config::getConnexion();\n try{\n $list=$db->query($sql);\n return $list;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "public function destroyListItem($id)\n\t{\n\t\tDB::table('list_items')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function genListId(){\n $id = $this->genRandNum(10);\n $IdExists = Group::find($id); \n if($IdExists){\n return $this->genListId();\n }\n return $id;\n }", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "public function getIdMaillist($instance=false){\n if ($instance && !is_object($this->_data['id_maillist'])){\n $this->setIdMaillist('',array('required'=>false));\n }\n return $this->_data['id_maillist'];\n }", "public function testGetListOfSpecificIds()\n {\n $itemIds = [];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n\n $search = 'ids:'.implode(',', $itemIds);\n\n $response = $this->api->getList($search);\n $this->assertErrors($response);\n $this->assertEquals(count($itemIds), $response['total']);\n\n foreach ($response['lists'] as $item) {\n $this->assertTrue(in_array($item['id'], $itemIds));\n $this->api->delete($item['id']);\n $this->assertErrors($response);\n }\n }", "public function updateExternalList($newlist, $idtype)\n {\n $updatelist = [];\n $updskipped = 0;\n $countnewlistspotterid = 0;\n $countdellistspotterid = 0;\n\n if ($idtype == 'black') {\n $idtype = 1;\n } elseif ($idtype == 'white') {\n $idtype = 2;\n } else {\n throw new Exception('Invalid list type specified for updateExternalList: '.$idtype);\n } // else\n\n /* Retrieve the current list */\n $oldlist = $this->_conn->arrayQuery(\"SELECT spotterid,idtype\n\t\t\t\t\t\t\t\t\t\t\t\tFROM spotteridblacklist \n\t\t\t\t\t\t\t\t\t\t\t\tWHERE ouruserid = -1 AND origin = 'external'\");\n foreach ($oldlist as $obl) {\n $islisted = (($obl['idtype'] == $idtype) > 0);\n $updatelist[$obl['spotterid']] = 3 - $islisted; \t// Put \"old\" spotterids (current ones) on the to-delete list\n }\n /* verwerk de nieuwe lijst */\n foreach ($newlist as $nwl) {\n $nwl = trim($nwl);\n //if ($idtype == 2) {\n // $ex = explode(',', $nwl);\n // if (isset($ex[1])) {\n // $nwl = $ex[1];\n // } else {\n // $nwl = '';\n // }\n //}\n $nwl = $this->_util->calculateSpotterId($nwl);\n if ((strlen($nwl) >= 3) && (strlen($nwl) <= 6)) {\t// Spotterids are between 2 and 7 characters long\n if (empty($updatelist[$nwl])) {\n $updatelist[$nwl] = 1;\t\t\t\t\t\t// We want to add this spotterid\n } elseif ($updatelist[$nwl] == 2) {\n $updatelist[$nwl] = 5;\t\t\t\t\t\t// SpotterID is on the list already, dont remove it\n } elseif ($updatelist[$nwl] == 3) {\n if ($idtype == 1) {\n $updatelist[$nwl] = 4;\t\t\t\t\t// Spotterid is on another kind of list, change the idtype\n } else {\n $updskipped++;\t\t\t\t\t\t\t// Spotter is already on the list, dont remove it\n $updatelist[$nwl] = 5;\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t// double spotterid in xxxxxlist.txt.\n }\n } else {\n $updskipped++;\t\t\t\t\t\t\t\t\t// Spotterid did not pass the sanity check\n }\n }\n $updlist = array_keys($updatelist);\n $this->_conn->beginTransaction();\n foreach ($updlist as $updl) {\n if ($updatelist[$updl] == 1) {\n // Add new spotterid's to the list\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"INSERT INTO spotteridblacklist (spotterid,ouruserid,idtype,origin) VALUES (:spotterid, '-1', :idtype,'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 2) {\n // Remove spotters which aren't on the list\n $countdellistspotterid++;\n $this->_conn->modify(\n \"DELETE FROM spotteridblacklist WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = :doubled WHERE spotterid = :spotterid AND ouruserid != -1 AND idtype = :idtype',\n [\n ':doubled' => [true, PDO::PARAM_BOOL],\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } elseif ($updatelist[$updl] == 4) {\n $countnewlistspotterid++;\n $this->_conn->modify(\n \"UPDATE spotteridblacklist SET idtype = 1 WHERE (spotterid = :spotterid) AND (ouruserid = -1) AND (origin = 'external')\",\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ]\n );\n $this->_conn->modify(\n 'UPDATE spotteridblacklist SET doubled = (idtype = :idtype) WHERE spotterid = :spotterid AND ouruserid != -1 ',\n [\n ':spotterid' => [$updl, PDO::PARAM_STR],\n ':idtype' => [$idtype, PDO::PARAM_INT],\n ]\n );\n } // elseif\n } // foreach\n $this->_conn->commit();\n\n return ['added' => $countnewlistspotterid,\n 'removed' => $countdellistspotterid,\n 'skipped' => $updskipped,\n 'total' => count($newlist), ];\n }", "public function followup_lists($l_id)\n {\n \n $result = $this->db->query(\"call lead_followup_lists('\".$l_id.\"')\")->result_array();\n save_query_in_log();\n \n return $result;\n }", "function messageid($list) {\n\t\t$uid = 0;\n\t\t$mid = array();\n\t\t\n\t\tforeach($list as $line) {\n\t\t\tif(preg_match('#^\\* ([0-9]+) FETCH#', $line)) {\n\t\t\t\t$temp = explode(' ', $line);\n\t\t\t\t$uid = $temp[4];\n\t\t\t}\n\t\t\t\n\t\t\t$temp = strtoupper($line);\n\t\t\t\n\t\t\tif(substr($temp, 0, 12) == 'MESSAGE-ID: ')\n\t\t\t\t$mid[$line] = $uid;\n\t\t}\n\t\t\n\t\treturn $mid;\n\t}", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "static public function getItemIDsFromList($pm_list_name_or_id, $pa_idnos, $pa_options=null) {\n\t\tif(isset($pa_options['dontIncludeSubItems']) && (!isset($pa_options['dont_include_sub_items']) || !$pa_options['dont_include_sub_items'])) { $pa_options['dont_include_sub_items'] = $pa_options['dontIncludeSubItems']; }\n\t \t\n\t\tif (isset($pa_options['dont_include_sub_items']) && $pa_options['dont_include_sub_items']) {\n\t\t\t$pa_options['noChildren'] = true;\n\t\t}\n\t\t$t_list = new ca_lists();\n\t\t$t_item = new ca_list_items();\n\t\t$va_item_ids = array();\n\t\tforeach($pa_idnos as $vs_idno) {\n\t\t\t$vn_item_id = null;\n\t\t\tif (is_numeric($vs_idno)) { \n\t\t\t\t$vn_item_id = (int)$vs_idno; \n\t\t\t} else {\n\t\t\t\t$vn_item_id = (int)$t_list->getItemIDFromList($pm_list_name_or_id, $vs_idno);\n\t\t\t}\n\t\t\t\n\t\t\tif ($vn_item_id && !(isset($pa_options['noChildren']) || $pa_options['noChildren'])) {\n\t\t\t\tif ($qr_children = $t_item->getHierarchy($vn_item_id, array())) {\n\t\t\t\t\twhile($qr_children->nextRow()) {\n\t\t\t\t\t\t$va_item_ids[$qr_children->get('item_id')] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($vn_item_id) {\n\t\t\t\t\t$va_item_ids[$vn_item_id] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array_keys($va_item_ids);\n\t}", "public function edit(UserList $list)\n {\n \n }", "public function syncToRemote($list_id);", "public function add($listid\t= NULL)\r\r\n\t{\r\r\n\t\tif($listid)\r\r\n\t\t{\r\r\n\t\t\t$this->_data['single_list']\t=\t$this->listing->get_single_record($listid);\t\r\r\n\t\t}\r\r\n\t\tif($this->input->post())\r\r\n\t\t{\r\r\n\t\t\t\r\r\n\t\t\t$data\t\t=\t$this->input->post();\r\r\n\t\t\t\r\r\n\t\t\t// UNSET ARRAY key\r\r\n\t\t\tunset($data['submit']);\r\r\n\t\t\t\r\r\n\t\t\tif($this->input->post('list_id'))\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->update_list($this->input->post('list_id'),$data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم تحديث تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t\t\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->listing->add_list($data);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->session->set_flashdata('success', 'تم إضافة تسجيلك بنجاح');\r\r\n\t\t\t\tredirect(base_url().\"listing_managment/listing\");\r\r\n\t\t\t\texit();\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\tif($listid)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t$listid;\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_data['list_id']\t=\t'';\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t$this->load->view('add', $this->_data);\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "public function add_list_to_table($list){\n\t\t$query = \"SELECT $this->column_name FROM \" . $this->table;\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "abstract public function getId();", "public function getId($item);", "abstract function getId();", "function mod_element_list($newElement, $list, $lastElement, $description, $ecolor, $priority, $modified){\n $lid = get_id($list);\n //modifier\n if ($lid!=-1){\n $SQL = \"UPDATE element_list SET element = '$newElement', description = '$description', ecolor = $ecolor, priority = $priority, modified = $modified \n WHERE element = '$lastElement' and list='$lid'\";\n global $db;\n $res = $db->prepare($SQL);\n $res->execute();\n }\n}", "public function destroyList($id)\n\t{\n\t\tDB::table('list_items')->where('list_id', $id)->delete();\n\t\tDB::table('lists')->where('id', $id)->delete();\n\t\t\n\t\treturn redirect(url('/yourLists'));\n\t}", "public function listing()\n\t{\n\n if(isset($_POST['dosubmit']) && $_POST['dosubmit']=='删除'){\n if( empty($_POST['id']) ){\n $this->error(L('请选择要删除的数据!'));\n }\n\n if(is_array($_POST['id'])){\n $ids = $_POST['id'];\n $in = implode(\",\",$_POST['id']);\n }else{\n $ids[] = $_POST['id'];\n $in = $_POST['id'];\n }\n\n //删除连带数据\n\n //删除自身数据\n $contactMod = M('contact');\n $sql=\" id in (\".$in.\") \";\n $contactMod->where($sql)->delete();\n\n $this->success('删除成功', U('contact/listing'));\n exit;\n }\n \n\n\n /// 载入 lk_cunction. (使用其 LkHTML::ListSort 函数)\n load(\"@.lk_function\");\n\n\t\t///列表过滤\n\t\t$sqlWhere = \"status < 250\";\n\t\t//$sqlWhere .= \" and mobile!='' and score_jia!='' and wx_headpic_path!='' \";\n\t\t//$sqlWhere .= \" and is_prize>=0 and openid!='' \";\n\t\t//$sqlWhere .= \" and user_id_crm!='' \";\n\t\t$sqlOrder = \" id DESC\";\n\t\t\n\t\t//$sqlWhere .= \" and (headpic!='' or voice!='') and mobile!='' \";\n\t\t\n\t\t\n\t\t$s_time=time()-(SHENHE_CROSS_TIME*3600); //超过4小时自动审核通过\n\t\t\n\t\t\n\n\t\t$filter_role = $this->REQUEST('_filter_role');\n\t\tif( $filter_role != '' ){\n\t\t\t$sqlWhere .= \" and role = '\". $this->fixSQL($filter_role).\"' \";\n\t\t}\n\n\t\t$filter_state = $this->REQUEST('_filter_state');\n\t\tif( $filter_state != '' ){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif ($filter_state=='0'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" \";\n\t\t\t}\n\t\t\tif ($filter_state=='1'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time<'\".$s_time.\"' \";\n\t\t\t}\n\t\t\tif ($filter_state=='1_4h'){\n\t\t\t\t$sqlWhere .= \" and status = \". intval($filter_state).\" and create_time>='\".$s_time.\"' \";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n \n //新搜索\n $f_search = $this->REQUEST('_f_search');\n $filter_fieldname = $this->REQUEST('_filter_fieldname');\n\t\tif( $f_search != '' ){\n\t\t\tif($filter_fieldname=='realname'){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='mobile'){\n\t\t\t\t$sqlWhere .= \" and (mobile like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\telseif($filter_fieldname=='summary'){\n\t\t\t\t$sqlWhere .= \" and (summary like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t}\n\t\t\t//elseif($filter_fieldname=='wx_nickname'){\n\t\t\t//\t$sqlWhere .= \" and (wx_nickname like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='openid'){\n\t\t\t//\t$sqlWhere .= \" and (openid like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='user_id_crm'){\n\t\t\t//\t$sqlWhere .= \" and (user_id_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='username_crm'){\n\t\t\t//\t$sqlWhere .= \" and (username_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='realname_crm'){\n\t\t\t//\t$sqlWhere .= \" and (realname_crm like '%\". $this->fixSQL($f_search).\"%') \";\n\t\t\t//}\n\t\t\t//elseif($filter_fieldname=='is_prize'){\n\t\t\t//\t$sqlWhere .= \" and (is_prize = '\". $this->fixSQL($f_search).\"') \";\n\t\t\t//}\n\t\t\telseif($filter_fieldname==''){\n\t\t\t\t$sqlWhere .= \" and (realname like '%\". $this->fixSQL($f_search).\"%' or mobile like '%\". $this->fixSQL($f_search).\"%' or summary like '%\". $this->fixSQL($f_search).\"%' )\";\n\t\t\t}\n\t\t\telse{\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$filter_starttime = $this->REQUEST('_filter_starttime');\n\t\t$filter_endtime = $this->REQUEST('_filter_endtime');\n\t\tif( $filter_starttime != '' ){\n\t\t\t$sql_starttime=strtotime($filter_starttime);\n\t\t\t$sqlWhere .= \" and create_time >= \". $sql_starttime.\" \";\n\t\t}\n\t\tif( $filter_endtime != '' ){\n\t\t\t$sql_endtime=strtotime($filter_endtime)+(24*3600);\n\t\t\t$sqlWhere .= \" and create_time < \". $sql_endtime.\" \";\n\t\t}\n\t\t\n\t\t\n\t\t//echo $sqlWhere;exit;\n\t\t\n\t\t\n\t\t\n\t\t\n\n $this->ModManager = M('contact');\n $f_order = $this->REQUEST('_f_order', 'modify_time');\n $fields = $this->ModManager->getDbFields();\n if( in_array($f_order, $fields) ){\n $sqlOrder = $f_order . ' ';\n }else{\n $sqlOrder = 'modify_time ';\n }\n \n $f_direc = strtoupper($this->REQUEST('_f_direc'));if($f_direc==\"\"){$f_direc='DESC';}\n if( $f_direc != 'DESC' ){\n $sqlOrder .= 'ASC';\n }else{\n $sqlOrder .= 'DESC';\n }\n \n $sqlOrder = ' id DESC ';\n \n //echo $sqlOrder;exit;\n\n\t\t///回传过滤条件\n\t\t$this->assign('filter_fieldname', $filter_fieldname);\n\t\t$this->assign('filter_starttime', $filter_starttime);\n\t\t$this->assign('filter_endtime', $filter_endtime);\n\n\n\n $this->assign('filter_role', $filter_role);\n $this->assign('filter_state', $filter_state);\n $this->assign('f_search', $f_search);\n $this->assign('f_order', $f_order);\n $this->assign('f_direc', $f_direc );\n\n\t\t///获取列表数据集\n\t\tif(isset($_POST['do_search']) && $_POST['do_search']==1){\n\t\t\t$paginglimit=1000000;\n\t\t}\n\t\telse{\n\t\t\t$paginglimit='';\n }\n //$rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, '', 'M');\n $rst=$this->GeneralActionForListing('contact', $sqlWhere, $sqlOrder, $paginglimit, 'M');\n //echo \"<pre>\";print_r($rst);exit;\n\t\t\n\t\t\n\t\t//过滤搜索条件\n\t\t//$UserinfoMod = M('user');\n\t\t\n //if(isset($rst['dataset'])){\n // foreach($rst['dataset'] as $k => $v){\n\t\t\t\t\n \t\t/*\n \t\t$user = $UserinfoMod->field('id,username,realname,point_total')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t$user=$user[0];\n \t\t\n \t\t$rst['dataset'][$k]['user_id'] = $user['id'];\n \t$rst['dataset'][$k]['username'] = $user['username'];\n $rst['dataset'][$k]['realname'] = $user['realname'];\n $rst['dataset'][$k]['point_total'] = $user['point_total'];\n */\n \n \n /*\n if($v['status']==0){\n \t$rst['dataset'][$k]['status_now']='审核拒绝';\n }\n if($v['status']==1){\n \tif($v['create_time']<$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核通过';\n \t}\n \tif($v['create_time']>=$s_time){\n \t\t$rst['dataset'][$k]['status_now']='审核中';\n \t}\n }\n */\n \n //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n \t\t//$user=$user[0];\n \t\t\n //\t\t$rst['dataset'][$k]['user_province'] = $user['province'];\n // \t$rst['dataset'][$k]['user_city'] = $user['city'];\n \n \n \n // }\n // $this->assign('dataset', $rst['dataset']);// 赋值数据集\n //}\n //echo \"<pre>\";print_r($rst['dataset']);exit;\n\t\t\n\t\t$this->assign('dataset', $rst['dataset']);// 赋值数据集\n\t\t\n\t\t\n\t\t\n if(isset($_POST['do_search']) && $_POST['do_search']==1){\n \t//echo \"export\";exit;\n \t\n \t$toShow['banner']=$rst['dataset'];\n \t\n\t $start=0;\n\t $pagenum=1000000;\n\n\t $downloadfilename='ExportData.csv';\n\t $output=\"\";\n\t $expstr=\"\\t\";\n\t $expenter=\"\\t\\n\";\n\t $output .= \"流水ID编号\"\n \t.$expstr.\"提交时间\"\n .$expstr.\"姓名\"\n .$expstr.\"性别(1男2女)\"\n .$expstr.\"联系电话\"\n .$expstr.\"电子邮箱\"\n .$expstr.\"反馈标题\"\n .$expstr.\"反馈内容\"\n .$expenter;\n\n \t\n \t$UserinfoMod = M('user');\n \t\n\t if (!empty($toShow['banner'])){\n\t $k=0;\n\t do{\n\t \n\t $v=$toShow['banner'][$k];\n\t \n\t \n\t //if(isset($allProductList[$v['class_id']])){\n\t // $toShow['banner'][$k]['class_name']=$allProductList[$v['class_id']]['title'];\n\t //}\n\t //else{\n\t // $toShow['banner'][$k]['class_name']=\"\";\n\t //}\n\t \n\t \n\t \n\t //$myword=$toShow['banner'][$k]['myword'];\n\t //$myword=str_replace(\"\\r\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\n\",\" [Enter] \",$myword);\n\t //$myword=str_replace(\"\\r\",\"\",$myword);\n\t\t\t\t\t\n\t\t\t\t\t\n\t //if ($toShow['banner'][$k]['device']==\"0\"){\n\t // $device_show=\"PC端\";\n\t //}\n\t //if ($toShow['banner'][$k]['device']==\"1\"){\n\t // $device_show=\"手机端\";\n\t //}\n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/web_headpic/\".$v['headpic'];\n\t //$voice=empty($v['voice'])?\"\":BASE_URL_FRONT.\"/public/web_voice/\".$v['voice'];\n\t //$wx_headpic=empty($v['wx_headpic_path'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t /*\n\t if($v['status']==0){\n\t \t$status_now='审核拒绝';\n\t }\n\t if($v['status']==1){\n\t \tif($v['create_time']<$s_time){\n\t \t\t$status_now='审核通过';\n\t \t}\n\t \tif($v['create_time']>=$s_time){\n\t \t\t$status_now='审核中';\n\t \t}\n\t }\n\t */\n\t \n\t \n\t \n\t $summary=str_replace(\"\\r\\n\",\" [Enter] \",$toShow['banner'][$k]['summary']);\n\t $summary=str_replace(\"\\n\",\" [Enter] \",$summary);\n\t $summary=str_replace(\"\\r\",\"\",$summary);\n\t \n\t \n\t \n\t \n\t //$headpic=empty($v['headpic'])?\"\":BASE_URL_FRONT.\"/public/wx_headpic/\".$v['wx_headpic_path'];\n\t \n\t \n\t \n\t //$user = $UserinfoMod->field('id,province,city')->where(\" id='\".$v['user_id'].\"' \" )->select();\n\t \t\t//$user=$user[0];\n\t \t\t\n\t\t \t//\t$user_province = $user['province'];\n\t\t //\t$user_city = $user['city'];\n\t \n\t \n\n\t $output .= $toShow['banner'][$k]['id']\n\t \t.$expstr.$toShow['banner'][$k]['addtime']\n\t \t.$expstr.$toShow['banner'][$k]['realname']\n\t \t.$expstr.$toShow['banner'][$k]['sex']\n\t \t.$expstr.$toShow['banner'][$k]['mobile']\n\t \t.$expstr.$toShow['banner'][$k]['email']\n\t \t.$expstr.$toShow['banner'][$k]['title']\n\t \t.$expstr.$summary\n\t .$expenter;\n\n\n\t $k=$k+1;\n\t }while($k<count($toShow['banner']));\n\t }\n\n\t $T_text=$output;\n\n\t\t\t//exit;\n\n\n\t\t\theader('Cache-control: private');\n\t header('Content-Disposition: attachment; filename='.$downloadfilename);\n\n\n\n\t//如果mb_convert_encoding函数存在则用此函数来转编码,前提是需要安装mbstring包\n\t if(function_exists('mb_convert_encoding')){\n\t header('Content-type: text/csv; charset=UTF-16LE');\n\t echo(chr(255).chr(254));\n\t echo(mb_convert_encoding($T_text,\"UTF-16LE\",\"UTF-8\"));\n\t }\n\t//如果iconv函数存在则用此函数来转编码\n\t elseif(function_exists('iconv')){\n\t header('Content-type: text/csv');\n\t echo(chr(255).chr(254));\n\t echo(iconv(\"UTF-8\",\"UTF-16LE\",$T_text));\n\t }\n\t//直接从utf-8转,这个貌似不灵...\n\t else{\n\t header('Content-type: text/csv; charset=UTF-8');\n\t echo(chr(239).chr(187).chr(191));\n\t echo($T_text);\n\t }\n\t exit;\n\t \n \n }\n\t\t\n\t\t\n\t\t$PageTitle = L('信息反馈列表');\n\t\t$PageMenu = array(\n\t\t\t//array( U('contact/create'), L('信息反馈') ),\n //array( U('contact/export'), L('导出信息反馈') ),\n\t\t);\n\t\t$this->setPagething( $PageTitle, $PageMenu, true);\n\t\t$this->display();\n\t}", "static function getListCode($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_code_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_code_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (!is_numeric($pm_list_name_or_id)) {\n\t\t\treturn $pm_list_name_or_id;\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load((int)$pm_list_name_or_id)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t\t$vs_list_code = $t_list->get('list_code');\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_code_cache[$vn_list_id] = $vs_list_code;\n\t}", "public function do_delete_record()\n {\n $v_list_delete = get_post_var('hdn_item_id_list','');\n $this->model->do_delete_record($v_list_delete);\n }", "function getId();", "public function listIdOfListCompanyAndListStaff($listCompanyId, $listStaffId = null)\n {\n $hFunction = new \\Hfunction();\n if ($hFunction->checkEmpty($listStaffId)) {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->pluck('work_id');\n } else {\n return QcCompanyStaffWork::whereIn('company_id', $listCompanyId)->whereIn('staff_id', $listStaffId)->pluck('work_id');\n }\n\n }", "public function getLoveId($loveArray=null,$key=\"item_id\"){\n if($loveArray !=null ){\n $list_id=array_map(function($value) use($key){\n return $value[$key];\n },$loveArray);\n return $list_id;\n }\n }", "function delete_list( $ids = array()) {\n \t\t\n \t\t// where clause\n\t\t$this->db->where_in( $this->primary_key, $id );\n\n\t\t// delete the record\n\t\treturn $this->db->delete( $this->table_name );\n \t}", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "function addToListM($listname,$entry){\n $sql= \"INSERT INTO `all_list`(`$listname`) VALUES ('$entry')\";\n $result= $this-> db-> query($sql);\n if (!$result) {\n echo \"Duplicate Entry Exist !\";\n } else {\n echo \"Entry Added to List !\";\n }\n }", "public function delete_lists($id){\n\t\t$this->db->where(array(\n\t\t\t'pi_percentage_id'\t\t=>\t$id\n\t\t));\t\t\n\t\t$query = $this->db->get(\"payroll_pagibig_percentage_table\");\n\t\treturn $query->row();\n\t}", "public function concatPostIdList($list)\n {\n $param = null;\n\n foreach ($list as $item) {\n $param = $param . ', ' . $item;\n }\n\n return trim($param, ', ');\n }", "function decodeList($list);", "public function model_id_list()\r\n {\r\n $this->set_error(\"MBE-\".$this->model_code.\"-MIL-1\", \r\n \"Internal error, please contact admin\", \r\n \"Missing model_id_list API for this model \".$this->model_name);\r\n $model_id_list = array();\r\n /*\r\n $model_id_list = array (\r\n array(\r\n \"table\" => \"dummy_table\", \r\n \"editable\" => false,\r\n \"id_column\" => \"dummy_id\",\r\n \"data_column\" => array(\r\n array(\"data\" => \"dummy_name\", \"column\" => \"dummy_column\"),\r\n ),\r\n ),\r\n );\r\n */\r\n return $model_id_list;\r\n }", "function listar_inscrito($id) {\n $this->db->distinct ('distinct evento.id_evento');\n\t\t$this->db->select ( 'evento.*' );\n\t\t$this->db->from ( 'evento,participacao,usuario' );\n\t\t$this->db->where ( 'participacao.id_evento = evento.id_evento' );\n\t\t$this->db->where ( 'participacao.id_face = usuario.id_face' );\n\t\t$this->db->where ( 'participacao.id_face = ' . \"'\" . $id . \"'\" );\n\t\n\t\t$query = $this->db->get ();\n\t\n\t\tif ($query->num_rows () != 0) {\n\t\t\treturn $query->result ();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function get_Parent_list($result, $parent_list){\n\t\tglobal $parent_list;\n\t\tif($result){\n\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t\t$parent_list[]=$row[0];\n\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'pages.pid',\t\t\t \t\t\t\t\t\t\t// SELECT ...\n\t\t\t\t'pages',\t\t\t\t\t\t\t\t\t// FROM ...\n\t\t\t\t'pages.uid = '.$row[0].\n\t\t\t\t$this->cObj->enableFields('pages'),\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// GROUP BY...\n\t\t\t\t'', \t\t\t\t\t\t\t\t\t\t// ORDER BY...\n\t\t\t\t'' \t\t\t\t\t\t\t\t\t\t\t// LIMIT to 10 rows, starting with number 5 (MySQL compat.)\n\t\t\t\t);\n\t\t\t$this->get_parent_list($res2, $liste);\n\t\t\t}\n\t\t}\n\t\treturn $parent_list;\n\t}", "public function getById($idList) {\n\t\n\t\treturn $this->find($idList);\n\t}", "public function editList($id)\n\t{\n\t\t$edit = \"list\";\n\t\t$list = DB::table('lists')->where('id', $id)\n\t\t->get();\n\n\t\treturn view('edit', compact(\"list\", \"edit\"));\n\t}", "function update_tel_list_name() {\n\t\tif (empty($this->data) || empty($this->data['callListId']) || empty($this->data['listName'])) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\t\t$list_name = $this->data['listName'];\n\t\t$call_list_id = $this->data['callListId'];\n\t\t$item_main = $this->data['item_main'];\n\n\t\t$info_list = $this->T16InboundCallList->getListInfoById($call_list_id);\n\t\tif (!isset($info_list[\"T16InboundCallList\"][\"id\"]) || empty($info_list[\"T16InboundCallList\"][\"id\"])) {\n\t\t\techo \"err_not_exist\";\n\t\t\texit;\n\t\t}\n\t\t$check_lock = $this->T92Lock->getInfoLock('inbound_call_list', $this->ESession->getCallListId($this));\n\t\tif (!empty($check_lock)) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$lock_new = $this->create_lock('inbound_call_list', $this->ESession->getCallListId($this), __FUNCTION__);\n\t\tif (!$lock_new) {\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\tif ($this->data['listTestFlag'] == 'true') {\n\t\t\t$list_test_flag = 1;\n\t\t} else {\n\t\t\t$list_test_flag = 0;\n\t\t}\n\n\t\t//Save data to DB\n\t\t$dsT16InboundCallList = $this->T16InboundCallList->getDataSource();\n\t\t$dsT16InboundCallList->begin($this);\n\n\t\t$data_call_list['T16InboundCallList']['id'] = $call_list_id;\n\t\t$data_call_list['T16InboundCallList']['list_name'] = $list_name;\n\t\t$data_call_list['T16InboundCallList']['item_main'] = $item_main;\n\t\t$data_call_list['T16InboundCallList']['list_test_flag'] = $list_test_flag;\n\t\t$data_call_list['T16InboundCallList']['update_user'] = $this->ESession->getUserId($this);\n\t\t$data_call_list['T16InboundCallList']['update_program'] = $this->name.'_'.__FUNCTION__;\n\n\t\t$call_list = $this->T16InboundCallList->save($data_call_list['T16InboundCallList']);\n\n\t\tif(!$call_list || (isset($lock_new) && !empty($lock_new) && !$this->update_lock($lock_new, __FUNCTION__))){\n\t\t\t$dsT16InboundCallList->rollback($this);\n\t\t\t$this->log(\"発信規制番号登録:失敗\");\n\t\t\techo 'systemerror';\n\t\t\texit;\n\t\t}\n\n\t\t$dsT16InboundCallList->commit($this);\n\t\t$results = Array();\n\t\t$results['status'] = 'save';\n\t\t$item_column = $this->T13InboundListItem->getColumnListByItemName($call_list_id, $item_main);\n\t\t$item_column = $item_column['T13InboundListItem']['column'];\n\t\t$results['item_column'] = $item_column;\n\t\techo json_encode($results);\n\t\texit;\n\t}", "function privList(&$p_list)\n {\n }", "public function saveList($list, &$m_order = 0)\n {\n foreach ($list as $item) {\n $m_order++;\n $this->updateOrder($m_order, $item['id']);\n }\n }", "public abstract function get_ids();", "function listItem($view, $id, $value='') {\n\t\tif(!$value) { $value = implode(', ',$id) ; }\n\t\t$str = '<tr><td><a href=\"?view='.$view.'&amp;do=view&amp;pks='.implode(',',$id).'\">'.$value.'</a></td><td><a class=\"edit\" href=\"?view='.$view.'&amp;do=edit&amp;pks='.implode(',',$id).'\"><span class=\"icon has-text-grey\"><i class=\"fas fa-edit\"></i></span></a></td><td><a class=\"open-modal\" data-do=\"delete\" data-view=\"'.$view.'\" data-pks=\"'.implode(',',$id).'\" data-modal-id=\"#my-modal\"><span class=\"icon has-text-danger\"><i class=\"fas fa-ban\"></i></span></a></td></tr>';\n\t\treturn $str;\n\t}", "public function show_list($p_obj_id)\n {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id__master, isys_catg_relation_list__isys_obj__id__slave, obj.isys_obj__isys_obj_type__id, obj.isys_obj__title AS title\n FROM isys_catg_relation_list\n INNER JOIN isys_obj AS obj ON isys_catg_relation_list__isys_obj__id__slave = obj.isys_obj__id\n INNER JOIN isys_obj AS relObj ON isys_catg_relation_list__isys_obj__id = relObj.isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND obj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND relObj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id__slave ';\n\n $l_res = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row = $l_res->get_row()) {\n if ($l_row[\"isys_catg_relation_list__isys_obj__id__master\"] == $p_obj_id &&\n (is_null($this->m_obj_arr) || !in_array($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $this->m_obj_arr))) {\n if ($l_row[\"isys_obj__isys_obj_type__id\"] == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n $this->m_its_arr[$l_row[\"isys_catg_relation_list__isys_obj__id__slave\"]] = $l_row[\"title\"];\n }\n\n if (in_array($this->m_dao_rel->get_objTypeID($l_row['isys_catg_relation_list__isys_obj__id__slave']), $this->m_software_obj_types)) {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id\n FROM isys_catg_relation_list\n INNER JOIN isys_obj ON isys_obj__id = isys_catg_relation_list__isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND isys_catg_relation_list__isys_obj__id__slave = ' . $this->m_dao_rel->convert_sql_id($l_row['isys_catg_relation_list__isys_obj__id__slave']) . '\n AND isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id';\n\n $l_res_app = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row_app = $l_res_app->get_row()) {\n $l_its_data = $this->m_dao_its_comp\n ->get_data(null, null, \"AND isys_connection__isys_obj__id = \" . $this->m_dao_rel->convert_sql_id($l_row_app[\"isys_catg_relation_list__isys_obj__id\"]), null, C__RECORD_STATUS__NORMAL)\n ->get_row();\n\n // Check in it service components\n if (isset($l_its_data['isys_obj__id']) &&\n $this->m_dao_rel->get_objTypeID($l_its_data['isys_obj__id']) == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n if (!array_key_exists($l_its_data['isys_obj__id'], $this->m_its_arr)) {\n $this->m_its_arr[$l_its_data['isys_obj__id']] = $l_its_data['isys_obj__title'];\n }\n }\n }\n }\n\n $this->m_obj_arr[] = $l_row[\"isys_catg_relation_list__isys_obj__id__slave\"];\n $this->new_recurse_relation($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $p_obj_id);\n unset($this->m_obj_arr);\n }\n }\n\n return $this;\n }", "abstract public function get_id();", "function ler_id($id) {\n $x = (int)$id;\n if($x >= $this->bd[0][0] || $x <= 0) {return false;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\n return true;\n }", "public function addToDoList() {\n try {\n if (!($this->toDoList instanceof Base_Model_ObtorLib_App_Core_Crm_Entity_ToDoList)) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception(\" ToDoList Entity not intialized\");\n } else {\n $data = array(\n 'list_title' => $this->toDoList->getListTitle(),\n 'list_description' => $this->toDoList->getListDescription(),\n 'added_on' => $this->toDoList->getAddedOn(),\n 'added_by' => $this->toDoList->getAddedBy(),\n 'added_user_type' => $this->toDoList->getAddedByUserObject(),\n 'reminder_on' => $this->toDoList->getReminderOn(),\n 'reminder_date' => $this->toDoList->getReminderDate(),\n 'reminder_time' => $this->toDoList->getReminderTime(),\n 'current_status' => $this->toDoList->getStatus());\n $last_inserted_id = $this->insert($data);\n return $last_inserted_id;\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception($ex);\n }\n }", "function generarId (){\n $usuarios = traerTodos();\n\n if (count($usuarios) == 0) {\n return 1;\n }\n $elUltimo = array_pop($usuarios);\n $id = $elUltimo['id'];\n return $id + 1;\n}", "public function delete_from_aweber_list($post_data = array(),$list_id = null ){\n\n \t\t$aweber = new AWeberAPI($this->aweber_consumerKey, $this->aweber_consumerSecret);\n // dd($aweber);\n\n\t\ttry {\n\n\t\t $account = $aweber->getAccount($this->aweber_accessKey , $this->aweber_accessSecret);\n\t\t $lists = $account->lists->find(array('name' => $list_id));\n\t\t $list = $lists[0];\n\n\t\t # lets create some custom fields on your list!\n\t\t $custom_fields = $list->custom_fields;\n\t\t $params = array(\n\t\t 'email' => $post_data['email']\n\n\t\t );\n\n\t\t $subscribers = $list->subscribers;\n\t\t $found_subscribers = $subscribers->find($params);\n\t\t foreach ($found_subscribers as $subscriber) {\n\t\t $subscriber->delete();\n\t\t }\n\n\t\t # success!\n\t\t //print \"A new subscriber was added to the $list->name list!\";\n\t\t return true;\n\n\t\t} catch(AWeberAPIException $exc) {\n\t\t return false;\n\t\t}\n\n}", "function listarres_one($id)\n\t{\n\t\t$sql = \"call sp_s_restaurante_one(?)\";\n\t\ttry {\n\t\t\t$PrepareStatement = $this->cnn->getPrepareStatement($sql);\n\t\t\t$PrepareStatement->bindValue(1, $id, PDO::PARAM_INT);\n\t\t\t$PrepareStatement->execute();\n\t\t\treturn $PrepareStatement->fetch();\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error: \" . $e;\n\t\t\treturn false;\n\t\t}\n\t}", "private function getParentListItemDefinitionIds() {\n\t\tif ($this->parentListItemDefinitionIds === null) {\n\t\t\t$this->parentListItemDefinitionIds =\n\t\t\t\t$this->selectParentListItemDefinitionIds();\n\t\t}\n\t\treturn $this->parentListItemDefinitionIds;\n\t}", "public function setListID($ListID)\n\t{\n\t\treturn $this->set('ListID', $ListID);\n\t}", "abstract protected function displayList($list);" ]
[ "0.7275675", "0.72488713", "0.7129375", "0.70470315", "0.679451", "0.66342205", "0.65959966", "0.654775", "0.6538752", "0.649281", "0.6492706", "0.6330551", "0.6299707", "0.6183655", "0.61164963", "0.6107622", "0.60982466", "0.6033601", "0.59617794", "0.59299195", "0.58855116", "0.5881312", "0.58789355", "0.5820285", "0.5813719", "0.5782923", "0.57482535", "0.57453334", "0.57327336", "0.57318604", "0.5703174", "0.5675764", "0.56493723", "0.56416076", "0.5619032", "0.56174904", "0.556113", "0.5538004", "0.55246854", "0.5508774", "0.5494731", "0.5494543", "0.5478503", "0.54772604", "0.5474231", "0.5471406", "0.5469391", "0.5467161", "0.54284954", "0.5413474", "0.54004186", "0.5398792", "0.5379281", "0.5376219", "0.53681546", "0.5368069", "0.53598404", "0.5351203", "0.5336391", "0.53339314", "0.53306615", "0.5319408", "0.53145427", "0.5303059", "0.52900773", "0.5288178", "0.5286024", "0.52830523", "0.5279095", "0.52710915", "0.5270697", "0.5250311", "0.5246855", "0.52182853", "0.52145535", "0.5213668", "0.52104485", "0.51850706", "0.517925", "0.5173071", "0.5156479", "0.5156349", "0.51555395", "0.5147578", "0.51475745", "0.5146936", "0.5144952", "0.51332575", "0.5129701", "0.51296747", "0.51266897", "0.5120809", "0.5119665", "0.5115401", "0.511198", "0.5110172", "0.5104909", "0.51041317", "0.5102409", "0.5102298" ]
0.5708788
30
Returns the parent of the scope
public function getParent() { return $this->parent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_parent() {\n\t\treturn $this->parent();\n\t}", "public function parent()\r\n\t{\r\n\t\treturn $this->parent;\r\n\t}", "public function parent() {\n return $this->parent;\n }", "function getParent () {\r\n\t\treturn $this->_parent;\r\n\t}", "function getParent () {\r\n\t\treturn $this->_parent;\r\n\t}", "public function getParent() {\n\t\treturn $this->_parent;\n\t}", "public function getParent() {\n\t\treturn $this->parent;\n\t}", "public function getParent() {\n\t\treturn $this->parent;\n\t}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "protected function get_parent()\r\n {\r\n return $this->parent;\r\n }", "public function getParent()\n\t{\n\t\treturn $this->parent;\n\t}", "public function getParent()\n\t{\n\t\treturn $this->parent;\n\t}", "public function getParent() {\n return $this->parent;\n }", "public function get_parent();", "public function getParent();", "public function getParent();", "public function getParent();", "public function getParent();", "public function getParent();", "public function getParent();", "public function getParent();", "public function getParent();", "public function getParent();", "public function getParent();", "public function getParent()\n {\n return $this->parent;\n\n }", "final public function getParent()\n\t{\n\t\treturn $this->parent;\n\t}", "public function getParent() {\n\t\t\treturn $this->parent;\n\t\t}", "public function getParent() {\n return $this->__parent;\n }", "public function getParent(){\n return $this->_parent;\n }", "function get_parent()\r\n {\r\n return $this->parent;\r\n }", "function get_parent()\r\n {\r\n return $this->parent;\r\n }", "public function getParentName()\n {\n return $this->getParentContext()->getName();\n }", "function get_parent() {\n return $this->get_mapped_property('parent');\n }", "public function getParent() {\n return $this->mediator_->getContainerForName($this->get('parentName'), $this->getType());\n }", "public function getParentIdentifier()\n {\n return $this->parent;\n }", "public function getParent()\n {\n }", "final public function getParent() {\n\t\treturn $this->_parentNode;\n\t}", "public function getParent () {\n\t\treturn ProjectFactory::getProject($this->idParent);\n\t}", "public function parent(){\n return $this->where('id', $this->parent_id)->first();\n }", "public function getParentContext()\n {\n return $this->parentContext;\n }", "function getParent();", "public function getOuterMostParent() {}", "public function getParent()\n {\n // TODO: Implement getParent() method.\n }", "private function getCurrentParent()\n {\n return $this->getCurrentCategory()->getParentCategory();\n }", "public function parentRecord()\r\n {\r\n return $this->_parent;\r\n }", "public function getParent() {\n\t\tif ($this->path === '/') {\n\t\t\treturn NULL;\n\t\t}\n\t\treturn $this->nodeDataRepository->findOneByPath($this->parentPath, $this->workspace);\n\t}", "public function getParent(){\n\t\treturn $this->father;\n\t}", "public function getParent()\n {\n return $this->Root->parentOfSection($this->URLSegment);\n }", "public function getParent() {\r\n\t\tif ($this->pzkParentId) {\r\n\t\t\treturn pzk_store_element($this->pzkParentId);\r\n\t\t}\r\n\t\treturn NULL;\r\n\t}", "protected function retrieveParent()\n {\n }", "public function parent() { return $this->post->post_parent; }", "public function getParentObject()\n\t{\n\t\treturn $this->parent_obj;\n\t}", "public function __invoke()\n {\n return $this->getParent();\n }", "public function getParent()\n {\n if (! $this->parentrecord) {\n list($this->parentrecord, $unused) = self::getParentAndChild($this->flatpath);\n }\n return $this->parentrecord;\n }", "public function getParentActive()\n {\n return $this->_parentActive;\n }", "public function getParent() {\n return Tracker_FormElementFactory::instance()->getFieldByid($this->parent_id);\n }", "public function getParent()\n {\n return $this->user;\n }", "public function parent() {\n\t\treturn $this->hasOne(Forum::getSectionClass(), \"parent_id\");\n\t}", "public function parent() { }", "public function getParent_id() {\n\t\treturn $this->parent_id;\n\t}", "public function getParentNameSpace(){\n return $this->getSite()->getParent()->getParentNameSpace();\n }", "public function getParentEntity() {\n\t\treturn get_entity($this->getParentGUID());\n\t}", "public function parent()\n {\n if ( !$this->loaded )\n $this->reload();\n\n if ($this->is_root())\n return NULL;\n\n if ( ! in_array('parent', $this->_objects) )\n {\n $sql = \"SELECT * FROM $this->_table_name\n WHERE \n $this->primary_column = $this->parent_key\n ORDER BY \". $this->_sorting[0] .\" \". $this->_sorting[1] .\"\n \";\n\n $result = $this->_db->query($sql);\n\n $this->_objects['parent'] = $this->factory_set($result)[0];\n }\n\n return $this->_objects['parent'];\n }", "public function getParentKey()\n {\n return $this->parent->getAttribute($this->localKey);\n }", "public function getParentKey()\n {\n return $this->parent->getAttribute($this->localKey);\n }", "function getParent() {\n if (!empty($this->parent_txn_id)) {\n return userpoints_transaction_load($this->parent_txn_id);\n }\n }", "public function getParentID()\n {\n return $this->parent_id;\n }", "public function getParentId()\n\t{\n\t\treturn $this->parent_id;\n\t}", "public function getGrandParent();", "public function Parent()\n\t{\n\t\treturn Category::findOrFail($this->category_id);\n\t}", "public function getParent() {\n if (NULL === $this->_parent) {\n throw new LogicException('No parent object was provided for this context.');\n }\n return $this->_parent;\n }", "public function getParentId()\n {\n return $this->parent_id;\n }" ]
[ "0.8053058", "0.7892056", "0.7883717", "0.77991444", "0.77991444", "0.77913827", "0.77913135", "0.77913135", "0.7783843", "0.7783843", "0.7783843", "0.7783843", "0.7783843", "0.7783843", "0.7783843", "0.77772844", "0.77478045", "0.77478045", "0.7735489", "0.7726295", "0.7693168", "0.7693168", "0.7693168", "0.7693168", "0.7693168", "0.7693168", "0.7693168", "0.7693168", "0.7693168", "0.7693168", "0.7689023", "0.7679683", "0.7678684", "0.76750827", "0.7669361", "0.76499766", "0.76499766", "0.7607477", "0.7583176", "0.75313765", "0.75191367", "0.7507634", "0.7502378", "0.7487364", "0.7466823", "0.7461715", "0.7446204", "0.7381132", "0.7377084", "0.73642", "0.7357729", "0.7329388", "0.73276246", "0.7301234", "0.7296246", "0.7240826", "0.7211949", "0.71912336", "0.71636754", "0.71165824", "0.7112395", "0.7079384", "0.70783645", "0.7061775", "0.70599794", "0.7058624", "0.70451957", "0.7043414", "0.703834", "0.70373815", "0.70373815", "0.70328397", "0.6998561", "0.6995244", "0.6981055", "0.69808894", "0.6972966", "0.6964022" ]
0.77763915
33
Returns the name of the scope
public function getName() { return $this->name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _scope()\n\t{\n\t\treturn $this->_meta['scope'];\n\t}", "public static function getScope() {\n\t\treturn self::getPathParams()['scope'];\n\t}", "public function getScope()\n {\n return $this->scope;\n }", "public function getScope()\n {\n return $this->scope;\n }", "public function getScope()\n {\n return $this->scope;\n }", "public function getScope()\n {\n return $this->scope;\n }", "public function getScope()\n {\n return $this->scope;\n }", "public function getScope()\n {\n return $this->scope;\n }", "public function getScope()\n {\n return $this->scope;\n }", "public function getScope();", "public function getScope();", "public function getScope() {\n\t\treturn $this->scope;\n\t}", "public function getScope(): ?string\n {\n return $this->scope;\n }", "public function getScope(): ?string\n {\n return $this->scope;\n }", "public function getScope()\n {\n return $this->_scope;\n }", "public function getScope() {\n\t\treturn $this->_scope;\n\t}", "public static function getScope()\n {\n return self::$scope;\n }", "static public function getScope()\r\n {\r\n return self::$_scope;\r\n }", "abstract public function getScope();", "protected function get_tokenname() {\n // This is unusual but should work for most purposes.\n return get_class($this).'-'.md5($this->scope);\n }", "function getScope($type) {\n\t\tif ($type == \"static\")\n\t\t\treturn \"static\";\n\t\telse\n\t\t\treturn \"instance\";\n\t}", "public function getName() {\n\n\t\treturn $this->class->getNamespaceName();\n\t}", "public function getAttributesScope(string $name);", "private function scope($params)\n {\n if (isset($params['scope'])) {\n return $params['scope'];\n }\n\n return 'global';\n }", "public function getQualifiedName()\r\n {\r\n return $this->getNamespace()->qualify($this->getName());\r\n }", "public function getCurrentScope()\n {\n return $this->getPersistentData('currentScope', $this->getDefaultScope());\n }", "public function getCompleteName()\n {\n return $this->namespace . '\\\\' . $this->name;\n }", "public function getQueryScope()\n {\n return $this->query_scope;\n }", "public function getScopeLabel()\r\n {\r\n $html = '';\r\n $attribute = $this->getElement()->getEntityAttribute();\r\n if (!$attribute || Mage::app()->isSingleStoreMode() || $attribute->getFrontendInput()=='gallery') {\r\n return $html;\r\n }\r\n\r\n /*\r\n * Check if the current attribute is a 'price' attribute. If yes, check\r\n * the config setting 'Catalog Price Scope' and modify the scope label.\r\n */\r\n $isGlobalPriceScope = false;\r\n if ($attribute->getFrontendInput() == 'price') {\r\n $priceScope = Mage::getStoreConfig('catalog/price/scope');\r\n if ($priceScope == 0) {\r\n $isGlobalPriceScope = true;\r\n }\r\n }\r\n\r\n if ($attribute->isScopeGlobal() || $isGlobalPriceScope) {\r\n $html .= Mage::helper('adminhtml')->__('[GLOBAL]');\r\n } elseif ($attribute->isScopeWebsite()) {\r\n $html .= Mage::helper('adminhtml')->__('[WEBSITE]');\r\n } elseif ($attribute->isScopeStore()) {\r\n $html .= Mage::helper('adminhtml')->__('[STORE VIEW]');\r\n }\r\n\r\n return $html;\r\n }", "private function getMappedScope($key)\n {\n $scope = 'default';\n\n if (array_key_exists($key, self::$nameMapping)) {\n $scope = self::$nameMapping[$key]['scope'];\n }\n\n return $scope;\n }", "public function getName()\n {\n return $this->name . ':' . $this->region->getWorld()->id;\n }", "public function getQualifiedName(): string\n {\n return $this->namespace.'.'.$this->name;\n }", "public function getDefaultScope()\n {\n return $this->_defaultScope;\n }", "private function getScopeAdderMethodName($key) {\n return \"addQueryScopeFor\" . studly_case($key);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function name()\n {\n return $this->getName();\n }", "public function name()\n {\n return $this->getName();\n }", "public function getName() {\n\t\treturn $this->current_name;\n\t}", "private function determine_scope() {\n\t\t$taxonomy = $this->get_taxonomy();\n\n\t\tif ( $taxonomy === 'category' ) {\n\t\t\treturn 'category';\n\t\t}\n\n\t\tif ( $taxonomy === 'post_tag' ) {\n\t\t\treturn 'tag';\n\t\t}\n\n\t\treturn 'term';\n\t}", "public function getScope($objectName) {\n\t\treturn $this->objectContainer->getScope($objectName);\n\t}", "public function getName() {\n return $this->getFullName();\n }", "function getName():string\n {\n return $this->grant_type;\n }", "public function getGroupNames($scope);", "public static function getName(): string\n {\n return static::$name;\n }", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName() {\n if ( $this->reflectionSource instanceof ReflectionFunction ) {\n return $this->reflectionSource->getName();\n } else {\n return parent::getName();\n }\n }", "public function name() {\n\t\treturn $this->name;\n\t}", "protected function getOwnerName() {\n $owner_name = 'environment';\n return $owner_name;\n }", "public function getName()\n {\n return $this->_session->getName();\n }", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function getName()\n {\n return $this->get(self::NAME);\n }", "public function getName()\n {\n return $this->get(self::NAME);\n }", "public function getName() {\n return $this->get(self::NAME);\n }", "public function getName() {\n return $this->get(self::NAME);\n }", "public function getName() {\n return $this->get(self::NAME);\n }", "public function getName()\n {\n switch ($this->queriedContext) {\n case $this->i8n('context-keyword'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-keyword') . ' : ' . $this->getInput('q');\n break;\n case $this->i8n('context-group'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-group') . ' : ' . $this->getKey('group');\n break;\n case $this->i8n('context-talk'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-talk') . ' : ' . $this->getTalkTitle();\n break;\n default: // Return default value\n return static::NAME;\n }\n }", "public function getName(): string\n {\n return $this->getIdentifier()->getName();\n }", "public function getName(): string\n {\n\t\treturn $this->name;\n\t}", "public function getName() {\n return ($this->isInit()) ? $this->name : null;\n }", "public function getName()\n {\n\t\treturn $this->_name;\n\t}", "public function name()\n\t{\n\t\treturn $this->_name;\n\t}", "public function scopes()\n {\n return [\n 'none' => 'Testing Unit',\n 'tag' => new TagScope(),\n 'category' => new CategoryScope(),\n\n ];\n }", "public function getName() {\n\t\treturn $this->_name;\n\t}", "public function getName() {\n\t\treturn $this->_name;\n\t}", "function getName() {\n // $this is used to refer to an attribute of a class\n return $this->name;\n }", "public function getName(): string\n {\n return $this->fqsen->getName();\n }", "public function getScopes();", "public function getScopes();", "public function getScopes();", "private function scopeCondition()\n {\n $theScope = $this->scopeName();\n\n if ($theScope === null) {\n throw new NullScopeException('You cannot pass in a null scope into Listify. It breaks stuff.');\n }\n\n if ($theScope === $this->defaultScope) {\n return $theScope;\n }\n if (is_string($theScope)) {\n //Good for you for being brave. Let's hope it'll run in your DB! You sanitized it, right?\n $this->stringScopeValue = $theScope;\n return $theScope;\n }\n if (! is_object($theScope)) {\n throw new InvalidScopeException('Listify scope parameter must be a String, an Eloquent BelongsTo object, or a Query Builder object.');\n }\n\n $reflector = new \\ReflectionClass($theScope);\n if ($reflector->getName() == 'Illuminate\\Database\\Eloquent\\Relations\\BelongsTo') {\n $relationshipId = $this->getAttribute($theScope->getForeignKey());\n\n if ($relationshipId === null) {\n throw new NullForeignKeyException('The Listify scope is a \"belongsTo\" relationship, but the foreign key is null.');\n }\n\n return $theScope->getForeignKey().' = '.$this->getAttribute($theScope->getForeignKey());\n }\n if ($reflector->getName() != 'Illuminate\\Database\\Query\\Builder') {\n throw new InvalidScopeException('Listify scope parameter must be a String, an Eloquent BelongsTo object, or a Query Builder object.');\n }\n $theQuery = ( new GetConditionStringFromQueryBuilder())->handle($theScope);\n $this->stringScopeValue = $theQuery;\n\n return $theQuery;\n }", "public function getApiScope()\n {\n return $this->api_scope;\n }", "public function getName(): string\n {\n return $this->isStarted() ? session_name() : $this->name;\n }", "public function getName(): string {\n\t\treturn $this->l10nFactory->get('comments')->t('Comments');\n\t}", "protected function _getScope()\n {\n if (!$this->hasData('scope')) {\n $this->setScope(null);\n }\n return $this->_getData('scope');\n /*\n if (!$this->_scope) {\n $this->_scope = $this->_storeFactory->create(\n [\n 'url' => $this,\n 'data' => ['force_disable_rewrites' => false, 'disable_store_in_url' => false],\n ]\n );\n }\n return $this->_scope; */\n }", "protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', get_class($this)));\n\t}", "public function defaultScope() {\n return array(\n 'order' => $this->getTableAlias(false, false) . '.name'\n );\n }", "final public function getName()\n\t{\n\t\treturn $this->name;\n\t}", "function getName() {\n\t\treturn $this->name;\n\t}", "public function getName(): string\n {\n return $this->getAttributes()['name'];\n }", "public function getName(): string\n {\n return $this->requireString('name');\n }", "public function getName()\n\t{\n\t\treturn $this->_name;\n\t}", "public function getName()\n\t{\n\t\treturn $this->_name;\n\t}", "public function getName()\n\t{\n\t\treturn $this->_name;\n\t}", "public function getName()\n\t{\n\t\treturn $this->_name;\n\t}", "public function getName()\n\t{\n\t\treturn $this->_name;\n\t}", "public function getName()\n\t{\n\t\treturn $this->_name;\n\t}", "function getName () {\n\t\treturn $this->name;\n\t}", "public static function getName();", "public function getName()\n {\n return $this->str_name;\n }", "public function getName()\n {\n return $this->getLocales()[$this->getCurrent()]->name;\n }", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}" ]
[ "0.7557822", "0.75445944", "0.73972374", "0.73972374", "0.73972374", "0.73972374", "0.73972374", "0.73972374", "0.73972374", "0.7346841", "0.7346841", "0.7345836", "0.73372066", "0.73372066", "0.73232", "0.72875124", "0.720846", "0.69939387", "0.6883572", "0.68202764", "0.6584795", "0.6539349", "0.64984256", "0.64296085", "0.64230263", "0.6411256", "0.63786525", "0.6362475", "0.6355303", "0.6335969", "0.6295985", "0.6274945", "0.6254046", "0.6252375", "0.6228014", "0.6228014", "0.6228014", "0.6228014", "0.6228014", "0.6228014", "0.6228014", "0.62050116", "0.62050116", "0.61882406", "0.6169058", "0.6158365", "0.6150789", "0.6114661", "0.6109657", "0.61056644", "0.60894996", "0.60894996", "0.6089146", "0.6089039", "0.60716933", "0.60667616", "0.606224", "0.606224", "0.606224", "0.60599107", "0.60599107", "0.6050383", "0.6050383", "0.6050383", "0.6050196", "0.6048711", "0.60422766", "0.6040716", "0.6036979", "0.60326993", "0.60320246", "0.6030415", "0.6030415", "0.6029718", "0.60287607", "0.6024726", "0.6024726", "0.6024726", "0.6019503", "0.6019125", "0.60123867", "0.60088545", "0.6008655", "0.60085255", "0.5992042", "0.5989177", "0.59880996", "0.59825426", "0.598067", "0.5979699", "0.5979699", "0.5979699", "0.5979699", "0.5979699", "0.5979699", "0.5976492", "0.59748155", "0.5974626", "0.59733266", "0.5971524", "0.5971524" ]
0.0
-1
Return a list of records
function listRecord() { global $dbi; $sql = "SELECT c.id, c.id_menu, m.menu, c.keywords, c.description, c.content FROM content c, navigation m WHERE c.id_menu=m.id"; $varResult = mysql_query($sql,$dbi); $varContent .= "<thead>\n"; $varContent .= " <tr align='center' bgcolor='#a8a887'>\n"; $varContent .= " <th align='center' class='nobr' width='2%'>\n"; $varContent .= " <a href=\"javascript:selecionaTodos();\n\">"; $varContent .= " <img src='../$varCaminho/images/admin/ico_marcar.gif' border='0' />\n"; $varContent .= " </a>\n"; $varContent .= " </th>\n"; $varContent .= " <th class='nobr' width='100%'>Menu</th>\n "; $varContent .= " <th class='nobr'>Options</th>\n"; $varContent .= " </tr>\n "; $varContent .= "</thead>\n"; $varContent .= "<input name='hideaction' type='hidden' id='hideaction' />\n"; $varContent .= "<input name='cod' type='hidden' id='cod' />\n"; $varContador = 0; $varContent .= "<tbody>\n"; while(list($varId,$varIntId_menu,$varStrMenu,$varKeywords,$varDescription,$varTxtContent)=mysql_fetch_row($varResult)) { $varBgColor = ($varContador%2) ? "#ffffcc" : "#ffffff"; $varContent .= "<tr bgcolor=\"$varBgColor\">\n"; $varContent .= " <td align='center'>\n"; $varContent .= " <input type='checkbox' name='selected[]' value='$varId' />\n"; $varContent .= " </td>\n"; $varContent .= " <td width='100%'>\n"; $varContent .= " <strong><a href=\"javascript:executar('view','$varId','content-view.php')\">$varStrMenu</a></strong>\n"; $varContent .= " </td>\n"; $varContent .= " <td align='center' class='nobr'>\n"; $varContent .= " <a href=\"javascript:executar('edit','$varId','content-edit.php')\">\n"; $varContent .= " <img src=\"../$varCaminho/images/admin/icons/edit.png\" width='16' height='15' border='0' /> Edit</a>\n"; $varContent .= " </td>\n"; $varContent .= "</tr>\n"; $varContador ++; } $varContent .= "</tbody>\n"; $varContent .= "<tr>\n"; $varContent .= " <td height='30' colspan='4' class='nobr'>\n"; $varContent .= " <img src='../$varCaminho/images/admin/ico_selecionados.gif' width='38' height='22' border='0' />\n"; $varContent .= " <a href=\"javascript:executar('exclude','','content-del.php','Do you sure about this?')\">\n"; $varContent .= " <img src='../$varCaminho/images/admin/icons/user-trash.gif' width='16' height='15' border='0' />\n"; $varContent .= " Del selected\n"; $varContent .= " </a>\n"; $varContent .= " </td>\n"; $varContent .= "</tr>\n"; return $varContent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllRecords();", "public function getRecords()\n {\n $result = $this->fetchAll($this->select()->order('id ASC'))->toArray();\n return $result;\n }", "public function records() { return $this->_m_records; }", "public function getRecords()\n {\n return $this->records;\n }", "public function getRecords()\n {\n return $this->records;\n }", "public function records() : array {\n return $this->records;\n }", "public function get_records(){\n\t\t$records = array();\n\t\t$this->do_db();\n\t\t$tmps\t = $this->last_result;\n\t\t$db\t\t = $this->db;\n\t\twhile($record\t = $db->fetch_array($tmps)){\n\t\t\t$records[] = $record;\n\t\t}\n\t\treturn $records;\n\t}", "public function fetchRecords() {\n return self::all();\n }", "function getRecords() {\n\t\treturn $this->records;\n\t}", "public function records() {\n if( ! property_exists($this->response(), 'records') ) return [];\n\n return $this->response()->records;\n }", "public function getRecords()\n\t{\n\t\treturn $this->records['data'];\n\t}", "public function getRecords(){\n // Get the sql statement\n $sql = $this->getSql($this->filters);\n // Prepare the query\n $stmt = $this->db->query($sql);\n // Fetch values from PDO array\n return $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function getAll()\n {\n $records = $this->getRecordsModel()->getAll();\n \n return $records;\n }", "public function getListRecords()\n {\n $result = array();\n $records = $this->records;\n if (count($records)) {\n $columns = $this->columns;\n $customColumns = $this->customColumns;\n $formatterColumns = $this->formatterColumns;\n foreach ($records as $index => $record) {\n $row = array();\n foreach ($columns as $column) {\n if (isset($customColumns[$column])) {\n $params = $customColumns[$column];\n ob_start();\n call_user_func($params['callback'], $record, $this);\n $output = ob_get_contents();\n ob_end_clean();\n $row[$column] = $output;\n } else {\n if (isset($formatterColumns[$column])) {\n $params = $formatterColumns[$column];\n ob_start();\n call_user_func($params['callback'], $record);\n $output = ob_get_contents();\n ob_end_clean();\n $row[$column] = $output;\n } else {\n // Is alias column\n if (array_key_exists($column, $this->aliases)) {\n $columnName = $column;\n } else {\n list($tableName, $columnName) = explode(\".\", $column);\n }\n $columnIdentifier = isset($columnName) ? $columnName : $column;\n $row[$column] = $record[$columnIdentifier];\n }\n }\n }\n $result[$index] = $row;\n }\n }\n return $result;\n }", "public function getQueryRecords()\n {\n return $this->get(self::_QUERY_RECORDS);\n }", "function getListOfRecords(){\n // the orders will be display and the receipts from there \n \n $element = new Order();\n \n $receipts_filter_orders = cisess(\"receipts_filter_orders\");\n \n if ($receipts_filter_orders===FALSE){\n $receipts_filter_orders = \"Abierta\"; // default to abiertas\n }\n \n if (!empty($receipts_filter_orders))\n {\n $element->where(\"status\",$receipts_filter_orders);\n }\n \n \n $element->order_by(\"id\",\"desc\");\n \n $all = $element->get()->all;\n //echo $element->check_last_query();\n ///die();\n $table = $this->entable($all);\n \n return $table;\n \n \n }", "private function get_recs() {\n\tglobal $_DB;\n\n\t$sql = \"SELECT e00.name, e00.property_id AS name_id,\n\t\t\t\te02.name AS value, e02.prop_value_id AS value_id\n\t\t\tFROM (\n\t\t\t\tSELECT property_id, name FROM \".$_DB->prefix.\"e00_property\n\t\t\t\tWHERE organization_idref = \".$_SESSION[\"organization_id\"].\"\n\t\t\t) AS e00\n\t\t\tJOIN \".$_DB->prefix.\"e02_prop_value AS e02 ON e02.property_idref = e00.property_id\n\t\t\tORDER BY name, value;\";\n\t$stmt = $_DB->query($sql);\n\t$this->records = array();\n\twhile ($row = $stmt->fetchObject()) {\n\t\t$record = array(\n\t\t\t\t\"name\" =>\t\t$row->name,\n\t\t\t\t\"name_id\" =>\t$row->name_id,\n\t\t\t\t\"value\" =>\t\t$row->value,\n\t\t\t\t\"value_id\" =>\t$row->value_id,\n\t\t);\n\t\t$this->records[] = $record;\n\t}\n\t$stmt->closeCursor();\n}", "public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}", "#[\\ReturnTypeWillChange]\n function records()\n {\n return $this->getArrayCopy();\n }", "public function fetchAll()\n\t{\n\t\t$aReturn = Array();\n\t\twhile( $oRecord = $this->next() )\n\t\t\tarray_push( $aReturn, $oRecord );\n\t\t$this->rewind();\n\t\treturn $aReturn;\n\t}", "public function all()\n {\n $records = R::findAll( $this->table_name(), \" order by id \");\n\n $object = array_map( function($each_record) {\n return $this->map_reford_to_object( $each_record );\n },\n $records\n );\n\n return array_values( $object );\n }", "public static function get_all_records() {\n\t\tglobal $wpdb;\n\n\t\t$query = 'select * from ' . self::TABLE_NAME . ' order by email asc;';\n\n\t\t$results = $wpdb->get_results( $query, ARRAY_A );\n\n\t\tif ( ! is_array( $results ) ) {\n\t\t\t$results = array();\n\t\t\treturn $results;\n\t\t}\n\n\t\treturn $results;\n\t}", "protected function getCollectedRecords() {}", "protected function getCollectedRecords() {}", "protected function getCollectedRecords() {}", "protected function getRecords()\n {\n $query = $this->prepareQuery();\n\n if ($this->showTree) {\n $records = $query->getNested();\n }\n elseif ($this->showPagination) {\n $method = $this->showPageNumbers ? 'paginate' : 'simplePaginate';\n $currentPageNumber = $this->getCurrentPageNumber($query);\n $records = $query->{$method}($this->recordsPerPage, $currentPageNumber);\n }\n else {\n $records = $query->get();\n }\n\n /**\n * @event backend.list.extendRecords\n * Provides an opportunity to modify and / or return the `$records` Collection object before the widget uses it.\n *\n * Example usage:\n *\n * Event::listen('backend.list.extendRecords', function($listWidget, $records) {\n * $model = MyModel::where('always_include', true)->first();\n * $records->prepend($model);\n * });\n *\n * Or\n *\n * $listWidget->bindEvent('list.extendRecords', function ($records) {\n * $model = MyModel::where('always_include', true)->first();\n * $records->prepend($model);\n * });\n *\n */\n if ($event = $this->fireSystemEvent('backend.list.extendRecords', [&$records])) {\n $records = $event;\n }\n\n return $this->records = $records;\n }", "public function getMultipleRecords() {\n $i = 0;\n $output = [];\n $_this = $this;\n while($row = $_this->fetchAssoc()){\n $output[\"data\"][$i] = $row;\n $i++;\n }\n return $output;\n }", "function getRecords($limit = false)\n\t{\n\t\tif ($limit !== false)\n\t\t\t$this->setParam(\"limit\", $limit);\n\n\t\t$this->table->getRecords();\n\t}", "protected function getRecords()\r\n {\r\n $records = null;\r\n $model = $this->controller->reorderGetModel();\r\n $query = $model->newQuery();\r\n\r\n $this->controller->reorderExtendQuery($query);\r\n\r\n if ($this->sortMode == 'simple') {\r\n $query = $query\r\n ->orderBy($model->getSortOrderColumn());\r\n $records = $query->get();\r\n $records = $records->groupBy($model->getGroupColumn());\r\n }\r\n elseif ($this->sortMode == 'nested') {\r\n $records = $query->getNested();\r\n }\r\n\r\n return $records;\r\n }", "public function index()\n {\n return new RecordCollection(Record::all());\n }", "public function records()\n {\n return $this->hasMany(Record::class);\n }", "function getList()\n {\n global $db;\n $sql = \" select * from \".$this->table.\" \"; \n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n\t\t$info = $db->execute($sql);\n \t\t$item = $info->GetRows();\t\n\t\treturn $item;\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM recibo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function get_usersrecords() {\n\t\t$this->db->select('ut.users_id, ut.message, u.users_fname, u.users_lname,u.users_email_id');\n\t\t$this->db->from('user_tickets ut');\n\t\t$this->db->join('users u', 'u.users_id = ut.users_id');\n\t\t$query = $this->db->get();\n\n\t\t$collection = $query->result();\n\t\treturn $collection;\n\t}", "public function getList()\n\t{\n\t\treturn $this->crud->orderby('id DESC')\n\t\t\t\t\t->read(10)\n\t\t;\t\n\t}", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "public function fetchList();", "function retAllRecords()\n {\n\t\t //open database connection\n\t\t $conn = $this->openDBConnection();\n\t\t \n\t\t\t//Create query\n\t\t $query = 'SELECT * FROM players ORDER BY projdraftround ASC';\n\t\t \n\t\t //Get result\n\t\t $result = mysqli_query($conn, $query);\n\t\t \n\t\t \n\t\t //Fetch result\n\t\t $entries = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\t\t \n\t\t //close connection\n\t\t mysqli_close($conn);\n\t\t \n\t\t //return entries\n\t\t return $entries;\n\t\t \n\t }", "public static function all()\n\t{\n\t\treturn self::new_instance_records()->all();\n\t}", "function readAll() {\r\n $todo = [];\r\n $sql = 'SELECT id, nombre\r\n FROM deportes\r\n ORDER BY nombre';\r\n $stmt = $this->pdo->prepare($sql);\r\n $stmt->execute();\r\n while ($datos = $stmt->fetch()) {\r\n $todo[] = $this->convertRecord($datos);\r\n }\r\n return $todo;\r\n }", "function getRecords($pupil_id){\r\n\t\t$data = array('massive'=>array('Data','Dump'));\r\n\treturn $data;\r\n\t}", "public function showList()\n {\n $query = \"SELECT * FROM todos LIMIT :numRecs OFFSET :offsetVal\";\n $stmt = $this->dbConnection->prepare($query);\n $stmt->bindValue(':numRecs', $this->numRecords, PDO::PARAM_INT);\n $stmt->bindValue(':offsetVal', $this->offsetValue, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function getList() {\n return $this->db->get($this->table)->result_array();\n }", "public function getRecordList(Application $app)\n {\n $api_key = $app->locals['api_key'];\n $sql = 'SELECT * FROM records WHERE api_key = ? ORDER BY id LIMIT ' . (string)self::MAX_RECORDS;\n $records = $app->entryFormDb->query($sql, [$api_key]);\n return [\n 'most_recent_id' => max(array_merge([0], array_column($records, 'id'))),\n 'records' => $records,\n 'categories' => self::CATEGORIES,\n ];\n }", "public function index()\n {\n return Record::all();\n }", "public static function getMultiRecord(){\n $sql = \"SELECT user_id, user_name, email, password, phone, address, type, signup_day, del_flag FROM user_t\";\n $records = Database::currentDb()->getMultiRecord($sql, $total_row);\n return $records;\n }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function sourceRecords()\n {\n if (class_exists(\"Subsite\") && Subsite::get()->count() > 0) {\n $origMode = Versioned::get_reading_mode();\n Versioned::set_reading_mode(\"Stage.Stage\");\n $items = array(\n \"Pages\" => Subsite::get_from_all_subsites(\"SiteTree\"),\n \"Files\" => Subsite::get_from_all_subsites(\"File\"),\n );\n Versioned::set_reading_mode($origMode);\n\n return $items;\n } else {\n return array(\n \"Pages\" => Versioned::get_by_stage(\"SiteTree\", \"Stage\"),\n \"Files\" => File::get(),\n );\n }\n }", "protected function _readRecords() {}", "function fetch_records($dont_get_more = false)\n\t{\n\t\t//echo $this->sql.'<br>';\n\t\t$recs = db_getAll($this->sql, $this->use_db);\n\t\tif ($recs === false) return array();\n\n\t\t$res = array();\n\t\t$single_el = new $this->single_element_class;\n\t\tforeach ($recs as $rec) {\n\t\t\t$single_el->from_raw($rec);\n\t\t\t$res[] = $single_el->to_array($dont_get_more);\n\t\t}\n\t\treturn $res;\n\t}", "function getRecords() {\n Global $Link;\n $sql = \"SELECT id, url, site FROM `test`\";\n $results = mysqli_query($Link, $sql );\n\n if (!$results) { echo mysqli_error($Link); echo ' <br>' . $sql; }\n \n $rowsAll = [];\n while ($row = $results->fetch_assoc()) {\n $rowsAll[] = $row;\n }\n return $rowsAll;\n }", "public static function getRecords() {\r\n\t\t$activities\t= self::getAllActivities();\r\n\t\t$reformConfig\t\t= array(\r\n\t\t\t'id'\t=> 'id',\r\n\t\t\t'title'\t=> 'label'\r\n\t\t);\r\n\r\n\t\treturn TodoyuArray::reform($activities, $reformConfig);\r\n\t}", "public function getScoreRecordListList(){\n return $this->_get(2);\n }", "protected function fetchRecords(): array\n {\n // Ascending update date is the ONLY way we can be sure to get all payments.\n\n $order = 'UpdatedDateUTC';\n\n return $this->accountingApi->getAccounts(\n $this->ifModifiedSince,\n $this->where,\n $order\n )->accounts;\n }", "public function getRecord();", "public function data()\n\t{\n\t\t$query = $this->query;\n\t\t$query['limit'] = $this->per_page;\n\t\t$query['offset'] = ($this->get_cur_page() - 1) * $this->per_page;\n\t\treturn $this->model->all($query);\n\t}", "public function getRecords()\n {\n try {\n $SQL = \"SELECT * FROM `\".CMS_TABLE_PREFIX.\"mod_feedback` WHERE `page_id` > '0' AND `active`='1'\";\n $results = $this->app['db']->fetchAll($SQL);\n return $results;\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "function fetch_all() {\n $query = \"SELECT * FROM ReadingList\";\n $statement = $this->connect->prepare($query);\n if($statement->execute()) {\n while($row = $statement->fetch(PDO::FETCH_ASSOC))\n {\n $data[] = $row;\n }\n return $data;\n } else {\n return \"error\";\n }\n }", "public function get_data()\n\t{\n\t\t//get records\n\t\t$record_set = $this->connection->query\n\t\t(\"\n\t\t\tselect\n\t\t\t\tProjectID as ID,\n\t\t\t\tconcat ('Project ', ProjectNum, ': ', Title) as selection\n\t\t\tfrom Project\n\t\t\");\n\t\t$records = $record_set->fetchAll();\n\t\t$record_set->closeCursor();\n\n\t\t//return records\n\t\treturn $records;\n\n\t}", "public function findAll()\n {\n $this->ensureIsConfigured();\n $classname = $this->getRecordClassname();\n return $classname::find();\n }", "public function records()\n {\n return $this->hasMany('App\\Record');\n }", "public function fetchAll()\n {\n // LEFT JOIN patient ON patient.patientId = doc_calendar.patientId\n $select = new \\Zend\\Db\\Sql\\Select ;\n $select->from('doc_calendar');\n $user_session = new Container('user');\n\n $select->where(\" doc_calendar.doctorId = '{$user_session['user']->getId()}'\");\n $select->join(array(\"p\" => \"patient\"), \"doc_calendar.patientId = p.patientId\");\n\n $dbAdapter = $this->tableGateway->getAdapter();\n $statement = $dbAdapter->createStatement();\n\n $select->prepareStatement($dbAdapter, $statement);\n $driverResult = $statement->execute(); // execute statement to get result\n\n $resultSet = new ResultSet();\n $resultSet->initialize($driverResult);\n $rows = array();\n foreach($resultSet as $row) {\n $rows[] = $row->getArrayCopy();\n }\n\n return $rows;\n }", "public function getList();", "public function getList();", "public function results()\r\n\t{\r\n\t\treturn $this->model->get($this->select);\r\n\t}", "public function getDataList(){\n return $this->_get(1);\n }", "public function get_rows()\n\t{\n//\t\t$rows = new object_list($this->connections_from(array(\"type\" => \"RELTYPE_CHILD\", \"to.class_id\" => crm_bill_row_obj::CLID)));\n\t\t$rows = new object_list(array(\n\t\t\t\"class_id\" => crm_bill_row_obj::CLID,\n\t\t\t\"CL_CRM_BILL_ROW.RELTYPE_CHILD(CL_CRM_BILL_ROW_GROUP).oid\" => $this->id(),\n\t\t\tnew obj_predicate_sort(array(\"jrk\" => \"asc\")),\n\t\t));\n\t\treturn $rows;\n\t}", "public function index()\n\t{\n\t\treturn $this->repo->loadRecord();\n\t}", "public function get_records($to_date){\n $this->db->select('record_id, title, description, publish_date')\n ->from('records')\n // only retrieve records that were published before $to_date\n ->where(\"publish_date <= '$to_date'\")\n ->order_by('record_id asc');\n $query = $this->db->get();\n return $query->result_array();\n }", "public function get_entries() {\n\t\t$this->db->select('oznaka, lokacija, brm');\n\t\t$query = $this->db->get('sale');\n\t\tif ($query->num_rows() > 0) {\n foreach ($query->result() as $temp) {\n $array[] = $temp;\n }\n\t\t\treturn $array;\n\t\t}\n\t}", "public function getAll(){\n\t\treturn $this->db->get($this->table);\n\t}", "public function getRecordsAt($offset)\n {\n return $this->get(self::_RECORDS, $offset);\n }", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "function get()\n\t{\n\t\tif (empty($this->use_db)) $this->use_db = false; //use default connection\n\t\t$this->sql = 'SELECT * FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\t$this->apply_sort();\n\t\treturn $this->fetch_records();\n\t}", "function getRecords( $sql ) {\r\n\t\t\t$result = $this->_connectAndExec( $sql );\r\n\t\t\t$dataset = array();\r\n\t\t\twhile ( ocifetchinto( $result, $line, OCI_ASSOC ) ) {\r\n\t\t\t\tarray_push( $dataset, $this->_lowerKeyNames( $line ) );\r\n\t\t\t}\r\n\t\t\tOCIFreeStatement( $result );\r\n\t\t\treturn $dataset;\r\n\t\t}", "function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}", "function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}", "public function results()\n {\n return $this->model->get($this->select);\n }", "public function getList()\n {\n $sql = 'SELECT * FROM ' . $this->_tablename;\n \n $query = $this->db->query($sql);\n\n return $query;\n }", "function getRecords($columnParameterArray){\n\t\t\t\n\t\t}", "public function toList() {\r\n\t\treturn $this->PDOStatement->fetchAll(PDO::FETCH_ASSOC);\r\n\t}", "public function allRecords()\n\t{\n\t\treturn $this->with(['applicant.department.college.branch', \n\t\t\t'patent', 'project', 'projectType'])\n ->get();\n\t}", "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 TemparioData());\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM \".$this->table;\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_OBJ);\n \n }", "public function allRecordsByDate(){\n\t\t\t$news = collect(DB::table('news')->get());\n\t\t\treturn $news->sortBy('createdat');\n\t\t}", "public static function getDataList () { return self::getList('data'); }", "function getallrecord()\n\t{\n\t\treturn $this->db->get(\"tblteman\");\n\t\t// fungsi get(\"namatable\") adalah active record ci\n\t}", "public function getList()\n {\n return $this->select()->get();\n }", "function get ()\n\t{\n\t\t$ ret = array ();\n\t\t\n\t\t// Loop por todos os registros no banco de dados\n\t\tfor ( $ x = 0 ; ( $ x < $ this -> num_records () && count ( $ ret ) < $ this -> _limit ); $ x ++)\n\t\t{\t\t\t\n\t\t\t$ row = $ this -> _px -> retrieve_record ( $ x );\n\t\t\t\n\t\t\tif ( $ this -> _test ( $ row ))\n\t\t\t{\n\t\t\t\tforeach ( $ row as $ key => $ val )\n\t\t\t\t{\n\t\t\t\t\t// Encontre todos os campos que não estão na matriz selecionada\n\t\t\t\t\tif (! in_array ( $ key , $ this -> _select ) &&! empty ( $ this -> _select )) unset ( $ row [ $ key ]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ ret [] = $ linha ;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ ret ;\n\t}", "public function get_all ();", "public function getAll()\n {\n $sql = \"SELECT * FROM `%s`\";\n $this->_sql[] = sprintf($sql, $this->_table);\n $this->_parameters[] = array();\n return $this->run();\n }", "public function get()\n {\n return self::fetchAll();\n }", "public function Records()\r\n\t{\r\n\t\treturn $this->last_result;\r\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM patient_info';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "protected final function fetchRecords()\n {\n $this->query->setLimit(\n (($this->parameters->getCurrentPage() - 1) * $this->parameters->getResultsPerPage()),\n $this->parameters->getResultsPerPage()\n );\n\n $this->data = $this->query->execute()->getAssociative();\n }", "public function getList()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}" ]
[ "0.81536776", "0.7975154", "0.79085326", "0.7842345", "0.7842345", "0.7787921", "0.7781327", "0.7774018", "0.77368194", "0.7623033", "0.75859314", "0.7582214", "0.74418926", "0.740975", "0.7395353", "0.7369865", "0.7336273", "0.71824855", "0.7024901", "0.6992816", "0.6992177", "0.69622004", "0.6948275", "0.6948275", "0.694401", "0.6866384", "0.6830413", "0.68285966", "0.68041563", "0.680401", "0.6784771", "0.674514", "0.67309225", "0.6715899", "0.6697082", "0.66550624", "0.66350436", "0.6620782", "0.6619507", "0.66154015", "0.66085017", "0.6598155", "0.658977", "0.6589347", "0.65753686", "0.65646625", "0.6548581", "0.6548581", "0.6548581", "0.6532329", "0.6528257", "0.6505489", "0.6504425", "0.65017104", "0.64857656", "0.64766675", "0.6474169", "0.6460889", "0.64489657", "0.6430068", "0.64218616", "0.6421137", "0.6412398", "0.639859", "0.63973796", "0.63973796", "0.63862926", "0.63830304", "0.6370628", "0.63701296", "0.63674754", "0.63654107", "0.6362687", "0.6348475", "0.63466793", "0.6344033", "0.63424236", "0.6340812", "0.6340812", "0.6331662", "0.633154", "0.6326489", "0.6326468", "0.63226396", "0.6309039", "0.6303056", "0.62953156", "0.6292793", "0.62834424", "0.62800467", "0.6279837", "0.6278757", "0.6270745", "0.62673765", "0.62616354", "0.6260979", "0.6258822", "0.6258822", "0.6258822", "0.62529856", "0.6242968" ]
0.0
-1
Adds the record in the database
function addRecord($prmIntId_menu,$prmKeywords,$prmDescription,$prmStrTitle,$prmTxtContent) { global $dbi; $prmTxtContent = addslashes($prmTxtContent); $prmStrKeywords = addslashes($prmStrKeywords); $prmStrDescription = addslashes($prmStrDescription); $prmStrTitle = addslashes($prmStrTitle); $prmTxtContent = addslashes($prmTxtContent); $sql = "INSERT INTO content(id_menu,keywords,description,title,content) VALUES ($prmIntId_menu,'$prmKeywords','$prmDescription','$prmStrTitle','$prmTxtContent')"; $varResult = mysql_query($sql,$dbi); return mysql_errno(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "function add($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\n\t\t// update the DB table appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\t$this->_data[$key] = $record;\n\n\t\t$this->store();\n\t}", "public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// insert\n\t\t\t\t$this->getHandler()->create($record);\n\n\n\t\t\t\t$msg = new Message('You have successful create a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "public function addToDb()\n {\n\n // make sure this is a valid new entry\n if ($this->isValid()) {\n // check for duplicate\n $vals = sprintf(\"('%s',%d)\",$this->email,$this->level);\n $sql = \" insert into Admins values $vals\";\n Dbc::getReader()->Exec($sql);\n }\n else\n print \"<br> Invalid entry. STOP! ($sql)<br>\";\n }", "function addItemToDB()\n {\n $this->database->addItemToDB($this);\n }", "public function add() {\n $fields_definition = '';\n $fields_values = '';\n foreach ($this->fields as $name => $value) {\n $fields_definition .= '`' . $name . '`, ';\n $fields_values .= '\\''. $value . '\\', ';\n }\n\n $fields_definition = chop($fields_definition, ', ');\n $fields_values = chop($fields_values, ', ');\n\n $query = 'INSERT INTO `' . $this->table . '`'\n . ' (' . $fields_definition\n . ' ) VALUES ( ' . $fields_values . ' )';\n\n return $this->connection->query($query);\n }", "public function add(){\n $tab = DB::table('student');\n $res = $tab -> insert(['name' => '小黑', 'age' => '18']);\n }", "public function addRecord()\n {\n $rec = new Record($this, true);\n $rec->markForInsert();\n $this->records[] = $rec;\n return $rec;\n }", "function addNew($rec)\r\n\t\t{\r\n\t\t\t// Create associative array of key fields and data values\r\n\t\t\t$data = array(\"idMedicalRecord\"=>$rec[0],\"medicalRec_weight\"=>$rec[1],\"medicalRec_height\"=>$rec[2],\"medicalRec_bloodPressure\"=>$rec[3],\"medicalRec_temperature\"=>$rec[4],\"medicalRec_bloodIronLevel\"=>$rec[5],\"medicalRec_time\"=>$rec[6],\"medicalRec_date\"=>$rec[7],\"medicalRec_medicalHistory\"=>$rec[8],\"medicalRec_rejectionReason\"=>$rec[9]);\r\n\t\t\t// Bind values to object's attributes\r\n\t\t\t$this->bind($data);\r\n\t\t\t// Add new values to table in database\r\n\t\t\t$this->insert();\r\n\t\t}", "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "public function addChild(Doctrine_Record $record);", "private function db_add() {\n try {\n db_insert('uc_checkoutpayment_hub_communication')\n ->fields(array(\n 'id' => $this->id,\n 'created' => $this->created,\n 'email' => $this->email,\n 'track_id' => $this->trackId,\n 'value' => $this->value,\n 'currency' => $this->currency,\n 'responseMessage' => $this->responseMessage,\n 'responseCode' => $this->responseCode,\n 'status' => $this->status,\n ))\n ->execute();\n }\n catch (Exception $e) {\n watchdog(\n 'Checkout.com',\n 'Notice: The charge wasn\\'t added to the the local database.\n (:errorMessage)',\n array(\n ':errorMessage' => $e->getMessage(),\n ),\n WATCHDOG_NOTICE\n );\n\n return false;\n }\n\n return true;\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "function dbase_add_record($dbase_identifier, $record)\n{\n}", "public function add(Record $record)\n {\n $this->list[] = $record;\n }", "public function pushRecord()\r\n {\r\n\r\n }", "public function Add(){\n $insert =[\n 'RankNo'=>32132,\n 'UserName'=>$UserName,\n 'NickName'=>123,\n 'MoneyNum'=>32131,\n 'Signature'=>32132131,\n 'WeChatID'=>3213123,\n 'Status'=>$Status,\n 'head_img'=>$head_img\n ];\n return $this->insert($insert);\n }", "public function add() {\n if ($this->id == 0) {\n $reponse = $this->bdd->prepare('INSERT INTO chapitres SET title = :title, body = :body');\n $reponse->execute([\n 'body'=>$this->body, \n 'title'=>$this->title\n ]);\n }\n }", "public function add($data)\n {\n return $this->db->table($this->tableName)->insert($data)->execute();\n }", "public function add($data)\n {\n // $this->db->insert($this->_table, $this);\n\t\t$this->db->insert('tb_event', $data);\n\t\t\treturn true;\n }", "public function saveToDb()\n\t{\n\t\t$this->addDocument();\n\t\tparent::saveToDb();\n\t}", "public function create() //添加\n {\n\t\t//\n }", "public function add() {\n $insertData = $this->data;\n $keepNullFields = [\n 'estimator_id', 'date_requested', 'date_service', 'class_id',\n 'date_service', 'lat', 'lng'\n ];\n foreach ($keepNullFields as $field) {\n if (!$insertData[$field]) {\n $insertData[$field] = null;\n }\n }\n $model = new ReferralModel;\n $ref = $model->create();\n $ref->set($insertData);\n $ref->save();\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request created successfully',\n 'data' => $ref->asArray()\n ]);\n }", "public function add() {\n $mysqli = Database::getMYSQLI();\n \n $stmt = $mysqli->prepare(\"\n INSERT INTO lessons (title, subject, description, resources, persons_ID, \n date_created, search_field)\n VALUES (?,?,?,?,?,?,?)\");\n \n $stmt->bind_param('ssssiss', $this->title, $this->subject, $this->description, \n $this->resources, $this->personsID, $this->dateCreated, $this->searchField);\n \n $stmt->execute();\n $stmt->close();\n $insertID = $mysqli->insert_id;\n $mysqli->close();\n \n // Return ID of inserted record.\n return $insertID;\n }", "public function add($data){\n\t\t\t// echo 'LINE 11:: model';\n\t\t\t// print_r($data);die;\n\n\t\t\tif($this->db->insert('tbl_books', $data)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function addRecord($pObject) {\r\n $this->records[] = $pObject;\r\n }", "function add($record)\n {\n $data = get_object_vars($record);\n $this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $retrieved = $this->rest->post('recipe/maintenance/item/id/' . $record->menu_id.'-'.$record->inventory_id, $data);\n }", "public function add() {\n\t\t\n\t\t$data = array(\n\t\t\t'user_id' => $this->_user_id,\n\t\t\t'date' => $this->_date,\n\t\t\t'time_of_day' => $this->_time_of_day,\n\t\t\t'type_id' => $this->_type_id,\n\t\t\t'route_id' => $this->_route_id,\n\t\t\t'distance' => $this->_distance,\n\t\t\t'time' => $this->_time,\n\t\t\t'shoe_id' => $this->_shoe_id,\n\t\t\t'quality' => $this->_quality,\n\t\t\t'effort' => $this->_effort,\n\t\t\t'weather_ids' => $this->_weather_ids,\n\t\t\t'temperature' => $this->_temperature,\n\t\t\t'notes' => $this->_notes,\n\t\t\t'field' => $this->_field,\n\t\t\t'placement' => $this->_placement,\n\t\t\t'group_min_age' => $this->_group_min_age,\n\t\t\t'group_max_age' => $this->_group_max_age,\n\t\t\t'group_age_size' => $this->_group_age_size,\n\t\t\t'group_age_placement' => $this->_group_age_placement,\n\t\t\t'group_gender_size' => $this->_group_gender_size,\n\t\t\t'group_gender_placement' => $this->_group_gender_placement,\n\t\t\t'active' => $this->_active\n\t\t);\n\t\t$this->db->insert($this->_table,$data);\n\t\t\n\t\treturn true;\n\t}", "public function add() {\n $this->usePostRequest();\n //$this->dbFileModel->add_file();\n }", "public function add() \n { // metodo add, complementar\n $str = \"insert into \".self::$tablename.\"(nitHotel, idCiudad, nomHotel, dirHotel, telHotel1, telHotel2, correoHotel, tipoHotel, Administrador, idRedes, aforo, tipoHabitaciones, status)\";\n $str.= \" values ('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n }", "function saveRecord()\n\t{\n\t\t$data['roleID'] = $this->roleID;\n\t\t$data['module'] = $this->module;\n\t\t$data['roleName'] = $this->roleName;\n\t\t$data['roleDesc'] = $this->roleDesc;\n\t\t\n\t\t$this->db->insert('roles', $data); \n\t\t\n\t\tif ($this->db->_error_message())\n\t\t\treturn false;\n\t\telse \n\t\t\treturn true;\n\t}", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function p_add() {\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this post was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n\n # Insert\n # Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n DB::instance(DB_NAME)->insert('activities', $_POST);\n\n # Send them back to home page\n Router::redirect('/activities/index');\n\n }", "function add( $obj )\r\n\t{\r\n\t\tif ( $this->signUseID == true) {\r\n\t\t\t$pos = $obj->primary_key_value();\r\n\t\t\t$this->data[ $pos ] = $obj;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->data[] = $obj;\r\n\t\t}\r\n\t}", "public function save()\n {\n array_push($this->table, $this->value);\n }", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "private function addPaymentToDatabase()\n {\n $this->setReceiptKey();\n \n $this->createDonorEntry();\n $this->createDonationEntry();\n $this->createDonationContentEntry();\n $this->createDonorAddressEntry();\n $this->addDonationToFundraisersTotalRaise();\n \n $this->redirect('donations');\n }", "public function add($data) {\r\n\t \tglobal $wpdb;\r\n\t \t\r\n\t \tif ($wpdb->insert( $this->table, (array) $data ))\r\n\t \t\t$return = $wpdb->insert_id;\r\n\t \telse\r\n\t \t\t$return = FALSE;\r\n\t \t\r\n\t \treturn $return;\r\n\t }", "public function add($data)\r\n {\r\n $data = $this->sanitize($data);\r\n\r\n return $this->db->table($this->table)->insertGetId($data);\r\n\r\n }", "public function insert(){\r\n\t\tif (!$this->new){\r\n\t\t\tMessages::msg(\"Cannot insert {$this->getFullTableName()} record: already exists.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\t$vals[\"`$name`\"] = $value->getSQLValue();\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$sql = 'INSERT INTO '.$this->getFullTableName().' ('.implode(', ',array_keys($vals)).') VALUES ('.implode(', ',$vals).')';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to insert record into '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t// Get this here, because getPrimaryKey can call other SQL queries and thus override this value\r\n\t\t$auto_id = SQL::getInsertId();\r\n\t\t\r\n\t\t$table = $this->getTable();\r\n\t\t// Load the AUTO_INCREMENT value, if any, before marking record as not new (at which point primary fields cannot be changed)\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\tif ($table->getColumn($name)->isAutoIncrement()){\r\n\t\t\t\t$this->$name = $auto_id;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->new = false;\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "public function save(){\n if($this->id == 0) {\n // Object is new and needs to be created\n return $this->insert();\n }\n }", "public function add($data)\n {\n $tableName = $this->getTableName();\n return $this->callChain('insert', [$tableName, $data], $this->getStorage());\n }", "function addToDatabase() {\n\t\tif ($this->id != null && $this->id != 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$add_query = \"INSERT INTO user_table \n\t\t(user_name, \n\t\t user_password,\t\n\t\t isAdmin,\t\n\t\t user_first_name,\n\t\t user_last_name) \n\t\tVALUES \n\t\t('$this->username', \n\t\t '$this->password',\t\n\t\t '$this->isAdmin',\t\n\t\t '$this->firstName',\t\n\t\t '$this->lastName');\";\n\n\t\t$result = mysqli_query($db, $add_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function insert()\n {\n $this->id = insert($this);\n }", "private function crud_post($record = null) {\n $key = $record['id'];\n\n if (!isset($key)) {\n $this->response(array('error' => 'Create: No supply specified'), 406);\n return;\n }\n\n if ($this->supplies->exists($key)) {\n $this->response(array('error' => 'Create: Supply ' . $key . ' already exists'), 406);\n return;\n }\n\n $this->supplies->add($record);\n\n $oops = $this->db->error();\n if (empty($oops['code']))\n $this->response(array('ok'), 200);\n else\n $this->response($oops, 400);\n }", "function add() {\n\t\tif (True) {\n\n\t\t\t// create an empty product.\n\t\t\t$o =& new ufo_product(0);\n\t\t\t$this->addedObject =& $o;\n\t\t\n\t\t\t// create an entry in the db.\n\t\t\t$o->initialize();\n\t\t\t$o->create();\n\t\t\t$o->edit();\n\n\t\t\t// add it to the product array.\n\t\t\t$this->product[] = $o;\n\t\t}\n\t}", "public function create_a_record()\n {\n // Add a record\n factory(Email::class, 1)->create();\n\n $this->assertCount(1, Email::all());\n }", "public function NewRecord()\n {\n global $g_BizSystem;\n $this->SetDisplayMode(MODE_N);\n $recArr = $this->GetNewRecord();\n if (!$recArr)\n return $this->ProcessDataObjError();\n $this->UpdateActiveRecord($recArr);\n // TODO: popup message of new record successful created\n return $this->ReRender();\n }", "public function add($data){\n \t\t\t$result = $this->db->insert(\"user\",$data);\n \t\t}", "public function save() {\n\t\tif( $this->isAddingNew() ) {\n\t\t\t//Insert record\n\t\t\t$key = $this->getConnection()->insert( $this->_updateBuffer, $this );\n\n\t\t\t//remove all state from this object (including isAddingNew)\n\t\t\t$this->clear();\n\n\t\t\t//Pull just this new record\n\t\t\t$method = \"where\" . $this->getTable()->getPrimaryKey();\n\t\t\t$this->$method( $key );\n\t\t} else {\n\t\t\t$updatedRecord = $this->getConnection()->update( $this->_updateBuffer, $this );\n\t\t\t$this->_recordset[ $this->_currentRow ] = $updatedRecord[0];\n\t\t}\n\n\t\t$this->_updateBuffer = array();\n\t\treturn $this;\n\t}", "public function add(){\n\n\t\t$db = new dbconnection();\n\t\t$conn = $db->startconnection();\t\n\n\t\t$query = $conn->prepare(\"INSERT INTO item(`item_code`,`item_category`,`item_subcategory`,`item_name`,`quantity`,`unit_price`) values (?,?,?,?,?,?)\");\n\n\t\t$query->bind_param(\"ssssss\",$this->itemcode,$this->category,$this->subcategory,$this->itemname,$this->quantity,$this->uprice);\n\t\t\t\n\t\t\tif($query->execute()){\n\n\t\t\treturn 1;\n\n\t\t}else{\n\n\t\t\treturn 0;\n\n\t\t}\n\n\n\t\t}", "public function add() {\n $mysqli = Database::getMYSQLI();\n \n $stmt = $mysqli->prepare(\"\n INSERT INTO reviews (persons_id, lessons_id, title, review, date_submitted, rating)\n VALUES (?,?,?,?,?,?)\");\n \n $stmt->bind_param('iisssi', $this->personsID, $this->lessonsID, $this->title, \n $this->review, $this->dateSubmitted, $this->rating);\n \n $stmt->execute();\n $stmt->close();\n $mysqli->close();\n }", "public function insert()\n\t{\n\t\treturn $this->getModel()->insert($this);\n\t}", "protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}", "protected function addAnnouncementToDb()\n {\n $db = Db::getConnection();\n $db->query(\"INSERT INTO sale (id, id_user, is_banned, street, total_area, living_area, kitchen_area, balcony, description, price, type_house, floor, count_floor, rooms_count, ownership) VALUES (NULL, '$this->userId', NULL, '$this->street', '$this->totalArea', '$this->livingArea', '$this->kitchenArea', '$this->balcony', '$this->description', '$this->price', '$this->typeHouse', '$this->floor', '$this->countOfFloors', '$this->roomsCount', '$this->ownership');\");\n return $db->lastInsertId();\n }", "public function add($entity);", "function Add() \n\t{\n\t\tglobal $dal_info;\n\t\t\n\t\t$insertFields = \"\";\n\t\t$insertValues = \"\";\n\t\t$tableinfo = &$dal_info[ $this->infoKey ];\n\t\t$blobs = array();\n\t\t//\tprepare parameters\t\t\n\t\tforeach($tableinfo as $fieldname => $fld)\n\t\t{\n\t\t\tif( isset($this->{$fld['varname']}) )\n\t\t\t{\n\t\t\t\t$this->Value[ $fieldname ] = $this->{$fld['varname']};\n\t\t\t}\n\t\t\t\n\t\t\tforeach($this->Value as $field => $value)\n\t\t\t{\n\t\t\t\tif( strtoupper($field) != strtoupper($fieldname) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t$insertFields.= $this->_connection->addFieldWrappers( $fieldname ).\",\";\n\t\t\t\t$insertValues.= $this->PrepareValue($value,$fld[\"type\"]) . \",\";\n\t\t\t\t\n\t\t\t\tif( $this->_connection->dbType == nDATABASE_Oracle || $this->_connection->dbType == nDATABASE_DB2 || $this->_connection->dbType == nDATABASE_Informix )\n\t\t\t\t{\n\t\t\t\t\tif( IsBinaryType( $fld[\"type\"] ) )\n\t\t\t\t\t\t$blobs[ $fieldname ] = $value;\n\t\t\t\t\t\t\n\t\t\t\t\tif( $this->_connection->dbType == nDATABASE_Informix && IsTextType( $fld[\"type\"] ) )\n\t\t\t\t\t\t$blobs[ $fieldname ] = $value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//\tprepare and exec SQL\n\t\tif( $insertFields != \"\" && $insertValues != \"\" )\t\t\n\t\t{\n\t\t\t$insertFields = substr($insertFields, 0, -1);\n\t\t\t$insertValues = substr($insertValues, 0, -1);\n\t\t\t$dalSQL = \"insert into \".$this->_connection->addTableWrappers( $this->m_TableName ).\" (\".$insertFields.\") values (\".$insertValues.\")\";\n\t\t\t$this->Execute_Query($blobs, $dalSQL, $tableinfo);\n\t\t}\n\t\t//\tcleanup\t\t\n\t $this->Reset();\n\t}", "public function addData()\n {\n $phone = new Phone();\n $phone->phone = '01517167619';\n\n $student = new Student();\n $student->name = 'SI-2';\n $student->email = 'si-2@gmail.com';\n $student->save();\n $student->phone()->save($phone);\n\n return 'Data Insert Successfully';\n }", "public function create_record() {\n $class = get_called_class();\n\n if ($this->does_exist()) {\n return false;\n }\n\n $db = DB::connect();\n\n $attributes = '';\n $values = '';\n\n // Loop through all the attributes to get the attributes and values\n foreach (get_object_vars($this) as $key => $value) {\n // We dont add the id of the object, as it is autoincremented\n if ($value == null) {\n continue;\n }\n\n $attributes = $attributes . \" $key,\";\n\n // We cannot add an object to sql statemnt. if the value is an object, get the id of it\n if (gettype($value) == 'object') {\n $value = $value->id;\n } elseif (gettype($value) === 'string') {\n $value = \"'\" . $value . \"'\";\n }\n\n $values = $values . \" $value,\";\n\n }\n\n // Delete the last comma\n $attributes = substr_replace($attributes, \" \", -1);\n $values = substr_replace($values, \" \", -1);\n\n $sql = $db->prepare(\"INSERT INTO \" . $class . \" (\" . $attributes . \") VALUES (\" . $values . \")\");\n $sql->execute();\n\n return true;\n }", "public function record() {\n $data = array(\n \"name\" => $this->name,\n \"description\" => $this->description,\n \"image\" => $this->image,\n \"type\" => $this->type,\n \"discount\" => $this->discount_offer,\n \"code\" => $this->coupon_code,\n \"expiration\" => $this->expiration\n );\n return $this->db->insert(\"trade\", $data);\n }", "private function add_record_or_update_record() {\n\t\t\t$this->before_custom_save();\n\t\t\t$this->before_save();\n\t\t\tif($this->new_record) {\n\t\t\t\t$this->before_create();\n\t\t\t\t$result = $this->add_record();\n\t\t\t\t$this->after_create();\n\t\t\t} else {\n\t\t\t\t$this->before_update();\n\t\t\t\t$result = $this->update_record();\n\t\t\t\t$this->after_update();\n\t\t\t}\n\t\t\t$this->after_save();\n\n\t\t\t// init user custom cache\n\t\t\tif (is_array($this->cache)) {\n\t\t\t\t$this->rebuild_cache();\n\t\t\t}\n\n\t\t\tif($this->blob_fields) {\n\t\t\t\t$this->update_blob_fields();\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "public function save_new_record() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$db_data = $this->get_db_data();\r\n\r\n\t\t$table_name = $wpdb->prefix . CTF_POSTS_TABLE;\r\n\t\t$data = array(\r\n\t\t\t'twitter_id' => $db_data['twitter_id'],\r\n\t\t\t'created_on' => $db_data['created_on'],\r\n\t\t\t'last_requested' => $db_data['last_requested'],\r\n\t\t\t'time_stamp' => $db_data['time_stamp'],\r\n\t\t\t'json_data' => $db_data['json_data'],\r\n\t\t\t'media_id' => $db_data['media_id'],\r\n\t\t\t'sizes' => $db_data['sizes'],\r\n\t\t\t'aspect_ratio' => $db_data['aspect_ratio'],\r\n\t\t\t'images_done' => $db_data['images_done']\r\n\t\t);\r\n\t\t$format = array(\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%d',\r\n\t\t\t'%d'\r\n\t\t);\r\n\t\t$error = $wpdb->insert( $table_name, $data, $format );\r\n\r\n\t\tif ( $error !== false ) {\r\n\t\t\t$insert_id = $wpdb->insert_id;\r\n\r\n\t\t\t$this->db_id = $insert_id;\r\n\t\t\t$this->insert_ctf_feeds_posts();\r\n\t\t} else {\r\n\t\t\t// log error\r\n\t\t}\r\n\t}", "function addUpdate() {\n\t\tif ($this->id) $this->update();\n\t\telse $this->insert();\n\t}", "public function createRecord();", "public function add($data = array())\n {\n return $this->db->insert($this->tableName, $data);\n }", "public function add($data){\n $this->db->insert('tbl_petugas', $data);\n\n }", "function add_product($product){\n if($this->_check_product_in_db($product)){\n return False; // Product already in database\n }else{\n array_push($this->db, $product);\n return True;\n }\n }", "public function add();", "public function add();", "public function add_payer_record($data){\n\t\t$this->db->insert('tat_finance_payers', $data);\n\t\tif ($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function add($data) {\n\t\tif ($this->db->insert($this->table, $data))\n\t\t\treturn $this->db->insert_id();\n\t\telse\n\t\t\treturn false;\n\t}", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "public function addRecordInDB($id_entita, $id_sezione){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $id_entita = DB_Functions::esc($id_entita);\r\n $id_sezione = DB_Functions::esc($id_sezione);\r\n\r\n //inserimento nuovo PROTAGONISTA\r\n $query = \"INSERT INTO PROTAGONISTA (ID_ENTITA, ID_SEZIONE)\r\n\t VALUES ($id_entita, $id_sezione)\";\r\n $resQuery = $db->executeQuery($query);\r\n\r\n // Se la query ha esito positivo\r\n if ($resQuery[\"state\"]) {\r\n $this->id_entita = $id_entita;\r\n $this->id_sezione = $id_sezione;\r\n }\r\n return $resQuery;\r\n }", "protected function storeRecordInDb(&$record)\n {\n if (!$this->m_node->addDb($record, true, 'add')) {\n return false;\n }\n\n $this->m_node->getDb()->commit();\n $this->notify('save', $record);\n $this->clearCache();\n\n return true;\n }", "public function testaddOneRecord()\n\t{\n\t\t$this->assertEquals(1,1);\n\t}", "public static function add($data){\n DB::table('order_items')->insert($data);\n }", "public function add()\n {\n $job = $this->Jobs->newEntity();\n if ($this->request->is('post')) {\n $job = $this->Jobs->patchEntity($job, $this->request->data);\n if ($this->Jobs->save($job)) {\n $this->Flash->success(__('The job has been saved.'));\n return $this->redirect(['action' => 'index']);\n } else {\n $this->Flash->error(__('The job could not be saved. Please, try again.'));\n }\n }\n //$hirers = $this->Jobs->Hirers->find('list', ['limit' => 200]);\n //$appliers = $this->Jobs->Appliers->find('list', ['limit' => 200]);\n $this->set(compact('job'));\n $this->set('_serialize', ['job']);\n }", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function add(){\n $this->edit();\n }", "public function p_add() {\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\t\t\n\t\t# Unix timestamp of when this post was created / modified\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\t\t$_POST['created_by'] = $this->user['email'];\n\t\t$_POST['modified_by'] = $this->user['email'];\n\t\tunset($_POST['MAX_FILE_SIZE']);\n\n\t\t# Insert\n\t\t# Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n\t\tDB::instance(DB_NAME)->insert('teachers', $_POST);\n\n\t\t\n\t\t# Send them to the main page\n\t\tRouter::redirect(\"/\");\n\n\n\t}", "public function add()\n {\n //$this->log($this->request->data, 'debug');\n\n $humidity = $this->Humidities->newEntity();\n $humidity = $this->Humidities->patchEntity($humidity, [\n 'dt' => $this->request->data['datetime'],\n 'val' => $this->request->data['humidity']\n ]);\n\n $result = ['code' => 'S', 'message' => 'Success: humidity save is success.'];\n if (!$this->Humidities->save($humidity)) {\n $result = ['code' => 'E', 'message' => 'Error: unexpected error is occurred when save humidity data.'];\n }\n\n $this->set([\n 'result' => $result,\n '_serialize' => ['result']\n ]);\n }", "public function add() {\n $insert = $this->db->insert(\n $this->table_name, array(\n 'file_url' => $this->file_url,\n 'DOC' => $this->DOC,\n 'status' => $this->status\n ), array('%s', '%d', '%d')\n );\n\n return ($insert) ? $this->db->insert_id : $insert;\n }", "public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }", "function add($_data = null)\n\t{\n\t\tif (empty($_data['fields']) AND empty($_data['table'])){\n\t\t return FALSE;\n\t\t}\n\t\t\n\t\t$data = array();\n\t\tforeach($_data['fields'] as $k => $d)\n\t\t{\n\t\t\t$data[$k] = $d;\n\t\t}\n\t\t\n\t\t$ret =\t$this->db->insert($_data['table'], $data);\n\t\n\t\t\n\t\tlog_message('info','SQL Query: ' . $this->db->last_query());\n\t\n\t\t$this->__insert_id = $this->db->insert_id();\n\t\treturn $ret;\n\t}", "public function save() : bool {\n\t\t// Check if record is new\n\t\t$isNew = isset($this->{$this->primaryKey}) && $this->{$this->primaryKey} ? false : true;\n\n\t\tif ($isNew) {\n\t\t\t// Insert\n\t\t\t$this->database->query('INSERT INTO ' . $this->tableNamePrefixed, $this->getValuesForDatabase());\n\t\t\tif ($this->database->getInsertId()) {\n\t\t\t\t$this->{$this->primaryKey} = $this->database->getInsertId();\n\t\t\t}\n\t\t} else {\n\t\t\t// Update\n\t\t\t$this->database->query(\n\t\t\t\t'UPDATE ' . $this->tableNamePrefixed . ' SET',\n\t\t\t\t$this->getValuesForDatabase(),\n\t\t\t\t'WHERE ' . $this->primaryKey . ' = ?', $this->{$this->primaryKey}\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}", "public function add()\n\t{\n\t\t$fake_id = $this->_get_id_cur();\n\t\t$form = array();\n\t\t$form['view'] = 'form';\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t$form['submit'] = function()use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_inputs();\n\t\t\t$data['sort_order'] = $this->_model()->get_total() + 1;\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data,$id);\n\t\t\t// Cap nhat lai table_id table file\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url($this->_get_mod());\n\t\t};\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\n\t\t\t$this->_display('form');\n\t\t};\n\t\t$this->_form($form);\n\t}", "public function save()\n\t{\n\t\t$data = ['criteria' => $this -> criteria,\n\t\t\t\t 'dbname' => $this -> dbname,\n\t\t\t\t 'tblname' => $this -> tblname];\n\n\t\t$result = $this -> connection -> setTable($this -> entity)\r\n\t\t\t\t\t\t\t\t\t -> saveRec($data);\n\t\tif ($result) {\n\t\t\t$this -> id = $result;\n\t\t\treturn $this;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function recInsert($record) {\n $conn = Query::connect();\n $col = $conn->SelectLimit(\"select*from \".static::getTable(),1);\n $sql = $conn->GetInsertSQL($col,$record);\n $rs = $conn->Execute($sql);\n return $conn->ErrorNo();\n }", "public function add($data){\n\t\t$this->db->insert('training', $data);\n\t\tif ($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function action_register() {\n\t\t\t$this->data[] = 0; // record_id - default for increment\n\t\t\t$this->prepareMainData();\n\t\t\t$model = Model::factory($this->modelName)->registerRecord($this->data);\n\t\t\tif ($model) $this->request->redirect($this->redirectURL);\n\t\t\n\t}", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function save() {\n $db = Db::instance();\n // omit id \n $db_properties = array(\n 'firstName' => $this->firstName,\n 'lastName' => $this->lastName,\n 'description' => $this->description,\n 'user' => $this->user,\n 'password' => $this->password,\n 'image' => $this->image,\n 'gender' => $this->gender,\n 'topic_id' => $this->topic_id,\n 'topic_id1' => $this->topic_id1,\n 'role_id' => $this->role_id,\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }" ]
[ "0.7334255", "0.7264731", "0.7212691", "0.69528276", "0.6910126", "0.6837056", "0.6695053", "0.66880614", "0.6679375", "0.66200185", "0.66041464", "0.65122133", "0.6495338", "0.64499235", "0.6437464", "0.64327824", "0.6423331", "0.6409739", "0.6381727", "0.6346", "0.63344187", "0.6330929", "0.63107896", "0.62957615", "0.625923", "0.62581044", "0.6256214", "0.62541544", "0.6246753", "0.6244518", "0.6228713", "0.622765", "0.6170411", "0.6166878", "0.61605614", "0.6157557", "0.6156141", "0.61552507", "0.6151051", "0.61469764", "0.61457574", "0.61383706", "0.61246854", "0.6121434", "0.61214215", "0.6111892", "0.6092217", "0.6090921", "0.6078828", "0.6078161", "0.60761946", "0.6067503", "0.60668194", "0.6048158", "0.6045629", "0.604275", "0.6035721", "0.60328746", "0.6028371", "0.6016863", "0.6013726", "0.6008286", "0.60044724", "0.6003436", "0.60028565", "0.60018563", "0.59946907", "0.5989303", "0.59748524", "0.59542626", "0.5953077", "0.59499145", "0.5948133", "0.5948133", "0.5927612", "0.5923105", "0.5919696", "0.5919548", "0.59162337", "0.59071827", "0.58965576", "0.5887658", "0.58856314", "0.58856314", "0.58855903", "0.5881511", "0.5871389", "0.58690494", "0.5864736", "0.58642644", "0.5852021", "0.5849", "0.58488876", "0.58412325", "0.5839418", "0.58283585", "0.5824601", "0.58128273", "0.58128273", "0.58128273", "0.58072084" ]
0.0
-1
Returns the data record
function viewRecord($prmId) { global $dbi,$varIdMenu,$varStrMenu,$varStrKeywords,$varStrDescription,$varStrTitle,$varTxtContent; $sql = "SELECT c.id_menu, m.menu, c.keywords, c.description, c.title, c.content FROM content c, navigation m WHERE c.id_menu=m.id AND c.id=".$prmId; $varResult = mysql_query($sql,$dbi); list($varIdMenu,$varStrMenu,$varStrKeywords,$varStrDescription,$varStrTitle,$varTxtContent)=mysql_fetch_row($varResult); $varStrKeywords = stripslashes($varStrKeywords); $varStrDescription = stripslashes($varStrDescription); $varStrTitle = stripslashes($varStrTitle); $varTxtContent = stripslashes($varTxtContent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRecord();", "public function getRecord() {}", "public function getRecord() {}", "public function getRecord() {}", "public function getRecord()\n {\n return $this->get(self::_RECORD);\n }", "public function getRecord(){\n return $this->record;\n }", "public function getRecord(){\n \n return $this->record;\n }", "public function getRecord()\r\n\t{\r\n\t\treturn $this->record;\r\n\t}", "protected function get_data_record($data) {\r\n if ($this->_data_record) {\r\n return $this->_data_record;\r\n }\r\n\r\n global $USER, $DB;\r\n\r\n $this->_data_record = new object();\r\n $this->_data_record->id = null;\r\n $this->_data_record->userid = $USER->id;\r\n $this->_data_record->groupid = 0;\r\n $this->_data_record->dataid = $data->id;\r\n $this->_data_record->timecreated = $time = time();\r\n $this->_data_record->timemodified = $time;\r\n $this->_data_record->approved = true;\r\n $this->_data_record->id = $DB->insert_record('data_records', $this->_data_record);\r\n return $this->_data_record->id ? $this->_data_record : false;\r\n }", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "public function get_data();", "public function getRecordInformation() {}", "public function getRecord()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->getRecord();\n }\n }", "public function get_data() {\r\n\t\treturn $this->data;\r\n\t}", "public function get_data() {\n\t\treturn $this->data;\n\t}", "protected function get_record()\n\t{\n\t\treturn $this->key ? parent::get_record() : null;\n\t}", "function &returnRecord()\n\t{\n\t\treturn $this->record;\n\t}", "public function get_data() {\r\n return $this->data;\r\n }", "public function get_data()\n {\n return $this->_data;\n }", "public function get_data() {\n return $this->data;\n }", "function readDataField() {return $this->_datafield;}", "function getData($data = null){\r\n\t\tif(empty($data)){\r\n\t\t\tif($this->scope->recordId !== NULL){\r\n\t\t\t\t$data = $this->model->FindOneById($this->scope->recordId);\r\n\t\t\t}else{\r\n\t\t\t\t$data = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->fields->getData($data, $this);\r\n\t}", "public function get_data() {\n $data = parent::get_data();\n if ($data !== null) {\n }\n return $data;\n }", "public function getData() {\r\n\t\treturn $this->_data;\r\n\t}", "public function getRecord()\n {\n return $this->options['peoplefinder']->getByNUID($this->nu_id);\n }", "public function getData(){\n\t\treturn $this->data;\n\t}", "public function getData(){\n\t\treturn $this->data;\n\t}", "public function getData(){\n\t\treturn $this->data;\n\t}", "public function getData_row()\n {\n return $this->data_row;\n }", "public function getData() \n\t{\n return $this->data;\n }", "function get_data() {\r\n return $this->data;\r\n }", "function getrecord($data)\n\t{\n\t\t$this->db->where($data);\n\n\t\treturn $this->db->get(\"tblteman\");\n\t}", "function getData() {\n\t\treturn $this->data;\n\t}", "public function data()\n {\n \tif (!isset($this->data)) {\n \t\t$this->setData();\n \t}\n \t\n \treturn $this->data->data();\n }", "public function getLiveRecord() {}", "function getData()\n {\n return $this->_data;\n }", "public function getData()\r\n {\r\n return $this->data;\r\n }", "public function getData() {\n return $this->Data;\n }", "public function getData()\n {\n return $this->_objData;\n }", "function &getData()\r\n\t{\r\n\r\n\t\tif ($this->_loadData())\r\n\t\t{\r\n\r\n\t\t}\r\n\t\telse $this->_initData();\r\n\r\n\t\treturn $this->_data;\r\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData()\n {\n return $this->data;\n }", "public function getData() {\n return $this->data;\n }", "public function getData()\n\t{\n\t\treturn $this->m_data->getData();\n\t}", "public function getRecords()\n\t{\n\t\treturn $this->records['data'];\n\t}", "public function getData()\n\t{\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->Data;\n\t}", "public function data(){\r\n\t\treturn $this->_data;\r\n\t}", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData() {\r\n return $this->data;\r\n }", "public function data(){\n\n\t\treturn $this->_data;\n\n\t}", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function retrieveData() {\n return $this->fetch();\n }", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n {\n $row = $this->_row;\n $data = array(\n 'id' => intval($row['id']),\n 'mls_number' => $row['mls_number'],\n 'type' => $row['type'],\n 'price' => intval($row['price']),\n 'city' => $row['city'],\n 'subdivision' => $row['subdivision'],\n 'num_bedrooms' => ($row['bedrooms'] == 0 ? null : intval($row['bedrooms'])),\n 'num_bathrooms' => ($row['bathrooms'] == 0 ? null : floatval($row['bathrooms'])),\n 'num_sqft' => ($row['sqft'] == 0 ? null : intval($row['sqft'])),\n 'feed' => $row['idx'],\n 'source' => $row['table'],\n );\n return $data;\n }", "public function getData()\n {\n return $this->Data;\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function getData()\n\t\t{\n\t\t\treturn $this->_data;\n\t\t}", "function getDataField() {return $this->_datafield;}", "abstract function getdata();", "public function getData(): stdClass\n\t{\n\t\treturn $this->data;\n\t}", "protected function getData()\n {\n return $this->data;\n }", "public function getData() {}", "public final function getData(){\n return $this->data;\n }" ]
[ "0.81906635", "0.80527985", "0.80527985", "0.80525297", "0.78738546", "0.7495056", "0.7433575", "0.73673284", "0.70769554", "0.70599014", "0.70239705", "0.7019906", "0.701645", "0.6977993", "0.6968359", "0.694768", "0.6940125", "0.6911512", "0.6876792", "0.6857487", "0.68322545", "0.68288165", "0.67934304", "0.67794085", "0.6778153", "0.67710495", "0.67710495", "0.67710495", "0.6760339", "0.6757462", "0.6749617", "0.67456704", "0.6743157", "0.67295974", "0.67228234", "0.67138594", "0.6712686", "0.6705325", "0.6690101", "0.66859317", "0.6676324", "0.6676324", "0.6676324", "0.6676324", "0.6676324", "0.667527", "0.6660522", "0.6651182", "0.66503334", "0.66497356", "0.6646662", "0.6646585", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6645139", "0.6640519", "0.6640519", "0.6640519", "0.6640519", "0.6640519", "0.6640519", "0.6640419", "0.66400164", "0.6639885", "0.6639885", "0.66363424", "0.6635189", "0.6635189", "0.6635189", "0.6635189", "0.6632965", "0.6629709", "0.66234404", "0.6623299", "0.6623299", "0.6623299", "0.66229856", "0.6614736", "0.6610943", "0.6602968", "0.66018933", "0.65937334", "0.65929276" ]
0.0
-1
Method ini digunakan untuk insert data ke tabel Cashout
public static function store($publisherId, $bankId, $amount, $accountOwner) { $now = Carbon::now(); DB::table('cashouts')->insert([ "id" => Cashout::getNewId(), "publisherId" => $publisherId, "bankId" => $bankId, "amount" => $amount, "accountOwner" => $accountOwner, "created_at" => $now, "updated_at" => $now, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert($cbtRekapNilai);", "function insert() {\n\t \t$sql = \"INSERT INTO evs_database.evs_key_component (kcp_key_component_detail_en, kcp_key_component_detail_th, kcp_cpn_id)\n\t \t\t\tVALUES(?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->kcp_key_component_detail_en, $this->kcp_key_component_detail_th, $this->kcp_cpn_id));\n\t\n\t }", "public function insert($cbtSoalSiswa);", "function post_log_ecoupon($tableName,$data) {\n $this->db->insert($tableName, $data);\n }", "public function cadastrar(){\r\n //DEFINIR A DATA DE CADASTRO\r\n $this->cadastro = date('Y-m-d H:i:s');\r\n\r\n $db = new Database('cartao');\r\n $this->id = $db->insert([\r\n 'bandeira' => $this->bandeira,\r\n 'numero' => $this->numero,\r\n 'doador' => $this->doador,\r\n ]);\r\n\r\n }", "function input_data($data,$table){\n\t\t$this->db->insert($table,$data);//menginputkan data ke database dengan function input_data\n }", "public function insert() {\n $this->observer->idchangemoney = $this->connection->insert(\"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), $this->user->iduser);\n }", "public function tambahDataKC()\n {\n $data = array(\n 'kode_cabang' => htmlspecialchars($this->input->post('kode_cabang', true)),\n 'nama_kantorcabang' => htmlspecialchars($this->input->post('nama_kantorcabang', true))\n );\n\n //QUERY INSERT DATA\n $this->db->insert('tb_kantorcabang', $data);\n // Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')\n }", "public function run()\n {\n DB::table('kamar_operasi')->insert(array(\n array('no_kamar'=>'Operasi-001'),\n array('no_kamar'=>'Operasi-002')\n ));\n }", "public function insert_data_reservasi($data)\n\t {\n\t\t$this->db->insert('tbb_reservasi', $data); \n\t }", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function run()\n {\n DB::table('client')->insert([\n 'nama_client' => 'ardi',\n 'tempat_lahir' => 'Bandung',\n 'tanggal_lahir' => '2005-1-11',\n 'jenis_kelamin' => 'L',\n 'alamat' => 'Jalan Babakan',\n 'no_ktp' => '2343232',\n 'no_hp' => '0898398',\n 'email' => 'ardinur@gmail.com',\n 'ket' => 'coba',\n 'crated_by' => '2'\n ]);\n \n }", "function insert() {\n\t\t$sql = \"INSERT INTO cost_detail (cd_fr_id, cd_seq, cd_start_time, cd_end_time, cd_hour, cd_minute, cd_cost, cd_update, cd_user_update)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq, $this->cd_start_time, $this->cd_end_time, $this->cd_hour, $this->cd_minute, $this->cd_cost, $this->cd_update, $this->cd_user_update));\n\t\t$this->last_insert_id = $this->ffm->insert_id();\n\t}", "public function insert_data( $data,$table)\n {\n \n $this->db->insert('sewa',$data);\n \n }", "public function run()\n {\n DB::table('cat_report')->insert([\n ['name' => 'Otro'],\n\t ['name' => 'Servicio'],\n\t ['name' => 'Seguridad']\n\t ]);\n }", "public function run()\n {\n DB::table('desconto_produtos')->insert([\n ['desconto_id' => 1, 'produto_id' => 1, 'total' => 90],\n ]);\n }", "public function add() \n { // metodo add, complementar\n $str = \"insert into \".self::$tablename.\"(nitHotel, idCiudad, nomHotel, dirHotel, telHotel1, telHotel2, correoHotel, tipoHotel, Administrador, idRedes, aforo, tipoHabitaciones, status)\";\n $str.= \" values ('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n }", "public function run()\n {\n DB::table(\"data\")->insert([\n \t\"name\"=>\"IVA\",\n \t\"data\"=>\"21\"\n ]);\n DB::table(\"data\")->insert([\n \t\"name\"=>\"DESIGN_INDEX\",\n \t\"data\"=>\"BUTTONS\"\n ]);\n\n }", "public function insert($data)\r\n {\r\n \r\n }", "public function run()\n {\n $Catalogo=[\n [\n 'nombre'=>'catalogo 1',\n ],\n \n \n\n ];\n DB::table('catalogo')->insert($Catalogo);\n }", "public function insertBarang($data)\n {\n //menyimpan data ke tabel\n $this->insert($data);\n }", "public function run()\n {\n $data = array(\n array('name' => 'LBC', 'fee' => 200),\n array('name' => 'JRS', 'fee' => 150),\n array('name' => 'ToGo', 'fee' => 180)\n );\n\n Courier::insert($data);\n }", "public function run()\n {\n $input = [\n \t'nama_app' => 'CDC',\n \t'nama_tab' => 'CDC',\n \t'copyright_text' => 'PT LAPI ITB'\n ];\n\n \\DB::table('pengaturan_aplikasis')->insert($input);\n }", "public function run()\n {\n DB::table('cau_hoi')->insert([\n \t['noi_dung' =>'']\n \t['linh_vuc_id' =>'']\n \t['phuong_an_a'=>'']\n \t['phuong_an_b'=>'']\n \t['phuong_an_c'=>'']\n \t['phuong_an_d'=>'']\n \t['dap_an'=>'']\n ])\n }", "public function insert($data);", "public function tambah($data_sapi) {\n\t\t$data['id_sapi'] = $this->db->insert_id();\n\t\t$this->db->insert('tb_sapi', $data_sapi);\n\t}", "public function run()\n {\n DB::table('kota')->insert([\n ['propinsi_id'=>1,'nama_kota' =>'Bantul'],\n ['propinsi_id'=>1,'nama_kota' =>'Sleman'],\n ['propinsi_id'=>1,'nama_kota' =>'Kulon Progo']\n ]);\n \n }", "public function run()\n {\n DB::table('hez_tipocost')->insert([\n ['nomb-tipocost'=>'N/A'],\n ['nomb-tipocost'=>'horas'],\n ['nomb-tipocost'=>'total']\n ]);\n }", "public function input_data($data,$table){\n\t\t$this->db->insert($table,$data);\n\t}", "public function run()\n {\n DB::table('cursos')->insert([\n 'nombrecurso' => 'programacion dos',\n 'año' => '1999-07-16',\n 'ciclo' => 'dos',\n 'profesor_id' => '1',\n ]);\n\n\n\n\n }", "public function run()\n {\n TransactionType::truncate();\n $data = [\n ['name' => 'Pemasukan', 'category' => 1],\n ['name' => 'Pengeluaran', 'category' => 2],\n ['name' => 'Piutang', 'category' => 1],\n ['name' => 'Target', 'category' => 2],\n ];\n\n TransactionType::insert($data);\n }", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }", "public function run()\n {\n if (DB::table('socioeconomico_tem_item_casa')->get()->count() == 0) {\n DB::table('socioeconomico_tem_item_casa')->insert([\n [\n 'opcao' => 'A',\n 'descricao' => 'Não.'\n ],\n [\n 'opcao' => 'B',\n 'descricao' => 'Sim.'\n ],\n ]);\n } else {\n echo \"\\e[31mA tabela não está vazia. Nenhum dado foi adicionado.\";\n }\n }", "public function run()\n {\n \tDB::table('transaksi')->insert([\n \t\t'tgltransaksi' => '2020-07-12',\n \t\t'customer' => 'gajah talamuk', \n \t\t'paket' => 'super hemat', \n \t\t'pembayaran' => 'belum lunas', \n \t\t'statusorderan' => 'baru',\n \t\t'total' => 15000]); \n\n \tDB::table('transaksi')->insert([\n \t\t'tgltransaksi' => '2020-07-06',\n \t\t'customer' => 'mama_mud', \n \t\t'paket' => 'hemat', \n \t\t'pembayaran' => 'lunas', \n \t\t'statusorderan' => 'baru',\n \t\t'total' => 30000]); \n }", "public function addData(){\n \n $data=$_POST['option'];\n //echo json_encode(array('error'=>false,'result'=>$data)); exit;\n foreach ($data as $item) \n {\n ClothingCut::insert([\n 'un_id'=>4,\n 'cut_name'=>$item,\n ]); \n }\n echo json_encode(array('error'=>false,'result'=>\"success\")); exit;\n }", "function insertVoucher(){\n $db =new Database();\n $query=\"INSERT INTO `gutscheine`(`GutscheinID`, `Wert`, `Gueltigkeit`, `Eingeloest`) VALUES \"\n .\"('\".$this->gutscheinID.\"','\".$this->wert.\"','\".$this->gueltigkeit.\"','\".$this->eingeloest.\"')\";\n $db->insert($query);\n }", "public function run()\n {\n DB::table('po_terima')->insert([\n 'nopo' => '',\n 'kd_cus' => '',\n 'kode' => '',\n 'tanggal' => '2021-04-08',\n 'qty' => '7',\n 'total' => '70000'\n ]);\n }", "public function run()\n {\n DB::table('stock_opdetail')->insert([\n 'id_so' => '1',\n 'id_partname' => '1',\n 'qty_sistem' => '10',\n 'qty_fisik' => '12',\n 'total_qty_selisih' => '-2',\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }", "public function actionInsert()\n\t{\n\t\t$model=new Knowledgecatalogue();\n\t\t$model->fCatalogueNo=GuidUtil::getUuid();\n\t\t$model->fFatherCatalogueNo=$_POST['no'];\n\t\t$model->fCatalogueName=$_POST['name'];\n\t\t$model->fStatus=$_POST['statu'];\n\t\t$model->fIsDownLoad=$_POST['down'];\n\t\t$model->fCreateUser=Yii::app()->params->loginuser->fUserName;\n\t\t$model->fCreateDate=time();\n\t\t$model->fUpdateUser=Yii::app()->params->loginuser->fUserName;\n\t\t$model->fUpdateDate=time();\n\t\tif($model->save())\n\t\t{\n\t\t\t$this->renderPartial('update',array(\n\t\t\t\t\t'data'=>UFSBaseUtil::printJson(array(\n\t\t\t\t\t\t\t'fCatalogueNo'=>CHtml::encode($model->fCatalogueNo),\n\t\t\t\t\t\t\t'fIsDownLoad'=>CHtml::encode($model->fIsDownLoad),\n\t\t\t\t\t\t\t'fCatalogueName'=>CHtml::encode($model->fCatalogueName),\n\t\t\t\t\t\t\t'fFatherNo'=>$model->fFatherCatalogueNo,\n\t\t\t\t\t\t\t'fStatus'=>CHtml::encode($model->fStatus),\n\t\t\t\t\t\t\t'fCreateDate'=>CHtml::encode(empty($model->fCreateDate)?'':date('Y-m-d',$model->fCreateDate)),\n\t\t\t\t\t\t\t'fCreateUser'=>CHtml::encode($model->fCreateUser),\n\t\t\t\t\t\t\t'fUpdateDate'=>CHtml::encode(empty($model->fUpdateDate)?'':date('Y-m-d',$model->fUpdateDate)),\n\t\t\t\t\t\t\t'fUpdateUser'=>CHtml::encode($model->fUpdateUser),\n\t\t\t\t\t\t\t'msg'=>$this->FrameInfo(Yii::app()->params['layouttype']['top'],Yii::t('message','Add Success'),Yii::app()->params['notytype']['success']),\n\t\t\t\t\t))\n\t\t\t));\n\t\t}\n\t}", "public function run()\n {\n DB::table('gcopscondicion')->insert([\n [\n 'pscDescription' => 'Buena PRO'\n ],[\n 'pscDescription' => 'Elegible'\n ],[\n 'pscDescription' => 'No Cumple'\n ]\n ]);\n }", "function saveData()\n{\n global $f;\n global $db;\n global $isNew;\n if ($db->connect()) {\n /// Cek apakah ada nomer reuest ada yang sama\n $noReq = $f->getValue('dataConsPurchaseNo');\n $noReqMatch = $f->getValue('dataReqNoMatch');\n if ($isNew) {\n $found = checkExistNo($noReq);\n } elseif ($noReq != $noReqMatch) {\n $found = checkExistNo($noReq);\n }\n $strMessage = \"\";\n if ($found > 0) {\n $strMessage = \"Your Number Request Has Exist\";\n } else {\n $tblSave = new cGaConsumablePurchase();\n //$dataGaPurchaseRequest = new cGaPurchaseRequest;\n $data = [\n \"id_item\" => $f->getValue('dataIdItem'),\n \"request_date\" => $f->getValue('dataRequestDate'),\n \"item_amount\" => $f->getValue('dataItemAmount'),\n \"remark\" => $f->getValue('dataRemark'),\n \"consumable_purchase_no\" => $f->getValue('dataConsPurchaseNo'),\n \"id_consumable_request\" => $f->getValue('dataConsReqNo')\n ];\n // simpan data donation\n $bolSuccess = false;\n if ($isNew) {\n // data baru\n $bolSuccess = $tblSave->insert($data);\n } else {\n $bolSuccess = $tblSave->update(\"id='\" . $f->getValue('dataID') . \"'\", $data);\n }\n if ($bolSuccess) {\n if ($isNew) {\n $f->setValue('dataID', $tblSave->getLastInsertId());\n } else {\n $f->setValue('dataID', $f->getValue('dataID'));\n }\n }\n $strMessage = $tblSave->strMessage;\n }\n } else {\n $f->message = \"no connection\";\n $f->msgClass = \"bgError\";\n }\n $f->message = $strMessage;\n}", "function insert() {\n\t\t$solic = json_decode($_POST['DATA']);\n\t\t$service = new CompraService();\n\t\tif($service->insert($solic))\n\t\t\thttp_response_code();\n\t\telse\n\t\t\thttp_response_code(500);\n\t}", "public function insert() {\n \n }", "public function inserir()\n {\n }", "public function addData2($data)\n {\n DB::table('tbl_laporanmasuk')->insert($data);\n }", "public function insert(){\n\t\t$sql = new Sql();\n\t\t$results = $sql->select(\"CALL sp_insert_usuario(:LOGIN, :PASS)\", array(\n\t\t\t':LOGIN'=>$this->getDeslogin(),\n\t\t\t':PASS'=>$this->getDessenha()\n\t\t));\n\n\t\tif (isset($results[0])) {\n\t\t\t\n\t\t\t$this->setData($results[0]);\n\n\t\t}\n\t}", "public function insert($cotizacion);", "public function run()\n {\n \\DB::table('casino_money')\n ->insert([\n 'id' => 1,\n 'bank' => 10000\n ]);\n }", "public function insertData()\n\t{\n\t\t$data = array(\n\t\t\t/* 'id' yang dikiri harus sama seperti di table\n\t\t\t'id' yang dikanan harus menurut name inputnya */\n\t\t\t'id_transaksi' => $this->input->post('id_transaksi'),\n\t\t\t'id_pelanggan' => $this->input->post('id_pelanggan'),\n\t\t\t'order_id' => $this->input->post('order_id'),\n\t\t\t'message' => $this->input->post('message'),\n\t\t\t'tgl_kirim' => $this->input->post('tgl_kirim'),\n\t\t\t'tgl_terima' => $this->input->post('tgl_terima')\n\t\t);\n\t\t/* jika semua sama sperti di table\n\t\tgunakan versi simple seprti berikut */\n\t\t$data = $this->input->post();\n\t\t/* eksekusi query insert into \"transaksi\" diisi dengan variable $data\n\t\tface2face ae lek bingung :| */\n\t\t$this->db->insert(\"transaksi\",$data);\n\t}", "public function run()\n {\n DB::table('caixas')->insert([\n 'id' => 1,\n 'valor' => 332.4,\n 'descricao' => 'Entrada dos valores de hoje',\n 'tipo_fluxos_id'=>1,\n 'created_at'=>Carbon::today(),\n \n ]); \n }", "public function newCita($data){\n\t\t\t$query =\"INSERT INTO cita (codigoCita,documentoCli, documentoEmp,fechaHora,estadoCita,\n\t\t\tnombreServicio,Servicio2,Servicio3) VALUES ('\".$data['codigoCita'].\"','\".$data['documentoCli'].\"','\".$data['documentoEmp'].\"','\".$data['fechaHora'].\"','\".$data['estadoCita'].\"','\".$data['nombreServicio'].\"','\".$data['Servicio2'].\"','\".$data['Servicio3'].\"')\";\n\t\t\t$result =mysqli_query($this->link,$query);\n\t\t\tif(mysqli_affected_rows($this->link)>0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function run()\n {\n DB::table('transactions')->insert(\n [\n [\n 'user_id' => '1',\n 'nominal' => '2000000',\n 'old_balance' => '0',\n 'category_id' => '4',\n 'description' => 'bonus'\n ],\n [\n 'user_id' => '1',\n 'nominal' => '1000000',\n 'old_balance' => '2000000',\n 'category_id' => '4',\n 'description' => 'bonus'\n ],\n [\n 'user_id' => '1',\n 'nominal' => '10000',\n 'old_balance' => '3000000',\n 'category_id' => '1',\n 'description' => 'makan siang'\n ],\n [\n 'user_id' => '1',\n 'nominal' => '15000',\n 'old_balance' => '2990000',\n 'category_id' => '1',\n 'description' => 'makan malam'\n ],\n ]\n );\n }", "public function run()\n {\n DB::table('asal_sekolah')->insert([\n \t[\n \t\t'id_calon' => 1,\n \t\t'asal_sekolah' => 'SMPN 40 Bandung'\n \t],\n \t[\n \t\t'id_calon' => 2,\n \t\t'asal_sekolah' => 'SMPN 9 Bandung'\n \t],\n \t[\n \t\t'id_calon' => 3,\n \t\t'asal_sekolah' => 'SMP Pasundan 4 Bandung'\n \t]\n ]);\n }", "public function run()\n {\n DB::table('disc_plan_orders')->insert([\n 'order_id' => 1 ,\n 'disc_plan_id' => 1 ,\n 'quantity' => 1 ,\n 'price' => 0 ,\n 'total' => 0 ,\n 'tax' => 0 \n ]);\n }", "function chawa_db_transactions_data() {\n\tglobal $wpdb;\n\t\n\t$table_name = $wpdb->prefix . 'chawa_transactions';\n\t\n\t$wpdb->insert(\n\t\t$table_name, \n\t\tarray(\n\t\t\t'transaction_id' => 'chawa_000000000000000000000000',\n\t\t\t'transaction_type' => 'DEBIT',\n\t\t\t'transaction_status' => 'status',\n\t\t\t'source_id' => 'src_000000000000000000000000',\n\t\t\t'source_status' => 'status',\n\t\t\t'charge_id' => 'py_000000000000000000000000',\n\t\t\t'charge_status' => 'status',\n\t\t\t'user_id' => 0,\n\t\t\t'amount' => 0,\n\t\t\t'recurring' => FALSE,\n\t\t\t'time' => current_time('mysql')\n\t\t) \n\t);\n}", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\t\r\n\t\t\tif (isset ( $this->title )) {\r\n\t\t\t\t$insertCols .= \"dsh_title, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->title;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->desc )) {\r\n\t\t\t\t$insertCols .= \"dsh_desc, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->desc;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->portlet )) {\r\n\t\t\t\t$insertCols .= \"dsh_portlet, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->portlet;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->hide )) {\r\n\t\t\t\t$insertCols .= \"dsh_hide, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->hide;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->createdBy )) {\r\n\t\t\t\t$insertCols .= \"dsh_created_by, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->createdBy;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->modifiedBy )) {\r\n\t\t\t\t$insertCols .= \"dsh_modified_by, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->modifiedBy;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->createdDate )) {\r\n\t\t\t\t$insertCols .= \"dsh_created_date, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->createdDate;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->modifiedDate )) {\r\n\t\t\t\t$insertCols .= \"dsh_modified_date, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->modifiedDate;\r\n\t\t\t}\r\n\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the auto-increment property, only if the primary column is auto-increment\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\r\n\t\t\t$ks_db->commit ();\r\n\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "function open_deposit($data)\n\t{\n\t\t\t$this->db->insert('pamm_summaries',$data);\n\t}", "public function run()\n {\n $data = array(\n \t['id'=>1,\n \t 'name' => 'Food Coupon',\n \t 'amount' => 150.00\n \t],\n \t['id'=>2,\n \t 'name' => 'Hashhacks',\n \t 'amount' => 300.00\n \t]\n );\n DB::table('food_coupons')->insert($data);\n }", "protected function saveInsert()\n {\n }", "function inserirAgencia(){\n\n $banco = abrirBanco();\n //declarando as variáveis usadas na inserção dos dados\n $nomeAgencia = $_POST[\"nomeAgencia\"];\n $cidadeAgencia = $_POST[\"cidadeAgencia\"];\n\n //a consulta sql\n $sql = \"INSERT INTO Agencias(nomeAgencia,cidadeAgencia) VALUES ('$nomeAgencia','$cidadeAgencia')\";\n \n //executando a inclusão\n $banco->query($sql);\n //fechando a conexao com o banco\n $banco->close();\n voltarIndex();\n\n }", "protected function fijarSentenciaInsert(){}", "public function run()\n {\n Category::insert([\n \t['name'=>'Sci-fi','created_at'=>NULL,'updated_at'=>NULL],\n \t['name'=>'Suspense','created_at'=>NULL,'updated_at'=>NULL],\n \t['name'=>'Religious','created_at'=>NULL,'updated_at'=>NULL],\n \t['name'=>'Romance','created_at'=>NULL,'updated_at'=>NULL]]);\n }", "function add_shipto($params){\n $this->company_db->insert('tbl_shipto', $params);\n return $this->company_db->insert_id();\n }", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function run()\n {\n DB::table('master_chat_cs')->insert([\n 'kode_chat' => 'CHT-1',\n 'kode_customer' => '2',\n 'kode_cs' => '1',\n 'status' => 'aktif',\n ]);\n }", "public function run()\n {\n DB::table('courses')->insert([\n 'name' => 'Provisoire',\n 'price'=>100\n ]);\n\n DB::table('courses')->insert([\n 'name' => 'Driving license',\n 'price'=>140\n ]);\n }", "public function run()\n {\n DB::table('t_tipousuario')->insert(\n \t['tusu_desc' => 'MP',],\n \t['tusu_desc' => 'UC',],\n \t['tusu_desc' => 'JD',],\n );\n }", "public function insert()\n {\n \n }", "public function add(){\n $tab = DB::table('student');\n $res = $tab -> insert(['name' => '小黑', 'age' => '18']);\n }", "public function run()\n\t{\n\n\t\t\t\\DB::table('accounts')->insert(array(\n\t\t\t\t'name' => 'Mercadería'\n\t\t\t));\n\n\t\t\t\\DB::table('accounts')->insert(array(\n\t\t\t\t'name' => 'materias primas'\t\t\t\t\n\t\t\t));\t\n\n\t\t\t\\DB::table('accounts')->insert(array(\n\t\t\t\t'name' => 'Suministros'\t\t\t\t\n\t\t\t));\t\n\n\t}", "public function run()\n {\n if (DB::table('socioeconomico_quantidade_item_casa')->get()->count() == 0) {\n DB::table('socioeconomico_quantidade_item_casa')->insert([\n [\n 'opcao' => 'A',\n 'descricao' => 'Não.'\n ],\n [\n 'opcao' => 'B',\n 'descricao' => 'Sim, um.'\n ],\n [\n 'opcao' => 'C',\n 'descricao' => 'Sim, dois.'\n ],\n [\n 'opcao' => 'D',\n 'descricao' => 'Sim, três.'\n ],\n [\n 'opcao' => 'E',\n 'descricao' => 'Sim, quatro ou mais.'\n ],\n ]);\n } else {\n echo \"\\e[31mA tabela não está vazia. Nenhum dado foi adicionado.\";\n }\n }", "public function run()\n {\n $data = [\n [\n 'title'=>'3 месяца',\n 'text'=>'минимальный срок',\n 'ordering'=>1\n ],\n [\n 'title'=>'0%',\n 'text'=>'Переплата',\n 'ordering'=>2\n ],\n [\n 'title'=>'36 месяцев',\n 'text'=>'максимальный срок',\n 'ordering'=>3\n ]\n ];\n\n DB::table('layout_credit_items')->insert($data);\n }", "public function tambah($data,$table){ \n return $this->db->insert($table, $data);\n }", "public function run()\n {\n DB::table('listprintbarangs')->insert([\n \t'id' => 'id',\n \t'jenis'=>'jenis',\n \t'namajenis'=>'namajenis',\n \t'ukuran'=>'ukuran',\n \t'beratasli'=>'beratasli',\n \t'beratpembulatan'=>'beratpembulatan',\n \t'hargagram'=>'hargagram',\n \t'totalharga'=>'totalharga',\n \t'supplier'=>'supplier',\n \t'kadar'=>'kadar',\n ]);\n }", "public function run()\n {\n DB::table('informasi__tokos')->insert([\n \t'nama_instansi' => 'Pos Andrea',\n \t'notlp' => '08958376634',\n \t'kode_pos' => '13520',\n \t'deskripsi' => 'Pos Mantap',\n \t'alamat' => 'Jl.Batu Ampar',\n \t'foto' => 'Pos.jpg'\n \t]);\n }", "function insert() {\n $coche = new coches_model();\n\n if (isset($_POST['insert'])) {\n $coche->setMarca ($_POST['marca']);\n $coche->setModelo ($_POST['modelo']);\n $coche->setFabricado ($_POST['fabricado']);\n\n $error = $coche->insertar();\n\n if (!$error) {\n header( \"Location: index.php?controller=coches&action=listado\");\n }\n else {\n echo $error;\n }\n }\n }", "public function run()\n {\n DB::table('category_merchant')->insert([\n 'name'=>'store',\n 'description'=>'Toko penjual barang maupun makanan.'\n ]);\n DB::table('category_merchant')->insert([\n 'name'=>'hotel',\n 'description'=>'Hotel maupun tempat menginap.'\n ]);\n DB::table('category_merchant')->insert([\n 'name'=>'restaurant',\n 'description'=>'Tempat makan.'\n ]);\n }", "public function addData($data)\n {\n DB::table('tbl_laporankeluar')->insert($data);\n }", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }", "public function insert($tarConvenio);", "public function run()\n {\n DB::table('objectifs')->insert([\n 'objet' => 'depeche',\n 'date'=>'2019-02-03',\n 'note'=>'cour vite',\n 'statut'=>1,\n 'contact_id'=>1\n\n ]);\n\n DB::table('objectifs')->insert([\n 'objet' => 'depecherrrr',\n 'date'=>'2019-02-03',\n 'note'=>'cour vite chaud',\n 'statut'=>0,\n 'contact_id'=>1\n \n ]);\n }", "public function run()\n {\n DB::table('plans')->insert(array(\n \n array('name' => 'Monthly',\n 'price' => 3500),\n\n array('name' => 'Yearly',\n 'price' => 19700)\n ));\n }", "public function run()\n {\n DB::table('tbl_customer')->insert([\n 'customer_name' => Str::random(10),\n 'customer_avatar' => rand(1,100).'.jpg',\n 'customer_email' => Str::random(10).'@gmail.com',\n 'customer_password' => Hash::make('password'),\n 'customer_phone' => rand(),\n 'customer_address' => Str::random(10),\n 'customer_birthday' => date(\"Y-m-d\",rand(0,time())),\n 'customer_gender' => rand(1,2),\n 'customer_status' => 1,\n 'customer_title' => rand(0,1),\n 'customer_cash' => 0,\n 'customer_sales' => 0,\n 'customer_publish' => 0,\n 'cash_used' => 0,\n 'number_noti' => 0,\n 'customer_date' => time(),\n 'customer_update' => 1619670581,\n \n ]);\n }", "function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "public function inserCompte()\n {\n $username = \"Numherit\";\n $userId = 1;\n $token = $this->utils->getToken($userId);\n\n $nom = $this->utils->securite_xss($_POST['nom']);\n $prenom = $this->utils->securite_xss($_POST['prenom']);\n $adresse = $this->utils->securite_xss($_POST['adresse']);\n $email = $this->utils->securite_xss($_POST['email']);\n $password = $this->utils->generation_code(12);\n $dateNaissance = $this->utils->securite_xss($_POST['datenaiss']);\n $typePiece = $this->utils->securite_xss($_POST['typepiece']);\n $numPiece = $this->utils->securite_xss($_POST['piece']);\n $dateDeliv = $this->utils->securite_xss($_POST['datedelivrancepiece']);\n $telephone = trim(str_replace(\"+\", \"00\", $this->utils->securite_xss($_POST['phone'])));\n $sexe = $this->utils->securite_xss($_POST['sexe']);\n $user_creation = $this->userConnecter->rowid;\n $agence = $this->userConnecter->fk_agence;\n $response = $this->api_numherit->creerCompte($username, $token, $nom, $prenom, $adresse, $email, $password, $dateNaissance, $telephone, $user_creation, $agence, $sexe, $typePiece, $numPiece, $dateDeliv);\n\n $tab = json_decode($response);\n if (is_object($tab)) {\n if ($tab->{'statusCode'} == '000') {\n @$num_transac = $this->utils->generation_numTransaction();\n @$idcompte = $this->utils->getCarteTelephone($telephone);\n @$this->utils->SaveTransaction($num_transac, $service = ID_SERVICE_CREATION_COMPTE, $montant = 0, $idcompte, $user_creation, $statut = 0, 'SUCCESS: CREATION COMPTE', $frais = 0, $agence, 0);\n $true = 'bon';\n $this->utils->log_journal('Creation compte', 'Client:' . $nom . ' ' . $prenom . ' Agence:' . $agence, 'succes', 1, $user_creation);\n $this->rediriger('compte', 'compte/' . base64_encode($true));\n } else {\n $this->utils->log_journal('Creation compte', 'Client:' . $nom . ' ' . $prenom . ' Agence:' . $agence, 'echec', 1, $user_creation);\n $this->rediriger('compte', 'compte/' . base64_encode($tab->{'statusMessage'}));\n }\n }\n }", "public function insert_kas_cabang($data, $method)\n {\n $kasCabang = $this->kas_cabang->where('id_cabang', $data->id_cabang);\n $findKasCabang = $this->kas_cabang->where('id_cabang', $data->id_cabang)->first();\n\n if($method == 'create'){\n if($findKasCabang){\n // add up 'total kas' with new income 'biaya admin' \n $totalKas = $findKasCabang->total_kas + $data->biaya_admin;\n \n $kasCabang->update(['total_kas' => $totalKas]);\n }else{\n $kasCabang = $this->kas_cabang;\n $kasCabang->id_cabang = $data->id_cabang;\n $kasCabang->total_kas = $data->biaya_admin;\n $kasCabang->save();\n } \n }elseif($method == 'edit'){\n $previous_type_item = session()->get('jenis_barang');\n $previous_admin_price = session()->get('biaya_admin');\n\n if($previous_type_item != $data->jenis_barang){\n $totalKas = $findKasCabang->total_kas - $previous_admin_price;\n $totalKas = $totalKas + $data->biaya_admin;\n\n $kasCabang->update(['total_kas' => $totalKas]);\n }\n } \n }", "public function run()\n {\n $data = [\n [\n 'description' => 'Pop',\n 'value' => 5.00,\n 'merchant' => 1\n ],\n [\n 'description' => 'Burguer',\n 'value' => 25.00,\n 'merchant' => 2\n ]\n ];\n\n $this->table('products')\n ->insert($data)\n ->save();\n }", "public static function insertData($data){\n DB::table('auctions')->insert($data);\n }", "public function run()\n {\n DB::table('cabang')->insert([\n [\n 'id_cabang' => 1,\n 'nama_cabang' => 'Biak',\n ],\n [\n 'id_cabang' => 2,\n 'nama_cabang' => 'Pontianak',\n ],\n [\n 'id_cabang' => 3,\n 'nama_cabang' => 'Sumedang',\n ],\n [\n 'id_cabang' => 4,\n 'nama_cabang' => 'Garut',\n ],\n [\n 'id_cabang' => 5,\n 'nama_cabang' => 'Pasuruan',\n ],\n [\n 'id_cabang' => 6,\n 'nama_cabang' => 'Kupang',\n ],\n [\n 'id_cabang' => 7,\n 'nama_cabang' => 'Manado',\n ],\n [\n 'id_cabang' => 8,\n 'nama_cabang' => 'Agam',\n ],\n [\n 'id_cabang' => 9,\n 'nama_cabang' => 'Yogyakarta',\n ],\n ]);\n }", "public function addData()\n {\n $data['city'] = $this->admin_m->getCities();\n $data['deptt'] = $this->admin_m->getDeptt();\n $data['pName'] = $this->admin_m->getPapers();\n $data['cat'] = $this->admin_m->getCategories();\n\n $data['content'] = 'admin/admin_v';\n $this->load->view('components/template', $data);\n }", "function simpanTutupBulanSimuda($data){\n $this->db->insert($this->tutup_bulan_simuda,$data);\n }", "public function run()\n {\n DB::table('kota')->insert(array(\n \t[\n \t\t'provinsi_id' \t\t=> '1',\n \t\t'nama_kota' \t\t=> 'Cilacap',\n \t],\n \t[\n \t\t'provinsi_id' \t\t=> '1',\n \t\t'nama_kota' \t\t=> 'Purwokerto',\n \t],\n \t[\n \t\t'provinsi_id' \t\t=> '1',\n \t\t'nama_kota' \t\t=> 'Tegal',\n \t],\n \t[\n \t\t'provinsi_id' \t\t=> '1',\n \t\t'nama_kota' \t\t=> 'Pemalang',\n \t],\n \t[\n \t\t'provinsi_id' \t\t=> '1',\n \t\t'nama_kota' \t\t=> 'Pekalongan',\n \t],\n \t[\n \t\t'provinsi_id' \t\t=> '1',\n \t\t'nama_kota' \t\t=> 'Banjarnegara',\n \t],\n \t[\n \t\t'provinsi_id' \t\t=> '1',\n \t\t'nama_kota' \t\t=> 'Wonosobo',\n \t],\n \t[\n \t\t'provinsi_id' \t\t=> '1',\n \t\t'nama_kota' \t\t=> 'Semarang',\n \t],\n ));\n }", "public function simpan_data_res($tabel, $data)\n {\n \t$this->db->insert($tabel, $data);\n }", "public function modelDoAdd(){\n\t\t\t$tenphongban = $_POST[\"tenphongban\"];\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//chuan bi truy van\n\t\t\t$query = $conn->prepare(\"insert into phongban set tenphongban=:ten\");\n\t\t\t$query->execute(array(\"ten\"=>$tenphongban));\n\t\t}", "private function addData ()\n {\n foreach ($this->data as $key=>$value)\n {\n $keys[] = $key;\n $values[] = $value;\n \n }\n $cols = implode($keys, \",\");\n $dataValues = \"'\".implode($values, \"','\").\"'\";\n $query = \"INSERT INTO `$this->tablename`($cols)VALUES($dataValues);\";\n \n $conn = $this->DB->conn;\n \n $sql = $conn->query($query);\n \n if($sql == TRUE) return TRUE;\n else \n {\n \n throw new Exception(\"Error : Data Not inserted to database :( \".$conn->error);\n \n }\n \n }", "public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::table('ticket_count_types')->insert([\n ['name'=>'4 урока','price'=>1000,'lessons_count'=>4,],\n ['name'=>'8 уроков','price'=>1000,'lessons_count'=>8],\n ['name'=>'12 уроков','price'=>1000,'lessons_count'=>12],\n ['name'=>'Разовое посещение','price'=>300,'lessons_count'=>1],\n ]);\n }", "public function setDataLaporan($data) {\n $this->db->insert($this->table,$data); \n }", "public function run()\n {\n DB::table('orders')->insert([\n 'id_customer'=>'029',\n 'type'=>'alat musik',\n 'nama'=>'gitar',\n 'address'=>'griya cibinong indah',\n 'email'=>'pratiwiwuan59@gmail.com',\n 'phone'=>'089507891023',\n 'total_item'=>'1',\n 'total_price'=>'880.000',\n 'descreption'=>'gitar cowboy 325NS',\n 'status'=>'pesanan',\n ]);\n }" ]
[ "0.6786104", "0.6712596", "0.662185", "0.65489334", "0.65347666", "0.6457016", "0.64260024", "0.64230144", "0.64207524", "0.63876116", "0.6373747", "0.63731027", "0.6370571", "0.63501626", "0.633569", "0.63187623", "0.6300736", "0.62959665", "0.62924945", "0.6291193", "0.62904924", "0.6278692", "0.6270499", "0.6250426", "0.6237378", "0.62349945", "0.6223559", "0.6220936", "0.6219369", "0.62184703", "0.6212764", "0.62065107", "0.6203445", "0.62022966", "0.61959404", "0.61945146", "0.6174641", "0.6171363", "0.6170889", "0.61692667", "0.61674213", "0.61670405", "0.61623", "0.6154864", "0.6151319", "0.61403453", "0.61402446", "0.612946", "0.61161274", "0.6112486", "0.61113703", "0.6108368", "0.6105954", "0.6103707", "0.6101105", "0.610091", "0.60981745", "0.60941696", "0.60932726", "0.60924166", "0.6090341", "0.6089867", "0.60789543", "0.6074555", "0.606751", "0.606751", "0.60549235", "0.6052934", "0.6051594", "0.6044956", "0.60410494", "0.60345", "0.60306627", "0.60266036", "0.60259324", "0.60235417", "0.60226226", "0.60190755", "0.6017695", "0.60176164", "0.60146904", "0.6005371", "0.600339", "0.5997146", "0.59958553", "0.59956867", "0.5989238", "0.59867424", "0.5983996", "0.59820056", "0.5974806", "0.5973618", "0.59734744", "0.597319", "0.59727454", "0.5967855", "0.59660447", "0.5957797", "0.595681", "0.59564245", "0.595581" ]
0.0
-1
Membuat id baru untuk digunakan pada saat insert data
private static function getNewId() { return DB::table('cashouts')->get()->count() + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertId();", "abstract public function insertId();", "abstract public function insertId();", "abstract public function insertId();", "abstract public function insert_id();", "public function insert_id();", "public function insertId()\r\n\t{\r\n\t\t//orcal_last_inserted_id($this->link)\r\n\t}", "public function insertId()\r\n\t{\r\n\t\t//mysql_insert_id($this->link)\r\n\t}", "abstract public function insertID();", "abstract public function InsertId();", "public function insert()\n {\n $this->id = insert($this);\n }", "function ingresar($data){\n\t\t$this->db->insert('mantenciones',$data);\n\t\treturn $this->db->insert_id();\t\t\n\t}", "function load_id(){\r\n $db = new Database();\r\n $sql = \"select * from \" . Interest::TABLE_NAME . \" where name=:name\";\r\n $stm = $db->pdo->prepare($sql);\r\n $stm->bindParam(':name', $this->name);\r\n $stm->execute();\r\n if ($stm->rowCount() > 0){\r\n $row = $stm->fetch();\r\n $this->id = $row[\"id\"];\r\n }\r\n else{\r\n $this->save();\r\n $this->id = $db->pdo->lastInsertId();\r\n }\r\n }", "function insert_id();", "public function insertid()\n\t{\n\t\treturn 0;\n\t}", "private function _insert($data){\n if($lastId = $this->insert($data)){\n return $lastId;\n }else{\n // Error\n Application_Core_Logger::log(\"Could not insert into table {$this->_name}\", 'Error');\n return false;\n } \t\n }", "public function sql_insert_id() {}", "public function sql_insert_id() {}", "public function datai($sql) {\n //$this->getDB()->query($sql);\n $this->data($sql);\n return $this->getDB()->insert_id;\n }", "public function insert_ico($data){\n\t\t $this->db->insert(DB_PREFIX.'setup',$data);\n\t\t $insert_id = $this->db->insert_id();\n\t\t return $insert_id;\n\t }", "abstract protected function _getInsertId();", "public function insert($data = array())\n {\n \n\n $id = parent::insert($data);\n return $id;\n }", "public function insertData()\n {\n try {\n// print_r($this->insertUpdateArray);exit;\n $id = DB::table($this->dbTable)->insertGetId($this->insertUpdateArray);\n } catch (Exception $ex) {\n throw new Exception($ex->getMessage(), 10024, $ex);\n }\n return $id;\n }", "public function insert_id(){\n\t\treturn $this->insert_id;\n\t}", "public function insert_id(){\n \treturn $this->_insert_id;\n }", "public function insert($data){\r\n $id = null;\r\n if($d = $this->parseData($data)){\r\n if(db::insert($this->tableName,$d)){\r\n $stmt = db::getPDO();\r\n $id = $stmt->lastInsertId($this->idField);\r\n }\r\n }\r\n return $id;\r\n }", "function iid(){\r\n return $this->ixd->insert_id;\r\n }", "public function insert($data)\n {\n $this->db->set($data);\n $this->db->insert('punti_spesi');\n return $this->db->insert_id();\n }", "public static function insertId() {\n\treturn self::$instance->insertId();\n }", "function id_db() {\n\t\treturn mysql_insert_id($this -> dbc);\n\t}", "public function getInsertId();", "public function tambah($data)\n {\n $this->db->insert($this->table, [\n \"nip\" => $data[\"nip\"],\n \"bidang\" => $data[\"bidang\"],\n \"nama\" => $data[\"nama\"]\n ]);\n \n return $this->db->id();\n }", "public static function insert_id(){\n return self::$connection->insert_id;\n }", "function insertupdaterecruitement($save,$id=\"\")\n\t\t{\n\t\t\t$this->_name = 'Recruitment';\n\t\t\tif($id)\n\t\t\t{\n\t\t\t\t$where=\" recruitment_id='\".$id.\"'\";\n\t\t\t\t$this->updateQuery($save,$where);\n\t\t\t\treturn $id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$save['recruitment_id'] = $this->getIdentifier();\n\t\t\t\t$this->insertQuery($save);\n\t\t\t\treturn $save['recruitment_id'];\n\t\t\t}\n\t\t}", "function get_id($id){\n\t\t$this->id = $id;\n\t}", "function setDataRow($table,$data,$id) {\r\n\t\t\r\n\t\tif (!$table) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$db =& JFactory::getDBO();\r\n\t\t$wert = new StdClass();\r\n\t\t\r\n\t\t\r\n\t\tforeach( $data as $key => $content ) {\r\n\t\t\t$wert->$key = $content;\r\n\t\t}\r\n\t\t\r\n\t\tif ( !$id ) {\r\n\t\t\t$wert->id = null;\r\n\t\t\t\r\n\t\t\tif ( !$db->insertObject($table, $wert, 'id') ) {\r\n\t\t\t\t//echo $db->getQuery();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//echo $db->getQuery();\r\n\t\t\treturn $db->insertid();\r\n\t\t\r\n\t\t} else {\r\n\t\t\t$wert->id = $id;\r\n\t\t\t\r\n\t\t\tif ( !$db->updateObject($table, $wert, 'id') ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//echo $db->getQuery();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn false;\r\n\t}", "function insert() {\n\t \t \n\t \t$sql = \"INSERT INTO evs_database.evs_identification (idf_identification_detail_en, idf_identification_detail_th, idf_pos_id, idf_ctg_id)\n\t \t\t\tVALUES(?, ?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id));\n\t\n\t }", "function inserisci_provincia($nome_provincia=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$nome_provincia= sistemaTesto($nome_provincia);\n\t$q=\"INSERT INTO provincia (id_provincia, nome) VALUES (null,'$nome_provincia')\";\n\t$r=$db->query($q);\n\t$id=mysql_insert_id();\n\treturn $id;\n}", "public function insert($data)\n\t{\n\t\t$this->db->insert('tbl_paket_wisata', $data);\n\t\treturn $this->db->insert_id();\n\t}", "public function ultimoID()\n\t{\n\t\treturn $this->db->insert_id();\n }", "public function insert() {\n \n $query = $this->dbConnection->prepare(\"INSERT INTO `menu` (`id`, `name`, `nameen`, `address`, `isMenu`, `order`) VALUES (NULL, :name, :nameen, :address, :isMenu, :order)\");\n $query->bindValue(':name', $this->name, PDO::PARAM_STR);\n $query->bindValue(':nameen', $this->nameen, PDO::PARAM_STR);\n $query->bindValue(':address', $this->address, PDO::PARAM_STR);\n $query->bindValue(':isMenu', $this->isMenu, PDO::PARAM_STR);\n $query->bindValue(':order', $this->order, PDO::PARAM_STR);\n $query->execute();\n $this->id = $this->dbConnection->lastInsertId();\n }", "public function tambah($data_responsi) {\n\t\t$this->db->insert('tb_responsi', $data_responsi);\n\t\treturn $this->db->insert_id();\n\t}", "function inserisci_comune($nome_comune=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$nome_comune= sistemaTesto($nome_comune);\n\t$q=\"INSERT INTO comune (id_comune, nome) VALUES (null,'$nome_comune')\";\n\t$r=$db->query($q);\n\t$id=mysql_insert_id();\n\treturn $id;\n}", "function insert($data) {\n $this->db->insert($this->table, $data);\n $idOfInsertedData = $this->db->insert_id();\n return $idOfInsertedData;\n }", "function insert($data) {\n $this->db->insert($this->table, $data);\n $idOfInsertedData = $this->db->insert_id();\n return $idOfInsertedData;\n }", "function insert_data_getid($data,$tablename)\n {\n if($this->db->insert($tablename,$data))\n {\n return $this->db->insert_id();\n }\n else\n {\n return false;\n }\n }", "public function insert_id() {\r\nreturn mysqli_insert_id($this->connection);\r\n}", "public function datumAddFromId($id){\n $sql = \"select persnr,datum from dzeitsoll where id='$id'\";\n $res = $this->db->query($sql);\n $rows = $res->fetchAll();\n $row = $rows[0];\n $datum = $row['datum'];\n $persnr = $row['persnr'];\n $sqlinsert = \"insert into dzeitsoll (persnr,datum,oe) values('$persnr','$datum','-')\";\n $this->db->query($sqlinsert);\n return $this->db->insertId();\n }", "public function insert_order($data)\n{\n$this->db->insert('tbl_order', $data);\n$id = $this->db->insert_id();\nreturn (isset($id)) ? $id : FALSE;\n}", "function add_tb_detil_barang($params)\n {\n $this->db->insert('tb_detil_barang',$params);\n return $this->db->insert_id();\n }", "function setMeGustaId($id, $id_usuario, $valor_megusta) {\n $c = new Conexion();\n $resultado = $c->query(\"INSERT INTO valoracion_mg (`id`, `id_usuario`, `id_contenido`, `megusta`) VALUES (NULL, $id_usuario, $id, $valor_megusta)\");\n}", "function add() {\r\n $sql = \"INSERT into student_researchers VALUES();\";\r\n global $db;\r\n if($db->Execute($sql) === false) {\r\n throw new Exception('SQL error. Unable to add a new researcher.');\r\n }\r\n $_REQUEST['id']=mysql_insert_id();\r\n\r\n edit();\r\n}", "final private function insertNewAutorizado($id) {\n # Si hay alergias\n if(null != $this->autorizado) {\n \n # Insertar de nuevo esas relaciones\n $autorizado = $this->db->prepare(\"INSERT INTO nino_autorizado_2 (id_nino,id_autorizado)\n VALUES ('$id',?);\");\n foreach($this->autorizado as $id_autorizado){\n $autorizado->execute(array($id_autorizado));\n }\n $autorizado->closeCursor();\n } \n }", "function idData($table){\n $array=get($table,'id');\n $id=max($array)+1;\n return $id;\n }", "function add_contrato($params)\n {\n $this->db->insert('contrato',$params);\n return $this->db->insert_id();\n }", "public function ingresarEmpleadoSinID(){\n $conexion = new Conexion;\n $con = new mysqli($conexion->servername, $conexion->username, $conexion->password, $conexion->dbname);\n $sql = \"INSERT INTO empleado (rut, nombre, password, categoria, estado ) VALUES ('\".$this->rut.\"', '\".$this->nombre.\"','\".$this->password.\"', '\".$this->categoria.\"', 1)\";\n if ($con->connect_error) {\n die(\"Conexión fallida: \" . $con->connect_error);\n } \n if ($con->query($sql) === TRUE) {\n echo \"Empleado ingresada correctamente.\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $con->error;\n }\n $con->close();\n }", "public function ultimo_id (){\n\t\t$id= mysqli_insert_id($this->descriptor);\n\t\treturn $id;\n\t}", "function insertProduit($db,$model,$produitEvident,$marque,$descriptif,$prix){\n\n $sql=\"INSERT INTO produits (modele,produit_evident,marque,descriptif,prix) VALUES ('$model','$produitEvident','$marque','$descriptif','$prix');\";\n $request = mysqli_query($db,$sql) or die(mysqli_error($db));\n // si le produit est bien inséré, on renvoie son ID\n return ($request)? mysqli_insert_id($db) :false;\n}", "public function Insert(){\n //Instancia conexao com o PDO\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (idcidade, cidade) VALUES (?, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getIdCidade());\n $consulta ->bindValue(2, $this->getCidade());\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "function StoreRecord($dto){\n $query = \"INSERT INTO config VALUES (NULL, '\".$dto->nomeParametro.\"', '\".$dto->descricao.\"', '\".$dto->tipoParametro.\"', '\".$dto->valor.\"');\";\n if ($dto->id > 0)\n $query = \"UPDATE config SET nomeParametro = '\".$dto->nomeParametro.\"', descricao = '\".$dto->descricao.\"', tipoParametro = '\".$dto->tipoParametro.\"', valor = '\".$dto->valor.\"' WHERE id = \".$dto->id.\";\";\n\n $result = mysqli_query($this->mysqlConnection, $query);\n if ($result) {\n $insertId = mysqli_insert_id($this->mysqlConnection);\n if ($insertId == null) return $dto->id;\n return $insertId;\n }\n\n if ((!$result) && ($this->showErrors)) {\n print_r(mysqli_error());\n echo '<br/>';\n }\n return null;\n }", "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "function add_ajudante($params)\n {\n $this->db->insert('ajudante',$params);\n return $this->db->insert_id();\n }", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "function save( &$data, $id = false ) {\n\n\t\tif ( !$id ) {\n\t\t// if id is not false and id is not yet existed,\n\t\t\tif ( !empty( $this->primary_key ) && !empty( $this->key_prefix )) {\n\t\t\t// if the primary key and key prefix is existed,\n\t\t\t\n\t\t\t\t// generate the unique key\n\t\t\t\t$data[ $this->primary_key ] = $this->generate_key();\n\t\t\t}\n\n\t\t\t// insert the data as new record\n\t\t\treturn $this->db->insert( $this->table_name, $data );\n\t\t\t// print_r($this->db->last_query());die;\n\n\t\t} else {\n\t\t// else\n\t\t\t// where clause\n\t\t\t$this->db->where( $this->primary_key, $id);\n\n\t\t\t// update the data\n\t\t\treturn $this->db->update($this->table_name,$data);\n\t\t\t //print_r($this->db->last_query());die;\n\n\t\t}\n\t}", "function actualizar_repuestos_submantencion($id,$data){\n\t\t$this->db->where('mantenciones_subdetalles.id',$id);\n\t\t$this->db->update('mantenciones_subdetalles',$data);\n\t\treturn $this->db->insert_id();\n\t}", "private function _insert($data){\n \t\n \tif(isset($data['date_established'] )){\n \t\t$data['date_established'] = Application_Core_Utilities::ukDateToMysql($data['date_established']);\n \t}\n \t\n if($lastId = $this->insert($data)){\n return $lastId;\n }else{\n // Error\n Application_Core_Logger::log(\"Could not insert into table {$this->_name}\", 'Error');\n return false;\n } \t\n }", "public function generatenewidBarang()\n {\n // mengambil seluruh isi tabel\n $temp = $this->findAll();\n // mengambil row terakhir \n \t$last = end($temp); \n\n // jika $last kosong (jika tabel masih kosong)\n if ($last == Null){\n // mengenerate id baru dengan nilai 1\n $new_id = 1;\n }else{\n // mengenerate id baru dengan nilai id terakhir + 1\n $new_id = $last['id_barang']+1;\n }\n\n // mengembalikan nilai \n return $new_id;\n }", "function insert($data)\n {\n if ($this->db->insert('fis_dworkshopseminar_feedbacks', $data)) {\n $id = $this->db->insert_id();\n return $id;\n }\n }", "function insert($data){\n\t if($data and (is_array($data) or is_object($data))){\n\t $data = (object) $data;\n\t }else return false; \n\t $data->id = uniqid('');\n\t return parent::insert($data);\t \n\t}", "function insert($taak) {\n $this->db->insert('taak', $taak);\n return $this->db->insert_id();\n }", "function add_tb_jarak_desa($params)\n {\n $this->db->insert('tb_jarak_desa',$params);\n return $this->db->insert_id();\n }", "function add_entrenador($params)\n {\n $this->db->insert('entrenador',$params);\n return $this->db->insert_id();\n }", "public function save($id = NULL){\n if(!$id){\n $this->load->library('savequeries');\n $this->setId(date(\"YmdHis\") . rand(99, 999));\n $data = array(\n \"id\" => $this->getId()\n ,\"evolucao\" => $this->getEvolucao()\n , \"exame_complementar\" => $this->getExameComplementar()\n , \"conduta\" => $this->getConduta()\n );\n if($this->db->insert($this->getTable(), $data)){\n $this->savequeries->write($this->db->last_query());\n return $this->getId();\n }else{\n return FALSE;\n }\n }\n }", "public function getInsertId(){\n return $this->sqli->insert_id;\n }", "function store($data)\n {\n\t\t$this->db->insert($this->table, $data);\n\t\t// return last inserted restaurant id\n\t\treturn $this->db->insert_id();\n\t}", "function ingresar_subdetalles($data){\n\t\t$this->db->insert('mantenciones_subdetalles',$data);\n\t\treturn $this->db->insert_id();\n\t}", "public function insert($datos) {\n\t\t\n\t\t$result = $this->db->insert(\"accounts\", $datos);\n\t\t$id = $this->db->insert_id();\n\t\treturn $id;\n \n }", "static function save_($data)\n {\n $id = 0;\n if (isset($data['id']) && $data['id'] != '') { // It's update\n if (self::exists($data['id'])) {\n $result = EmailmarketingCampaign::find($data['id'])->fill($data);\n $result->update();\n $id = $data['id'];\n }\n } else { // It's insert\n if (self::existsByName($data['name'])==0) {\n list($id, $rows_affected) = EmailmarketingCampaign::create($data);\n }\n }\n return $id;\n }", "function insert_id($table) {\r\n\t\treturn $this->dbh->insert_id($table);\r\n\t\t\r\n\t}", "function altaProducte($nom, $descripcio, $preu, $idUsuari){\n $conn=connexioBD();\n $sql=\"INSERT INTO productes (nom, descripcio, preu, usuari_id) VALUES ('$nom', '$descripcio', '$preu', $idUsuari)\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al darte de alta\".$conn->error);\n }else{\n $idProducte=$conn->insert_id;\n return $idProducte;\n }\n $conn->close();\n}", "public function insert_id(){\n return mysql_insert_id($this->connection);\n }", "function newskomentar_createid($tbl_newskomentar){ /* Fungsi buat id */\n\t$sql = mysql_query(\"SELECT * FROM $tbl_newskomentar \");\n\treturn $sql;\n}", "public function save($data, $id = FALSE) {\n \n if ($id == FALSE) {\n \n // This is an insert\n $this->db->set($data)->insert($this->table_name);\n }\n else {\n if(!is_array($id)){\n\t\t\t\t$filter = $this->primaryFilter;\n\t\t\t\t$this->db->set($data)->where($this->primary_key, $filter($id))->update($this->table_name);\n\t\t\t} else {\n\t\t\t\t$filter = $this->primaryFilter;\n\t\t\t\t$this->db->set($data)->where($id)->update($this->table_name);\n\t\t\t\t/*\n\t\t\t\tupdate tidak berdasarkan primary key tetapi, menggunakan kolom lain contoh : save($data,array(\"NAMA_KOLOM\"=>\"coba\"));\n\t\t\t\t*/\n\t\t\t\t//Zulmi Adi Rizki 19 Juli 2013\n\t\t\t}\n // This is an update\n }\n \n // Return the ID\n return $id == FALSE ? $this->db->insert_id() : $id;\n }", "public function store_insert($data) {\n //Transfering data to Model\n\t\t$this->db->trans_start();\n\t\t$this->db->insert('store_info', $data);\n\t\t$insert_id = $this->db->insert_id();\n\t\t$this->db->trans_complete();\n\t\treturn $insert_id;\t\t\n \t}", "public function insert() \n {\n if ($this->input->post('submit')) {\n\n $data = array(\n 'id_menimbang' => $this->input->post(''), \n 'isi_menimbang' => $this->input->post('isi_menimbang') \n );\n\n\n $this->Model_menimbang->insert($data);\n $id_menimbang = $this->db->insert_id();\n\n // cek jika query berhasil\n if ($this->db->trans_status() === true) {\n $this->db->trans_commit();\n $message = array('status' => true, 'message' => 'Data menimbang telah di tambahkan');\n }\n else {\n $this->db->trans_rollback();\n $message = array('status' => true, 'message' => 'Data menimbang gagal ditambahkan');\n }\n\n // simpan message sebagai session\n $this->session->set_flashdata('message', $message);\n\n // refresh page\n redirect('menimbang', 'refresh');\n }\n\n }", "public function get_id();", "public function get_id();", "function getInsertId(){\r\n\t\treturn $this->m_insertId;\r\n\t}", "public function insertData()\n\t{\n\t\t$data = array(\n\t\t\t/* 'id' yang dikiri harus sama seperti di table\n\t\t\t'id' yang dikanan harus menurut name inputnya */\n\t\t\t'id_transaksi' => $this->input->post('id_transaksi'),\n\t\t\t'id_pelanggan' => $this->input->post('id_pelanggan'),\n\t\t\t'order_id' => $this->input->post('order_id'),\n\t\t\t'message' => $this->input->post('message'),\n\t\t\t'tgl_kirim' => $this->input->post('tgl_kirim'),\n\t\t\t'tgl_terima' => $this->input->post('tgl_terima')\n\t\t);\n\t\t/* jika semua sama sperti di table\n\t\tgunakan versi simple seprti berikut */\n\t\t$data = $this->input->post();\n\t\t/* eksekusi query insert into \"transaksi\" diisi dengan variable $data\n\t\tface2face ae lek bingung :| */\n\t\t$this->db->insert(\"transaksi\",$data);\n\t}", "function StoreRecord($dto){\n $query = \"INSERT INTO ativofixo VALUES (NULL, '\".$dto->businessPartnerCode.\"', '\".$dto->businessPartnerName.\"', \".$dto->codigoCartaoEquipamento.\", '\".$dto->codigoItem.\"', '\".$dto->descricao.\"', \".$dto->valorAquisicao.\", '\".$dto->dataInstalacao.\"', \".$dto->vidaUtil.\")\";\n if ($dto->id > 0)\n $query = \"UPDATE ativofixo SET businessPartnerCode = '\".$dto->businessPartnerCode.\"', businessPartnerName = '\".$dto->businessPartnerName.\"', codigoCartaoEquipamento = \".$dto->codigoCartaoEquipamento.\", codigoItem = '\".$dto->codigoItem.\"', descricao = '\".$dto->descricao.\"', valorAquisicao = \".$dto->valorAquisicao.\", dataInstalacao = '\".$dto->dataInstalacao.\"', vidaUtil = \".$dto->vidaUtil.\" WHERE id = \".$dto->id;\n\n $result = mysqli_query($this->mysqlConnection, $query);\n if ($result) {\n $insertId = mysqli_insert_id($this->mysqlConnection);\n if ($insertId == null) return $dto->id;\n return $insertId;\n }\n\n if ((!$result) && ($this->showErrors)) {\n print_r(mysqli_error());\n echo '<br/>';\n }\n return null;\n }", "public function save()\n {\n $queryBuilder = $this->db->createQueryBuilder();\n\n $queryBuilder->insert(self::TABLE_NAME);\n\n foreach (['delivery_id', 'status', 'topic', 'body', 'sent_at', 'direction', 'to', 'result'] as $field) {\n $value = isset($this->data[$field]) ? $this->data[$field] : null;\n $queryBuilder->setValue(\"`$field`\", $queryBuilder->expr()->literal($value));\n }\n\n $queryBuilder->execute();\n\n return $this->db->lastInsertId();\n }", "public function insertCourseSertifikat($data){\n if(!isset($data['id'])){\n // Generate Random id\n $idList = $this->getCourseSertifikat(0,'id');\n if ($idList) {\n $isUnique = false;\n while(!$isUnique) { \n $id = $this->randomGenerator(5);\n $id = $id;\n if(!in_array($id, $idList)){\n $isUnique = true;\n }\n }\n $data['id'] = 'CST'.$id;\n }else {\n $data['id'] = 'CST'.$this->randomGenerator(5);\n }\n }\n\n // insert\n $this->insert($data); \n\n // check if inputed\n if( $this->where('id', $data['id'])->first() ) {\n return true;\n }else{\n return false;\n }\n }" ]
[ "0.7646396", "0.7556009", "0.7556009", "0.7556009", "0.753458", "0.75041777", "0.73337036", "0.7322323", "0.73060936", "0.72914594", "0.7272792", "0.7167845", "0.7087439", "0.7024146", "0.69956785", "0.6991842", "0.690168", "0.6900198", "0.6897316", "0.6893476", "0.6869776", "0.68342257", "0.6821846", "0.681669", "0.68122625", "0.67926884", "0.67871004", "0.6771779", "0.6770802", "0.6763314", "0.6752183", "0.67470086", "0.672009", "0.67090446", "0.6700098", "0.6678885", "0.66778165", "0.66724443", "0.6663281", "0.666175", "0.6659281", "0.6653439", "0.66496587", "0.66489273", "0.66489273", "0.66465634", "0.66395724", "0.66347104", "0.66216654", "0.66181403", "0.6615647", "0.66056246", "0.66018564", "0.65954155", "0.6590044", "0.65878356", "0.65860456", "0.6583971", "0.6578232", "0.6558763", "0.6558763", "0.6558763", "0.6558763", "0.6558763", "0.6558763", "0.6558763", "0.6558763", "0.6558763", "0.65580416", "0.655717", "0.6555406", "0.65550315", "0.65527856", "0.6551712", "0.654948", "0.65464914", "0.65442073", "0.6540424", "0.65310806", "0.652643", "0.6526124", "0.6525576", "0.6514108", "0.6501702", "0.6500821", "0.64951456", "0.64894736", "0.6488003", "0.6477479", "0.64767224", "0.6471919", "0.64705294", "0.64677256", "0.6464689", "0.6462518", "0.6462518", "0.645531", "0.64522415", "0.64489955", "0.64469135", "0.6443352" ]
0.0
-1
Evito que se pueda clonar el objeto.
public function __clone() { trigger_error('La clonación no permitida', E_USER_ERROR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __clone()\n { \n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR); \n }", "public function __clone()\n {\n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n\n }", "public function __clone()\n {\n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n }", "public function __clone(){\n\t trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n\t }", "public function __clone()\n {\n\n trigger_error('La clonaciónn de este objeto no está permitida', E_USER_ERROR);\n\n }", "public function __clone()\n\t {\n\t trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n\t }", "public function __clone(){\n trigger_error('No se permite la clonación de este objeto.', E_USER_ERROR);\n }", "public function __clone()\n {\n echo 'Objet cloné<br/>';\n }", "public function __clone()\n {\n trigger_error('Clonación no permitida.', E_USER_ERROR);\n }", "function makeClone()\n {\n $this->id = 0;\n }", "public function __clone()\n { \n trigger_error('La clonación no permitida', E_USER_ERROR); \n }", "public function _cloned($obj)\n {\n $this->new = true;\n $this->data = [];\n $this->attr($obj);\n $this->init();\n }", "public function __clone()\n {\n $this->_id = null;\n }", "public function __clone()\n {\n $this->reset(TRUE);\n }", "public function __clone()\n {\n $this->constructedObjectId = spl_object_hash($this);\n }", "public function aObjeto() {\t}", "public function __destruct(){unset($this);}", "private function __clone() {\n // do nothing here\n }", "public function __clone()\n {\n trigger_error('Clone this object is not allowed.', E_USER_ERROR);\n }", "private function __clone() {\r\n trigger_error(\"Clonig not allowed\");\r\n }", "public function __clone()\n {\n unset($this->id);\n }", "protected function __clone()\n {\n //no possibility for cloning of singleton class\n }", "function __destruct(){\n echo \"O objeto {$this->Nome} foi destruido <hr>\";\n }", "private function __clone () {}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "public function __clone()\n {\n unset( $this->_original['_tapioca'] );\n }", "public function __clone()\n {\n foreach ((array) get_object_vars($this) as $k => $v) {\n $this->$k = null;\n }\n }", "public function __clone()\n {\n $this->_objectTag = clone $this->_objectTag;\n }", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "private function __clone(){ }", "public function __clone()\n {\n $this->_id = null;\n $this->_key = null;\n $this->_rev = null;\n // do not change the _changed flag here\n }", "function assignObject()\n\t{\n\t\tif ($this->id != 0)\n\t\t{\n\t\t\tif ($this->call_by_reference)\n\t\t\t{\n\t\t\t\t$this->object =& new ilObjAICCLearningModule($this->id, true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->object =& new ilObjAICCLearningModule($this->id, false);\n\t\t\t}\n\t\t}\n\t}", "function __clone()\n {\n // it will point to same object.\n $this->object1 = clone $this->object1;\n }", "private function __clone() {\n throw new Exception('No se puede clonar');\n }", "final public function __clone() {}", "protected function __clone(){}", "private function __clone()\r\n {\r\n // ...\r\n }", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "public function __clone() {\n\t\techo \"Cloning objects\";\n\t}", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "final public function __clone()\n {\n }", "final public function __clone()\n {\n }", "final public function __clone()\n {\n }", "private function __clone() \r\n { \r\n }", "final public function __clone()\n {\n return;\n }", "private function __clone() {\r\n\r\n }" ]
[ "0.7202559", "0.7197693", "0.7193869", "0.7131042", "0.7129103", "0.70910525", "0.70567745", "0.6456242", "0.63732207", "0.6369496", "0.6317429", "0.6265744", "0.6262393", "0.6182983", "0.61338615", "0.60442996", "0.60424656", "0.602613", "0.60175276", "0.59899193", "0.59882236", "0.5977303", "0.5958571", "0.5941317", "0.5938689", "0.5938689", "0.5938689", "0.5938689", "0.5938689", "0.5938689", "0.5938689", "0.5938689", "0.5938689", "0.5938689", "0.5938689", "0.59340435", "0.59336245", "0.5907101", "0.5896845", "0.5896845", "0.5896845", "0.5896845", "0.5892948", "0.58919907", "0.5891822", "0.58916724", "0.5891313", "0.58830655", "0.5881407", "0.5876687", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.5865685", "0.58537394", "0.58537394", "0.58537394", "0.58537394", "0.58537394", "0.58537394", "0.58537394", "0.5842909", "0.5812643", "0.5812643", "0.5812643", "0.5812643", "0.5812643", "0.5812643", "0.5812643", "0.5812643", "0.5812643", "0.5812643", "0.58045864", "0.58033067", "0.58033067", "0.58033067", "0.5801583", "0.58002937", "0.57996243" ]
0.63669276
10
Notifications constructor. Registers the known notifications to the system, allows for integration to add more
public function __construct($db, $user) { parent::__construct($db, $user); $this->lang_data = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_notifications();", "protected function initNotifications()\n {\n $this->di->setShared('notifications', function () {\n return new NotificationsChecker();\n });\n }", "protected function registerNotifications()\n {\n $this->app->singleton(\n Notifications::class,\n function ($app) {\n return new Notifications(\n $app->make(Session::class),\n array_keys(config('tailwindnotifications.bags')),\n config('tailwindnotifications')\n );\n }\n );\n $this->app->bind('tailwindnotifications', Notifications::class);\n }", "public function __construct(Notification $notification, $users)\n {\n $this->users = is_array($users) ? $users : [$users];\n $this->notification = $notification;\n }", "function advanced_notifications_init() {\n\t\n\t// register plugin hooks\n\telgg_register_plugin_hook_handler('enqueue', 'notification', '\\ColdTrick\\AdvancedNotifications\\Enqueue::preventPrivateNotifications', 9000);\n\telgg_register_plugin_hook_handler('enqueue', 'notification', '\\ColdTrick\\AdvancedNotifications\\Enqueue::delayPrivateContentNotification', 9001);\n\t\n\t// register event handlers\n\telgg_register_event_handler('update:after', 'object', '\\ColdTrick\\AdvancedNotifications\\Enqueue::checkForDelayedNotification');\n}", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "function special_notifications_init() {\n \t\n // register extra css\n elgg_extend_view('elgg.css', 'special_notifications/special_notifications.css');\n\n // register hook for checking event which are available this plugin\n $sn = array('profile_location');\n foreach ($sn as $item) {\n elgg_register_plugin_hook_handler('special_notifications:config', 'notify', \"snotify_$item\");\n }\n \n // get available active checking event and register a hook, so they can be triggered\n $special_notifications = elgg_trigger_plugin_hook('special_notifications:config', 'notify', null, []);\n foreach ($special_notifications as $key => $sn) {\n if ($sn['active']) {\n elgg_register_plugin_hook_handler('special_notifications', 'user', \"special_notification_\".$sn['hook']);\n }\n }\n\n}", "public function __construct($notifiables, $notification, array $channels = null)\n {\n $this->channels = $channels;\n $this->notifiables = $notifiables;\n $this->notification = $notification;\n }", "public function setNotifications(array $notifications)\n {\n $this->values['Notifications'] = $notifications;\n return $this;\n }", "public function setNotifications(array $notifications)\n {\n $this->values['Notifications'] = $notifications;\n return $this;\n }", "public function register_notifications( $notifications ) {\n\n\t\t$notifications['two-factor-email'] = array(\n\t\t\t'slug' => 'two-factor-email',\n\t\t\t'schedule' => ITSEC_Notification_Center::S_NONE,\n\t\t\t'recipient' => ITSEC_Notification_Center::R_USER,\n\t\t\t'subject_editable' => true,\n\t\t\t'message_editable' => true,\n\t\t\t'tags' => array( 'username', 'display_name', 'site_title' ),\n\t\t\t'module' => 'two-factor',\n\t\t);\n\n\t\t$notifications['two-factor-confirm-email'] = array(\n\t\t\t'slug' => 'two-factor-confirm-email',\n\t\t\t'schedule' => ITSEC_Notification_Center::S_NONE,\n\t\t\t'recipient' => ITSEC_Notification_Center::R_USER,\n\t\t\t'subject_editable' => true,\n\t\t\t'message_editable' => true,\n\t\t\t'tags' => array( 'username', 'display_name', 'site_title' ),\n\t\t\t'module' => 'two-factor',\n\t\t\t'optional' => true,\n\t\t);\n\n\t\treturn $notifications;\n\t}", "public function notifications() {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n \n $notifications = $this->notifications->get_notifications($this->user_id);\n \n // Load view/user/notifications.php file\n $this->body = 'user/notifications';\n $this->content = ['notifications' => $notifications];\n $this->user_layout();\n \n }", "public function __construct()\n {\n $this->notificationTypes = ['TransactionBillWasClosed', 'LoyaltyRewardEarned', 'CustomerRedeemReward', 'CustomerRedeemDeal'];\n }", "public function __construct($notification)\n {\n parent::__construct($notification);\n }", "public static function register_notifications( $notifications = array() ) {\n\t\t$default_notifications = array(\n\t\t\t\t// Lead Generation\n\t\t\t\t'client_summary' => array(\n\t\t\t\t\t'name' => __( 'Client Summary', 'sprout-invoices' ),\n\t\t\t\t\t'description' => __( 'Customize the email sent to the client summarizing open invoices and esitmates.', 'sprout-invoices' ),\n\t\t\t\t\t'shortcodes' => array( 'date', 'name', 'username', 'dashboard_link', 'summary' ),\n\t\t\t\t\t'default_title' => sprintf( __( '%s: Your Summary', 'sprout-invoices' ), get_bloginfo( 'name' ) ),\n\t\t\t\t\t'default_content' => self::default_summary_notification(),\n\t\t\t\t),\n\t\t\t);\n\t\treturn array_merge( $notifications, $default_notifications );\n\t}", "function notifications()\r\r\n\t{\r\r\n\t\t$table \t\t\t\t\t\t\t= 'notifications';\r\r\n\t\t$condition \t\t\t\t\t\t= '';\r\r\n\t\tif ($this->uri->segment(3)) {\r\r\n\t\t\t$notificationId \t\t\t= $this->uri->segment(3);\r\r\n\t\t\t$condition['nid'] \t\t\t= $notificationId;\t\t\t\r\r\n\t\t}\r\r\n\t\t$notifications \t\t\t\t\t= $this->base_model->fetch_records_from(\r\r\n\t\t$table, \r\r\n\t\t$condition, \r\r\n\t\t$select \t\t\t\t\t\t= '*', \r\r\n\t\t$order_by \t\t\t\t\t\t= ''\r\r\n\t\t);\r\r\n\t\t$this->data['notifications'] \t= $notifications;\r\r\n\t\tif ($this->uri->segment(3)) {\r\r\n\t\t\t$this->data['notificationTitle'] = $notifications[0]->title;\r\r\n\t\t}\r\r\n\t\t$this->data['content'] \t\t\t= 'general/notifications';\r\r\n\t\t$this->_render_page('temp/template', $this->data);\r\r\n\t}", "protected function _construct()\n {\n $this->_init(\n 'Mmsbuilder\\Pushnotification\\Model\\Pushnotifications',\n 'Mmsbuilder\\Pushnotification\\Model\\ResourceModel\\Pushnotifications'\n );\n }", "public function notification(Notification $notification, array $parameters = []);", "public function __construct()\n {\n //Database notification\n $this->title = '';\n $this->subtitle = '';\n $this->icon = '';\n $this->type = '';\n $this->actions = [\n 'link' => '#'\n ];\n }", "public function getNotifications() {\n $api = new ApiNotification($this->_clientId, $this->_clientSecret, $this->_isTest);\n return $api;\n }", "function itsec_import_export_register_notification( $notifications ) {\n\n\t$notifications['import-export'] = array(\n\t\t'subject_editable' => true,\n\t\t'message_editable' => true,\n\t\t'recipient' => ITSEC_Notification_Center::R_PER_USE,\n\t\t'schedule' => ITSEC_Notification_Center::S_NONE,\n\t\t'tags' => array( 'date', 'time', 'site_title', 'site_url' ),\n\t\t'module' => 'import-export',\n\t);\n\n\treturn $notifications;\n}", "public function newNotifications()\n {\n $notifications = $this->notification->ReminderforUser(Auth::user());\n\n\n foreach($notifications as $key => $notification) \n \n $notifications[$key]['translated'] = __($notification['content'], [\n 'taskName' => $this->{$notification['notifiable_type']}->find($notification['notifiable_id'])->name\n ]);\n\n return response()->json([\n 'notification' => $notifications\n ]);\n }", "public function __construct(protected NotificationRepository $notificationRepository)\n {\n }", "function notification_init() {\n\t// Register a notification handler for the default email method\n\tregister_notification_handler(\"email\", \"email_notify_handler\");\n\n\t// Add settings view to user settings & register action\n\telgg_extend_view('forms/account/settings', 'core/settings/account/notifications');\n\n\telgg_register_plugin_hook_handler('usersettings:save', 'user', 'notification_user_settings_save');\n}", "public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }", "public function runNotifications():void;", "protected function loadNotifications()\n {\n /*\n * Load module items\n */\n foreach ($this->callbacks as $callback) {\n $callback($this);\n }\n\n /*\n * Load plugin items\n */\n $plugins = $this->pluginManager->getPlugins();\n\n foreach ($plugins as $id => $plugin) {\n if (!method_exists($plugin, 'registerNotifications')) {\n continue;\n }\n\n $notifications = $plugin->registerNotifications();\n if (!is_array($notifications)) {\n continue;\n }\n\n $this->registerNotifications($id, $notifications);\n }\n }", "public function listNotifications()\r\n { \t \r\n \r\n \t$data = $this->call(array(), \"GET\", \"notifications.json\");\r\n \t$data = $data->{'notifications'};\r\n \t$notificationArray = new ArrayObject();\r\n \tfor($i = 0; $i<count($data);$i++){\r\n \t\t$notificationArray->append(new Notification($data[$i], $this));\r\n \t}\r\n \treturn $notificationArray;\r\n }", "public function __construct($new_postNotification)\n {\n //\n $this->postNotification = $new_postNotification;\n\n }", "public function notification();", "public function notification();", "public function __construct() {\n notificationController::showNotificationAccordingToCurrentUser();\n }", "public function notifications() { return $this->notifications; }", "public function __construct()\n {\n $this->fields = [\n 'notification' => [],\n 'content_available' => true\n ];\n }", "public function __construct() {\r\n $this->setEntity('mst_notification');\r\n }", "function GetNotifications () {\n\t\treturn $this->notifications;\n\t}", "public static function notifications(): array\n {\n return [];\n }", "public function __construct(Notify $notify)\n {\n $this->notify = $notify;\n $this->userRep = new AccountUserRepository();\n }", "public static function create($notification){\n }", "public function __construct(NotificationTrigger $notification_trigger)\n {\n $this->notification_trigger = $notification_trigger;\n }", "private function buildNotificationsBlock(): void\n {\n //====================================================================//\n // Notifications Block\n $notifications = array(\n \"error\" => \"This is a Sample Error Notification\",\n \"warning\" => \"This is a Sample Warning Notification\",\n \"success\" => \"This is a Sample Success Notification\",\n \"info\" => \"This is a Sample Infomation Notification\",\n );\n\n $this->blocksFactory()->addNotificationsBlock($notifications, array(\"Width\" => self::SIZE_M));\n }", "public function __construct($notifier) {\n $this->notifier = $notifier;\n }", "function ExtractNotifications () {\n\t\trequire_once('xml-processing/gc_XmlParser.php');\n\t\t$GXmlParser = new gc_XmlParser($this->poll_result[1]);\n\t\t\t$data = $GXmlParser->GetData();\n\t\t\t//Get the actual notifications\n\t\t\tforeach($data['notification-data-response']['notifications'] as $notification) {\n\t\t\t\t$this->notifications[] = $notification;\n\t\t\t}\n\t\t\t//Get other useful info\n\t\t\t$this->has_more_notifications = $data['notification-data-response']['has-more-notifications']['VALUE'];\n\t\t\t$this->continue_token = $data['notification-data-response']['continue-token']['VALUE'];\n\t}", "public function show(Notifications $notifications) {\n //\n }", "public function notifications($uid = false)\r\n {\r\n global $_SMALLURL;\r\n if (!$uid) {\r\n $uid = $_SMALLURL['UID'];\r\n }\r\n $n = new user_notifications($uid);\r\n return $n;\r\n }", "protected static function booted()\n {\n $notification = new Notification();\n\n static::created(function ($lead_escalation) use($notification) {\n if(! isset($lead_escalation->metadata['v2_data'])){\n $notification_messages = $notification->parseMessages();\n\n $lead_escalation_status = \"{$lead_escalation->escalation_level} - {$lead_escalation->escalation_status}\";\n $organisation_notifications = $lead_escalation->organisation->notifications ?? ['sms', 'email'];\n\n //update expiration date\n $countdown = Setting::where('name', $lead_escalation_status)->first();\n\n if($countdown && ! empty($countdown->value)) {\n $time_type = ucfirst($countdown->metadata['type']);\n $lead_escalation->expiration_date = Date('Y-m-d H:i:s', strtotime('+'.$countdown->value.\" $time_type\"));\n $lead_escalation->save();\n }\n\n # Get general notifications for IP - Extended N\n if(strpos($lead_escalation_status, 'In Progress - Extended') !== false) {\n $lead_escalation_status = 'In Progress - Extended';\n }\n\n $user_types = ['inquirer', 'admin', 'organization'];\n\n foreach($user_types as $user_type) {\n if((isset($notification_messages[$lead_escalation_status][$user_type]['email']['title']) &&\n !empty($notification_messages[$lead_escalation_status][$user_type]['email']['title'])) ||\n (isset($notification_messages[$lead_escalation_status][$user_type]['email']['message']) &&\n !empty($notification_messages[$lead_escalation_status][$user_type]['email']['message']))) {\n\n if($user_type == 'admin') {\n $setting = Setting::where('key', 'admin-email-notification-receivers')->first();\n if($setting && !empty($setting->value)) {\n $emails = explode(',', $setting->value);\n\n $recepient = [];\n foreach($emails as $email) {\n $email = trim($email);\n if(!empty($email)) {\n $recepient[] = [\n 'name' => 'Admin',\n 'email' => $email\n ];\n }\n }\n } else {\n # get admin user names and emails\n $users_email = User::role('administrator')->get();\n\n $recepient = [];\n foreach($users_email as $user) {\n $recepient[] = [\n 'name' => $user->name,\n 'email' => $user->email\n ];\n }\n }\n\n # Removed email sending to admin when reassigning\n if( !isset($lead_escalation->metadata['reassign'])) {\n # Send email to admin\n Mail::to($recepient)->queue(new AdminNotification($lead_escalation, $notification_messages));\n }\n\n } else if($user_type == 'inquirer' && !isset($lead_escalation->metadata['prevent_inquirer_notification'])) {\n $title = $notification_messages[$lead_escalation_status][$user_type]['email']['title'];\n $description = $notification_messages[$lead_escalation_status][$user_type]['email']['description'];\n\n $recepient = [];\n $recepient[] = [\n 'name' => \"{$lead_escalation->lead->customer->first_name} {$lead_escalation->lead->customer->last_name}\",\n 'email' => $lead_escalation->lead->customer->email\n ];\n\n $message = $description;\n\n if(!empty($lead_escalation->lead->enquirer_message)){\n $message = $lead_escalation->lead->enquirer_message;\n }\n\n # Send email to inquirer check if the customer has email address\n if(!empty($lead_escalation->lead->customer->email && isset($lead_escalation->metadata['notif_config']['enquirer_send_email']))\n && !empty($lead_escalation->metadata['notif_config']['enquirer_send_email'])) {\n Mail::to($recepient)->queue(new InquirerNotification($title, $message));\n }\n\n # Send sms to inquirer check if the customer has contact number\n if(!empty($lead_escalation->lead->customer->contact_number) && isset($lead_escalation->metadata['notif_config']['enquirer_send_sms'])\n && !empty($lead_escalation->metadata['notif_config']['enquirer_send_sms'])) {\n //add notification for enquirer, to display in LO - Enquirer Notifications\n $notif_structure = [\n 'title' => 'LEAF STOPPER CONFIRMATION',\n 'description' => $message,\n 'metadata' => [\n 'to' => 'inquirer',\n 'lead_id' => $lead_escalation->lead_id,\n 'organisation_id' => $lead_escalation->organisation_id,\n 'notification_type' => 'notification',\n 'lead_escalation_status' => $lead_escalation_status,\n 'lead_escalation_color' => $lead_escalation->leadEscalationStatus($lead_escalation_status) ?? 'purple',\n ]\n ];\n\n Notification::create($notif_structure);\n\n //save all notification types\n $notification->logActivity(\n $lead_escalation,\n $notif_structure\n );\n\n Notification::send_sms($lead_escalation->lead->customer->contact_number, $message);\n }\n\n } else {\n if($lead_escalation->organisation && (!isset($lead_escalation->metadata['send_email']) || $lead_escalation->metadata['send_email'] == true)) {\n $user_ids = $lead_escalation->organisation->organisation_users()->pluck('user_id');\n\n $users_email = User::whereIn('id',\n $user_ids\n )->get();\n\n $recepient = [];\n foreach($users_email as $user) {\n $recepient[] = [\n 'name' => $user->name,\n 'email' => $user->email\n ];\n }\n\n # Send email to org users\n # for previous value of notification. we have updated values notification to email\n if( isset($lead_escalation->metadata['notif_config'])) {\n if ( $lead_escalation->metadata['notif_config']['send_email'] == true) {\n Mail::to($recepient)->queue(new OrganizationNotification($lead_escalation, $notification_messages));\n }\n }\n\n if(in_array('notification', $organisation_notifications) && (!isset($lead_escalation->metadata['notif_config'])) ){\n Mail::to($recepient)->queue(new OrganizationNotification($lead_escalation, $notification_messages));\n } else if(in_array('email', $organisation_notifications)) {\n Mail::to($recepient)->queue(new OrganizationNotification($lead_escalation, $notification_messages));\n }\n }\n }\n }\n }\n NotificationJob::dispatch(\n $lead_escalation\n );\n }\n\n });\n }", "protected function registerNotification(array $notification)\n {\n $view = $this->getView();\n\n $options = Json::encode(ArrayHelper::merge($this->getClientOptions(), $notification));\n $view->registerJs(\"new PNotify({$options});\");\n }", "protected function getNotificationsFromContainer()\n {\n if (!empty($this->notifications) || $this->isAdded) {\n return;\n }\n\n $container = $this->getContainer();\n $namespaces = [];\n\n foreach ($container as $namespace => $notification) {\n $this->notifications[$namespace] = $notification;\n $namespaces[] = $namespace;\n }\n\n $this->clearNotificationsFromContainer($namespaces);\n }", "public function __construct($notification_id)\n {\n $this->notification_id = $notification_id;\n }", "public function __construct($invitation_notification_arr)\n {\n $this->invitation_notification_arr = $invitation_notification_arr;\n }", "public function onBeforeCreateEchoEvent(\n\t\tarray &$notifications,\n\t\tarray &$notificationCategories,\n\t\tarray &$icons\n\t) {\n\t\t$notificationCategories['dt-subscription'] = [\n\t\t\t'priority' => 3,\n\t\t\t'tooltip' => 'echo-pref-tooltip-dt-subscription',\n\t\t];\n\t\t$notifications['dt-subscribed-new-comment'] = [\n\t\t\t'category' => 'dt-subscription',\n\t\t\t'group' => 'interactive',\n\t\t\t'section' => 'message',\n\t\t\t'user-locators' => [\n\t\t\t\t[ [ EventDispatcher::class, 'locateSubscribedUsers' ] ]\n\t\t\t],\n\t\t\t// Exclude mentioned users and talk page owner from our notification, to avoid\n\t\t\t// duplicate notifications for a single comment\n\t\t\t'user-filters' => [\n\t\t\t\t[\n\t\t\t\t\t[ EchoUserLocator::class, 'locateFromEventExtra' ],\n\t\t\t\t\t[ 'mentioned-users' ]\n\t\t\t\t],\n\t\t\t\t[ [ EchoUserLocator::class, 'locateTalkPageOwner' ] ],\n\t\t\t],\n\t\t\t'presentation-model' => SubscribedNewCommentPresentationModel::class,\n\t\t\t'bundle' => [\n\t\t\t\t'web' => true,\n\t\t\t\t'email' => true,\n\t\t\t\t'expandable' => true,\n\t\t\t],\n\t\t];\n\n\t\t$notificationCategories['dt-subscription-archiving'] = [\n\t\t\t'priority' => 3,\n\t\t\t'tooltip' => 'echo-pref-tooltip-dt-subscription-archiving',\n\t\t];\n\t\t$notifications['dt-removed-topic'] = [\n\t\t\t'category' => 'dt-subscription-archiving',\n\t\t\t'group' => 'interactive',\n\t\t\t'section' => 'message',\n\t\t\t'user-locators' => [\n\t\t\t\t[ [ EventDispatcher::class, 'locateSubscribedUsers' ] ]\n\t\t\t],\n\t\t\t'presentation-model' => RemovedTopicPresentationModel::class,\n\t\t\t'bundle' => [\n\t\t\t\t'web' => true,\n\t\t\t\t'email' => true,\n\t\t\t\t'expandable' => true,\n\t\t\t],\n\t\t];\n\t\t$notifications['dt-added-topic'] = [\n\t\t\t'category' => 'dt-subscription',\n\t\t\t'group' => 'interactive',\n\t\t\t'section' => 'message',\n\t\t\t'user-locators' => [\n\t\t\t\t[ [ EventDispatcher::class, 'locateSubscribedUsers' ] ]\n\t\t\t],\n\t\t\t'presentation-model' => AddedTopicPresentationModel::class,\n\t\t\t'bundle' => [\n\t\t\t\t'web' => true,\n\t\t\t\t'email' => true,\n\t\t\t\t'expandable' => true,\n\t\t\t],\n\t\t];\n\n\t\t// Override default handlers\n\t\t$notifications['edit-user-talk']['presentation-model'] = EnhancedEchoEditUserTalkPresentationModel::class;\n\t\t$notifications['mention']['presentation-model'] = EnhancedEchoMentionPresentationModel::class;\n\t}", "public function __construct(NotificationService $notificationService)\n {\n $this->notificationService = $notificationService;\n\n parent::__construct();\n }", "public function index()\r\n {\r\n if (!auth()->user()->can('send_notification')) {\r\n abort(403, 'Unauthorized action.');\r\n }\r\n\r\n $business_id = request()->session()->get('user.business_id');\r\n\r\n $customer_notifications = NotificationTemplate::customerNotifications();\r\n\r\n $module_customer_notifications = $this->moduleUtil->getModuleData('notification_list', ['notification_for' => 'customer']);\r\n\r\n if (!empty($module_customer_notifications)) {\r\n foreach ($module_customer_notifications as $module_customer_notification) {\r\n $customer_notifications = array_merge($customer_notifications, $module_customer_notification);\r\n }\r\n }\r\n\r\n foreach ($customer_notifications as $key => $value) {\r\n $notification_template = NotificationTemplate::getTemplate($business_id, $key);\r\n $customer_notifications[$key]['subject'] = $notification_template['subject'];\r\n $customer_notifications[$key]['email_body'] = $notification_template['email_body'];\r\n $customer_notifications[$key]['sms_body'] = $notification_template['sms_body'];\r\n $customer_notifications[$key]['auto_send'] = $notification_template['auto_send'];\r\n $customer_notifications[$key]['auto_send_sms'] = $notification_template['auto_send_sms'];\r\n }\r\n\r\n $supplier_notifications = NotificationTemplate::supplierNotifications();\r\n\r\n $module_supplier_notifications = $this->moduleUtil->getModuleData('notification_list', ['notification_for' => 'supplier']);\r\n\r\n if (!empty($module_supplier_notifications)) {\r\n foreach ($module_supplier_notifications as $module_supplier_notification) {\r\n $supplier_notifications = array_merge($supplier_notifications, $module_supplier_notification);\r\n }\r\n }\r\n\r\n foreach ($supplier_notifications as $key => $value) {\r\n $notification_template = NotificationTemplate::getTemplate($business_id, $key);\r\n $supplier_notifications[$key]['subject'] = $notification_template['subject'];\r\n $supplier_notifications[$key]['email_body'] = $notification_template['email_body'];\r\n $supplier_notifications[$key]['sms_body'] = $notification_template['sms_body'];\r\n $supplier_notifications[$key]['auto_send'] = $notification_template['auto_send'];\r\n $supplier_notifications[$key]['auto_send_sms'] = $notification_template['auto_send_sms'];\r\n }\r\n\r\n\r\n $business_notifications = NotificationTemplate::businessNotifications();\r\n\r\n $module_business_notifications = $this->moduleUtil->getModuleData('notification_list', ['notification_for' => 'business']);\r\n\r\n if (!empty($module_business_notifications)) {\r\n foreach ($module_business_notifications as $module_business_notification) {\r\n $business_notifications = array_merge($business_notifications, $module_business_notification);\r\n }\r\n }\r\n\r\n foreach ($business_notifications as $key => $value) {\r\n $notification_template = NotificationTemplate::getTemplate($business_id, $key);\r\n $business_notifications[$key]['subject'] = $notification_template['subject'];\r\n $business_notifications[$key]['email_body'] = $notification_template['email_body'];\r\n $business_notifications[$key]['sms_body'] = $notification_template['sms_body'];\r\n $business_notifications[$key]['auto_send'] = $notification_template['auto_send'];\r\n $business_notifications[$key]['auto_send_sms'] = $notification_template['auto_send_sms'];\r\n }\r\n\r\n $tags = NotificationTemplate::notificationTags();\r\n\r\n return view('notification_template.index')\r\n ->with(compact('customer_notifications', 'supplier_notifications', 'business_notifications', 'tags'));\r\n }", "public function notifications()\n {\n return $this->morphToMany(Notification::class, 'notifiable');\n }", "public function show(Notifications $notifications)\n {\n //\n }", "public function getNotifications()\n {\n return $this->_notifications;\n }", "public function markAsUnread($notifications);", "public function __construct($notifiable)\n {\n $this->notifiable = $notifiable;\n }", "public function notifications()\n {\n return $this->morphToMany(Notification::class, 'notificationable', 'notificationables');\n }", "public function notifications()\n {\n return $this->hasMany('App\\Notification');\n }", "public function notifications()\n {\n return $this->hasMany('App\\Notification');\n }", "public function init()\n\t{\n\t\tparent::init();\n\n\t\tcraft()->on('entries.SaveEntry', function(Event $event) {\n\t\t\t$sectionId = $event->params['entry']->sectionId;\n\n\t\t\tforeach (craft()->userGroups->getAllGroups() as $group) {\n\t\t\t\t$groupId = $group->id;\n\n\t\t\t\t$permission = 'getnotifications:' . $sectionId;\n\n\t\t\t\tif (craft()->userPermissions->doesGroupHavePermission($groupId, $permission)) {\n\n\t\t\t\t\tcraft()->brief->notifyUsers($event->params['entry'], $groupId);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public function notifications()\n {\n return $this->hasMany('App\\Models\\Servers\\ApplicationNotification');\n }", "public function unread($notifications);", "public function notificationsAction()\n {\n \t$medium = User_Notification::MEDIUM_HOMEPAGE;\n \t$notifications = $this->_user->getNotifications($medium);\n \t$notifications = $this->_user->addDefaultNotifications($notifications, $medium);\n\n $form = new User_Notification_Form($notifications);\n $form->populateFromDatabaseData($notifications);\n\n $data = $this->_request->getPost();\n if(!$data || !$form->isValid($data)){\n // Display errors or empty form\n $this->view->form = $form;\n $this->view->status = null;\n return;\n }\n\n /**\n * Try to fetch the notification rows in DB for each itemType.\n * Create a blank one if it does not exist, then save it.\n */\n $table = new User_Notification();\n $elements = $form->getElements();\n foreach($elements as $element){\n \t$name = $element->getName();\n \tif(in_array($name, $this->_disregardUpdates)){\n \t\tcontinue;\n \t}\n\n \tif(!isset($data[$name])){\n \t\tcontinue;\n \t}\n\n \t$row = $notifications[$name];\n\t\t\t$row->notify = $element->getValue();\n\t\t\t$row->save();\n }\n\n $this->_user->clearCache();\n // Update successful\n $this->view->form = null;\n $this->view->status = true;\n }", "function wd_notification() {\n return WeDevs_Notification::init();\n}", "public function __construct( TicketService $ticketService , NotificationService $notificationService )\n {\n $this->ticketService = $ticketService;\n $this->notificationService = $notificationService;\n }", "public static function core_email_notifications() {\n\t\treturn array(\n\t\t\t'WP_Job_Manager_Email_Admin_New_Job',\n\t\t\t'WP_Job_Manager_Email_Admin_Updated_Job',\n\t\t\t'WP_Job_Manager_Email_Admin_Expiring_Job',\n\t\t\t'WP_Job_Manager_Email_Employer_Expiring_Job',\n\t\t);\n\t}", "public function getUserNotifications($where, array $markers = []);", "public function notification() {\n\t\t$this->page_data['page_name'] = \"notification\";\n\t\t$this->page_data['page_title'] = 'notification';\n\t\t$this->page_data['page_view'] = 'user/notification';\n\n\t\t$this->page_data['company_add_request_list'] = $this->corporate_model->get_company_list(\n\t\t\t\"OBJECT\",\n\t\t\tarray(\n\t\t\t\t'company_user' => array('company_id', 'corporate_role', 'designation_id', 'department_id', 'request_status'),\n\t\t\t\t'company' => array('name as company_name'),\n\t\t\t\t'designation' => array('name as designation'),\n\t\t\t\t'department' => array('name as department'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'company_user.user_id' => $this->session->userdata('user_id'),\n\t\t\t\t'company_user.request_status' => 'PENDING',\n\t\t\t)\n\t\t);\n\n\t\t$this->load->view('index', $this->page_data);\n\n\t}", "private function dispatchNotifications() {\n $this->channels->each(function($channel) {\n $notifiable = new AnonymousNotifiable();\n $notifiable->route($channel->type, $channel->endpoint);\n DispatchNotification::dispatch($notifiable, $this->notification);\n });\n }", "public function notifications()\n {\n return $this->morphMany(Notification::class, 'notificable');\n }", "public function __construct($notification_url)\n {\n $this->notification_url=$notification_url;\n }", "public function __construct(\\Ews\\StructType\\EwsNotificationType $notification = null)\n {\n $this\n ->setNotification($notification);\n }", "public function __construct(CanReceiveNotifications $recipient, $magic_link)\n {\n $this->magic_link = $magic_link;\n $this->recipient = $recipient;\n\n // set the applications locale to the user's culture we are sending\n // the notification to, instead of the current application locale\n Localization::setApplicationLocale($recipient->culture);\n }", "public function __construct($title, $sender, $notification)\n {\n $this->title = $title;\n $this->sender = $sender;\n $this->notification = $notification;\n }", "protected function registerPushNotification()\n {\n $this->app->singleton(PushNotification::class, function ($app) {\n return new PushNotificationManager($app);\n });\n }", "protected function setNotificationParam(Notifications $notification)\n {\n $this->notification = $notification;\n $this->content = $this->notificationService->getContentsForNotification($notification);\n }", "public static function createFromArray($fields) \n\t{\n\t\t$notification = new Notification();\n\t\tself::populate($notification,$fields);\n\t\treturn $notification;\n\t}", "public function addFromSession()\n {\n if ($this->session->has(\"notifications.$this->name\")) {\n $this->push($this->session->get(\"notifications.$this->name\"));\n }\n if ($this->plural) {\n if ($this->session->has(\"notifications.$this->plural\")) {\n foreach (\n $this->session->get(\"notifications.$this->plural\") as\n $notification\n ) {\n $this->push($notification);\n }\n }\n }\n }", "protected function getCron_Task_Core_PruneNotificationsService()\n {\n $this->services['cron.task.core.prune_notifications'] = $instance = new \\phpbb\\cron\\task\\core\\prune_notifications(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['notification_manager']) ? $this->services['notification_manager'] : $this->getNotificationManagerService()) && false ?: '_'});\n\n $instance->set_name('cron.task.core.prune_notifications');\n\n return $instance;\n }", "public function __construct(PushNotification $push)\n {\n $this->push = $push;\n }", "protected function getNotificationManagerService()\n {\n return $this->services['notification_manager'] = new \\phpbb\\notification\\manager(${($_ = isset($this->services['notification.type_collection']) ? $this->services['notification.type_collection'] : $this->getNotification_TypeCollectionService()) && false ?: '_'}, ${($_ = isset($this->services['notification.method_collection']) ? $this->services['notification.method_collection'] : $this->getNotification_MethodCollectionService()) && false ?: '_'}, $this, ${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, 'phpbb_notification_types', 'phpbb_user_notifications');\n }", "public function run()\r\n {\r\n Notification::create([\r\n 'id' => 1,\r\n 'image' => 'assets/images/notifications/reminder.png',\r\n 'title' => 'Follow Up Reminder',\r\n 'message' => '{CONTACT} Follow Up Reminder. Go to \"My Task\" to complete action.',\r\n 'type' => 'reminder',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 2,\r\n 'image' => 'assets/images/notifications/thumbs-down.png',\r\n 'title' => '{CONTACT} not interested',\r\n 'message' => '{REASON_NOT_INTERESTED}',\r\n 'type' => 'not-interested',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 3,\r\n 'image' => 'assets/images/notifications/order.png',\r\n 'title' => 'New Order Update',\r\n 'message' => '{STEP_TITLE} was completed by {COMPANY} for {CONTACT}.',\r\n 'type' => 'step-completed',\r\n 'sound' => 's_new_order',\r\n 'android_channel_id' => 'new_order',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 4,\r\n 'image' => 'assets/images/notifications/video.png',\r\n 'title' => 'Video Started',\r\n 'message' => '{CONTACT} is watching the video titled {VIDEO_TITLE}.',\r\n 'type' => 'video',\r\n 'sound' => 's_tracking',\r\n 'android_channel_id' => 'tracking',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 5,\r\n 'image' => 'assets/images/notifications/order.png',\r\n 'title' => 'New Order Submitted',\r\n 'message' => '{CONTACT} submitted an new order.',\r\n 'type' => 'new-order',\r\n 'sound' => 's_new_order',\r\n 'android_channel_id' => 'new_order',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 6,\r\n 'image' => 'assets/images/notifications/cross.png',\r\n 'title' => 'Order Canceled',\r\n 'message' => 'Order was canceled for {CONTACT} by {COMPANY}. Please review the message in todays task to learn more.',\r\n 'type' => 'order-cancelled',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 7,\r\n 'image' => 'assets/images/notifications/faq.png',\r\n 'title' => 'Article Read',\r\n 'message' => '{CONTACT} read the article on {ARTICLE_TITLE}',\r\n 'type' => 'article-read',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 8,\r\n 'image' => 'assets/images/notifications/brochure.png',\r\n 'title' => 'Booklet Read',\r\n 'message' => '{CONTACT} has read the Booklet. Nice Job {USER}!',\r\n 'type' => 'brochure-read',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 9,\r\n 'image' => 'assets/images/notifications/brochure.png',\r\n 'title' => 'Booklet Downloaded',\r\n 'message' => '{CONTACT} downloaded the software-demand.com Booklet',\r\n 'type' => 'brochure-downloaded',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 10,\r\n 'image' => 'assets/images/notifications/appointment.png',\r\n 'title' => 'New Appointment',\r\n 'message' => 'You have an appointment right now with {CONTACT}!',\r\n 'type' => 'appointment-now',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 11,\r\n 'image' => 'assets/images/notifications/support.png',\r\n 'title' => 'New Ticket',\r\n 'message' => 'A new ticket from {FROM} has been submitted for titled {TITLE}.',\r\n 'type' => 'new-ticket',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 12,\r\n 'image' => 'assets/images/notifications/support.png',\r\n 'title' => 'New Reply',\r\n 'message' => 'A new reply from {FROM} has been posted for the support ticket titled {TITLE}.',\r\n 'type' => 'new-reply',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 13,\r\n 'image' => 'assets/images/notifications/new_lead.png',\r\n 'title' => 'New Opt In Page Lead',\r\n 'message' => 'Just in! A new opt in page lead.',\r\n 'type' => 'new-lead',\r\n 'sound' => 's_new_order',\r\n 'android_channel_id' => 'new_order',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 14,\r\n 'image' => 'assets/images/notifications/new_lead.png',\r\n 'title' => 'New Opt In Page Lead Handoff',\r\n 'message' => 'Just in! A new opt in page lead handed off to {SALES_SUPPORT}. We will keep you informed on the progress.',\r\n 'type' => 'handedoff-lead',\r\n 'sound' => 's_new_order',\r\n 'android_channel_id' => 'new_order',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 15,\r\n 'image' => 'assets/images/notifications/new_lead.png',\r\n 'title' => 'New Handoff Referral',\r\n 'message' => 'Just in! A new handoff referral from {FROM}',\r\n 'type' => 'new-handoff-referral',\r\n 'sound' => 's_new_order',\r\n 'android_channel_id' => 'new_order',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 16,\r\n 'image' => 'assets/images/notifications/new_lead.png',\r\n 'title' => 'New Team Support Referral',\r\n 'message' => 'Just in! A new team support referral from {FROM}',\r\n 'type' => 'new-team-support-referral',\r\n 'sound' => 's_new_order',\r\n 'android_channel_id' => 'new_order',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 17,\r\n 'image' => 'assets/images/notifications/flame.png',\r\n 'title' => 'New Hot Lead',\r\n 'message' => '{CONTACT} became a hot lead. Go to \"Hot Lead\" for activity details.',\r\n 'type' => 'third-base',\r\n 'sound' => 's_new_order',\r\n 'android_channel_id' => 'new_order',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 18,\r\n 'image' => 'assets/images/notifications/flame-green.png',\r\n 'title' => 'Education Completed',\r\n 'message' => '{CONTACT} software-demand.com completed education! Connect with team support to move customer forward.',\r\n 'type' => 'ki-completed',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 19,\r\n 'image' => 'assets/images/notifications/testimonial-video.png',\r\n 'title' => 'Video Started',\r\n 'message' => '{CONTACT} is watching the testimonial video from {VIDEO_TITLE}.',\r\n 'type' => 'testimonial-video-started',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 20,\r\n 'image' => 'https://dev.springaqua.com/api/assets/images/money.png',\r\n 'title' => 'Commission Paid',\r\n 'message' => 'We paid you, congrats.',\r\n 'type' => 'commission-paid',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 21,\r\n 'image' => 'assets/images/notifications/new.png',\r\n 'title' => 'Commission Posted',\r\n 'message' => 'A new commission posted. Go to \"My B.O.B\" for details.',\r\n 'type' => 'commission-posted',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 22,\r\n 'image' => 'assets/images/notifications/reminder.png',\r\n 'title' => 'Reset Funnel',\r\n 'message' => ' {CONTACT} funnel has been reset.',\r\n 'type' => 'reset-funnel',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 23,\r\n 'image' => 'assets/images/notifications/reminder.png',\r\n 'title' => 'New Personal Notes',\r\n 'message' => '{USER} added personal note',\r\n 'type' => 'personal-notes',\r\n 'sound' => 's_new_order',\r\n 'android_channel_id' => 'new_order',\r\n 'navigate_to' => '/tasks-list'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 24,\r\n 'image' => 'assets/images/notifications/reminder.png',\r\n 'title' => 'New Appointment',\r\n 'message' => 'You have an appointment in an hour. This is now in your Today\\'s Task awaiting your completion.',\r\n 'type' => 'appointment-task',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n\r\n Notification::create([\r\n 'id' => 25,\r\n 'image' => 'assets/images/customer.png',\r\n 'title' => 'Congratulations!',\r\n 'message' => 'Congratulations! You\\'re an agent now',\r\n 'type' => 'become-agent',\r\n 'sound' => 's_update',\r\n 'android_channel_id' => 'update',\r\n 'navigate_to' => '/notifications'\r\n ]);\r\n }", "public function __construct(NotificationServiceContract $notificationService)\n {\n $this->notificationService=$notificationService;\n }", "public function test_create_changelog_creates_notifications_for_users(): void\n {\n User::query()->each(static function(User $user){\n $user->notifications()->delete();\n });\n\n $users = $this->user();\n\n $this->assertEquals(0, $users->unreadNotifications()->count());\n Changelog::create([\n 'title' => 'Test title new changelog',\n 'text' => 'Test text new changelog',\n 'nextstep' => 'Text nextstep new changelog',\n ]);\n\n $this->assertEquals(1, $users->unreadNotifications()->count());\n }", "public function notifications()\n {\n return $this->morphMany(DatabaseNotification::class, 'notifiable')->orderBy('created_at', 'desc');\n }", "public function getNotifications()\n {\n return $this->hasMany(Notification::className(), ['task_id' => 'id']);\n }", "public function push($notification, $notifiable);", "public static function init() {\n\t\tadd_action( 'job_manager_send_notification', array( __CLASS__, '_schedule_notification' ), 10, 2 );\n\t\tadd_action( 'job_manager_email_init', array( __CLASS__, '_lazy_init' ) );\n\t\tadd_action( 'job_manager_email_job_details', array( __CLASS__, 'output_job_details' ), 10, 4 );\n\t\tadd_action( 'job_manager_email_header', array( __CLASS__, 'output_header' ), 10, 3 );\n\t\tadd_action( 'job_manager_email_footer', array( __CLASS__, 'output_footer' ), 10, 3 );\n\t\tadd_action( 'job_manager_email_daily_notices', array( __CLASS__, 'send_employer_expiring_notice' ) );\n\t\tadd_action( 'job_manager_email_daily_notices', array( __CLASS__, 'send_admin_expiring_notice' ) );\n\t\tadd_filter( 'job_manager_settings', array( __CLASS__, 'add_job_manager_email_settings' ), 1 );\n\t\tadd_action( 'job_manager_job_submitted', array( __CLASS__, 'send_new_job_notification' ) );\n\t\tadd_action( 'job_manager_user_edit_job_listing', array( __CLASS__, 'send_updated_job_notification' ) );\n\t}", "private static function createNotificationTable() {\n\n global $wpdb;\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n // creates notification in database if not exists\n $table = $wpdb->prefix . \"notification\";\n $charset_collate = $wpdb->get_charset_collate();\n $sql = \"CREATE TABLE IF NOT EXISTS $table (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `title` text NOT NULL,\n `content` text NOT NULL,\n `image` text NOT NULL,\n `is_deleted` BOOLEAN NOT NULL DEFAULT FALSE,\n `created_date` int(11) NOT NULL,\n `update_date` int(11) NOT NULL,\n PRIMARY KEY (`id`)\n ) $charset_collate;\";\n dbDelta($sql);\n\n $table = $wpdb->prefix . \"notification_queue\";\n $charset_collate = $wpdb->get_charset_collate();\n $sql = \"CREATE TABLE IF NOT EXISTS $table (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `notification_id` int(11) NOT NULL,\n `title` text NOT NULL,\n `content` text NOT NULL,\n `image` text NOT NULL,\n `token_id` int(11) NOT NULL,\n `is_sent` BOOLEAN NOT NULL DEFAULT FALSE,\n `is_read` BOOLEAN NOT NULL DEFAULT FALSE,\n `created_date` int(11) NOT NULL,\n PRIMARY KEY (`id`)\n ) $charset_collate;\";\n dbDelta($sql);\n\n\n }", "function notifications(){\n $this->session->set_userdata('notify_offset', '0');\n $offset_session= $this->session->userdata('notify_offset');\n $sk = array();\n $uid = $this->session->userdata('user_id');\n // Login verification and user stats update\n $logged = false;\n $user = null;\n $config['site_url'] = base_url();\n $config['theme_url'] = '';\n $config['script_path'] = str_replace('index.php', '', $_SERVER['PHP_SELF']);\n $config['ajax_path'] = base_url() . 'ajax/socialAjax';\n $sk['config'] = $config;\n if ($this->socialkit->SK_isLogged()) {\n $user = $this->socialkit->SK_getUser($uid, true);\n if (!empty($user['id']) && $user['type'] == \"user\") {\n $sk['user'] = $user;\n $logged = true;\n $query_two = \"UPDATE \" . DB_ACCOUNTS . \" SET last_logged=\" . time() . \" WHERE id=\" . $user['id'];\n $sql_query_two = $this->db->query($query_two);\n }\n $sk['logged'] = $logged;\n $sk['notifications'] = $this->socialkit->SK_getNotifications(array('all'=>true), $offset_session ,50);\n\t\t\t\n $data['sk'] = $sk;\n $this->load->view('user/notifications', $data);\n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\n }\n }", "public function __construct()\n {\n /* excepts */\n $this->validateRoutes(['sendNotificationToAllUser']);\n }", "public function notifications()\n {\n return $this->hasMany(DatabaseNotification::class, 'type', 'name');\n }", "public function getNotifications()\n {\n return $this->hasMany(Notification::className(), ['user_id' => 'id']);\n }", "function GetAdminNotification()\n\t{\n\t\t$notifications = array(\n\t\t\t'adminnotify_email' => $this->adminnotify_email,\n\t\t\t'adminnotify_send_flag' => $this->adminnotify_send_flag,\n\t\t\t'adminnotify_send_threshold' => $this->adminnotify_send_threshold,\n\t\t\t'adminnotify_send_emailtext' => $this->adminnotify_send_emailtext,\n\t\t\t'adminnotify_import_flag' => $this->adminnotify_import_flag,\n\t\t\t'adminnotify_import_threshold' => $this->adminnotify_import_threshold,\n\t\t\t'adminnotify_import_emailtext' => $this->adminnotify_import_emailtext\n\t\t);\n\n\t\treturn $notifications;\n\t}", "public function __construct()\n {\n $this->smsSettings = sms_setting();\n Config::set('twilio-notification-channel.auth_token', $this->smsSettings->auth_token);\n Config::set('twilio-notification-channel.account_sid', $this->smsSettings->account_sid);\n Config::set('twilio-notification-channel.from', $this->smsSettings->from_number);\n\n Config::set('nexmo.api_key', $this->smsSettings->nexmo_api_key);\n Config::set('nexmo.api_secret', $this->smsSettings->nexmo_api_secret);\n Config::set('services.nexmo.sms_from', $this->smsSettings->nexmo_from_number);\n\n Config::set('services.msg91.key', $this->smsSettings->msg91_auth_key);\n Config::set('services.msg91.msg91_from', $this->smsSettings->msg91_from);\n }", "public function initialize()\n {\n $this->setSchema(\"micro_mail\");\n $this->setSource(\"notice\");\n \n $this->addBehavior(new SoftDelete(\n \tarray(\n \t\t'field' => 'status',\n \t\t'value' => 'S0'\n \t)\n ));\n $this->useDynamicUpdate(true);\n }", "public function push($notification)\n {\n if ($notification instanceof Notification) {\n $this->notifications[] = $notification;\n } else {\n $this->notifications[] = new I18nTextNotification($notification);\n }\n }" ]
[ "0.76410186", "0.7485888", "0.7239179", "0.7049934", "0.6884878", "0.68610394", "0.68610394", "0.68610394", "0.6840568", "0.68308145", "0.682163", "0.682163", "0.678556", "0.6732774", "0.66707563", "0.6621415", "0.65692157", "0.6544258", "0.65359575", "0.6516812", "0.65101725", "0.64596796", "0.643288", "0.6400954", "0.63807666", "0.63428223", "0.63367504", "0.6325855", "0.6307806", "0.62554723", "0.6204648", "0.6190751", "0.6190751", "0.6189507", "0.61641294", "0.615669", "0.6151494", "0.60849744", "0.6073644", "0.60712093", "0.6053312", "0.60515636", "0.59933585", "0.5992413", "0.596976", "0.5954941", "0.5949544", "0.59456456", "0.5927444", "0.5917976", "0.59127295", "0.59016764", "0.5890712", "0.58867824", "0.5885763", "0.5875819", "0.58693975", "0.58673215", "0.5862881", "0.5820675", "0.5819859", "0.58065987", "0.58065987", "0.57988393", "0.57827234", "0.5779378", "0.57692415", "0.5768937", "0.5766815", "0.57300967", "0.5724361", "0.57076645", "0.5700275", "0.56891316", "0.5671021", "0.56579566", "0.5646723", "0.564404", "0.56424606", "0.56295955", "0.56257236", "0.56135976", "0.5605136", "0.5587972", "0.5580149", "0.5578153", "0.5570725", "0.5567617", "0.5556345", "0.55553204", "0.5538776", "0.5538388", "0.55366623", "0.55330217", "0.5525001", "0.55159515", "0.55031323", "0.5500273", "0.5496337", "0.54920024", "0.54913676" ]
0.0
-1
Inserts a new mention in the database (those that appear in the mentions area).
protected function _send_notification($obj, $task, $bodies) { global $modSettings; $mentioning = new Mentioning($this->db, $this->user, new DataValidator(), $modSettings['enabled_mentions']); foreach ($bodies as $body) { $mentioning->create($obj, array( 'id_member_from' => $task['id_member_from'], 'id_member' => $body['id_member_to'], 'id_msg' => $task['id_target'], 'type' => $task['notification_type'], 'log_time' => $task['log_time'], 'status' => $task['source_data']['status'], )); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert($mambot);", "function new_comments_mentions($insertId, $user_id){\n\t\t\t$conn = new Conexion();\t\t\n\t\t\t$sql = $conn->prepare( \"insert into wall_comments_mentions values (:COMMENT, :USER)\"); \n \t\t\t$sql->execute(array('COMMENT' => $insertId, 'USER' => $user_id));\n \t\t\t$conn = null;\n \t\t\t$sql = null;\n\n\n\t}", "function associateWordWithWord($wordID, $seeAlsoID, $message=\"\"){\r\n\tinsertIntoTable(\"seealso\", array(\"wordID\" => $wordID, \"seeAlsoID\" => $seeAlsoID));\r\n\tprint $message;\r\n}", "public function mentions(){\n\t\t$title = \"mentioning user: @\";\n\t\t$where = \"select m.post_id from mentions m, users u2 where m.user_id = u2.user_id and u2.user_name\";\n\n\t\t#call generic routine for showing a specific list of posts:\n\t\t$this->view_specific($where, $title);\n\t}", "function mINSERT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$INSERT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:19:3: ( 'insert' ) \n // Tokenizer11.g:20:3: 'insert' \n {\n $this->matchString(\"insert\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function InsertChatMessage(){\n include \"conn.php\";\n\n $req=$bdd->prepare('INSERT INTO chats(ChatUserId,ChatText) VALUES(:ChatUserId,:ChatText)');\n $req->execute(array(\n 'ChatUserId'=>$this->getChatUserId(),\n 'ChatText'=>$this->getChatText()\n ));\n }", "public function insertStory()\n\t\t{\n\n\t\t\t$sql = \"INSERT INTO `BreakingNews`(`News`) VALUES (\\\" \\\")\";\n\n\t\t\t$this->connection->query($sql);\n\n\t\t}", "function insert() {\n\t\t$sql = \"INSERT INTO lessons\n\t\t\t\tVALUES (?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->lessons_id, $this->name, $this->date, $this->active, $this->rank));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t\t\n\t}", "function mentionMePostbit(&$post)\n{\n\tglobal $mybb, $theme, $lang, $templates, $forumpermissions,\n\t$fid, $post_type, $thread, $forum;\n\n\tif ($mybb->settings['quickreply'] == 0 ||\n\t\t$mybb->user['suspendposting'] == 1 ||\n\t\t$forumpermissions['canpostreplys'] == 0 ||\n\t\t($thread['closed'] == 1 && !is_moderator($fid)) ||\n\t\t$forum['open'] == 0 ||\n\t\t$post_type ||\n\t\t$mybb->user['uid'] == $post['uid']) {\n\t\treturn;\n\t}\n\n\t// tailor JS to postbit setting\n\t$js = \"javascript:MentionMe.insert('{$post['username']}');\";\n\tif ($mybb->settings['mention_multiple']) {\n\t\t$js = \"javascript:MentionMe.multi.mention({$post['pid']});\";\n\t}\n\n\teval(\"\\$post['button_mention'] = \\\"\" . $templates->get('mentionme_postbit_button') . \"\\\";\");\n}", "function insertIntoTopicsTable($topic){\n $sqlAddTopic = 'REPLACE INTO topics SET topic = (\\'' . $topic . '\\');';\n run_sql($sqlAddTopic);\n}", "public function add($entity)\n {\n $statement = \"INSERT INTO contact (message, user_id, animal_id, created_at) \n VALUES (:message, :user, :animal, :created_at)\";\n\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":message\", $entity->getMessage());\n $prepare->bindValue(\":user\", $entity->getUser());\n $prepare->bindValue(\":animal\", $entity->getAnimal());\n $prepare->bindValue(\":created_at\", $entity->getCreatedAt());\n $prepare->execute();\n }", "function iu_mentionusername($string, $from, $posturl){\n\tinclude 'dbparams.php';\n\tpreg_match_all('/@[a-zA-Z0-9_]+/', $string, $matches);\n\t// print_r($matches[1]);\n\tforeach ($matches as $match) {\n\t\tif(in_array($match, $matches)){\n\t\t\tforeach ($match as $name) {\n\t\t\t\t$matchedname = str_replace(\"@\", \"\", $name);//remove '@' from username match\n\t\t\t\t$mentionQuery = @mysqli_query($dblink, \"SELECT user_id FROM users WHERE username = '$matchedname'\");\n\t\t\t\t$mentionRow = mysqli_fetch_assoc($mentionQuery);\n\t\t\t\t$mentionuserid = $mentionRow['user_id'];\n\n\t\t\t\tiu_send_notification($from, $mentionuserid, 'mentionpost', $posturl);\n\t\t\t}\n\t\t}\n\t}\n}", "public function insert(Tag $tag);", "function textus_db_insert_annotation($userid, $textid, $start, $end, $private, $lang, $text)\n{\n global $wpdb;\n\n $table_name = $wpdb->prefix . \"textus_annotations\"; \n print \"user is $userid\";\n $rows_affected = $wpdb->insert( $table_name, \n array( \n 'textid' => $textid,\n 'start' => $start, \n 'end' => $end, \n 'userid' => $userid,\n 'private' => $private,\n 'language' => $lang,\n 'text' => $text\n ) \n );\n return $rows_affected;\n}", "function InsertComment ($message, $author_name, $author_mail, $answer_to) {\n\t \n\t $sql = \"INSERT INTO NoticeBoard (message, author_name, author_mail, answer_to) \n\t \t\t\tVALUES ('$message', '$author_name', '$author_mail', $answer_to) \";\n\n\t mysqli_query($GLOBALS[\"connection\"], $sql);\t\t\t\n}", "function content_twitter_mention($content) {\n\treturn preg_replace('/([^a-zA-Z0-9-_&])@([0-9a-zA-Z_]+)/', \"$1<a href=\\\"http://twitter.com/$2\\\" target=\\\"_blank\\\" rel=\\\"nofollow\\\">@$2</a>\", $content);\n}", "function suggestcomment_add_comment($text){\n global $wpdb;\n $table_name = $wpdb->prefix . \"suggestcomment\";\n $sql=\"INSERT INTO \" . $table_name .\" (comment_text) \" .\"VALUES ('\" . $wpdb->escape($text) . \"');\";\n $results = $wpdb->query($sql);\n}", "public function save()\n {\n\n // Doesn't exist yet -- Insert it\n if( $this->id == -1 )\n {\n $sql = 'INSERT INTO messages (recipient, sender, annotation)\n VALUES (?, ?, ?);';\n $params = array( $this->recipient, $this->sender, $this->annotation );\n $query = $this->db->query( $sql, $params );\n }\n\n // Already exists -- Update it\n else \n {\n $sql = 'UPDATE messages\n SET recipient = ?, sender = ?, annotation = ?\n WHERE id = ?';\n $params = array( $this->id, $this->recipient->id, $this->sender->id, $this->annotation->id );\n $query = $this->db->query( $sql, $params );\n }\n }", "public function addFriend($friend_guid);", "function associateWordWithSentence($sentenceID, $wordID, $wordSequenceNumber, $message=\"\"){\r\n\tremoveExistingAssociation($sentenceID, $wordSequenceNumber);\r\n\t//given a sentenceID, wordID, and wordSequenceNumber, populate sentence_word\r\n\t$sentence_wordInsertQuery = \"INSERT INTO sentence_word (sentenceID, wordID, wordSequenceNumber) VALUES (\".\r\n\t\t\t\tmysql_real_escape_string($sentenceID).\",\".\r\n\t\t\t\tmysql_real_escape_string($wordID).\",\".\r\n\t\t\t\tmysql_real_escape_string($wordSequenceNumber).\")\";\r\n\t\t\tif(!$result = mysql_query($sentence_wordInsertQuery)){echo ('Query failed: ' . mysql_error()); mysql_query(\"ROLLBACK\");die();} \r\n\tprint $message;\r\n}", "function add_news($name, $text)\n {\n $query = \"INSERT INTO `news` (`name`,`text`) VALUES (:name,:text)\";\n $sth = $this->db->prepare($query);\n $sth->execute(array(\n 'name' => $name,\n 'text' => $text\n ));\n return $this->db->lastInsertId();\n }", "public function insert($article);", "public function AddFavourite($uid, $msgID) {\n\t$uid = mysqli_real_escape_string($this->db, $uid);\n\t$msgID = mysqli_real_escape_string($this->db, $msgID);\n\t$query = mysqli_query($this->db,\"INSERT INTO favourite(fav_uid,fav_msgID ) VALUES('$uid','$msgID')\")or die(mysqli_error($this->db));\n\t\n}", "function add_actor($info){\n\t$db= $GLOBALS['db']; \n\textract($info);\n\t$submitted= $db->query(\"INSERT INTO actors VALUES('', '$first_name', '$last_name', '$bio', '$dob', '$won_oscar', '$timestamp')\");\n\techo \"<h3>$first_name $last_name has been submitted!</h3>\"; \n}", "public function insertExpert($user, $word) {\n $user = $this->connection->escape_string($user);\n $word = $this->connection->escape_string($word);\n \n $this->query(\"INSERT INTO Expert (user, word)\"\n . \" VALUES ('$user', '$word')\");\n\n\n }", "public function insert($medAccount);", "public function mention() {\n\n return view('admin.mention');\n }", "function likeComment($userId, $commentId)\n{\n $sqlLike = \"INSERT INTO `user_like_comment`(`userId`,`commentId`) VALUES ('$userId', $commentId)\";\n mysqli_query($GLOBALS[\"conn\"], $sqlLike);\n\n}", "public function insert() {\n\t\t$db = self::getDB();\n\t\t$sql = \"INSERT INTO posts\n\t\t\t\t\t(nome, conteudo, fk_idUsuario, fk_idTopico)\n\t\t\t\tVALUES\n\t\t\t\t\t(:nome, :conteudo, :fk_idUsuario, :fk_idTopico)\";\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute([\n\t\t\t':nome' => $this->getNome(),\n\t\t\t':conteudo' => $this->getConteudo(),\n\t\t\t':fk_idUsuario' => $this->getFkIdUsuario(),\n\t\t\t':fk_idTopico' => $this->getFkIdTopico()\n\t\t]);\n\t\t$this->idPost = $db->lastInsertId();\n\t}", "public function insertKeyword($page_id, $word) {\n $page_id = $this->connection->escape_string($page_id);\n $word = $this->connection->escape_string($word);\n \n $this->query(\"INSERT INTO Keywords (page_id, word)\"\n . \" VALUES ('$page_id', '$word')\");\n }", "function new_emetteur($nom_emetteur, $email_emetteur, $message, $random_value) {\n insert_emetteur($nom_emetteur, $email_emetteur, $message, $random_value);\n}", "public function insertContributor($data){\r\n $this->insert($data);\r\n }", "public static function insert($what, $update = null)\n\t{\n\t\t$what['search_title'] = self::searchTitle($what);\n\t\t$set = \"set\n\t\t\ttitle \t\t= '\".db::escape($what['title']).\"',\n\t\t\tsearch_title= '\".db::escape($what['search_title']).\"',\n\t\t\ticon \t\t= '\".db::escape($what['icon']).\"',\n\t\t\tauthor_id \t= \".intval($what['author_id']).\",\n\t\t\tpost_date \t= \".intval($what['post_date']).\",\n\t\t\tbody \t\t= '\".db::escape($what['body']).\"'\";\n\n\t\tdb::query(\"insert into \".Blog::$table.\" \".$set);\n\t\treturn db::insertId();\n\t}", "public function addOneComment(){\n\t\tif (!empty($_POST['user_name']) && !empty($_POST['content'])){\n\t\t\t$values = array(\n \t\t'user_name' => $_POST['user_name'],\n\t\t\t'content' => $_POST['content'],\n\t\t\t'post_id' => $_POST['post_id']\n\t\t);\n\n\t\t$sqlfuncs = array(\n \t\t'date_creation' => 'NOW()',\n\t\t);\n\n\t$this->pInsertFunc(\"INSERT INTO\", \"comment\", $values, $sqlfuncs);\n\t\t\techo '<script>alert(\"Le commentaire a bien été envoyé.\")</script>';\n\t\t}\n\n\t}", "public function insert(){\n\t\t// $post->title = 'A post from the insert method';\n\t\t// $post->body = 'Some random ghibberrish';\n\t\t// $post->save();\n\n\t\t$data = array(\n\t\t\t'title' => 'A post from the insert method, using the data array',\n\t\t\t'body' => 'Some random ghibberrish, using the data array',\n\t\t\t'user_id' => 1\n\t\t);\n\n\t\tPost::create($data);\n\n\t\tdd('post inserted');\n\t}", "function log_spam_word($id_auteur, $login, $id_forum, $id_article, $titre, $message)\n{\n\t$user_ip = (isset($HTTP_SERVER_VARS['REMOTE_ADDR'])) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR');\n\n\t$req = sql_select('spam_word','spip_spam_words');\n\t$spam = false;\n\n\twhile ( $row = sql_fetch($req) )\n\t{\n\t\t$spamword = str_replace('*', '', $row['spam_word']);\n\t\t$titre = preg_replace(\"#$spamword#is\", '{{' . $spamword . '}}', $titre);\n\t\t$message = preg_replace(\"#$spamword#is\", '{{' . $spamword . '}}', $message);\n\t}\n\n\t$res = sql_insertq('spip_spam_words_log', array (\n\t\t\t\t'id_auteur' => $id_auteur,\n\t\t\t\t'login' => $login,\n\t\t\t\t'ip_auteur' => $user_ip,\n\t\t\t\t'titre' => $titre,\n\t\t\t\t'message' => $message,\n\t\t\t\t'id_forum' => $id_forum,\n\t\t\t\t'id_article' => $id_article\n\t\t\t\t)\n\t\t\t);\n}", "function mentionDetect($match)\n{\n\tstatic $nameCache, $myCache;\n\n\tif (!empty($match['quoted'])) {\n\t\t$username = $match['quoted'];\n\t} elseif (!empty($match['unquoted'])) {\n\t\t$username = $match['unquoted'];\n\t} else {\n\t\treturn $match[0];\n\t}\n\n\t$username = html_entity_decode(mb_strtolower($username));\n\n\t// cache names to reduce queries\n\tif ($myCache instanceof MentionMeCache == false) {\n\t\t$myCache = MentionMeCache::getInstance();\n\t}\n\n\tif (!isset($nameCache)) {\n\t\t$nameCache = $myCache->read('namecache');\n\t}\n\n\tif (isset($nameCache[$username])) {\n\t\treturn mentionBuild($nameCache[$username]);\n\t}\n\n\t// lookup the user name\n\t$user = mentionTryName($username);\n\tif ($user['uid'] == 0) {\n\t\treturn $match[0];\n\t}\n\n\t// store the mention\n\t$nameCache[$username] = $user;\n\t$myCache->update('namecache', $nameCache);\n\n\t// and return the mention\n\treturn mentionBuild($user);\n}", "public function insert() {\n\t\t$this->insert_user();\n\t}", "function insertGoalSeen($UUID,$GOAL){\n\tob_start();\n\t//$firephp = FirePHP::getInstance(true);\n\t//$firephp->log($UUID, \"uuid now that I'm in toolkit.php\");\n\t//$firephp->log($GOAL, \"ending now that I'm in toolkit.php\");\n\t$connection = get_SQL_Connection();\n\t$uid = getUserIdFromFacebookId($UUID);\n\t//$firephp->log($uid, \"uid value (no longer facebook id I think\");\n\t$query = sprintf(\"INSERT INTO GoalsSeen (userId, goalName) VALUES('%s', '%s')\",\n\t\t$uid, \n\t\tmysql_real_escape_string($GOAL)\n\t\t); \n\tif (!mysql_query($query,$connection)) {\n\t\t//$firephp->log($query, \"uid value (no longer facebook id I think\");\n echo(\"Could not execute SQL query, '$query' in updatePlayCount\");\n }\n}", "public function insert_message($data)\n {\n $this->db->insert('contact_us', $data);\n\n }", "public function addReply()\r\n{\r\n $query_string = \"INSERT INTO replies \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"replycontent = :replycontent, \";\r\n $query_string .= \"replytopic = :replytopic, \";\r\n $query_string .= \"replyauthor = :replyauthor\";\r\n\r\n return $query_string;\r\n}", "protected function insert() {\n\t\tglobal $wgEchoNotifications;\n\n\t\t$notifMapper = new NotificationMapper();\n\n\t\t$services = MediaWikiServices::getInstance();\n\t\t$hookRunner = new HookRunner( $services->getHookContainer() );\n\t\t// Get the bundle key for this event if web bundling is enabled\n\t\t$bundleKey = '';\n\t\tif ( !empty( $wgEchoNotifications[$this->event->getType()]['bundle']['web'] ) ) {\n\t\t\t$hookRunner->onEchoGetBundleRules( $this->event, $bundleKey );\n\t\t}\n\n\t\tif ( $bundleKey ) {\n\t\t\t$hash = md5( $bundleKey );\n\t\t\t$this->bundleHash = $hash;\n\t\t}\n\n\t\t$notifUser = NotifUser::newFromUser( $this->user );\n\n\t\t// Add listener to refresh notification count upon insert\n\t\t$notifMapper->attachListener( 'insert', 'refresh-notif-count',\n\t\t\tstatic function () use ( $notifUser ) {\n\t\t\t\t$notifUser->resetNotificationCount();\n\t\t\t}\n\t\t);\n\n\t\t$notifMapper->insert( $this );\n\n\t\tif ( $this->event->getCategory() === 'edit-user-talk' ) {\n\t\t\t$services->getTalkPageNotificationManager()\n\t\t\t\t->setUserHasNewMessages( $this->user );\n\t\t}\n\t\t$hookRunner->onEchoCreateNotificationComplete( $this );\n\t}", "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }", "public function mention()\n {\n $project_id = $this->request->getStringParam('project_id');\n $query = $this->request->getStringParam('search');\n $users = $this->projectPermissionModel->findUsernames($project_id, $query);\n\n $this->response->json($this->userMentionFormatter->withUsers($users)->format());\n }", "public function insertNewTinyUrl(TinyUrl $tinyUrl): void;", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "public function insert($uavmDocument);", "public function insert(){\n\t\t$facebook = $_POST['facebook'];\n $linkedin = $_POST['linkedin'];\n $twitter = $_POST['twitter'];\n $youtube = $_POST['youtube'];\n\t\t$sql= $this->link->query(\"INSERT INTO social(facebook,linkedin,twitter,youtube)VALUES('$facebook','$linkedin','$twitter','$youtube')\");\n if($sql){\n\t\techo \"<script>alert('link created')</script>\";\n\t\techo \"<script>window.location.href = './social.php'</script>\";\n exit;\n\t }\n\t}", "public function p_add() {\n\t\t\t#print_r($_POST);\n\t\t\t\n\t\t\t\n\t\t\t$_POST['created'] = Time::now();\n \t\t\t$_POST['modified'] = Time::now();\n\t\t\t$_POST['poster'] = $this->user->user_id;\n\t\t\t\n\t\t\t#Write Post to the Database\n\t\t $post_id= DB::instance(DB_NAME)->insert('posts', $_POST);\n\t\t\t#Call the parser to look for hashtags: \n\t\t\t$_POST['post'] = $this->parse(\"#\",$_POST['post'],$post_id);\n\t\t\t#Call the parser to look for mentions, and the 'reply_to' for the post\n\t\t\t$_POST['post'] = $this->parse(\"@\",$_POST['post'],$post_id);\n\t\t\t#Update the Post record with new post, updated in the parser:\n\t\t\tDB::instance (DB_NAME)->update('posts',$_POST,\"where post_id = '\".$post_id.\"'\");\t\n\t\t\t\n\t\t Router::redirect('/users/');\n\t\t\t\n\t\t\t\t\t\t\n\t\t}", "public function insert($maeMedico);", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function addComment()\r\n {\r\n $pdoStatment = $this->pdo->prepare(\r\n 'INSERT INTO `comment`(`content`, `id_User`, `id_Article`) \r\n VALUES(:content, :id_User, :id_Article)'\r\n );\r\n $pdoStatment->bindValue(':content', $this->content, PDO::PARAM_STR);\r\n $pdoStatment->bindValue(':id_User', $this->id_User, PDO::PARAM_INT);\r\n $pdoStatment->bindValue(':id_Article', $this->id_Article, PDO::PARAM_INT);\r\n $pdoStatment->execute();\r\n return $this->pdo->lastInsertId();\r\n }", "function add_like($params)\n {\n $this->db->insert('likes',$params);\n return $this->db->insert_id();\n }", "protected function _insert()\n\t{\n\t}", "function textus_insert_annotation($userid, $textid, $start, $end, $private, $lang, $text) {\n $rows = textus_db_insert_annotation($userid, $textid, $start, $end, $private, $lang, $text);\n return ($rows) ? $rows : false;\n \n}", "public function save_maptag()\n\t{\n\t\t$maptag = $this->input->post('name',true);\n\t\t$member_id = $this->session->userdata('member_id');\n\t\t$query = $this->db->get_where('saved_maptags', array('user_id' => $member_id,'maptag_id' => $maptag) );\n\t\tif($query->num_rows()==0){\n\t\t\t$insert_arr = array(\n\t\t\t\t\t\t\t\t\t'user_id' => $member_id, \n\t\t\t\t\t\t\t\t\t'maptag_id' => $maptag, \n\t\t\t\t\t\t\t\t);\n\t\t\t$this->db->insert('saved_maptags',$insert_arr);\n\t\t\techo 'Maptag has been saved....';\n\t\t}\n\t\telse{\n\t\t\techo 'Maptag already in your list';\n\t\t}\n\n\t}", "function insertComment() {\n if ($this->getRequestMethod() != \"POST\") {\n $this->response('', 406);\n }\n $comment = json_decode(file_get_contents(\"php://input\"),true);\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($comment['user_id'], $auth)) {\n $this->response('', 406);\n }\n \n $columns = 'user_id, video_id, text';\n $values = $comment['user_id'] . ',' . $comment['video_id'] . ',\\'' . $comment['text'] . \"'\";\n \n $query = \"insert into comments(\". $columns . \") VALUES(\". $values . \");\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => \"Success\", \"msg\" => \"Comment Posted.\", \"data\" => $comment);\n $this->response(json_encode($success),200);\n }", "public function insert_article($nameadd, $textadd)\n {\n\t$nameadd = $this->real_escape_string($nameadd);\t\n\t$textadd = $this->real_escape_string($textadd);\t\n\t\n$sql = \"INSERT INTO articles (name, text, created_at) VALUES ('$nameadd', '$textadd', NOW())\";\nif ($this->query($sql)) {\necho \"<br/>П О З Д Р А В Л Я Е М!<br/><br/>Ваш комментарий был записан успешно.<br/><br/>\";\n }\nelse echo \"Error on write to articles: \" . $sql . \"<br>\" . mysqli_error($link);\n }", "function insert($word){\n\t\tinsert($root,$word);\n\t}", "private function insert_forum_comment_smiley(Socket $sckt, array $forum_comment_smiley_data)\n {\n $smiley = new forum_smiley_mdl();\n $smiley->user_prof = $sckt->user->profile;\n $smiley->comment_magic_id = $forum_comment_smiley_data[\"comment_magic_id\"];\n $smiley->set_smiley();\n //send feed back to the user to certify that the forum comment smiley has been inserted into the database\n $this->post($sckt,\"forum_comment_smiley_feedback\",1);\n }", "public function insert() {\n if($this->topic_id != 0)\n return null;\n\n $db = Db::instance(); // connect to db\n $q = sprintf(\"INSERT INTO profiles (`firstname`, `lastname`, `username`, `password`, `photo`, `number_posts`)\n VALUES (%s, %s, %s, %s, %s, %d);\",\n $db->escape($this->firstname),\n $db->escape($this->lastname),\n $db->escape($this->username),\n $db->escape($this->password),\n $db->escape($this->photo),\n $db->escape($this->number_posts)\n );\n\n $db->query($q); // execute query\n return $db->getInsertID();\n }", "public static function append_into_contact_list(){\n\n\n $id_added_user = $_SESSION[\"user_id_added\"]; // usuario que acabamos de agregar\n\t$current_user_id = $_SESSION[\"id_user\"]; // este soy yo osea el que agrega\n\n\t$QUERY = \"INSERT INTO contact values(NULL,$current_user_id ,$id_added_user) \";\n\n\n\t mysql_query( $QUERY , Conectar::con());\n\n\n\n\t}", "public function insert($gunBbl);", "public function insert() {\n $pdo = Database::getPDO();\n\n $sql = 'INSERT INTO `comment`(\n `name`, \n `content`,\n `created_at`\n ) VALUES (\n :name, \n :content,\n NOW()\n );';\n\n $pdoStatement = $pdo->prepare($sql);\n $pdoStatement->bindValue(':name', $this->name, PDO::PARAM_STR);\n $pdoStatement->bindValue(':content', $this->content, PDO::PARAM_STR);\n\n $executed = $pdoStatement->execute();\n $insertedRows = $pdoStatement->rowCount();\n\n if ($executed && $insertedRows === 1) {\n $this->id = $pdo->lastInsertId();\n return true;\n }\n return false;\n }", "protected function afterInserting()\n {\n }", "public function _insert()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public abstract function insert();", "function hashtags_insert_post( $id, $data ) {\n if (preg_match_all(\"/\".HASHTAGS_REGEXP.\"/i\", $data->post_content, $match)) {\n $tags = implode(\", \", $match[2]);\n\n wp_add_post_tags( $data->post_parent, $tags );\n }\n \n return $id;\n}", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "function commentmeta_insert_handler( $meta_id, $comment_id=null ) {\n\t\tif ( empty( $comment_id ) || wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t$this->add_ping( 'db', array( 'commentmeta' => $meta_id ) );\n\t}", "function insertIntoLyrics($URL, $artist, $lyrics) {\n $URI = $URL . \"#\" . str_replace(\" \", \"_\", $artist);\n scraperwiki::save_sqlite(array(\"UniqURI\"), array(\"UniqURI\"=>$URI, \"TrackURL\"=>$URL, \"TrackSegment\"=>0, \"Artist\"=>$artist, \"Lyrics\"=>$lyrics), $table_name=\"Lyrics\");\n}", "function insertIntoLyrics($URL, $artist, $lyrics) {\n $URI = $URL . \"#\" . str_replace(\" \", \"_\", $artist);\n scraperwiki::save_sqlite(array(\"UniqURI\"), array(\"UniqURI\"=>$URI, \"TrackURL\"=>$URL, \"TrackSegment\"=>0, \"Artist\"=>$artist, \"Lyrics\"=>$lyrics), $table_name=\"Lyrics\");\n}", "function becomeFriendsWith($person) {\n $query = \"INSERT INTO friends (friend_id, user_id) VALUES ('{$person}','\".$this->data['id'].\"')\";\n $query2 = \"INSERT INTO friends (friend_id, user_id) VALUES ('\".$this->data['id'].\"','{$person}')\";\n mysql_query($query);\n mysql_query($query2);\n\n header('location: home.php');\n }", "public static function insert()\n {\n }", "public function mentionsAction()\n {\n return $this->render('sil16VitrineBundle:Default:mentions.html.twig');\n }", "function insertPosts($postmessage)\n {\n $person_id = $_SESSION['userid'];\n // query to insert data into the database\n $myQuery = \"INSERT INTO post (post_message, user_id) VALUES ('$postmessage', '$person_id') \";\n return $this->query($myQuery);\n }", "function addLike()\n {\n // query to insert record\n $query = \"INSERT INTO `LikeList`(`user_email`, `pushpin_ID`) VALUES ('$this->email','$this->pushpin_id');\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "public function addFriend($other) {\n\t\t$conn = new mysqli ( $GLOBALS ['dbservername'], $GLOBALS ['dbusername'], $GLOBALS ['dbpassword'], $GLOBALS ['dbname'] );\n\t\t$sql = \"INSERT INTO friend (this,that) VALUES ('$this->userID','$other')\";\n\t\t$conn->query ( $sql );\n\t\t$sql = \"INSERT INTO friend (this,that) VALUES ('$other','$this->userID')\";\n\t\t$conn->query ( $sql );\n\t\t$conn->close ();\n\t}", "public function mentions(){\n return $this->render('home/mentions.html.twig');\n }", "function insertIntoMembers($nickname, $email, $pwd)\n{\n $db = dbConnect();\n $req = $db->prepare('INSERT INTO members(nickname, email, pwd) VALUES(?,?,?)');\n $req->execute(array($nickname, $email, $pwd));\n}", "abstract public function insert();", "function postNewMessage($user_id, $thread_id, $message)\n\t\t{\n\t\t\t$query=sqlite_exec($this->connection, \"INSERT INTO message(thread_id, user_id, message, date) VALUES($thread_id, $user_id, $message, NOW())\");\n\t\t}", "public function addUserToDb($token) {\n\t\t\trequire_once('classes/canvasWrapper.php');\n\t\t\t$canvas = new CanvasWrapper();\n\t\t\t$user = $canvas->formatUserData();\n\t\t\t$sql = \"INSERT INTO users (osuId,token,name) VALUES (\" . $user->user_id . \",'\" . $token . \"','\" . $user->name . \"')\";\n\t\t\t$result = $this->db->query($sql);\n\t\t}", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "protected function insert() {\n // get firat line and use it as title\n $this->title = $this->getFileTitle();\n\n $insertDoc = $this->dbConn->prepare(\"\n INSERT INTO docs(file_name, title, content, count_of_terms) \n VALUES (:fileName, :title, :content, :count_of_terms)\");\n $result = $insertDoc->execute(array(\n ':fileName' => $this->fileName,\n ':title' => $this->title,\n ':content' => $this->content,\n ':count_of_terms' => count($this->uniqueMatchesStatus)\n ));\n\n if ($result) {\n $this->id = $this->dbConn->lastInsertId();\n } else {\n throw new Exception('Error on insert document in database.', 500);\n }\n }", "public function insertAction()\r\n\t{\r\n\t\tif ($this->request->getPost('submit')) {\r\n\t\t\t$name = $this->request->getPost('name');\r\n\t\t\t$phone = $this->request->getPost('phone');\r\n\t\t\t$arrPost = array('name' => $name, 'phone' => $phone);\r\n\t\t\t$room = new Room();\r\n\t\t\tif ($room->save($arrPost)) {\r\n\t\t\t\t$this->response->redirect(\"/users/index\", true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }", "public function insertContact($nom, $email, $sujet, $message) {\n \t// on récupère les données rentrées par l'utilisateur\n $this->nom = strip_tags($nom);\n\t\t$this->email = strip_tags($email);\n $this->sujet = strip_tags($sujet);\n $this->message = strip_tags($message);\n \n // appelle la connexion à la BDD\n require('connexion.php');\n \n // on crée une requête puis on l'exécute\n $req = $bdd->prepare('INSERT INTO t_commentaires (co_nom, co_email, co_sujet, co_message) VALUES (:co_nom, :co_email, :co_sujet, :co_message)');\n $req->execute([\n \t':co_nom'\t=> $this->nom, // on attribue à la variable co_nom la valeur de l'objet en cours d'instanciation, le nom de l'auteur du message qui vient d'être posté.\n ':co_email' => $this->email,\n ':co_sujet' => $this->sujet,\n ':co_message' => $this->message]);\n echo 'bonjour';\n // on ferme la requête pour protéger des injections\n $req->closeCursor();\n }", "public function addNewQuote($quote, $author) {\n\t\t\t$stmt = $this->DB->prepare ( \"INSERT INTO quotations (added, quote, author, rating, flagged ) values(now(), :quote, :author, 0, 'f')\" );\n\t\t\t$stmt->bindParam ( 'quote', $quote );\n\t\t\t$stmt->bindParam ( 'author', $author );\n\t\t\t$stmt->execute ();\n\t\t}", "public function insert($artist_credit)\n {\n $query=\"INSERT INTO artist_credit ( \".\n\t \"id,\".\n \"name,\".\n \"artist_count,\".\n \"ref_count,\".\n \"created \". \n \")\".\n \"VALUES (\".\n \"null,\".\n \"'\".$this->sqlSafe($artist_credit->name).\"',\".\n \" \".$artist_credit->artist_count.\" ,\".\n \" \".$artist_credit->ref_count.\" ,\".\n \"'\".$this->sqlSafe($artist_credit->created).\"' \". \n \")\"; \n\n $this->executeQuery($query);\n }", "function sendNewMessage($dbh, $user, $message, $time)\n{\n // Retrieve user_id of logged in person:\n $query = \"SELECT user_id \n FROM users \n WHERE username = :username\";\n $stmt = $dbh->prepare($query);\n $stmt->execute(array('username' => $user));\n $row = $stmt->fetch();\n $user_id = $row['user_id'];\n \n // Add new message:\n $query = \"INSERT INTO messages (msg_id, user_id, message, time) \n VALUES (:msg_id, :user_id, :message, :time)\";\n $stmt = $dbh->prepare($query);\n $row = $stmt->execute(array('msg_id' => null, 'user_id' => $user_id, 'message' => $message, 'time' => $time));\n}", "public function insert($attream);", "function AgenteInsert($Nombre, $Contacto, $Notas, $NombreArchivo, $Uuid, $IdInmobiliaria) {\r\n\tglobal $Cfg;\r\n\r\n\t$sql = \"insert $Cfg[SqlPrefix]agentes set\r\n\t\tNombre = '$Nombre',\r\n\t\tContacto = '$Contacto',\r\n\t\tNotas = '$Notas',\r\n\t\tNombreArchivo = '$NombreArchivo',\r\n\t\tUuid = '$Uuid',\r\n\t\tIdInmobiliaria = $IdInmobiliaria\";\r\n\r\n\tDbExecuteUpdate($sql);\r\n\r\n\treturn DbLastId();\r\n}", "public function add_post(){\n $response = $this->PersonM->add_person(\n $this->post('name'),\n $this->post('hp'),\n $this->post('email'),\n $this->post('message')\n );\n $this->response($response);\n }", "public function insert()\n {\n # code...\n }", "public function insert() {\n \n }", "function insertEndingSeen($UUID,$ENDING){\n\tob_start();\n\t//$firephp = FirePHP::getInstance(true);\n\t//$firephp->log($UUID, \"uuid now that I'm in toolkit.php\");\n\t//$firephp->log($ENDING, \"ending now that I'm in toolkit.php\");\n\t$connection = get_SQL_Connection();\n\t$uid = getUserIdFromFacebookId($UUID);\n\t//$firephp->log($uid, \"uid value (no longer facebook id I think\");\n\t$query = sprintf(\"INSERT INTO EndingsSeen (userId, ending_name) VALUES('%s', '%s')\",\n\t\t$uid, \n\t\tmysql_real_escape_string($ENDING)\n\t\t); \n\tif (!mysql_query($query,$connection)) {\n\t\t//$firephp->log($query, \"uid value (no longer facebook id I think\");\n echo(\"Could not execute SQL query, '$query' in updatePlayCount\");\n }\n}", "function insertarMeses($nombremes) {\r\n$sql = \"insert into tbmeses(mes,nombremes)\r\nvalues ('','\".($nombremes).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert() {\n if($this->id != 0){\n return null;\n }\n // Connect to db\n $db = Db::instance();\n\n // Build query\n $q = sprintf(\"INSERT INTO `%s` (`user_id`, `story_id`, `comment`) VALUES (%d, %d, %s);\", self::DB_TABLE, $db->escape($this->user_id), $db->escape($this->story_id), $db->escape($this->comment));\n\n // Execute query\n $db->query($q);\n\n // Set the ID for the new object\n $this->id = $db->getInsertID();\n return $this->id;\n }", "protected function afterInsert()\n {\n }" ]
[ "0.6336015", "0.61365134", "0.6038392", "0.56232005", "0.5580879", "0.5487206", "0.5364775", "0.5318614", "0.5284652", "0.52786046", "0.52756035", "0.52718425", "0.5245301", "0.5217713", "0.51960826", "0.518107", "0.51734394", "0.51476103", "0.5141662", "0.512767", "0.512582", "0.5123052", "0.5112976", "0.5112572", "0.5098112", "0.5058541", "0.50580376", "0.5045912", "0.5040186", "0.50293154", "0.50239", "0.50223225", "0.50212854", "0.5017925", "0.50049394", "0.5001564", "0.49930635", "0.49912423", "0.4978304", "0.49745497", "0.49676558", "0.4955883", "0.495306", "0.49517328", "0.49305817", "0.49250647", "0.49096835", "0.48961", "0.48958182", "0.48852515", "0.48797244", "0.48797172", "0.48719728", "0.48694313", "0.4864287", "0.48596787", "0.48550534", "0.4852937", "0.48506126", "0.48456368", "0.48446825", "0.48422167", "0.48343384", "0.48235932", "0.48210415", "0.48190898", "0.48154256", "0.48138332", "0.48109633", "0.48051742", "0.48041362", "0.48041362", "0.48018414", "0.48014197", "0.47968957", "0.47939423", "0.47933254", "0.4778363", "0.47766072", "0.47746387", "0.47697675", "0.47625986", "0.47622323", "0.47614586", "0.47614586", "0.47561267", "0.47540706", "0.47503516", "0.4747085", "0.47462496", "0.4745567", "0.4745524", "0.47389302", "0.47387117", "0.47375658", "0.47353536", "0.47316143", "0.472809", "0.47247794", "0.47173625", "0.47156876" ]
0.0
-1
/ requires the boolean value returned from isGoing ^
public static function isGoingText($isGoing){ $ret = ''; if($isGoing === null){ $ret = 'Set Attendance'; }else if($isGoing === true){ $ret = 'Going'; }else if($isGoing === false){ $ret = 'Not Going'; }else{ $ret = 'isGoingText fucked up'; } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pass(): bool;", "abstract public function isLoop();", "public function next(): bool;", "public function automated() : bool;", "private function lookRoutings(){\n return false;\n }", "function __return_true()\n {\n }", "function checkStatus(& $hangman) {\r\n $complete = false;\r\n \r\n foreach($hangman as $letterArr){\r\n if($letterArr[1] == false){\r\n $complete = false;\r\n }\r\n }\r\n\r\n if($complete){\r\n print \"Congratulation\";\r\n exit;\r\n }\r\n}", "public function isPaused();", "abstract public function isWalkable();", "public function hasContinueflag()\n {\n return $this->get(self::CONTINUEFLAG) !== null;\n }", "function __return_false()\n {\n }", "public function continue() : StateMachine;", "public function isLooped() { return $this->is_looped; }", "function game_is_broken($game) {\n\tif ($game->is_tie()) {\n\t\techo \"\\n\\n****ERROR: Broken Game. Tie! in game_is_broken()\";\n\t\tpause(\"\");\n\t\treturn true;\n\t}\n\treturn false;\n}", "function next() { \n\n\t\tif ($this->XBMCCmd(\"PlayNext\")!=\"OK\") { return false; }\n return true;\n\n\t}", "function done() {\n return $this->currentState === self::DONE;\n }", "public function hasCycling()\n {\n return $this->cycling !== null;\n }", "function checkState($state){\n\t\tif($state==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{ //Bloqueado\n\t\t\treturn false;\n\t\t}\n\t}", "public function passes();", "public function canContinue()\n {\n return $this->number_of_rounds >= $this->getRoundsCount();\n }", "function play() { \n\n\t\tif ($this->XBMCCmd(\"PlayNext\")!=\"OK\") { return false; } \n\t\treturn true;\n\n\t}", "function ozh_dlb_skip_if_bot() {\n return ozh_dlb_is_bot();\n // if anything but false is returned, functions using the two shunt_* filters will be short-circuited\n}", "public function resume(): bool {}", "function letGo()\n {\n }", "public function isFinished(): bool;", "protected function userMove() {\n echo \"Your move: \";\n $move = FALSE;\n while ($move === FALSE) {\n $move = $this->isValidMove();\n if ($move === FALSE)\n echo $this->promptMessage('invalid_move');\n }\n if (strtoupper($move) == self::QUIT_BUTTON)\n return TRUE;\n\n\n echo \"Your move is '\" . $this->_userMark . \"' at box \" . $move . PHP_EOL;\n $this->_markers[$this->_userMark][] = $move;\n $this->drawBoard($this->_markers);\n if ($this->isWon($this->_userMark) || $this->isBoardFull())\n return TRUE;\n return FALSE;\n }", "public function isFinished()\n {\n return $this->isWinner('X') || $this->isWinner('O') || $this->isDraw();\n }", "public function resume(): bool;", "abstract public function getIsOk(): bool;", "abstract public function isComplete();", "public function isFinished();", "public function playing(): bool\n {\n\n return $this->state !== SELF::STATE_GAMEOVER;\n }", "public function isReplaying() {\r\n return!$this->isRecording();\r\n }", "abstract public function isCurrent();", "protected function isWizardDone() {}", "public function isDeclined(): bool;", "public function isHalted(/* ... */)\n {\n return $this->_halt;\n }", "public function isOngoing() {\n return ($this->hasStarted() && !$this->isFinished());\n }", "public function produced(): bool;", "public function isTemporary(): bool;", "abstract public function moveAsFirst(): bool;", "public function check()\n {\n return time()%2==1; // condition\n }", "public function isHandled(): bool;", "public function next () {\n \treturn (FALSE !== next ($this->varContainer));\n }", "protected function runStep(&$stage)\n {\n if ($stage == 'continue') {\n if (!empty($this->state['stage'])) {\n foreach ($this->stages as $stage) {\n if (empty($this->state['stage'][$stage]) || $this->state['stage'][$stage] != 'done') {\n break;\n }\n }\n if (!empty($this->state['stage'][$stage]) && $this->state['stage'][$stage] == 'done') {\n // everything is done\n $this->log(\"Nothing to continue, everything is done.\");\n return true;\n }\n $this->log(\"Continuing from $stage\");\n }\n }\n\n if ($stage) {\n $stage_num = array_search($stage, $this->stages);\n } else {\n $stage = $this->stages[0];\n $stage_num = 0;\n }\n if ($stage_num === false) {\n return false;\n }\n $stageCode = $this->runStage($stage);\n if ($stageCode === self::STOP_SIGNAL) {\n return self::STOP_SIGNAL;\n }\n if ($stageCode === false) {\n return false;\n }\n if (++$stage_num >= count($this->stages)) {\n return true;\n } else {\n return $this->stages[$stage_num];\n }\n }", "function g() {\n if (false) {\n yield true;\n }\n}", "abstract public function hasAvailableMoves(): bool;", "private function get_next_move() {\n\t\t$move = $this->can_put_a_card_up();\n\t\tif($move !== false) return $move;\n\t\t\n\t\t// Test si une carte peut être déplacée\n\t\t$move = $this->can_move_cards();\n\t\t//if($move !== false) return $move;\n\t\t\n\t\t// Test si la carte du deck peut descendre\n\t\t$move2 = $this->can_put_deck_card_down();\n\t\tif($move !== false && $move2 !== false) {\n\t\t\tarray_push($move, $move2);\n\t\t\treturn $move;\n\t\t} \n\t\tif($move !== false) return $move;\n\t\tif($move2 !== false) return $move2;\n\t\t\n\t\t// Test si une carte peut être montée suite à un déplacement spécial\n\t\t//$move = $this->can_put_a_card_up_after_move();\n\t\t//if($move !== false) return $move;\n\t\t\n\t\t// Pioche\n\t\t$move = $this->can_turn_from_deck();\n\t\tif($this->infinite_move($move)) return false;\n\t\tif($move !== false) return $move;\n\t\t\n\t\treturn false;\n\t}", "public function tell()\n {\n return false;\n }", "public function isStopped(): bool;", "public function start(): bool;", "public function is_trackback()\n {\n }", "public function process() {\n\t\treturn false;\n\t}", "private function _pass()\n\t{\n\t\t// Save move\n\t\t$this->Move->create();\n\t\t$this->Move->set('game_id', $this->id);\n\t\t$this->Move->set('player_id', $this->data['Game']['active_player']);\n\t\t$this->Move->set('notation', 'pass');\n\t\t$this->Move->save();\n\t\t\n\t\t// Change active player\n\t\t$this->_changeActivePlayer();\n\t\t\n\t\t// Success\n\t\treturn true;\n\t}", "public function match() {\r\n\t\treturn false;\r\n\t}", "public function getIncrementing() : bool\n {\n return false;\n }", "public function nextDisabled(): string;", "function processa()\n {\n return true;\n }", "public static function __return_true() {\n\t\treturn true;\n\t}", "public function getSkip() : bool {\n\t\treturn $this->generator->getSkip();\n\t}", "public function turn()\n {\n $this->setError('The SMTP TURN command is not implemented');\n $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);\n return false;\n }", "private function seeIfPossible()\n {\n $correct = true;\n if(Parser::onlyNumbersString($_GET['o'])){\n if($_GET['o'] == User::get_currentCityId()){\n $this->cityTroopsInfo = DataBaseManager::fetchArray(DataBaseManager::query(\"SELECT * FROM {troops_movements} WHERE\n reciver_id = $_GET[o] and movement_type = 0\"));\n }else{\n $this->cityTroopsInfo = DataBaseManager::fetchArray(DataBaseManager::query(\"SELECT * FROM {troops_movements} WHERE\n reciver_city_id = $_GET[o] and owner_city_id = \".User::get_currentCityId().\" and movement_type = 10\"));\n }\n $correct = $correct && (!(Parser::onlyNumbersString($_GET['t']) && $_GET['t'] >= 0 && $_GET['t'] <= 6));\n $i = 1;\n $ttrops = 0;\n while($correct && $i<12){\n if(!(isset($_GET['tr'.$i]) && Parser::onlyNumbersString($_GET['tr'.$i]) && $_GET['tr'.$i] >= 0 && $this->cityTroopsInfo['tr'.$i] >= $_GET['tr'.$i] )){\n $correct = false;\n }else{\n $ttrops += $_GET['tr'.$i];\n }\n $i++;\n }\n $correct = $correct && ($ttrops > 0) && Parser::onlyNumbersString($_GET['d'] && $_GET['d'] > 0);\n if($correct){\n $exsistsd = DataBaseManager::query(\"SELECT owner_user_id FROM {map} WHERE box_id = $_GET[d]\");\n $this->calculateDistance();\n $oil = DataBaseManager::fetchArray(DataBaseManager::query(\"SELECT oil FROM {materials} WHERE city_id = \".User::get_currentCityId()));\n $oil = $oil[0];\n $this->finalOil = $oil - $this->calculateOil();\n $correct = ($this->finalOil >= 0 && DataBaseManager::numRows($exsistsd));\n $reciverUserId = DataBaseManager::fetchArray($exsistsd);\n $this->reciverUserId = $reciverUserId[0];\n }\n }else{\n $correct = false;\n }\n return $correct;\n\n }", "function loop($state) {\n\n\t\tif (is_null($this->_httpq->repeat($state))) { return false; }\n \t\treturn true;\n\n }", "public function wasHalted()\n\t{\n\t\treturn $this->halted === true;\n\t}", "public function isForwardValueActive() {}", "function finished() {\n\t\treturn $this->tries && ( ( $this->ready() && ! $this->hasSteps() ) || ! $this->needed() );\n\t}", "public function qualifyToStart(): bool;", "public function has_goal() {\r\n\t\treturn 0 < $this->get( 'goal' );\r\n\t}", "public function check()\n {\n return ! $this->guest();\n }", "function isStopped();", "public function advance();", "public function isHit()\n {\n return false;\n }", "public function has_returning()\n {\n return false;\n }", "public function call() {\n\t\treturn false;\n\t}", "function _check_command($return = false)\n\t{\n\t\t$response = '';\n\n\t\tdo\n\t\t{\n\t\t\t$result = @fgets($this->connection, 512);\n\t\t\t$response .= $result;\n\t\t}\n\t\twhile (substr($result, 3, 1) !== ' ');\n\n\t\tif (!preg_match('#^[123]#', $response))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ($return) ? $response : true;\n\t}", "public function isWaiting();", "protected function isReturnFramed() {\n\t\treturn false;\n\t}", "protected function isReturnFramed() {\n\t\treturn false;\n\t}", "function isPassOk($pass){\n\treturn true;\n}", "function deelbaarDoor3($invoer)\r\n{\r\n if ($invoer % 3 == 0) {\r\n $invoer = true;\r\n\r\n } else {\r\n $invoer = false;\r\n }\r\n return \"invoer = \" . $invoer;\r\n}", "public function valid() \n {\n return ($this->current() !== false);\n }", "public function holdingForward(){\n\t\treturn $this->_sendPacketToController(self::HOLDING_FORWARD);\n\t}", "public function checkRang(){\n if($this->_rang <= 0){\n return false;\n }\n return true;\n }", "public function isOk() : bool;", "public function valid() {\n\t\treturn ($this->current() !== false);\n\t}", "private function _checkEnd($position){\r\n return $position == $this->_endPoint ? true : false;\r\n /*\r\n * If it's possible that there is no solution for labyrinth\r\n * this function should check if algorithm didn't go back to start tile\r\n */\r\n }", "public function getIsHandled();", "public static function isChannelling(): bool\n {\n return self::$isChannel;\n }", "public static function guest ()\n {\n return !self::check();\n }", "public function isPlaying()\n {\n return \\doing_action($this->tag);\n }", "function will_squirrels_play($temp, $summer)\n{ $temp=\"\";\n if (!$summer) { //!$summer means if $summer is false... I used ($summer == false)\n if ($temp >= 65 || $temp <= 85) {\n return 'true';\n }\n } elseif ($summer) { //$summer = means if $summer is true... I used ($summer = true)\n if ($temp >= 65 || $temp <= 95) {\n return 'false';\n }\n }\n}", "public function injxOk() : bool {\n return $this->injxCaller != NULL;\n }", "function willYou($young, $beautiful, $loved) {\n if ($young && $beautiful && $loved) {\n return false;\n } elseif ($loved && (!$young || !$beautiful)) {\n return true;\n } elseif (!$loved && !$young && !$beautiful) {\n return false;\n } elseif (!$loved && $young && $beautiful) {\n return true;\n } else {\n return false;\n }\n}", "public function isEatenUp()\n {\n return $this->eaten >= 100;\n }", "function next() {\n\n\t\tif (is_null($this->_httpq->next())) { return false; }\n\n\t\treturn true;\n\n\t}", "public function getIncrementing(): bool\n {\n return false;\n }", "public function getIncrementing(): bool\n {\n return false;\n }", "public function isBeingReturned($stackPtr)\n {\n $prevPtr = $this->phpcsFile->findPrevious(T_RETURN, $stackPtr - 1, null, false, null, true);\n if ($this->tokens[$prevPtr]['code'] == T_RETURN) {\n return true;\n } else {\n return false;\n }\n }", "function door_status($doorinvert, $digitalio) {\n $return = false;\n if ($doorinvert == 1) {\n if ($digitalio == 0) {\n $return = false; //door close\n } else {\n $return = true; //door open\n }\n } else {\n if ($digitalio == 0) {\n $return = true; //door open\n } else {\n $return = false; //door close\n }\n }\n return $return;\n}", "public function solved() {\r\n\t\treturn $this->current == $this->expected;\r\n\t}", "public function gameWon()\n {\n return $this->countStones() === 1;\n }" ]
[ "0.6319381", "0.60844886", "0.59496415", "0.5918388", "0.5770915", "0.5694936", "0.56713086", "0.5658515", "0.56519634", "0.56355584", "0.5633903", "0.56321836", "0.5625695", "0.5606243", "0.5599037", "0.5562943", "0.5537405", "0.5514285", "0.55056393", "0.5495883", "0.5490018", "0.5482515", "0.54661554", "0.5446428", "0.5440687", "0.5436789", "0.5436097", "0.54195744", "0.5417022", "0.5391164", "0.53826076", "0.53790015", "0.5362542", "0.53486603", "0.53447735", "0.5344063", "0.5336906", "0.53295404", "0.5325099", "0.5323986", "0.5313466", "0.53115", "0.5308678", "0.5307188", "0.5304768", "0.5299198", "0.529845", "0.5290695", "0.52843755", "0.5277909", "0.52773434", "0.5273367", "0.52732277", "0.52506655", "0.5247646", "0.5245588", "0.524537", "0.52431774", "0.5240003", "0.5233507", "0.52263755", "0.52262664", "0.52206415", "0.52199954", "0.5208868", "0.5201563", "0.51985025", "0.5196154", "0.51937026", "0.5182661", "0.5176271", "0.5176245", "0.5173104", "0.51704144", "0.51563174", "0.51545966", "0.5152514", "0.5152514", "0.51484126", "0.51447964", "0.5135034", "0.5132254", "0.51196575", "0.51166487", "0.5104056", "0.5101344", "0.5101339", "0.51011884", "0.5094799", "0.5094295", "0.509311", "0.50927484", "0.5092035", "0.5091103", "0.50901353", "0.5089091", "0.5089091", "0.5082003", "0.5080046", "0.50759065", "0.50722176" ]
0.0
-1
/ requires the boolean value returned from isGoing ^
public static function isGoingClass($isGoing){ $ret = ''; if($isGoing === null){ $ret = 'btn-primary'; }else if($isGoing === true){ $ret = 'btn-success'; }else if($isGoing === false){ $ret = 'btn-danger'; }else{ $ret = 'btn-warning'; } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pass(): bool;", "abstract public function isLoop();", "public function next(): bool;", "public function automated() : bool;", "private function lookRoutings(){\n return false;\n }", "function __return_true()\n {\n }", "function checkStatus(& $hangman) {\r\n $complete = false;\r\n \r\n foreach($hangman as $letterArr){\r\n if($letterArr[1] == false){\r\n $complete = false;\r\n }\r\n }\r\n\r\n if($complete){\r\n print \"Congratulation\";\r\n exit;\r\n }\r\n}", "public function isPaused();", "abstract public function isWalkable();", "public function hasContinueflag()\n {\n return $this->get(self::CONTINUEFLAG) !== null;\n }", "public function continue() : StateMachine;", "function __return_false()\n {\n }", "public function isLooped() { return $this->is_looped; }", "function game_is_broken($game) {\n\tif ($game->is_tie()) {\n\t\techo \"\\n\\n****ERROR: Broken Game. Tie! in game_is_broken()\";\n\t\tpause(\"\");\n\t\treturn true;\n\t}\n\treturn false;\n}", "function next() { \n\n\t\tif ($this->XBMCCmd(\"PlayNext\")!=\"OK\") { return false; }\n return true;\n\n\t}", "function done() {\n return $this->currentState === self::DONE;\n }", "public function hasCycling()\n {\n return $this->cycling !== null;\n }", "function checkState($state){\n\t\tif($state==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{ //Bloqueado\n\t\t\treturn false;\n\t\t}\n\t}", "public function passes();", "public function canContinue()\n {\n return $this->number_of_rounds >= $this->getRoundsCount();\n }", "function play() { \n\n\t\tif ($this->XBMCCmd(\"PlayNext\")!=\"OK\") { return false; } \n\t\treturn true;\n\n\t}", "function ozh_dlb_skip_if_bot() {\n return ozh_dlb_is_bot();\n // if anything but false is returned, functions using the two shunt_* filters will be short-circuited\n}", "public function resume(): bool {}", "function letGo()\n {\n }", "public function isFinished(): bool;", "protected function userMove() {\n echo \"Your move: \";\n $move = FALSE;\n while ($move === FALSE) {\n $move = $this->isValidMove();\n if ($move === FALSE)\n echo $this->promptMessage('invalid_move');\n }\n if (strtoupper($move) == self::QUIT_BUTTON)\n return TRUE;\n\n\n echo \"Your move is '\" . $this->_userMark . \"' at box \" . $move . PHP_EOL;\n $this->_markers[$this->_userMark][] = $move;\n $this->drawBoard($this->_markers);\n if ($this->isWon($this->_userMark) || $this->isBoardFull())\n return TRUE;\n return FALSE;\n }", "public function isFinished()\n {\n return $this->isWinner('X') || $this->isWinner('O') || $this->isDraw();\n }", "public function resume(): bool;", "abstract public function getIsOk(): bool;", "abstract public function isComplete();", "public function isFinished();", "public function playing(): bool\n {\n\n return $this->state !== SELF::STATE_GAMEOVER;\n }", "public function isReplaying() {\r\n return!$this->isRecording();\r\n }", "abstract public function isCurrent();", "protected function isWizardDone() {}", "public function isDeclined(): bool;", "public function isHalted(/* ... */)\n {\n return $this->_halt;\n }", "public function isOngoing() {\n return ($this->hasStarted() && !$this->isFinished());\n }", "public function isTemporary(): bool;", "public function produced(): bool;", "abstract public function moveAsFirst(): bool;", "public function check()\n {\n return time()%2==1; // condition\n }", "public function next () {\n \treturn (FALSE !== next ($this->varContainer));\n }", "public function isHandled(): bool;", "protected function runStep(&$stage)\n {\n if ($stage == 'continue') {\n if (!empty($this->state['stage'])) {\n foreach ($this->stages as $stage) {\n if (empty($this->state['stage'][$stage]) || $this->state['stage'][$stage] != 'done') {\n break;\n }\n }\n if (!empty($this->state['stage'][$stage]) && $this->state['stage'][$stage] == 'done') {\n // everything is done\n $this->log(\"Nothing to continue, everything is done.\");\n return true;\n }\n $this->log(\"Continuing from $stage\");\n }\n }\n\n if ($stage) {\n $stage_num = array_search($stage, $this->stages);\n } else {\n $stage = $this->stages[0];\n $stage_num = 0;\n }\n if ($stage_num === false) {\n return false;\n }\n $stageCode = $this->runStage($stage);\n if ($stageCode === self::STOP_SIGNAL) {\n return self::STOP_SIGNAL;\n }\n if ($stageCode === false) {\n return false;\n }\n if (++$stage_num >= count($this->stages)) {\n return true;\n } else {\n return $this->stages[$stage_num];\n }\n }", "function g() {\n if (false) {\n yield true;\n }\n}", "abstract public function hasAvailableMoves(): bool;", "private function get_next_move() {\n\t\t$move = $this->can_put_a_card_up();\n\t\tif($move !== false) return $move;\n\t\t\n\t\t// Test si une carte peut être déplacée\n\t\t$move = $this->can_move_cards();\n\t\t//if($move !== false) return $move;\n\t\t\n\t\t// Test si la carte du deck peut descendre\n\t\t$move2 = $this->can_put_deck_card_down();\n\t\tif($move !== false && $move2 !== false) {\n\t\t\tarray_push($move, $move2);\n\t\t\treturn $move;\n\t\t} \n\t\tif($move !== false) return $move;\n\t\tif($move2 !== false) return $move2;\n\t\t\n\t\t// Test si une carte peut être montée suite à un déplacement spécial\n\t\t//$move = $this->can_put_a_card_up_after_move();\n\t\t//if($move !== false) return $move;\n\t\t\n\t\t// Pioche\n\t\t$move = $this->can_turn_from_deck();\n\t\tif($this->infinite_move($move)) return false;\n\t\tif($move !== false) return $move;\n\t\t\n\t\treturn false;\n\t}", "public function tell()\n {\n return false;\n }", "public function isStopped(): bool;", "public function start(): bool;", "public function is_trackback()\n {\n }", "public function process() {\n\t\treturn false;\n\t}", "private function _pass()\n\t{\n\t\t// Save move\n\t\t$this->Move->create();\n\t\t$this->Move->set('game_id', $this->id);\n\t\t$this->Move->set('player_id', $this->data['Game']['active_player']);\n\t\t$this->Move->set('notation', 'pass');\n\t\t$this->Move->save();\n\t\t\n\t\t// Change active player\n\t\t$this->_changeActivePlayer();\n\t\t\n\t\t// Success\n\t\treturn true;\n\t}", "public function match() {\r\n\t\treturn false;\r\n\t}", "public function nextDisabled(): string;", "public function getIncrementing() : bool\n {\n return false;\n }", "function processa()\n {\n return true;\n }", "public static function __return_true() {\n\t\treturn true;\n\t}", "public function getSkip() : bool {\n\t\treturn $this->generator->getSkip();\n\t}", "private function seeIfPossible()\n {\n $correct = true;\n if(Parser::onlyNumbersString($_GET['o'])){\n if($_GET['o'] == User::get_currentCityId()){\n $this->cityTroopsInfo = DataBaseManager::fetchArray(DataBaseManager::query(\"SELECT * FROM {troops_movements} WHERE\n reciver_id = $_GET[o] and movement_type = 0\"));\n }else{\n $this->cityTroopsInfo = DataBaseManager::fetchArray(DataBaseManager::query(\"SELECT * FROM {troops_movements} WHERE\n reciver_city_id = $_GET[o] and owner_city_id = \".User::get_currentCityId().\" and movement_type = 10\"));\n }\n $correct = $correct && (!(Parser::onlyNumbersString($_GET['t']) && $_GET['t'] >= 0 && $_GET['t'] <= 6));\n $i = 1;\n $ttrops = 0;\n while($correct && $i<12){\n if(!(isset($_GET['tr'.$i]) && Parser::onlyNumbersString($_GET['tr'.$i]) && $_GET['tr'.$i] >= 0 && $this->cityTroopsInfo['tr'.$i] >= $_GET['tr'.$i] )){\n $correct = false;\n }else{\n $ttrops += $_GET['tr'.$i];\n }\n $i++;\n }\n $correct = $correct && ($ttrops > 0) && Parser::onlyNumbersString($_GET['d'] && $_GET['d'] > 0);\n if($correct){\n $exsistsd = DataBaseManager::query(\"SELECT owner_user_id FROM {map} WHERE box_id = $_GET[d]\");\n $this->calculateDistance();\n $oil = DataBaseManager::fetchArray(DataBaseManager::query(\"SELECT oil FROM {materials} WHERE city_id = \".User::get_currentCityId()));\n $oil = $oil[0];\n $this->finalOil = $oil - $this->calculateOil();\n $correct = ($this->finalOil >= 0 && DataBaseManager::numRows($exsistsd));\n $reciverUserId = DataBaseManager::fetchArray($exsistsd);\n $this->reciverUserId = $reciverUserId[0];\n }\n }else{\n $correct = false;\n }\n return $correct;\n\n }", "public function turn()\n {\n $this->setError('The SMTP TURN command is not implemented');\n $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);\n return false;\n }", "function loop($state) {\n\n\t\tif (is_null($this->_httpq->repeat($state))) { return false; }\n \t\treturn true;\n\n }", "public function wasHalted()\n\t{\n\t\treturn $this->halted === true;\n\t}", "public function isForwardValueActive() {}", "function finished() {\n\t\treturn $this->tries && ( ( $this->ready() && ! $this->hasSteps() ) || ! $this->needed() );\n\t}", "public function qualifyToStart(): bool;", "public function has_goal() {\r\n\t\treturn 0 < $this->get( 'goal' );\r\n\t}", "public function check()\n {\n return ! $this->guest();\n }", "function isStopped();", "public function advance();", "public function isHit()\n {\n return false;\n }", "public function has_returning()\n {\n return false;\n }", "public function call() {\n\t\treturn false;\n\t}", "function _check_command($return = false)\n\t{\n\t\t$response = '';\n\n\t\tdo\n\t\t{\n\t\t\t$result = @fgets($this->connection, 512);\n\t\t\t$response .= $result;\n\t\t}\n\t\twhile (substr($result, 3, 1) !== ' ');\n\n\t\tif (!preg_match('#^[123]#', $response))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ($return) ? $response : true;\n\t}", "public function isWaiting();", "protected function isReturnFramed() {\n\t\treturn false;\n\t}", "protected function isReturnFramed() {\n\t\treturn false;\n\t}", "function isPassOk($pass){\n\treturn true;\n}", "function deelbaarDoor3($invoer)\r\n{\r\n if ($invoer % 3 == 0) {\r\n $invoer = true;\r\n\r\n } else {\r\n $invoer = false;\r\n }\r\n return \"invoer = \" . $invoer;\r\n}", "public function valid() \n {\n return ($this->current() !== false);\n }", "public function holdingForward(){\n\t\treturn $this->_sendPacketToController(self::HOLDING_FORWARD);\n\t}", "public function checkRang(){\n if($this->_rang <= 0){\n return false;\n }\n return true;\n }", "public function isOk() : bool;", "public function valid() {\n\t\treturn ($this->current() !== false);\n\t}", "public static function isChannelling(): bool\n {\n return self::$isChannel;\n }", "private function _checkEnd($position){\r\n return $position == $this->_endPoint ? true : false;\r\n /*\r\n * If it's possible that there is no solution for labyrinth\r\n * this function should check if algorithm didn't go back to start tile\r\n */\r\n }", "public function getIsHandled();", "public static function guest ()\n {\n return !self::check();\n }", "public function isPlaying()\n {\n return \\doing_action($this->tag);\n }", "function will_squirrels_play($temp, $summer)\n{ $temp=\"\";\n if (!$summer) { //!$summer means if $summer is false... I used ($summer == false)\n if ($temp >= 65 || $temp <= 85) {\n return 'true';\n }\n } elseif ($summer) { //$summer = means if $summer is true... I used ($summer = true)\n if ($temp >= 65 || $temp <= 95) {\n return 'false';\n }\n }\n}", "function willYou($young, $beautiful, $loved) {\n if ($young && $beautiful && $loved) {\n return false;\n } elseif ($loved && (!$young || !$beautiful)) {\n return true;\n } elseif (!$loved && !$young && !$beautiful) {\n return false;\n } elseif (!$loved && $young && $beautiful) {\n return true;\n } else {\n return false;\n }\n}", "public function injxOk() : bool {\n return $this->injxCaller != NULL;\n }", "public function getIncrementing(): bool\n {\n return false;\n }", "public function getIncrementing(): bool\n {\n return false;\n }", "function next() {\n\n\t\tif (is_null($this->_httpq->next())) { return false; }\n\n\t\treturn true;\n\n\t}", "public function isEatenUp()\n {\n return $this->eaten >= 100;\n }", "public function isBeingReturned($stackPtr)\n {\n $prevPtr = $this->phpcsFile->findPrevious(T_RETURN, $stackPtr - 1, null, false, null, true);\n if ($this->tokens[$prevPtr]['code'] == T_RETURN) {\n return true;\n } else {\n return false;\n }\n }", "function door_status($doorinvert, $digitalio) {\n $return = false;\n if ($doorinvert == 1) {\n if ($digitalio == 0) {\n $return = false; //door close\n } else {\n $return = true; //door open\n }\n } else {\n if ($digitalio == 0) {\n $return = true; //door open\n } else {\n $return = false; //door close\n }\n }\n return $return;\n}", "public function solved() {\r\n\t\treturn $this->current == $this->expected;\r\n\t}", "public function hasStopdf(){\r\n return $this->_has(26);\r\n }" ]
[ "0.6317722", "0.60840213", "0.5949822", "0.5916642", "0.5769784", "0.5691896", "0.5671403", "0.5657901", "0.56496817", "0.56352234", "0.5632594", "0.5631397", "0.56252986", "0.56046456", "0.55990076", "0.5562233", "0.55380553", "0.55141926", "0.55039024", "0.54945445", "0.5489231", "0.5481857", "0.5464518", "0.54453284", "0.54381007", "0.54370064", "0.5435426", "0.5418081", "0.54139894", "0.5388897", "0.5379979", "0.53783685", "0.53619725", "0.53465265", "0.53425217", "0.53416014", "0.53354025", "0.5326664", "0.53226274", "0.5322238", "0.53126246", "0.5310448", "0.53073955", "0.53071165", "0.53026783", "0.52981365", "0.52973956", "0.52910334", "0.5282112", "0.5276793", "0.5274796", "0.5271654", "0.5271259", "0.5250903", "0.5248178", "0.5247288", "0.5245457", "0.52425355", "0.52370197", "0.5232703", "0.5225147", "0.5225035", "0.52204686", "0.5218062", "0.52077043", "0.51993513", "0.519552", "0.51927555", "0.51917166", "0.51816094", "0.51772535", "0.5175995", "0.5169828", "0.51682013", "0.51579714", "0.51518995", "0.5151875", "0.5151875", "0.5148024", "0.5145517", "0.51338327", "0.5131256", "0.5119022", "0.51142186", "0.51029557", "0.5100749", "0.51001287", "0.50999105", "0.5093205", "0.50929064", "0.50916153", "0.5089997", "0.5089802", "0.5088971", "0.5088971", "0.50888324", "0.50885916", "0.50811267", "0.5079621", "0.50758475", "0.5073132" ]
0.0
-1
Displays the tile or returns the HTML it would have displayed as a string
public function display($echo = true) { $output = ""; if (count($this->resultSet) > 0) { if ($this->shuf) { shuffle($this->resultSet); } $totalShown = 0; $output .= '<div class="tile ' . $this->class . '"><a href="' . $this->URL . '">'; if ($this->barTitle != '') { $output .= '<div class="tileTitle"><span>' . $this->barTitle . '</span></div>'; } for ($i = 0; $i < count($this->resultSet); $i++) { $artifact = $this->resultSet[$i]; if ($totalShown == count($this->resultSet) - 1) { $output .= '<div class="tileItem lastTileItem"><div class="tileImgCont">'; } else { $output .= '<div class="tileItem"><div class="tileImgCont">'; } List($width, $height) = getimagesize($artifact->getThumbImage(artifact::TILE_CONTEXT)); if ($width == $height) { $output .= ' <img src="' . $artifact->getThumbImage(artifact::TILE_CONTEXT) . '" alt="' . $artifact->getAccessionNumber() . '" width="' . self::TILE_IMAGE_SIZE . '">'; } else if ($width > $height) { $newWidth = self::TILE_IMAGE_SIZE / $height * $width; $output .= ' <img src="' . $artifact->getThumbImage(artifact::TILE_CONTEXT) . '" alt="' . $artifact->getAccessionNumber() . '" height="' . self::TILE_IMAGE_SIZE . '" style="margin-left: -' . ($newWidth - self::TILE_IMAGE_SIZE) / 2 . 'px">'; } else { //$width < $height $output .= ' <img src="' . $artifact->getThumbImage(artifact::TILE_CONTEXT) . '" alt="' . $artifact->getAccessionNumber() . '" width="' . self::TILE_IMAGE_SIZE . '">'; } $output .= ' </div></div>'; $totalShown++; } $output .= '</a></div>'; if ($echo) { echo $output; } } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Tile $tile)\n {\n //\n }", "public function display($data) {\n\t\t\tif (isset($data[$this->get_field_name('image_id')])) {\n\t\t\t\t$image_src = wp_get_attachment_image_src(intval($data[$this->get_field_name('image_id')]), esc_attr($data[$this->get_field_name('image_id').'-size']), false);\n\t\t\t\t$image_alignment = esc_attr(str_replace('-', ' ', $data[$this->get_field_name('hero_alignment')]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$image_src = '';\n\t\t\t\t$image_alignment = '';\n\t\t\t}\n\t\t\t$title = (!empty($data[$this->get_field_name('title')]) ? esc_html($data[$this->get_field_name('title')]) : '');\n\t\t\t$content = (!empty($data[$this->get_field_name('content')]) ? $this->wp_formatting($data[$this->get_field_name('content')]) : '');\n\t\t\t$box_height = (!empty($data[$this->get_field_name('box-height')]) ? intval($data[$this->get_field_name('box-height')]) : 0);\n\t\t\t$id_base = $this->id_base;\n\t\t\t$url = $this->get_link_url($data);\n\t\t\t\n\t\t\treturn $this->load_view($data, compact('image_src', 'title', 'content', 'box_height', 'image_alignment', 'id_base', 'url'));\n\t\t\t//return $html;\n\t\t}", "abstract protected function displayContent();", "public function display() {\n echo $this->render();\n }", "public function display() {\r\n echo $this->template;\r\n }", "public function display()\n {\n //If the page was cached\n if ($this->isCached)\n {\n //Nothing to do, we already showed the page\n return;\n }\n return $this->route->getView()->output();\n }", "public function display() {\n \t\n \tif($this->userCanVisualize()){\n \t\t\n \t\t$e = $this->buildGraph();\n \t\tif($e){\n\t \techo $e->graph->GetHTMLImageMap(\"map\".$this->getId());\n\t \t$this->displayImgTag();\n \t\t}\n \t}\n }", "public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }", "public static function render()\n\t{\n\t\treturn self::display();\n\t}", "public function toScreen(){\n\n header('Content-Type: text/html');\n\n $nodeAsText = $this->getNodeAsText('Home');\n\n\n\n echo (utf8_encode($nodeAsText));\n\n }", "public function display()\n {\n return $this->page->output();\n }", "public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }", "function renderCallToActionTile($link)\n {\n global $themes_simple_view;\n\n if(!$themes_simple_view || checkperm('b') || !checkperm('h'))\n {\n return;\n }\n\n if('' === $link)\n {\n return;\n }\n ?>\n <div id=\"FeaturedSimpleTile\" class=\"FeaturedSimplePanel HomePanel DashTile FeaturedSimpleTile FeaturedCallToActionTile\">\n <a href=\"<?php echo $link; ?>\" onclick=\"return ModalLoad(this, true, true);\" class=\"\">\n <div class=\"FeaturedSimpleTileContents\">\n <div class=\"FeaturedSimpleTileText\">\n <h2><span class='fa fa-plus-circle fa-2x'></span></h2>\n </div>\n </div>\n </a>\n </div>\n <?php\n return;\n }", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function display() {\n //send header to browser\n header( \"Content-type: {$this->mimetype}\" );\n\n //output image\n if ( $this->mimetype == 'image/jpeg' ) {\n imagejpeg( $this->image );\n }\n if ( $this->mimetype == 'image/png' ) {\n imagepng( $this->image );\n }\n if ( $this->mimetype == 'image/gif' ) {\n imagegif( $this->image );\n }\n }", "public static function renderContent() {}", "private static function display($html) { self::$smarty->display($html); }", "public function display() {\n\t\t$this->init();\n\t\treturn $this->output();\n\t}", "public function display()\n\t{\n\t\tob_start();\n\t\t\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $content;\n\t}", "function printHTML() \n {\n $this->openBlockHeader(\"Candidate Event\");\n?>\n <img id='candidate_image' src=\"<?echo $this->cand_url?>\">\n<?\n $this->closeBlockHeader();\n }", "function getHTML()\n\t{\t\t\t\t\n\t\t// getHTML() is called by ilRepositoryGUI::show()\n\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// there is no way to do a permissions check here, we have no wsp\n\t\t\n\t\t$this->filterInactivePostings();\n\t\t\n\t\t$list_items = $this->getListItems();\t\t\n\t\t\n\t\t$list = $nav = \"\";\n\t\tif($list_items)\n\t\t{\t\t\t\t\n\t\t\t$list = $this->renderList($list_items, \"previewEmbedded\");\n\t\t\t$nav = $this->renderNavigation($this->items, \"gethtml\", \"previewEmbedded\");\n\t\t}\t\t\n\t\t\n\t\treturn $this->buildEmbedded($list, $nav);\t\t\n\t}", "public function show()\n {\n //the board string is used in the view\n $data = $this->getBoardAsString();\n require VIEW_PATH.'web.php';\n\n }", "public function display()\n {\n $this->output = '';\n $output = $this->load($this->_layout);\n $this->output = $this->output.$output;\n\n return $this->output;\n }", "public function show(){\r\n if($this->html){\r\n echo $this->html;\r\n }\r\n else{\r\n echo \"Not Available\";\r\n }\r\n }", "function display($tpl = null)\n\t{\n\t\t// Assign data to the view\n\t\t$this->currentActor = $this->get('CurrentActor');\n\t\t$this->headshotName = $this->get('HeadshotName');\n\t\t$this->headshotImage = $this->get('HeadshotImage');\n\t\t$this->ageMin = $this->get('AgeMin');\n\t\t$this->ageMax = $this->get('AgeMax');\n\t\t$this->lookLikeHeadshot = $this->get('LookLikeHeadshot');\n\t\t$this->ethnicity = $this->get('Ethnicity');\n\t\t$this->orientation = $this->get('Orientation');\n\t\t$this->occupation = $this->get('Occupation');\n\t\t$this->personality = $this->get('Personality');\n\t\t$this->archetype = $this->get('Archetype');\n\t\t\n\t\t// Check for errors.\n\t\tif (count($errors = $this->get('Errors')))\n\t\t{\n\t\t\tJLog::add(implode('<br />', $errors), JLog::WARNING, 'jerror');\n \n\t\t\treturn false;\n\t\t}\n \n\t\t// Display the view\n\t\tparent::display($tpl);\n\t}", "public function tml_display($whatever) {\n\t\t$this->login_enqueue_scripts();\n\t\treturn $whatever;\n\t}", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "function html()\n {\n }", "function html()\n {\n }", "function html()\n {\n }", "public function display() { ImageLib::serve($this->source_image, $this->source_image_mimetype); }", "function printPreview()\n {\n echo '<div class=\"theme_preview\">';\n echo '<h2>' . htmlspecialchars($this->getName())\n .' (' . htmlspecialchars($this->getVersion()) . ')</h2>'\n .'<p>'\n .'<a target=\"_top\" href=\"index.php'\n .PMA_generate_common_url(array('set_theme' => $this->getId())) . '\"'\n .' onclick=\"takeThis(\\'' . addslashes($this->getId()) . '\\');'\n .' return false;\">';\n if (@file_exists($this->getPath() . '/screen.png')) {\n // if screen exists then output\n\n echo '<img src=\"' . $this->getPath() . '/screen.png\" border=\"1\"'\n .' alt=\"' . htmlspecialchars($this->getName()) . '\"'\n .' title=\"' . htmlspecialchars($this->getName()) . '\" /><br />';\n } else {\n echo $GLOBALS['strThemeNoPreviewAvailable'];\n }\n\n echo '[ <strong>' . $GLOBALS['strTakeIt'] . '</strong> ]</a>'\n .'</p>'\n .'</div>';\n }", "public function render()\n {\n return view('components.lecturer-widget-tiles');\n }", "public function show($id)\n {\n $tile = new Tile();\n $this->outputJsonObject([$tile->getTable() => $tile::find((int) $id)->getAttributes()]);\n }", "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 }", "public function renderContent() {}", "public abstract function display();", "abstract public function display($renderer, $attempt);", "public function display($data) {\n\t\t\tglobal $cfct_build;\t\t\t\n\t\t\n\t\t\t$cfct_build->loaded_modules[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_paths[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_urls[$this->basename] = $this->pluginUrl;\n\n\t\t\t$text = do_shortcode($data[$this->get_field_id('content')]);\n\t\t\treturn $this->load_view($data, compact('text'));\t\t\t\n\t\t}", "public function render() {\n echo $this->getHtml();\n }", "public function display($data) {\n\t\t\t// url\n\t\t\t$url = null;\n\t\t\tif (!empty($data[$this->get_field_name('url')])) {\n\t\t\t\t$url = esc_attr($data[$this->get_field_name('url')]);\n\t\t\t}\t\n\t\t\t\n\t\t\t$title = null;\t\n\t\t\tif (!empty($data[$this->get_field_name('title')])) {\n\t\t\t\t$title = esc_html($data[$this->get_field_name('title')]);\n\t\t\t\tif (!empty($url)) {\n\t\t\t\t\t$title = '<a href=\"'.$url.'\">'.$title.'</a>';\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t\t$image = null;\n\t\t\tif (!empty($data[$this->get_field_name('featured_image')])) {\n\t\t\t\t$img_id = intval($data[$this->get_field_name('featured_image')]);\n\t\t\t\t$the_image = get_post($img_id);\n\t\t\t\tif (!empty($the_image)) {\n\t\t\t\t\t$atts = array(\n\t\t\t\t\t\t'class' => 'cfct-mod-image '.(!empty($data[$this->get_field_id('image-alignment')]) ? ' '.$data[$this->get_field_name('image-alignment')] : '')\n\t\t\t\t\t);\n\t\t\t\t\t$size = (!empty($data[$this->get_field_name('featured_image').'-size']) ? $data[$this->get_field_name('featured_image').'-size'] : 'thumbnail');\n\t\t\t\t\t$image = wp_get_attachment_image($the_image->ID, $size, false, $atts);\n\t\t\t\t}\n\t\t\t\tif (!empty($url) && !empty($image)) {\n\t\t\t\t\t$image = '<a href=\"'.$url.'\">'.$image.'</a>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// content\n\t\t\t$content = null;\n\t\t\tif (!empty($data[$this->get_field_name('content')])) {\n\t\t\t\t$content = $this->wp_formatting($data[$this->get_field_name('content')]);\n\t\t\t}\n\n\t\t\treturn $this->load_view($data, compact('title', 'image', 'content', 'url'));\n\t\t}", "public function preview($slug){\n\n echo <<<HTML\n<!doctype html>\n<html lang=\"\">\n <head>\n <meta charset=\"utf-8\">\n </head>\n <body>\nHTML;\n\n $this->embed($slug);\n\n echo <<<HTML\n </body>\n</html>\nHTML;\n\n }", "protected function _display($template)\n {\n echo $this->_fetch($template);\n }", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n ?>\n\t\t<div class=\"happyden-feature-image\">\n\t\t\t\t<?php the_post_thumbnail( get_the_Id(), 'full' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "function view_page($html){\r\n\t\techo $html;\r\n\t}", "function printHTML() \n {\n?>\n <center>\n <img src=\"/images/blankimage.gif\" border=0 width=700 height=240 id=\"candidate\" TITLE=\"Current Candidate\" alt=\"alt\">\n </center>\n<?\n }", "public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}", "function renderToClient();", "public function html();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function html() {}", "public function render() {\n\n echo $this->html;\n\n }", "public function render()\n {\n $control = $this->getControl();\n $inner = $this->getInner($this->inner);\n $plugins = $this->getInner($this->plugins);\n \n $body = <<<EOF\n<div style='height: {$this->height}px; '>\n <v-map :zoom=13 :center=\"[$this->Lat,$this->Lon]\" :options='$this->options'>\n $control\n <v-tilelayer url=\"$this->tileServer\" name=\"Cхема\" layer-type='base'></v-tilelayer>\n $plugins\n $inner\n </v-map>\n</div>\nEOF;\n\n return view($this->view, \n [\n $this->mapId => $body,\n ]\n )->render();\n }", "function render()\n {\n return '<frame name=\"'.$this->m_name.'\" scrolling=\"'.$this->m_scrolling.'\" '.(!$this->m_resize?\"noresize\":\"\").\n ' src=\"'.$this->m_src.'\" marginwidth=\"'.$this->m_margin.'\" marginheight=\"'.$this->m_margin.'\">'.\"\\n\";\n }", "protected function render()\n {\n $params = ['title' => $this->title, 'content' => $this->content];\n $html = $this->template('Views/v_main.php', $params);\n echo $html;\n }", "public function present() {\n\t\t$data = [\n\t\t\t'key'=>$this->key,\n\t\t\t'team'=>$this->team,\n\t\t\t'views'=>$this->views,\n 'after'=>$this->after\n\t\t];\n\n\t\tif($this->cards !== null) {\n\t\t $data['cards'] = $this->cards;\n }\n\n\t\t$json = htmlspecialchars(json_encode($data), ENT_NOQUOTES);\n\t\treturn <<<HTML\n<div class=\"cl-trello-sprinter\" style=\"display:none\">$json</div>\t\t\nHTML;\n\t}", "protected function render() {\n\t\t$html = <<<HTML\n\t\t<div class=\"dev-test\">\n\t\tok\n</div>\nHTML;\n\n\t\techo $html;\n\n\t}", "abstract function display();", "abstract function display();", "public function Display()\n\t\t{\n\t\t\techo \"<html>\\n<head>\\n\";\n\t\t\t$this -> DisplayTitle();\n\t\t\t$this -> DisplayKeywords();\n\t\t\t$this -> DisplayStyles();\n\t\t\techo \"</head>\\n<body>\\n\";\n\t\t\t$this -> DisplayHeader();\n\t\t\t$this -> DisplayMenu($this->buttons);\n\t\t\techo $this->content;\n\t\t\t$this -> DisplayFooter();\n\t\t\techo \"</body>\\n</html>\\n\";\n\t\t}", "function showhtml($sAltText = null, $sClassName = null)\n\t{\n\t\tif (file_exists($this->sFileLocation)) {\n\t\t\t/* set html alt attribute */\n\t\t\tif ((isset($sAltText)) && ($sAltText != '')) {\n\t\t\t\t$htmlAlt = \" alt=\\\"\" . $sAltText . \"\\\"\";\n\t\t\t} else {\n\t\t\t\t$htmlAlt = \"\";\n\t\t\t}\n\n\t\t\t/* set html class attribute */\n\t\t\tif ((isset($sClassName)) && ($sClassName != '')) {\n\t\t\t\t$htmlClass = \" class=\\\"\" . $sClassName . \"\\\"\";\n\t\t\t} else {\n\t\t\t\t$htmlClass = \" border=\\\"0\\\"\";\n\t\t\t}\n\n\t\t\t$sHTMLOutput = '<img src=\"' . $this->sImageURL . '\"' . $htmlClass . ' width=\"' . $this->width . '\" height=\"' . $this->height . '\"' . $htmlAlt . '>';\n\t\t\tprint $sHTMLOutput;\n\t\t} else {\n\t\t\t$this->printError('file not found');\n\t\t}\n\t}", "public function run()\n\t{\n\t\t$this->renderContent();\n\t\t$content=ob_get_clean();\n\t\tif($this->hideOnEmpty && trim($content)==='')\n\t\t\treturn;\n\t\techo $content;\n\t}", "function showMap() {\n\t\t$this->initMap();\n\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###MAP###');\n\n\t\t// title, text - markers\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['map.']['LL'], 'map');\n\t\t$markerArray['###CAT_MENU###'] \t\t= $this->displayCatMenu(0);\n\t\t$markerArray['###CAT_LIST###'] \t\t= ($this->config['categoriesActive']!='') ? $this->config['categoriesActive'] : '9999';\n\t\t$markerArray['###MAP_WIDTH###'] \t= $this->config['mapWidth'];\n\t\t$markerArray['###MAP_HEIGHT###']\t= $this->config['mapHeight'];\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'],$markerArray, $subpartArray,$wrappedSubpartArray);\n\t\treturn $content;\n\t}", "function viewStory() {\n // Make sure the story is set to publish before displaying.\n if ($this->story->published == 1) {\n\n $picture = new Picture();\n $picture->load(['id = ?', $this->story->picture_id]);\n $page = $this->db->exec('SELECT MIN(page_number) as firstPage FROM pages WHERE story_id = ?', $this->story->id);\n\n $this->assign('story', $this->story);\n $this->assign('role', $this->getAuthorizationStatus());\n $this->assign('contentTitle', $this->story->title);\n $this->assign('pageTitle', $this->story->title);\n $this->assign('firstPage', $page[0]['firstPage']);\n $this->assign('filename', $picture->filename);\n $this->display('viewStory.tpl');\n }\n else {\n // Otherwise send to 404.\n $this->f3->error(404);\n }\n }", "public function display() {\n\t\techo $this->data;\n\t\treturn;\n\t}", "public static function drawAdminTile()\n {\n ?>\n <div class=\"col-md-4\">\n <div class=\"box box-default\">\n <div class=\"box-header with-border\">\n <h3 class=\"box-title\">Coin Payments</h3>\n </div>\n <div class=\"box-body\" style=\"overflow-x: scroll\">\n <b>Public key: </b><span\n style=\"font-size: 10pt\"><?= h(Configure::read('App.coinPayments.PUBLIC_KEY')) ?></span><br>\n <b>Merchant ID: </b><span\n style=\"font-size: 10pt\"><?= h(Configure::read('App.coinPayments.MERCHANT_ID')) ?></span><br>\n <b>IPN Url: </b><span\n style=\"font-size: 10pt\"><?= h(self::getIPNUrl()) ?></span><br>\n </div>\n </div>\n </div>\n <?php\n }", "function display(){\n\t\t//assing the html to a hold so we can output it later\n\t\t$this->hold_html = $this->get_include_contents($this->hold_template);\n\t\t//Let us know if we failed to get anything from the template\n\t\tif($this->hold_html !== FALSE){\t\t\n\t\t\techo $this->hold_html;\t\t\t\n\t\t}else{\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//should never get here but doesnt hurt\n\t\treturn false;\n\t}", "function warquest_show_map() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\t\r\n\t/* output */\r\n\tglobal $page;\r\n\t\r\n\t$page .= '<div class=\"subparagraph\">'.t('GENERAL_PLANET_'.$player->planet).' '.t('HOME_MAP_TITLE').'</div>';\r\n\r\n\t$page .= '<div class=\"box\">';\r\n\t$page .= warquest_ui_map($player, $player->planet);\r\n\t\r\n\t$page .= '<div class=\"note\"><center>';\r\n\t$page .= t('HOME_MAP_NOTE');\r\n\t$page .= '</center></div>';\t\r\n\t\t\r\n\t$page .= '</div>';\r\n}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function display ()\n {\n echo $this->as_text ();\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function run()\n {\n $this->renderContent();\n echo ob_get_clean();\n }", "public function renderHTML() \n\t{\n\t\t$viewTemplate = file_get_contents('view_file.html');\n\t\techo $viewTemplate;\n\t}", "function showContent()\n {\n // FIXME: URL, image, video, audio\n $this->out->elementStart('p', array('class' => 'entry-content'));\n \n \n $this->out->raw($this->notice->content);\n //$this->out->raw(common_render_content($this->notice->content, $this->notice));\n /*\n if ($this->notice->rendered) {\n $this->out->raw($this->notice->rendered);\n } else {\n // XXX: may be some uncooked notices in the DB,\n // we cook them right now. This should probably disappear in future\n // versions (>> 0.4.x)\n $this->out->raw(common_render_content($this->notice->content, $this->notice));\n }\n */\n $this->out->elementEnd('p');\n }", "public function render()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'render content of display class',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n $blocks = array();\n foreach ($this->DISPLAY as $key => $val) {\n\n if ($key === 'core') {\n continue;\n }\n\n if ($this->block){ \n if (isset($this->block[$key])) {\n if (!isset($blocks[$this->block[$key]])) {\n $blocks[$this->block[$key]] = '';\n }\n\n $blocks[$this->block[$key]] .= $val;\n }\n }\n\n $this->DISPLAY['core'] = str_replace(\n '{;mod;' . $key . ';}',\n $val,\n $this->DISPLAY['core']\n );\n unset($this->DISPLAY[$key]);\n }\n\n foreach($blocks as $blockName => $blockContent){\n $this->DISPLAY['core'] = str_replace(\n '{;block;' . $blockName . ';}',\n $blockContent,\n $this->DISPLAY['core']\n );\n }\n\n $this->_link('css');\n $this->_link('js');\n $this->_session();\n\n $this->DISPLAY = $this->DISPLAY['core'];\n\n $this->_path();\n $this->_clean();\n $this->_compress();\n\n if (!(bool)$this->_options['debug']) {\n ob_clean();\n }\n return $this->DISPLAY;\n }", "public function Display()\n {\n include($this->template);\n }", "public function render($toScreen = TRUE);", "function display( array $atts , $content = '' ){\r\n\r\n ob_start();\r\n\r\n if( $content != '' )\r\n $atts['title'] = $content;\r\n\r\n Better_Mag::generator()->blocks()->get_block_title( $atts['title'], $atts['link'], true );\r\n\r\n return ob_get_clean();\r\n\r\n }", "public function render()\n\t{\n\t\t$template = $this->template\n\t\t\t? '<div class=\"wkm-template\" for=\"' .$this->id. '\">' .$this->template. '</div>'\n\t\t\t: '';\n\n\t\treturn parent::render().$template;\n\t}", "public function render() {\n\t\t$logs = $this->logger->get_logs();\n\t\tforeach ( $logs as $log_id => $gist ) {\n\t\t\techo '<div class=\"b6go-gist-debug\">';\n\t\t\tforeach ( $gist as $entry ) {\n\t\t\t\t// Don't wpautop tabular data, as it adds <br> between line number spans.\n\t\t\t\techo ( false === strpos( $entry['message'], '<table' ) ) ? wpautop ( $entry['message'] ) : $entry['message'];\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t.b6go-gist-debug { margin: 2em 0; padding: 10px; background: #e8e8e8;}\n\t\t#querylist .b6go-gist-debug .gist .gist-file .gist-data .line_data pre {\n\t\t\toverflow: auto;\n\t\t\tword-wrap: normal;\n\t\t\t-moz-tab-size: 4;\n\t\t\t-o-tab-size: 4;\n\t\t\ttab-size: 4;}\n\t\t.b6go-gist-debug .gist .gist-file .gist-data .line_numbers span {font-size: 12px;}\n\t\t#querylist .b6go-gist-debug h2 {border: 0; float: none; font-size: 22px; text-align: left; margin: 0 !important; padding-left: 0;}\n\t\t</style>\n\t\t<?php\n\t}", "protected function displayContent()\n\t{\n\t\t$html = \"\\t\\t\\t\\t\".'<div id=\"content\">'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\".'<h2 class=\"title\">'.$this->pageInfo['pageHeading'].'</h2>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\".'<div class=\"fineprint\">'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\".'<ul>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>What information do we collect?</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">We collect information from you when you register on our site. When ordering or registering on our site, as appropriate, you may be asked to enter your: name, e-mail address, mailing address or phone number. You may, however, visit our site anonymously.</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>What do we use your information for?</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">Any of the information we collect from you may be used in one of the following ways:<br />\n\t\t\t<strong>To personalize your experience:</strong><br />\n\t\t\tYour information helps us to better respond to your individual needs.<br /> \n\t\t\t<strong>To improve our website:</strong><br />\n\t\t\tWe continually strive to improve our website offerings based on the information and feedback we receive from you.<br /> \n\t\t\t<strong>To improve customer service:</strong><br />\n\t\t\tYour information helps us to more effectively respond to your customer service requests and support needs.<br />\n\t\t\t<strong>To process transactions</strong><br />\n\t\t\tYour information, whether public or private, will not be sold, exchanged, transferred, or given to any other company for any reason whatsoever, without your consent, other than for the express purpose of delivering the purchased product or service requested.<br />\n\t\t\t<strong>To administer a site feature</strong><br />\n\t\t\tThis may include a contest, promotion, survey or other<br />\n\t\t\t<strong>To send periodic emails</strong><br />\n\t\t\tThe email address you provide for order processing, may be used to send you information and updates pertaining to your order, in addition to receiving occasional company news, updates, related product or service information, etc.</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>How do we protect your information?</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">We implement a variety of security measures to maintain the safety of your personal information when you place an order or enter, submit, or access your personal information.</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\".'</ul>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\".'<ul>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>Do we use cookies?</li>'.\"\\n\";\t\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">We do not use cookies.</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>Do we disclose any information to outside parties?</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others rights, property, or safety. However, non-personally identifiable visitor information may be provided to other parties for marketing, advertising, or other uses.</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>Registered Users</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">All registered users of our site may make any changes to their information at anytime by logging in and going to the \\'Your Account\\' page.</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>Terms and Conditions</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">Please also visit our Terms and Conditions section establishing the use, disclaimers, and limitations of liability governing the use of our website at <a href=\"index.php?page=terms\">terms and conditions</a></li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>Your consent</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">By using our site, you consent to our online privacy policy.</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>Changes to our Privacy Policy</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">If we decide to change our privacy policy, we will post those changes on this page. This policy was last modified on 7 May 2013</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li><i class=\"icon-question-sign\"></i>Contacting us</li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\".'<li class=\"answer\">If there are any questions regarding this privacy policy you may <a href=\"index.php?page=contact\">contact us</a></li>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\\t\".'</ul>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\\t\\t\".'</div><!-- fineprint -->'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\\t\".'</div><!-- home_text -->'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\\t\".'</div><!-- content -->'.\"\\n\";\n\t\treturn $html;\n\t}", "public function show()\n {\n header('Content-Type: image/' . $this->config->mimeType);\n echo $this;\n }", "protected abstract function renderContent();" ]
[ "0.7070667", "0.63605994", "0.6333274", "0.6284302", "0.6263236", "0.62267584", "0.6212988", "0.6202755", "0.6186066", "0.61057687", "0.6081899", "0.604664", "0.604193", "0.6039828", "0.60211664", "0.60059714", "0.6005866", "0.5996114", "0.5974017", "0.5961451", "0.5945939", "0.5943113", "0.59226084", "0.5898988", "0.5870283", "0.5865118", "0.5862167", "0.58590144", "0.58590144", "0.58590144", "0.5855173", "0.5854665", "0.585327", "0.5852219", "0.5847815", "0.5847469", "0.58457345", "0.58434784", "0.58394533", "0.5832569", "0.5825146", "0.5820041", "0.5818798", "0.581603", "0.5815808", "0.580124", "0.57998854", "0.5796831", "0.57936", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791229", "0.5791005", "0.5785318", "0.5783885", "0.5783376", "0.5782667", "0.57823426", "0.5781863", "0.57794285", "0.57794285", "0.5778239", "0.5775528", "0.57704574", "0.57676333", "0.5761324", "0.5760576", "0.57552904", "0.57549644", "0.5753087", "0.5745484", "0.57420635", "0.5738381", "0.57208306", "0.57166463", "0.5710453", "0.570695", "0.5703399", "0.56986", "0.5695529", "0.5695031", "0.56917983", "0.56914496", "0.5682111", "0.5680495" ]
0.67042726
1
Store a newly created resource in storage.
public function pickStudent(Request $request, $student_id) { if ($request->ajax()) { /* Get Company ID */ $representation = DB::table('representation_company')->where('representation_id', Auth::user()->user_id)->first(); $company_id = $representation->company_id; /* Get Topic ID */ $topic_id = $request->topic_id; DB::table('assignment')->insert([ 'student_id' => $student_id, 'company_id' => $company_id, 'topic_id' => $topic_id, 'representation_id' => Auth::user()->user_id, 'company_confirm' => "Approved", 'status' => "Pending" ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7285922", "0.714503", "0.71324795", "0.6639801", "0.6620405", "0.6568167", "0.65257645", "0.650948", "0.64484984", "0.6375281", "0.6373189", "0.63650924", "0.63650924", "0.63650924", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($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}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "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 }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78548634", "0.7693446", "0.72737956", "0.72415876", "0.71732706", "0.7064379", "0.70547634", "0.6985193", "0.6948865", "0.6946892", "0.69416964", "0.6929201", "0.69028485", "0.6899143", "0.6899143", "0.68794435", "0.6864862", "0.6860578", "0.68581015", "0.6845792", "0.6836835", "0.681191", "0.6808133", "0.6806856", "0.68035305", "0.6796193", "0.67936623", "0.67936623", "0.67895305", "0.6785768", "0.678106", "0.67773324", "0.67697626", "0.6762823", "0.6747543", "0.6747543", "0.67463523", "0.67444044", "0.6741766", "0.6737379", "0.6726827", "0.6714104", "0.66950524", "0.66935307", "0.6689272", "0.6689106", "0.66872644", "0.6686648", "0.6684393", "0.6670288", "0.6669616", "0.66668564", "0.66668564", "0.666409", "0.6662514", "0.66599286", "0.66590035", "0.6655965", "0.6653906", "0.6644097", "0.66327673", "0.66314846", "0.6629497", "0.6629497", "0.6620671", "0.66204685", "0.66168797", "0.66163945", "0.66112244", "0.6610172", "0.66072273", "0.65975267", "0.6596347", "0.6595878", "0.65914613", "0.65904135", "0.65880567", "0.658147", "0.6581434", "0.6581035", "0.65780395", "0.65776944", "0.6576013", "0.6570687", "0.6569499", "0.6568776", "0.6567722", "0.6562973", "0.6562973", "0.6561691", "0.655929", "0.6557889", "0.65571314", "0.65565974", "0.65564924", "0.65558827", "0.65556073", "0.6555524", "0.6549151", "0.6548339", "0.65460944" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $student_id) { DB::table('assignment')->where('student_id', '=', $student_id)->update(['company_confirm' => "Approved"]); /* Declare variables */ DB::table('evaluation')->insert([ 'student_id' => $student_id ]); $id = Auth::user()->user_id; $instructor = DB::table('instructor_company')->where('company_id', $id)->first(); DB::table('student_instructor_company') ->insert([ 'instructor_id' => $instructor->instructor_id, 'student_id' => $student_id ]); DB::table('topic')->where('topic_id', '=', $request->topic_id)->decrement('quantity', 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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 }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "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 }", "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 }", "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 }", "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 }", "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}", "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 }", "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 }", "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 }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "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 }", "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 }", "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 }", "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}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "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 }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "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 }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "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 }", "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 }", "public function store($data, Resource $resource);", "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 }", "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 }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "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 }", "public function update($request, $id);", "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}", "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 }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "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 }", "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 }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "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 }", "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 }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "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 }", "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 }", "public function update($id, $input);", "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)); }", "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}", "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 }", "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 }", "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 }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "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 }", "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 }", "public function update(Entity $entity);", "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 }", "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}", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Request $request) { DB::table('assignment')->where('student_id', $request->student_id)->update(['status' => "Declined"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "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 }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "public function remove($id);", "public function remove($id);", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6671365", "0.6660839", "0.66361386", "0.6632988", "0.6624729", "0.6542195", "0.6541645", "0.6466739", "0.6288393", "0.61767083", "0.6129533", "0.608954", "0.6054169", "0.60443425", "0.60073143", "0.59338665", "0.59317696", "0.592145", "0.5920155", "0.59065086", "0.5897853", "0.58968836", "0.58958197", "0.58958197", "0.58958197", "0.58958197", "0.58800334", "0.5869308", "0.5861188", "0.5811069", "0.5774596", "0.5763277", "0.5755447", "0.5747713", "0.5742094", "0.573578", "0.5727048", "0.57164854", "0.5712422", "0.57092893", "0.57080173", "0.5707143", "0.5704078", "0.5696418", "0.5684556", "0.5684556", "0.56790006", "0.5678463", "0.5658492", "0.564975", "0.5648406", "0.56480885", "0.5641393", "0.5638992", "0.56302536", "0.56228197", "0.5616424", "0.5607389", "0.56033397", "0.5602035", "0.55991143", "0.55988586", "0.5590501", "0.5581284", "0.55681103", "0.5566215", "0.55644745", "0.5563726", "0.55593926", "0.55583876", "0.5548547", "0.5542015", "0.5541403", "0.5541403", "0.55397224", "0.55390894", "0.55376494", "0.5531044", "0.5529739", "0.55279493", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527671", "0.5527155", "0.5526666", "0.55245256", "0.552101", "0.55183184" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create()\n {\n return view('student::students.student.create');\n }" ]
[ "0.7593198", "0.7593198", "0.75881755", "0.75787884", "0.7570936", "0.74992913", "0.7436037", "0.7431172", "0.7386512", "0.7351077", "0.7337819", "0.73100585", "0.7295612", "0.72803086", "0.7272473", "0.72422874", "0.7229479", "0.7224403", "0.7184453", "0.7177193", "0.7173551", "0.71482", "0.71424824", "0.7141885", "0.7135663", "0.7126202", "0.7121413", "0.7113729", "0.7113729", "0.7113729", "0.7110717", "0.7092118", "0.7083616", "0.7080794", "0.7078082", "0.70561296", "0.70561296", "0.7054459", "0.703925", "0.70373696", "0.70346737", "0.70324355", "0.70287114", "0.7025425", "0.7025232", "0.7018496", "0.7016745", "0.7002774", "0.70019513", "0.69991785", "0.69942427", "0.69936013", "0.69929653", "0.6988009", "0.69856364", "0.6965122", "0.6964889", "0.6955187", "0.69511235", "0.69497", "0.6947041", "0.69432163", "0.6940678", "0.6939846", "0.6936846", "0.6936846", "0.6936506", "0.6933589", "0.69309", "0.69273484", "0.6925485", "0.6921386", "0.6917649", "0.6913987", "0.6910826", "0.6909406", "0.69085246", "0.6907409", "0.69021183", "0.6900961", "0.68997645", "0.68991655", "0.6894049", "0.68920606", "0.6892033", "0.6891114", "0.6890811", "0.6890811", "0.6887868", "0.6887327", "0.68854356", "0.688366", "0.68805534", "0.68766564", "0.68753666", "0.6872474", "0.68717086", "0.6869974", "0.6869806", "0.6868809", "0.68685615" ]
0.0
-1
Store a newly created resource in storage.
public function store(StoreDeviceRequest $request) { $user = User::findOrFail($request->user_id); $user->devices()->delete(); $device = new Device; $device->fill($request->all()); $device->saveOrFail(); return $this->api_success([ 'data' => new DeviceResource($device), 'message' => __('pages.responses.created'), 'code' => 201 ], 201); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Device $device) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "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 }", "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}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "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 }", "public function retrieve(Resource $resource);", "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 }", "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 }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "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}", "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 }", "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 }", "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}", "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 }", "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 }", "public function get(Resource $resource);", "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 }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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}", "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 }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "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 }", "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}", "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 }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "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}", "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 }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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}", "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 }", "#[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}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "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 }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "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}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "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 }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Device $device) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($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}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "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 }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.665213", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Device $device) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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 }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "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 }", "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 }", "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 }", "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 }", "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}", "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 }", "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 }", "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 }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "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 }", "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 }", "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 }", "public function updateStream($path, $resource, Config $config)\n {\n }", "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}", "public function edit(Resource $resource)\n {\n //\n }", "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 }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "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 }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "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 }", "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 }", "public function store($data, Resource $resource);", "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 }", "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 }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update($request, $id);", "public function update(IEntity $entity);", "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 }", "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}", "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 }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "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 }", "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 }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "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 }", "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 }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "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 }", "public function update($id, $input);", "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 }", "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)); }", "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 }", "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}", "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 }", "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 }", "public function update($id);", "public function update($id);", "public function put($path, $data = null);", "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 }", "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 }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update(Entity $entity);", "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 }", "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 }", "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}", "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 }", "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 }", "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 }", "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 }", "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 }" ]
[ "0.74238616", "0.7062842", "0.7057816", "0.6897868", "0.65820867", "0.64505464", "0.6347915", "0.62114644", "0.6145006", "0.61231726", "0.6115922", "0.6100021", "0.6089019", "0.60542375", "0.60187906", "0.6008231", "0.5974106", "0.5944986", "0.59397626", "0.59393746", "0.58937186", "0.58607864", "0.5853811", "0.5853811", "0.58521867", "0.5815276", "0.58061725", "0.57518756", "0.57518756", "0.5736318", "0.57246256", "0.5715636", "0.5696208", "0.5691033", "0.5687788", "0.56692934", "0.56556624", "0.5652178", "0.56494987", "0.5636202", "0.56355816", "0.5632871", "0.563206", "0.56291884", "0.5621382", "0.56087434", "0.5602465", "0.55928403", "0.55825645", "0.55821884", "0.5581833", "0.5576869", "0.55712104", "0.5568173", "0.55648434", "0.5562885", "0.5560537", "0.5560537", "0.5560537", "0.5560537", "0.5560537", "0.55592597", "0.5556131", "0.5555849", "0.5555397", "0.5553912", "0.55530137", "0.5543831", "0.55430055", "0.5540152", "0.5539437", "0.55359006", "0.5535772", "0.5534487", "0.552458", "0.5518245", "0.5515452", "0.55145514", "0.5509227", "0.55079365", "0.55065364", "0.55039924", "0.5501616", "0.5500345", "0.5499738", "0.54980725", "0.5496017", "0.5496017", "0.5494488", "0.5494334", "0.54936594", "0.54934716", "0.5491019", "0.54835314", "0.54795796", "0.5479442", "0.5478275", "0.54646415", "0.54637444", "0.5461914", "0.54562414" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Device $device) { $device->delete(); return $this->api_success([ 'data' => new DeviceResource($device), 'message' => __('pages.responses.deleted'), 'code' => 201 ], 201); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "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 }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Create a new controller instance.
public function __construct() { //$this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.68775725", "0.6868809", "0.68633306", "0.6839021", "0.6779905", "0.6705274", "0.6670987", "0.66623807", "0.6652613", "0.6643801", "0.6616729", "0.66143125", "0.65891534", "0.6449129", "0.64461046", "0.6429425", "0.6426337", "0.63015336", "0.6298573", "0.6294075", "0.62801653", "0.6259914", "0.62554234", "0.6167662", "0.61630553", "0.61601174", "0.6141946", "0.6137726", "0.6134302", "0.6133732", "0.61287725", "0.6110795", "0.60950965", "0.6089703", "0.60768735", "0.6066286", "0.60595477", "0.6055387", "0.60451794", "0.6028352", "0.60246956", "0.60228956", "0.6019088", "0.6012698", "0.6011448", "0.60113615", "0.60076576", "0.6004189", "0.5998927", "0.5997798", "0.5993557", "0.59863526", "0.59863526", "0.59863526", "0.59706056", "0.59546155", "0.59493065", "0.5940633", "0.59251904", "0.59143347", "0.5913916", "0.59121555", "0.59111917", "0.5909761", "0.59026676", "0.59009403", "0.5899209", "0.58973104", "0.58964044", "0.58933777", "0.5888429", "0.58760023", "0.5869122", "0.5863149", "0.58622074", "0.5849116", "0.5838678", "0.5831741", "0.5824525", "0.58167094", "0.58122987" ]
0.0
-1
Show the application dashboard.
public function index(Request $request) { $empresas = Empresa::nombre($request->get('search'))->paginate(20); return view('welcome', compact('empresas')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Display the specified resource.
public function show($id) { $empresa = Empresa::find($id); return view('perfil', compact('empresa')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "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 }", "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}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "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 }", "public function retrieve(Resource $resource);", "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 }", "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 }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "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}", "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 }", "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 }", "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 }", "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}", "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 }", "public function get(Resource $resource);", "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 }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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 }", "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}", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\n }", "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}", "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 }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "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 }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "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}", "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 }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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}", "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 }", "public function display() {\n echo $this->render();\n }", "#[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}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "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 }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "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}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public abstract function display();", "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 }", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "abstract public function resource($resource);", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Returns URL to rate a comment.
public function GetRateURL($bPositiveLink = true, $bUseFullUrl = false) { if ($bPositiveLink) { $bPositiveLink = '1'; } else { $bPositiveLink = '0'; } $aParameter = array('bRate' => $bPositiveLink, TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); $sRatePositiveLink = TTools::GetExecuteMethodOnCurrentModuleURL('RateReview', $aParameter, $bUseFullUrl); return $sRatePositiveLink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comment_author_url($comment_id = 0)\n {\n }", "function get_comment_author_url($comment_id = 0)\n {\n }", "function get_comment_author_link($comment_id = 0)\n {\n }", "public function getCreditComment();", "public function comment()\n {\n $commentManager = new CommentManager();\n \n $comment = $commentManager->getComment($_GET['id']);\n \n require (__DIR__ . '/../view/frontend/commentView.php');\n }", "function comment_author_link($comment_id = 0)\n {\n }", "function get_edit_comment_link($comment_id = 0)\n {\n }", "public function getComment();", "public function getComment();", "public function getComment();", "public function getComment();", "public function getComment();", "public function getComment();", "public function setComments($url);", "function DisplayRating($comment) {\n $rating = get_comment_meta(get_comment_ID(), 'crfp-rating', true);\n if ($rating == '') $rating = 0;\n return $comment.'<div class=\"crfp-rating crfp-rating-'.$rating.'\"></div>'; \n }", "public function commentAction() {\r\n $data = json_decode($_POST['data'], true);\r\n if (empty($data['comments'])) {\r\n exit('access deny!');\r\n }\r\n\r\n if (stristr($data['sourceid'], 'nav_fun_')) {\r\n $id = intval(str_ireplace('nav_fun_', '', $data['sourceid']));\r\n $info = Nav_Service_NewsDB::getRecordDao()->get($id);\r\n if (!empty($info['id'])) {\r\n $total = $info['c_num'] + 1;\r\n Nav_Service_NewsDB::getRecordDao()->update(array('c_num' => $total), $id);\r\n $rcKey = 'NAV_FUN_OP:' . intval($info['id']);\r\n Common::getCache()->hSet($rcKey, 'c_num', $total);\r\n }\r\n }\r\n\r\n $addData = array(\r\n 'content' => trim($data['comments'][0]['content']),\r\n 'ctime' => substr($data['comments'][0]['ctime'], 0, 10),\r\n 'ip' => $data['comments'][0]['ip'],\r\n 'cmtid' => $data['comments'][0]['cmtid'],\r\n 'userid' => $data['comments'][0]['user']['userid'],\r\n 'sourceid' => $data['sourceid'],\r\n 'url' => $data['url'],\r\n 'created_at' => Common::getTime(),\r\n );\r\n\r\n // error_log(date('Y-m-d H:i:s') . \" \" . Common::jsonEncode($addData) . \"\\n\", 3, '/tmp/3g_changyan_comment');\r\n User_Service_Changyan::getDao()->insert($addData);\r\n\r\n exit;\r\n }", "public function getComment() {}", "function lj_comments($post_id)\n{\n $link = \"http://\".$hostname = getenv(\"HTTP_HOST\").\"/wp-lj-comments.php?post_id=\".$post_id;\n\treturn '<img src=\"'.$link.'\" border=\"0\">';\n}", "function dsq_comments_number($comment_text) {\n\tglobal $post;\n\n\tif ( dsq_can_replace() ) {\n\t\treturn '<span class=\"dsq-postid\" rel=\"'.htmlspecialchars(dsq_identifier_for_post($post)).'\">View Comments</span>';\n\t} else {\n\t\treturn $comment_text;\n\t}\n}", "public function ReportComment(){ \r\n $this->comment();\r\n $this->reportPost();\r\n $this->_commentManager->getReportComment($this->_reportPostSecure,\"1\");\r\n header('location: '.$_GET[\"url\"].'&id='.$_GET[\"id\"]);\r\n }", "function comment_link($comment = \\null)\n {\n }", "public function formatComment(string $comment): string;", "function get_comments_link($post = 0)\n {\n }", "public function commentAction ()\n {\n /* @var $user User */\n $user = $this->getUser();\n if(!$user) {\n throw new UnauthorizedHttpException('You must be logged in to comment.');\n }\n \n $request = $this->getRequest();\n \n $decklist_id = filter_var($request->get('id'), FILTER_SANITIZE_NUMBER_INT);\n $decklist = $this->getDoctrine()\n ->getRepository('NetrunnerdbBuilderBundle:Decklist')\n ->find($decklist_id);\n \n $comment_text = trim(filter_var($request->get('comment'), FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));\n if ($decklist && ! empty($comment_text)) {\n $comment_text = preg_replace(\n '%(?<!\\()\\b(?:(?:https?|ftp)://)(?:((?:(?:[a-z\\d\\x{00a1}-\\x{ffff}]+-?)*[a-z\\d\\x{00a1}-\\x{ffff}]+)(?:\\.(?:[a-z\\d\\x{00a1}-\\x{ffff}]+-?)*[a-z\\d\\x{00a1}-\\x{ffff}]+)*(?:\\.[a-z\\x{00a1}-\\x{ffff}]{2,6}))(?::\\d+)?)(?:[^\\s]*)?%iu',\n '[$1]($0)', $comment_text);\n \n $mentionned_usernames = array();\n if(preg_match_all('/`@([\\w_]+)`/', $comment_text, $matches, PREG_PATTERN_ORDER)) {\n $mentionned_usernames = array_unique($matches[1]);\n }\n \n $comment_html = Markdown::defaultTransform($comment_text);\n \n $now = new DateTime();\n \n $comment = new Comment();\n $comment->setText($comment_html);\n $comment->setCreation($now);\n $comment->setAuthor($user);\n $comment->setDecklist($decklist);\n \n $this->get('doctrine')\n ->getManager()\n ->persist($comment);\n $decklist->setTs($now);\n $decklist->setNbcomments($decklist->getNbcomments() + 1);\n\n $this->get('doctrine')\n ->getManager()\n ->flush();\n \n // send emails\n $spool = array();\n if($decklist->getUser()->getNotifAuthor()) {\n if(!isset($spool[$decklist->getUser()->getEmail()])) {\n $spool[$decklist->getUser()->getEmail()] = 'NetrunnerdbBuilderBundle:Emails:newcomment_author.html.twig';\n }\n }\n foreach($decklist->getComments() as $comment) {\n /* @var $comment Comment */\n $commenter = $comment->getAuthor();\n if($commenter && $commenter->getNotifCommenter()) {\n if(!isset($spool[$commenter->getEmail()])) {\n $spool[$commenter->getEmail()] = 'NetrunnerdbBuilderBundle:Emails:newcomment_commenter.html.twig';\n }\n }\n }\n foreach($mentionned_usernames as $mentionned_username) {\n /* @var $mentionned_user User */\n $mentionned_user = $this->getDoctrine()->getRepository('NetrunnerdbUserBundle:User')->findOneBy(array('username' => $mentionned_username));\n if($mentionned_user && $mentionned_user->getNotifMention()) {\n if(!isset($spool[$mentionned_user->getEmail()])) {\n $spool[$mentionned_user->getEmail()] = 'NetrunnerdbBuilderBundle:Emails:newcomment_mentionned.html.twig';\n }\n }\n }\n unset($spool[$user->getEmail()]);\n \n $email_data = array(\n 'username' => $user->getUsername(),\n 'decklist_name' => $decklist->getName(),\n 'url' => $this->generateUrl('decklist_detail', array('decklist_id' => $decklist->getId(), 'decklist_name' => $decklist->getPrettyname()), TRUE) . '#' . $comment->getId(),\n 'comment' => $comment_html,\n 'profile' => $this->generateUrl('user_profile', array(), TRUE)\n );\n foreach($spool as $email => $view) {\n $message = \\Swift_Message::newInstance()\n ->setSubject(\"[NetrunnerDB] New comment\")\n ->setFrom(array(\"alsciende@netrunnerdb.com\" => $user->getUsername()))\n ->setTo($email)\n ->setBody($this->renderView($view, $email_data), 'text/html');\n $this->get('mailer')->send($message);\n }\n \n }\n \n return $this->redirect($this->generateUrl('decklist_detail', array(\n 'decklist_id' => $decklist_id,\n 'decklist_name' => $decklist->getPrettyName()\n )));\n \n }", "public function getRechargeUrl()\n {\n return $this->get(self::_RECHARGE_URL);\n }", "protected function getAPIcreditUrl()\n {\n return \"api/credit\";\n }", "public function getUrlData()\n\t{\n\t\t$b = $this->getCommentableBehavior();\n\t\tif ($urlFunc = $b->commentableUrl) {\n\t\t\t$data = $urlFunc($this);\n\t\t} else {\n\t\t\t$data = '';\n\t\t}\n\t\treturn $data;\n\t}", "public function setComment($comment){\n\t\tif(FW_Validate::isValidUrl($comment)){\n\t\t\t$this->_comment = $comment;\n\t\t}\n\t}", "function force_comment_author_url($comment)\n{\n // does the comment have a valid author URL?\n $no_url = !$comment-&gt;comment_author_url || $comment-&gt;comment_author_url == 'http://';\n\n if ($comment-&gt;user_id &amp;&amp; $no_url) {\n // comment was written by a registered user but with no author URL\n $comment-&gt;comment_author_url = 'http://localhost/cftea/?author=' . $comment-&gt;user_id;\n }", "function rate(){\n\n\t\t// is entry ID provided in URL\n\t\tif( isset( $_GET[\"id\"] ) ) :\n\n\t\t\t$entry_id = intval( $_GET[\"id\"] );\n\n\t\t\t// loading entry from ID\n\t\t\t$entry = new Models\\Entry( $entry_id );\n\n\t\t\t// entry is loaded\n\t\t\tif( $entry->is_loaded() ):\n\n\t\t\t\t// is rating provided in URL\n\t\t\t\tif( !isset( $_GET[\"rating\"] ) ) :\n\t\t\t\t\tdie(\"Missing rating\");\n\t\t\t\tendif;\n\n\t\t\t\t// did you already vote ?\n\t\t\t\tif( $entry->already_voted() ) :\n\t\t\t\t\tdie(\"You already voted.\");\n\t\t\t\tendif;\n\n\t\t\t\t// convert rating to number\n\t\t\t\t$rating = intval( $_GET[\"rating\"] );\n\n\t\t\t\t// check if rating number is allowed\n\t\t\t\tif( !$entry->is_rating_allowed( $rating ) ) :\n\t\t\t\t\tdie(\"Invalid rating\");\n\t\t\t\tendif;\n\n\t\t\t\t// rate this entry\n\t\t\t\t$entry->rate( $rating );\n\n\t\t\t\t// redirect back to entry\n\t\t\t\theader( \"Location:index.php?c=read&id=\" . $entry_id );\n\t\t\t\texit;\n\n\t\t\telse :\n\n\t\t\t\tdie(\"Entry doesn't exist\");\n\n\t\t\tendif;\n\n\t\telse :\n\n\t\t\tdie(\"ID is missing\");\n\n\t\tendif;\n\t}", "function requestComments() {\n $username = $_GET['username'];\n \n $response = retrieveComments($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "public function getComment(): string;", "abstract public function comment();", "function comment() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['id'];\n if ($id > 0) {\n $query = \"select * from comments where id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = $r->fetch_assoc(); \n $this->response(json_encode($result), 200);\n } else {\n $this->response('', 204);\n }\n } else {\n $this->response('', 400);\n }\n }", "public function testListRatingComment()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin')\n ->clickLink('Comment and Rating')\n ->assertSee('List comment & rating')\n ->assertPathIs('/admin/comment');\n });\n }", "public function getRawComment()\n\t{\n\t\tFoundry::checkToken();\n\n\t\t// Only registered users are allowed here.\n\t\tFoundry::requireLogin();\n\n\t\t// Get the view\n\t\t$view = Foundry::view( 'comments', false );\n\n\t\t// Check for permission first\n\t\t$access = Foundry::access();\n\n\t\tif( !$access->allowed( 'comments.read' ) )\n\t\t{\n\t\t\t$view->setMessage( JText::_( 'COM_EASYSOCIAL_COMMENTS_NOT_ALLOWED_TO_READ' ) , SOCIAL_MSG_ERROR );\n\t\t\treturn $view->call( __FUNCTION__ );\n\t\t}\n\n\t\t$id = JRequest::getInt( 'id', 0 );\n\n\t\t$table = Foundry::table( 'comments' );\n\n\t\t$state = $table->load( $id );\n\n\t\tif( !$state )\n\t\t{\n\t\t\t$view->setMessage( $table->getError(), SOCIAL_MSG_ERROR );\n\t\t\treturn $view->call( __FUNCTION__ );\n\t\t}\n\n\t\t$comment = $table->comment;\n\n\t\t$stringLib = Foundry::get( 'string' );\n\n\t\t$comment = $stringLib->escape( $comment );\n\n\n\t\t$view->call( __FUNCTION__, $comment );\n\t}", "public function comment($id)\n {\n $comments=Question::where('url_id',$id)->get();\n return view('summary.comments',compact('comments',$comments));\n }", "public function reportComment() {\n $commentId = $this->request->getParameter(\"comId\");\n $postId = $this->request->getParameter(\"postId\");\n $this->comment->report($commentId);\n $this->redirect('Post','index/'.$postId);\n }", "public function getCommentId()\n {\n return $this->_getValue('oepaypal_commentid');\n }", "public function getUrl ()\n {\n return array(\n 'endpointurl' => 'https://disqus.com/api/3.0/users/listActivity.json',\n 'method' => 'get'\n );\n }", "public function getDocComment();", "public function getCommentText()\n {\n $helper = Mage::helper('tigo_tigomoney');\n return\n $helper->__('Your store has two URIs which will be used by Tigo Payment Server. They are:') . '<br />' .\n '<strong>Redirect URI:</strong> ' . $this->_getRedirectUri() . ' <br />' .\n '<strong>Callback URI:</strong> ' . $this->_getCallbackUrl() . ' <br />';\n }", "function view_comment()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t$comment_id = $this->input->get('comment_id');\n\t\t$this->view_comments('', '', '', array($comment_id));\n\t}", "public function getUrl ()\n {\n return array(\n 'endpointurl' => '/comment/create',\n 'method' => 'post'\n );\n }", "function newsdot_comments_link() {\n\t\tif ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {\n\t\t\techo '<span class=\"comments-link\">';\n\t\t\techo '<i class=\"far fa-comments mr-1\"></i>';\n\t\t\tcomments_popup_link(\n\t\t\t\tsprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t/* translators: %s: post title */\n\t\t\t\t\t\t__( 'Leave a Comment<span class=\"screen-reader-text\"> on %s</span>', 'newsdot' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t\t'class' => array(),\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\twp_kses_post( get_the_title() )\n\t\t\t\t)\n\t\t\t);\n\t\t\techo '</span>';\n\t\t}\n\t}", "public function show(Comment $comment)\n {\n \n }", "public function url()\n\t{\n\t\treturn Url::to(\"review/\".$this->id.\"/\".$this->slug.\"/\".Session::get('Lang'));\n\t}", "public function add_comment( $id, $comment ) {\n\n\t\tif ( isset( $_POST['wp_reviews_score'] ) and ! empty( $_POST['wp_reviews_score'] ) ) {\n\n\t\t\t//Save Rating\n\t\t\tupdate_comment_meta( $id, 'score', sanitize_text_field( $_POST['wp_reviews_score'] ) );\n\n\t\t\t//Send Email\n\t\t\tif ( WP_REVIEWS_INSURANCE::$option['email_auth'] == 1 ) {\n\n\t\t\t\t//Generate User Link\n\t\t\t\t$auth_key = wp_generate_password( 50, false );\n\t\t\t\t$link = add_query_arg( array( 'wp_confirm_reviews_insurance' => $auth_key ), home_url() );\n\t\t\t\tupdate_comment_meta( $id, 'auth_key', sanitize_text_field( $auth_key ) );\n\n\t\t\t\t//Email text\n\t\t\t\t$email_opt = get_option( 'wp_reviews_email_opt' );\n\t\t\t\t$email_text = str_replace( array( '[fullname]', '[link]' ), array( $comment->comment_author, '<a href=\"' . $link . '\" target=\"_blank\">Confirm Your Review</a>' ), $email_opt['email_body'] );\n\t\t\t\t$email_subject = str_replace( array( '[fullname]', '[sitename]' ), array( $comment->comment_author, get_bloginfo( 'name' ) ), WP_REVIEWS_INSURANCE::$option['email_subject'] );\n\t\t\t\tUtility::send_mail( $comment->comment_author_email, $email_subject, $email_text );\n\n\t\t\t} else {\n\t\t\t\tupdate_comment_meta( $id, 'comment_approve_user', 'yes' );\n\t\t\t}\n\t\t}\n\t}", "public function getComment()\n { \n return $this->comment;\n }", "public function getURLCommentaire()\n {\n $ret = false;\n if ($this->exist()) {\n $oPage = new Page($this->getID(), 'ON_');\n if ($oPage && $oPage->exist()) {\n $ret = $oPage->getURL();\n }\n }\n\n return $ret;\n }", "function get_comment_ID()\n {\n }", "function getButton_editComment($commentid) {\r\r\n\t$PView = new PView;\r\r\n\t// PERMISSION!!!\r\r\n\tif ($PView -> getPermission(\"config\",\"permComment\",\"\")) {\r\r\n\t$btn = \"<a href='pviewgallery.php?image=\".$_GET['image'].\"&comment=\".$commentid.\"#a_preview'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/comment_edit.png' border='0px'alt='\".LAN_IMAGE_19.\"' title='\".LAN_IMAGE_19.\"'></a>\";\r\r\n\t}\r\r\n\treturn $btn;\r\r\n}", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function commentAction() {\n $ses = new Application_Model_Session();\n $ses->startSession();\n {\n $request = $this->getRequest();\n $ExpId = $this->_getParam('expid');\n $form = new Campuswisdom_Form_Comment();\n $this->view->form = $form;\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($request->getPost())) {\n $mapper = new Campuswisdom_Model_ExpMapper();\n $Comment = $form->getValue(\"comment\");\n $mapper->setDbTable('campuswisdom_Model_DbTable_Comments');\n $smthn = $mapper->save($ExpId, $Comment);\n if ($smthn == null) {\n //an error occurred so nothing was saved\n } else {\n $ses->setSessionParameter('comnt', 1);\n }\n $this->_helper->redirector('viewcomments', 'exps', 'default', array('expid' => $ExpId));\n }\n }\n }\n }", "public function FormattedComment() {\n\t\treturn $this->FormattedText($this->Comment);\n\t}", "public function getFeedUrl()\n\t{\n\t\treturn 'http://www.break.com/' . $this->getId();\n\t}", "function comment_author_url_link($link_text = '', $before = '', $after = '', $comment = 0)\n {\n }", "function add_twitlink_to_comment_text($comment_text){\r\n global $comment;\r\n //get link if exists\r\n if($twitter_link = $this->make_twitlink($comment->comment_author_email)){\r\n // construct twitter link\r\n $link = $twitter_link;\r\n $options = $this->get_options();\r\n if($options['position'] == 'start_comment'){\r\n // prepend link\r\n $comment_text = $link.$comment_text;\r\n } else {\r\n // append link\r\n $comment_text .= $link;\r\n }\r\n }\r\n // send back modified comment text\r\n return $comment_text;\r\n }", "public function getComment()\r\n {\r\n return $this->comment;\r\n }", "function get_comment_author_url_link($link_text = '', $before = '', $after = '', $comment = 0)\n {\n }", "public function getComment() {\n return $this->comment;\n }", "public function getResourceId()\n\t{\n\t\treturn 'comment';\n\t}", "function commenter_link() {\n\t $commenter = get_comment_author_link();\n\t if ( ereg( '<a[^>]* class=[^>]+>', $commenter ) ) {\n\t $commenter = ereg_replace( '(<a[^>]* class=[\\'\"]?)', '\\\\1url ' , $commenter );\n\t } else {\n\t $commenter = ereg_replace( '(<a )/', '\\\\1class=\"url \"' , $commenter );\n\t }\n\t $avatar_email = get_comment_author_email();\n\t $avatar = str_replace( \"class='avatar\", \"class='photo avatar\", get_avatar( $avatar_email, 80 ) );\n\t echo $avatar . ' <span class=\"fn n\">' . $commenter . '</span>';\n\t}", "function commenter_link() {\n\t $commenter = get_comment_author_link();\n\t if ( ereg( '<a[^>]* class=[^>]+>', $commenter ) ) {\n\t $commenter = ereg_replace( '(<a[^>]* class=[\\'\"]?)', '\\\\1url ' , $commenter );\n\t } else {\n\t $commenter = ereg_replace( '(<a )/', '\\\\1class=\"url \"' , $commenter );\n\t }\n\t $avatar_email = get_comment_author_email();\n\t $avatar = str_replace( \"class='avatar\", \"class='photo avatar\", get_avatar( $avatar_email, 80 ) );\n\t echo $avatar . ' <span class=\"fn n\">' . $commenter . '</span>';\n\t}", "function get_comment() {\n\t\treturn $this->comment;\n\t}", "function show_avatar($comment)\n {\n $size = 40;\n $default = get_bloginfo('stylesheet_directory') . '/images/gravatar.jpg';\n $email = strtolower(trim($comment->comment_author_email));\n // [G | PG | R | X]\n $rating = \"G\";\n if (function_exists('get_avatar')) {\n echo get_avatar($email, $size, $default);\n } else {\n $grav_url = \"http://www.gravatar.com/avatar.php?gravatar_id=\n \" . md5($emaill) . \"&default=\" . urlencode($default) . \"&size=\" . $size . \"&rating=\" . $rating;\n echo \"<img src='$grav_url'/>\";\n }\n }", "function itstar_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'itstar' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'itstar' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'itstar' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'itstar' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function itstar_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'itstar' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'itstar' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'itstar' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'itstar' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function comment_author($comment_id = 0)\n {\n }", "static function pretty_comments_number() {\n\t\tglobal $post;\n\t\tprintf(\n\t\t\t/* translators: %s represents a number */\n\t\t\t_n( '%s Comment', '%s Comments', get_comments_number(), 'cargopress-pt' ), number_format_i18n( get_comments_number() )\n\t\t);\n\t}", "public function likecommentAction ()\r\n\t{\r\n\t\t$idcomment = $this->getRequest()->getParam('idcomment');\r\n\t\t$idnews = $this->getRequest()->getParam('idnews');\r\n\t\t$mTinTuc = new Default_Model_Mtintuc();\r\n\t\t\r\n\t\t$mTinTuc->likeComment($idcomment);\r\n\t\t$this->view->comment = $mTinTuc->getInfoComment($idcomment);\r\n\t}", "function comment_author_IP($comment_id = 0)\n {\n }", "public function getUrlData()\n\t{\n\t\t$b = $this->getCommentableBehavior();\n\t\tif ($urlFunc = $b->commentableUrl) {\n\t\t\t$commentable = @$this->items[0];\n\t\t\t$data = $urlFunc($commentable);\n\t\t} else {\n\t\t\t$route = Yii::app()->controller->id.'/'.Yii::app()->controller->action->id;\n\t\t\t$data = array_merge(array($route), $_GET);\n\t\t}\n\t\t$data['#'] = 'c'.$this->id;\n\t\treturn $data;\n\t}", "public function the_comment()\n {\n }", "public function getComment()\n\t{\n\t\treturn $this->comment;\n\t}", "public static function get_avatar_url( $comment ) {\n\t\tif ( is_numeric( $comment ) ) {\n\t\t\t$comment = get_comment( $comment );\n\t\t}\n\n\t\t$avatar = get_comment_meta( $comment->comment_ID, 'avatar', true );\n\t\t// Backward Compatibility for Semantic Linkbacks\n\t\tif ( ! $avatar ) {\n\t\t\t$avatar = get_comment_meta( $comment->comment_ID, 'semantic_linkbacks_avatar', true );\n\t\t}\n\n\t\treturn $avatar;\n\t}", "public function getCommentId()\n {\n return $this->comment_id;\n }", "public function getCommentID()\n {\n return $this->commentID;\n }", "function comments_link_feed()\n {\n }", "function getComment()\n {\n return $this->comment;\n }", "function get_comment_author($comment_id = 0)\n {\n }", "public function getComment()\n {\n return $this->_comment;\n }", "public function commentsAction()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$user = Application_Model_User::getAuth();\r\n\r\n\t\t\t$id = $this->_request->getPost('id');\r\n\r\n\t\t\tif (!v::intVal()->validate($id))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post value: ' .\r\n\t\t\t\t\tvar_export($id, true));\r\n\t\t\t}\r\n\r\n\t\t\tif (!Application_Model_News::checkId($id, $post, ['join'=>false]))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post ID');\r\n\t\t\t}\r\n\r\n\t\t\t$start = $this->_request->getPost('start', 0);\r\n\r\n\t\t\tif (!v::intVal()->validate($start))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect start value: ' .\r\n\t\t\t\t\tvar_export($start, true));\r\n\t\t\t}\r\n\r\n\t\t\t$limit = 30;\r\n\t\t\t$model = new Application_Model_Comments;\r\n\t\t\t$comments = $model->findAllByNewsId($id, [\r\n\t\t\t\t'limit' => $limit,\r\n\t\t\t\t'start' => $start,\r\n\t\t\t\t'owner_thumbs' => [[55,55]]\r\n\t\t\t]);\r\n\r\n\t\t\t$response = ['status' => 1];\r\n\r\n\t\t\tif (count($comments))\r\n\t\t\t{\r\n\t\t\t\tforeach ($comments as $comment)\r\n\t\t\t\t{\r\n\t\t\t\t\t$response['data'][] = My_ViewHelper::render('post/_comment', [\r\n\t\t\t\t\t\t'user' => $user,\r\n\t\t\t\t\t\t'comment' => $comment,\r\n\t\t\t\t\t\t'post' => $post,\r\n\t\t\t\t\t\t'limit' => 250\r\n\t\t\t\t\t]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$count = max($post->comment - ($start + $limit), 0);\r\n\r\n\t\t\t\tif ($count > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$response['label'] = $model->viewMoreLabel($count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\tMy_Log::exception($e);\r\n\t\t\t$response = [\r\n\t\t\t\t'status' => 0,\r\n\t\t\t\t'message' => $e instanceof RuntimeException ? $e->getMessage() :\r\n\t\t\t\t\t'Internal Server Error'\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\t$this->_helper->json($response);\r\n\t}", "public function delete(Comment $comment)\n {\n $comment->rates()->detach(request()->user());\n }", "public function get_comment()\n\t{\n\t\treturn $this->comment;\n\t}", "function dislikeComment() {\n if ($this->getRequestMethod() != \"POST\") {\n $this->response('', 406);\n }\n $data = json_decode(file_get_contents(\"php://input\"),true);\n $id = (int)$data['id'];\n if ($id > 0) {\n $query = \"select * from comments where id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $query = \"update comments set dislikes = dislikes + 1 where id =$id;\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__); \n $this->response('', 200);\n } else {\n $this->response('', 204);\n }\n } else {\n $this->response('', 400);\n }\n }", "public function getCommentRateRepo()\n {\n if ($this->_commentRateRepo === null || !$this->_commentRateRepo) {\n $this->_commentRateRepo = $this->getEntityRepository(CommentRate::class);\n }\n\n return $this->_commentRateRepo;\n }", "function get_comment_author_IP($comment_id = 0)\n {\n }", "public function normaliseComment(string $comment): string;", "function jal_edit_comment_link($text = 'Edit This', $before = '', $after = '', $editing_message = '<strong>EDITING</strong>') {\n\tglobal $comment, $jal_minutes, $user_ID, $post;\n \n $time_ago = time() - strtotime($comment->comment_date_gmt . ' GMT');\n\n if (user_can_edit_post_comments($user_ID, $post->ID))\n edit_comment_link($text, $before, $after);\n \n\telseif ($comment->comment_author_IP == $_SERVER['REMOTE_ADDR']\n\t // show the link for the allotted time - 5 minutes\n\t && $time_ago < 60 * ($jal_minutes - 5)\n\t // don't show edit links if they're already editing\n\t && !isset($_GET['jal_edit_comments'])) {\n\t \n\t echo \"\\n{$before}<a href='\".add_query_arg('jal_edit_comments', \"$comment->comment_ID\").\"#commentform' title='Edit this Comment'>{$text}</a>{$after}\\n\";\n\t}\n\t\n\t// When the author has clicked Edit, the comment they are editing is highlighted as EDITING\n\telseif (isset($_GET['jal_edit_comments']) && $comment->comment_ID == $_GET['jal_edit_comments'])\n\t\techo $editing_message;\n\n}", "function getComment() {\n return DataObjectPool::get($this->getAdditionalProperty('comment_type'), $this->getAdditionalProperty('comment_id'));\n }", "function get_linkrating($link)\n {\n }", "public function getComment()\n {\n $value = $this->get(self::COMMENT);\n return $value === null ? (string)$value : $value;\n }", "function get_comments_number($post = 0)\n {\n }", "public function getComment()\n {\n $value = $this->get(self::comment);\n return $value === null ? (string)$value : $value;\n }" ]
[ "0.6779526", "0.6561828", "0.5944104", "0.59428203", "0.59015244", "0.58925265", "0.58125895", "0.57910436", "0.57910436", "0.57910436", "0.57910436", "0.57910436", "0.57910436", "0.5756557", "0.5743199", "0.57357794", "0.5717702", "0.5711031", "0.570111", "0.5662541", "0.56619865", "0.562202", "0.55758345", "0.5572722", "0.55237466", "0.5460638", "0.5451027", "0.5424295", "0.54117036", "0.5382383", "0.53613764", "0.53222376", "0.5314324", "0.5309248", "0.5299485", "0.5299287", "0.5244492", "0.5243687", "0.52318573", "0.5228847", "0.5218647", "0.52070385", "0.5199997", "0.5175941", "0.51714015", "0.5144666", "0.5143651", "0.5125618", "0.5124442", "0.5121216", "0.5115123", "0.51148057", "0.5110602", "0.5110602", "0.5110602", "0.5110602", "0.5110602", "0.5110602", "0.5110602", "0.5106369", "0.51017994", "0.5098968", "0.5096797", "0.5093525", "0.50874263", "0.5085188", "0.50796026", "0.5078126", "0.50766987", "0.50766987", "0.50745046", "0.50710225", "0.5051625", "0.5051625", "0.50440127", "0.5042717", "0.5042078", "0.5041073", "0.50388205", "0.50373876", "0.50372154", "0.503533", "0.50306034", "0.50253457", "0.502393", "0.50185466", "0.50165546", "0.49958238", "0.49923915", "0.49885744", "0.49793503", "0.49747375", "0.49737805", "0.4963158", "0.49620482", "0.49598402", "0.4959109", "0.4950348", "0.4949477", "0.49408883", "0.4939942" ]
0.0
-1
Returns true or false if active user rated review.
public function ReviewRatedByActiveUser() { return array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION) && array_key_exists($this->id, $_SESSION['TPkgShopArticleReviewShopArticleReviewRated']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isReviewed() {\n\t\t$this->getReviewed();\n\t}", "public function isReviewActive()\n {\n return $this->getConfig()->getConfigParam('bl_perfLoadReviews');\n }", "public function is_onreview() {\n $order = SalesOrder::load($this->orderno);\n\t\t\treturn $order->is_onreview();\n }", "public function canBeReviewed(): bool\n {\n if (!$this->isOnline()) {\n return false;\n }\n\n if (new \\DateTimeImmutable('now') > $this->getReviewDeadline()) {\n return false;\n }\n\n return true;\n }", "protected function canRate(){\n //Check if there's even a logged in user to save some cycles doing all the calculations below\n if(!$this->canUserModify()){\n return false;\n }\n $commentRateObject = $this->createEmptyObjectWithAttachedComment('SocialQuestionCommentContentRating', $this->connectObj);\n // add a filler rating value\n $commentRateObject->RatingValue = 100;\n\n return $this->isActive() &&\n $this->isQuestionActive() &&\n !$this->isAuthor() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n $this->cachePerQuestion(PERM_SOCIALQUESTIONCOMMENTCONTENTRATING_CREATE, $commentRateObject);\n }", "public function canRate()\n {\n if ($this->_blCanRate === null) {\n\n $this->_blCanRate = false;\n\n if ($this->ratingIsActive() && $oUser = $this->getUser()) {\n\n $oRating = oxNew('oxrating');\n $this->_blCanRate = $oRating->allowRating($oUser->getId(), 'oxarticle', $this->getProduct()->getId());\n }\n }\n\n return $this->_blCanRate;\n }", "public function ratingIsActive()\n {\n return $this->getConfig()->getConfigParam('bl_perfLoadReviews');\n }", "public function hasRating()\n\t{\n\t\t$this->getReview();\n\n\t\treturn $this->review->length > 0;\n\t}", "public function isReviewsEnabled()\n {\n return (bool)Mage::helper('core')->isModuleEnabled('Mage_Review');\n }", "function is_rated($product_id)\n {\n if ($this->session->userdata('user_login') == 'yes') {\n $user = $this->session->userdata('user_id');\n if ($this->get_type_name_by_id('product', $product_id, 'rating_user') !== '') {\n $rating_user = json_decode($this->get_type_name_by_id('product', $product_id, 'rating_user'));\n } else {\n $rating_user = array(\n '0'\n );\n }\n if (in_array($user, $rating_user)) {\n return 'yes';\n } else {\n return 'no';\n }\n } else {\n return 'no';\n }\n }", "public function isSellerReviewEnabled() {\n return $this->scopeConfig->getValue ( static::XML_SELLER_REVIEW, ScopeInterface::SCOPE_STORE );\n }", "public function review(User $user, Project $project)\n {\n // if user is not a reviewer, do not authorize\n if ($user->role->name != 'reviewer') {\n return false;\n }\n\n // get operating units being reviewed by user\n $ous = $user->reviews->pluck('id')->toArray();\n\n // get operating unit owner of project\n $ou = $project->operating_unit_id;\n\n // check if reviewer is assigned to review ou project\n $result = in_array($ou, $ous);\n\n // return result\n return $result;\n }", "function eman_can_review( $post, $user_id=false ) {\n\t// Get the post if an id was provide\n\tif ( is_numeric($post) ) { $post = get_post($post); }\n\t// If no post then nothing to review\n\tif ( ! is_object($post) ) { return false; }\n\n\t// Get current user if no user provided\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\n\t// Test if owner review phase (doesn't require bic)\n\t$owner_review = false;\n\t$status = emanager_post::status($post, 'slug');\n\tif ( 'em_noc' == $post->post_type && in_array($status, array('submitted','executed','recommend')) && eman_check_role('owner') ) {#( current_user_can('owner') || current_user_can('owners_rep') ) ) {\n\t\treturn true;\n\t}\n\n\t// Test if the post is currently reviewable, returns the reviews if so\n\tif ( eman_post_reviewable($post) ) {\n\t\tif ( 'em_letter' === get_post_type( $post ) && current_user_can('manage_options') ) {\n\t\t\treturn true;\n\t\t} elseif ( $user_id == emanager_bic::get_bic($post, 'ID') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "public function isReviewer()\n {\n return $this->hasRole(HakAkses::REVIEWER);\n }", "function is_rating($user_id)\n {\n $this->db->select(\"no\");\n $this->db->from('favourite_goods');\n $this->db->where('user_id', $user_id);\n $query = $this->db->get();\n return (count($query->result()) > 0) ? true : false;\n }", "public function is_show_ask_for_review_notice() {\n return (\n nk_theme()->theme_dashboard()->theme_id &&\n nk_theme()->theme_dashboard()->theme_uri &&\n nk_theme()->theme_dashboard()->ask_for_review &&\n 'show' === nk_theme()->get_option( 'ask_for_review_status', 'first' )\n );\n }", "public function view(User $user, UserRating $userRating)\n {\n if ($user->{'user-id'} === $userRating->{'rated_by'} || $user->{'user-id'} === $userRating->{'user-id'}) {\n return true;\n }\n\n return false;\n }", "public function isPendingReview() {\n return $this->getStatus() === Status::PENDING_REVIEW;\n }", "public function vote_active() { \n\n\t\t/* Going to do a little more here later */\n\t\tif ($this->type == 'vote') { return true; } \n\n\t\treturn false;\n\n\t}", "public function userActive(){\n\t\treturn (isset($this->session) && $this->session != null && isset($this->session['id']) && $this->session['id'] > 0) ? true : false;\n\t}", "public function getReviewExistsAttribute()\n {\n $auth_user = Auth::user();\n\n if (array_search($auth_user->id, [$this->user_id, $this->seller_id])) {\n $result = $this->reviews()\n ->where('user_id', $auth_user->id)\n ->exists();\n }\n\n return $result ?? null;\n }", "public function getIsUserAttribute()\n {\n return $this->attributes['user_type'] == '3';\n }", "public function isActive()\n {\n return ($this->isDraft() || $this->isExpired()) ? false : true;\n }", "private function ___hasCustomerReview( array $aProductData ) {\n return in_array(\n $this->getElement(\n $aProductData,\n array( 'CustomerReviews', 'HasReviews' ),\n false\n ),\n array( true, 'true', 'TRUE', 'True', 1, '1', ),\n true // type-sensitive\n );\n }", "public function isLiked()\n {\n return (bool) $this->likes()\n ->where('user_id', auth()->id())\n ->count();\n }", "public function checkUserReview($id, $user)\n {\n $queryBuilder = $this->createQueryBuilder('review');\n $queryBuilder->select('review.id')\n ->where(\"review.book = :id\")\n ->andWhere('review.author = :user')\n ->setParameter('id', $id)\n ->setParameter('user', $user);\n\n $query = $queryBuilder->getQuery();\n $queryResult = $query->getResult();\n\n $return = false;\n if (!empty($queryResult)) {\n $return = true;\n }\n\n return $return;\n }", "function isApproved() {\n return $this->getStatus() == UserpointsTransaction::STATUS_APPROVED;\n }", "function is_approved() {\n\t\treturn $this->get_data( 'comment_approved' );\n\t}", "public function update(User $user, UserRating $userRating)\n {\n if ($user->{'user-id'} === $userRating->{'rated_by'}) {\n return true;\n }\n\n return false;\n }", "public function isExistingReview(): bool\n {\n $review = ShopFeedbackEntity::findOne([\n 'created_by' => (!isset(Yii::$app->request->post()['created_by']))\n ? Yii::$app->user->identity->getId() : Yii::$app->request->post()['created_by'],\n 'shop_id' => Yii::$app->request->post()['shop_id']]);\n if (!$review) {\n $this->addError('created_by',\n Yii::t('app', 'Отзыв не найден'));\n return false;\n } else {\n return true;\n }\n }", "public function isLikedByCurrentUser($ratableId)\n {\n $rate = $this\n ->entityManager\n ->getRepository('RateBundle:Rate')\n ->findOneBy(\n [\n 'ratable' => $ratableId,\n 'user' => $this->getCurrentUser()\n ]\n );\n\n return !empty($rate);\n }", "private function isViewed() {\n $viewKey = $this->getViewKey();\n\n if ( Auth::check() ) {\n $viewed = Cache::get($viewKey.':user:'.Auth::user()->id);\n return !empty($viewed);\n } else {\n $time = session($viewKey);\n if ( !empty($time) ) {\n $viewed = (time() - $time) < config('counter.viewCountDuration') * 60;\n } else {\n $viewed = false;\n }\n return $viewed;\n }\n }", "public function hasActiveUser()\n {\n return $this->user && $this->user->active;\n }", "public function hasBeenRatedByUser(BaseObject $object, $user_id)\n {\n if (is_null($user_id) or trim((string)$user_id) === '')\n {\n throw new sfRatingException(\n 'Impossible to check a user rating with no user primary key provided');\n }\n $c = new Criteria();\n $c->add(sfRatingPeer::RATABLE_ID, sfRatingToolkit::getReferenceKey($object));\n $c->add(sfRatingPeer::RATABLE_MODEL, get_class($object));\n $c->add(sfRatingPeer::USER_ID, $user_id);\n $c->clearSelectColumns();\n $c->addSelectColumn(sfRatingPeer::ID);\n $c->setLimit(1);\n return sfRatingPeer::doSelectRS($c)->getRecordCount() > 0;\n }", "public function approve()\n {\n $post = new PostBag();\n $id = $post->fetchInt('id');\n \n $this->db->query(\"UPDATE `film_review` SET `status` = 'show' WHERE `id` = {$id} LIMIT 1\");\n if (!empty($this->db->error)) {\n return false;\n }\n\n $result = $this->db->query(\"SELECT `userId` FROM `film_review` WHERE `id` = {$id} LIMIT 1\");\n if ($row = $result->fetch_assoc()) {\n $this->db->query(\"UPDATE `user` SET `count_review` = `count_review` + 1 WHERE `id` = {$row['userId']} LIMIT 1\");\n }\n \n return true;\n }", "public function validateReviewer(): bool\n {\n $review = self::find()\n ->select(['shop_feedback.id', 'shop_feedback.shop_id', 'shop_feedback.created_by'])\n ->where(['shop_feedback.shop_id' => $this->shop_id, 'shop_feedback.created_by' => $this->created_by])\n ->asArray()\n ->one();\n if(!empty($review)){\n $this->addError('created_by',\n Yii::t('app', 'Вы уже добавляли отзыв об этом магазине, но Вы можете его изменить'));\n return false;\n } else {\n return true;\n }\n }", "private function isReviewSendingEnabled()\n {\n return $this->_scopeConfig->getValue(\n AntavoConfigInterface::XML_PATH_REVIEW_EVENT_SENDING,\n ScopeInterface::SCOPE_STORES,\n $this->_storeManager->getStore()->getId()\n );\n }", "public function isViewed() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->viewDate) ? false: true;\r\n\t}", "public function view(User $user, Interview $interview)\n {\n if($user->hasPermissionTo('view interview')){\n if(!$user->hasAnyRole(['Super Admin', 'Admin'])){\n return $interview->user_id == $user->id;\n } else {\n return true;\n }\n }\n return true;\n }", "function eman_post_reviewable( $post )\n{\n\t// Get current post status\n\t$status = emanager_post::status($post, 'slug');\n\tif ( $status && ! in_array($status, array('void','approved','approve','draft','revise','executed')) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function inReview()\n {\n return $this->state(function (array $attributes) {\n return [\n 'status' => 'Review',\n ];\n });\n }", "function is_active()\n {\n return $this->userData[$this->user_active];\n }", "protected function AllowSendAuthorReviewCommentNotification()\n {\n $bAllowSendAuthorCommentNotification = false;\n if ($this->fieldSendCommentNotification) {\n if (!empty($this->fieldAuthorEmail) || !empty($this->fieldDataExtranetUserId)) {\n $bAllowSendAuthorCommentNotification = true;\n }\n }\n\n return $bAllowSendAuthorCommentNotification;\n }", "public function approve(User $user)\n {\n return $user->role->can_approve_posts == 1;\n }", "public function isActive()\n {\n return ($this->slug == \"actief\");\n }", "public function canRating($customerId, $productId)\n {\n if ($customerId == \"\") {\n return false;\n }\n\n $order = TblOrder::select('tbl_order.order_id', 'tbl_order.customer_id')\n ->leftJoin('order_details as dt', 'tbl_order.order_id', '=', 'dt.order_id')\n ->where('tbl_order.order_status', 4)\n ->where('tbl_order.customer_id', $customerId)\n ->where('dt.product_id', $productId)\n ->get();\n\n $rated = Rating::where('customer_id', $customerId)->where('product_id', $productId)->get();\n\n if (count($rated) == 0 && count($order) > 0) {\n return true;\n }\n \n return false;\n }", "function validReview($db_connection)\n\t\t\t\t{\n\t\t\t\t\t$loginCheck = $session_check = isset($_SESSION['logged_in']) && isset($_SESSION['username']) && isset($_SESSION['permission_id']);\n\t\t\t\t\t// user is logged in, movie is associated with reivew, and there is an actual review submitted\n\t\t\t\t\tif(isset($_POST['movieid']) && isset($_POST['review']) && isset($_POST['rating']) && $loginCheck)\n\t\t\t\t\t{\n\t\t\t\t\t\t// review is not empty nor exceeding max length\n\t\t\t\t\t\tif($_POST['review'] != '' && strlen($_POST['review']) <= 65535)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(userHasReviewed($db_connection,$_POST['movieid']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"Can't review a film more than once.<br>\";\n\t\t\t\t\t\t\treturn false;\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\techo \"ERROR: Review is either empty or too long (max. 65535 characters).<br>\";\n\t\t\t\t\t\t\treturn false;\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{\n\t\t\t\t\t\techo \"ERROR: Either not logged in, or there is no movieid associated with this review.<br>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}", "public function review($userid, $filtered = false) {\n\n global $DB;\n $overall = false;\n\n foreach ($this->params as $param) {\n $badge = $DB->get_record('badge', array('id' => $param['badge']));\n // See if the user has earned this badge.\n $awarded = $DB->get_record('badge_issued', array('badgeid' => $param['badge'], 'userid' => $userid));\n\n // Extra check in case a badge was deleted while this badge is still active.\n if (!$badge) {\n if ($this->method == BADGE_CRITERIA_AGGREGATION_ALL) {\n return false;\n } else {\n continue;\n }\n }\n\n if ($this->method == BADGE_CRITERIA_AGGREGATION_ALL) {\n\n if ($awarded) {\n $overall = true;\n continue;\n } else {\n return false;\n }\n } else if ($this->method == BADGE_CRITERIA_AGGREGATION_ANY) {\n if ($awarded) {\n return true;\n } else {\n $overall = false;\n continue;\n }\n }\n }\n\n return $overall;\n }", "public function isLiked()\n {\n return $this->getData('likes.is_liked', false) === true;\n }", "public function isRecommendedBy(User $user)\n {\n return $this->recommendations()\n ->where('user_id', $user->id)\n ->exists();\n }", "public function check_auth_reviews() {\n\t\tif ( isset( $_GET['wp_confirm_reviews_insurance'] ) ) {\n\n\t\t\t//check auth Code\n\t\t\t$comment_id = Helper::check_auth_comment( $_GET['wp_confirm_reviews_insurance'] );\n\t\t\tif ( $comment_id != false ) {\n\n\t\t\t\t//remove meta Key\n\t\t\t\tdelete_comment_meta( $comment_id, 'auth_key' );\n\n\t\t\t\t//Add Validate User Reviews\n\t\t\t\tupdate_comment_meta( $comment_id, 'comment_approve_user', 'yes' );\n\n\t\t\t\t//Show Alert\n\t\t\t\techo '<div class=\"confirm-review-alert\">' . WP_REVIEWS_INSURANCE::$option['email_thanks_text'] . '</div>';\n\t\t\t\techo '\n\t\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t jQuery(\".confirm-review-alert\").delay(1500).fadeOut(\"normal\"); \n\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t}\n\t\t}\n\t}", "public function checkUserReview($user, $company){\n\n\t\tforeach($company['reviews'] as $reviews){\n\t\t\tif($reviews['user'] == $user){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function return(User $user, Project $project)\n {\n // if user is not a reviewer, do not authorize\n if ($user->role->name != 'reviewer') {\n return false;\n }\n\n // get operating units being reviewed by user\n $ous = $user->reviews->pluck('id')->toArray();\n // get operating unit owner of project\n $ou = $project->operating_unit_id;\n\n // check if reviewer is assigned to review ou project\n $result = in_array($ou, $ous);\n\n // return result\n return $result;\n }", "public function update(User $user, Rating $rating)\n {\n return $user->id === $rating->user_id;\n }", "function isActive() {\n\t\treturn ($this->getActive() == self::PROFILE_ACTIVE);\n\t}", "public function validate(User $user, Project $project)\n {\n // if user is not a reviewer, do not authorize\n if ($user->role->name != 'reviewer') {\n return false;\n }\n\n // get operating units being reviewed by user\n $ous = $user->reviews->pluck('id')->toArray();\n // get operating unit owner of project\n $ou = $project->operating_unit_id;\n\n // check if reviewer is assigned to review ou project\n $result = in_array($ou, $ous);\n\n // return result\n return $result;\n }", "public function validateIsActive() : bool\n {\n return $this->user_active ? true : false;\n }", "public function recommend(User $mod, User $user) {\n return $mod->getLastStatus()->status == 'moderator' &&\n $user->getLastStatus()->status == 'active';\n }", "public function hasBeenRated(BaseObject $object)\n {\n $c = new Criteria();\n $c->add(sfRatingPeer::RATABLE_ID, sfRatingToolkit::getReferenceKey($object));\n $c->add(sfRatingPeer::RATABLE_MODEL, get_class($object));\n $c->clearSelectColumns();\n $c->addSelectColumn(sfRatingPeer::ID);\n $c->setLimit(1);\n return sfRatingPeer::doSelectRS($c)->getRecordCount() > 0;\n }", "public function isOrsApproved() {\r\n global $db;\r\n\r\n $sql = sprintf('SELECT approvalType.type, approvalType.friendlyName, approvals.*\r\n FROM forms_tracking_approvals as approvals\r\n LEFT JOIN forms_approval_type as approvalType ON approvals.approval_type_id = approvalType.id\r\n WHERE `approvals`.`tracking_id` = %s AND `approval_type_id` IN (%s, %s)'\r\n , $this->trackingFormId, COI, ORS_REVIEW);\r\n $approvals = $db->getAll($sql);\r\n\r\n if(empty($approvals)) {\r\n return true; // no required approvals we assume approved.\r\n } else {\r\n $numApprovals = count($approvals);\r\n $i = 0;\r\n $approved = 1;\r\n // iterate through each approval and bitwise 'and' with the previous result\r\n while($i < $numApprovals) {\r\n $approved = $approvals[$i]['approved'] & $approved;\r\n $i++;\r\n }\r\n }\r\n\r\n return $approved;\r\n }", "public function isProposition()\n {\n $u = $this->user()->first();\n\n return auth()->user()->id != $u->id;\n }", "protected function renewal(): bool\n {\n // If we're not in a webhook, it's not possible to be an auto-renewal\n if (!$this->webhook) {\n return false;\n }\n\n // Check if the user's active sub is from before the current date\n /** @var \\Laravel\\Cashier\\Subscription $sub */\n $sub = \\Laravel\\Cashier\\Subscription::where('user_id', $this->user->id)->where('stripe_status', 'active')->first();\n if (empty($sub)) {\n return false;\n }\n return $sub->created_at->lessThan(Carbon::yesterday());\n }", "public function approved()\n\t{\n\t\treturn $this->response[0] === self::APPROVED;\n\t}", "public function authorize()\n {\n // $user = app( 'auth' )->user();\n // $rsvp = Rsvp::findOrFail( $this->rsvps );\n\n // return $rsvp->user_id === $user->id;\n return true;\n }", "public function isSellerSubscriptionEnabled() {\n return $this->scopeConfig->getValue ( static::XML_SUBSCRIPTION_REVIEW, ScopeInterface::SCOPE_STORE );\n }", "public function show(?User $user, CommunityVote $communityVote): bool\n {\n $status = $communityVote->status();\n if ($status == CommunityVote::STATUS_PUBLISHED) {\n return true;\n }\n // If it's not published and we aren't logged in, nope nope nope\n if (empty($user)) {\n return false;\n }\n\n if ($status == CommunityVote::STATUS_VOTING) {\n return $user->isGoblinPatron();\n }\n\n // Scheduled and Draft are limited to admins\n return $user->hasRole('admin');\n }", "function is_paying_or_trial__premium_only() {\n\t\t\treturn $this->is_premium() && $this->is_paying_or_trial();\n\t\t}", "public function vote(User $user, CommunityVote $communityVote): bool\n {\n $status = $communityVote->status();\n if ($status == CommunityVote::STATUS_PUBLISHED) {\n return true;\n } elseif ($status == CommunityVote::STATUS_VOTING) {\n return $user->isGoblinPatron();\n }\n\n // Not in a voting phase\n return false;\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function isViewable()\n {\n return ($this->isPublished() && $this->isActive());\n }", "private function isUserMode()\n {\n $isAdminMode = false;\n $acronym = isset($_SESSION['user']) ? $_SESSION['user']->acronym : null;\n if (isset($acronym)) {\n $isAdminMode = true;\n }\n\n return $isAdminMode;\n }", "function isRead() {\n\t\t$submissionDao = Application::getSubmissionDAO();\n\t\t$userGroupDao = DAORegistry::getDAO('UserGroupDAO');\n\t\t$userStageAssignmentDao = DAORegistry::getDAO('UserStageAssignmentDAO');\n\t\t$viewsDao = DAORegistry::getDAO('ViewsDAO');\n\n\t\t$submission = $submissionDao->getById($this->getSubmissionId());\n\n\t\t// Get the user groups for this stage\n\t\t$userGroups = $userGroupDao->getUserGroupsByStage(\n\t\t\t$submission->getContextId(),\n\t\t\t$this->getStageId()\n\t\t);\n\t\twhile ($userGroup = $userGroups->next()) {\n\t\t\t$roleId = $userGroup->getRoleId();\n\t\t\tif ($roleId != ROLE_ID_MANAGER && $roleId != ROLE_ID_SUB_EDITOR) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Get the users assigned to this stage and user group\n\t\t\t$stageUsers = $userStageAssignmentDao->getUsersBySubmissionAndStageId(\n\t\t\t\t$this->getSubmissionId(),\n\t\t\t\t$this->getStageId(),\n\t\t\t\t$userGroup->getId()\n\t\t\t);\n\n\t\t\t// Check if any of these users have viewed it\n\t\t\twhile ($user = $stageUsers->next()) {\n\t\t\t\tif ($viewsDao->getLastViewDate(\n\t\t\t\t\tASSOC_TYPE_REVIEW_RESPONSE,\n\t\t\t\t\t$this->getId(),\n\t\t\t\t\t$user->getId()\n\t\t\t\t)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function isLiked()\n {\n if(!is_null($this->isLiked)) {\n return $this->isLiked;\n }\n\n if(!$this->object->likes->isEmpty()) {\n $this->object->likes->each(function(Like $like) {\n if($like->user_id == $this->user->getPrimaryId()) {\n return $this->isLiked = true;\n }\n });\n }\n\n if($this->isLiked) {\n return true;\n }\n\n return $this->isLiked = false;\n }", "public function isLiked()\n {\n if(!is_null($this->isLiked)) {\n return $this->isLiked;\n }\n\n if(!$this->object->likes->isEmpty()) {\n $this->object->likes->each(function(Like $like) {\n if($like->user_id == $this->user->getPrimaryId()) {\n return $this->isLiked = true;\n }\n });\n }\n\n if($this->isLiked) {\n return true;\n }\n\n return $this->isLiked = false;\n }", "public function isAutoApproved($user_id, $story_type){\n\t\t$user = User::findOrFail($user_id);\n\n\t\tif($story_type == 'news' || $story_type == 'advisory' || $story_type == 'statement'){\n\t\t\tforeach($user->roles()->get() as $role){\n\t\t\t\tif($role->name == 'auto_approved'){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function isActive(){\n\t\treturn $this->getSessionID() == $this->getUser()->getShift() && $this->getStatus() == '1' ? true : false;\n\t}", "public function isActive (){\n if($this->is_active == 1) {\n return true;\n }else{\n return false;\n }\n }", "public function hasPostAuthentication()\n {\n return isset($this->sessionStorage->user['twofactor_activated']) && $this->sessionStorage->user['twofactor_activated'] === true;\n }", "public function isLiked(){\n $likeKey = $this->getLikeKey();\n if ( Auth::check() ){\n $isLiked = $this->user_counters()->where('user_id', Auth::user()->id)->where('action', 'like')->count();\n return $isLiked;\n } else {\n $isLiked = session($likeKey);\n return !empty($isLiked);\n }\n }", "function getReviewRoundJoin() {\n\t\treturn false;\n\t}", "public function canMyLikes() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\t\treturn true;\n }", "public static function getUserHasRating(PDO $db, int $userID): bool {\r\n return (UserRatings::getUserRatingCount($db, $userID) > 0);\r\n }", "public function isAutoApproval ()\n {\n return $this->scopeConfig->isSetFlag(\n 'b2bregistration/approval/auto_approval',\n ScopeInterface::SCOPE_STORE\n );\n }", "public function getIsLikedAttribute()\n {\n $like = $this->likes()->whereUserId(Auth::id())->first();\n return (!is_null($like)) ? true : false;\n }", "public function isActive() : bool\n {\n if (!isset($this->data['active'])) {\n return false;\n }\n return ($this->data['active'] === true || $this->data['active'] === 'Y');\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function view(User $user, AreaPricing $area_pricing)\n {\n return $user->isAdmin() || $user->isSupervisor();\n }", "public function view(User $user, Approval $resource)\n {\n return $user->can('read-approvals');\n }", "protected function isCurrentUser()\n {\n return ($this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id);\n }", "function userLiked($post_id)\n{\n usersOnly();\n global $conn;\n$user_id=$_SESSION['id'];\n $sql = \"SELECT * FROM rating WHERE user_id=$user_id\n \t\t AND post_id=$post_id AND rating=1\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n \treturn true;\n }else{\n \treturn false;\n }\n}", "public function user_has_access( WP_User $user ): bool {\n\t\t\t$has_access = false;\n\n\t\t\tif ( $user->ID > 0 ) {\n\t\t\t\tif ( learndash_is_course_post( $this->post ) ) {\n\t\t\t\t\t$has_access = sfwd_lms_has_access( $this->post->ID, $user->ID );\n\t\t\t\t} elseif ( learndash_is_group_post( $this->post ) ) {\n\t\t\t\t\t$has_access = learndash_is_user_in_group( $user->ID, $this->post->ID );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Filters whether a user has access to a product.\n\t\t\t *\n\t\t\t * @since 4.5.0\n\t\t\t *\n\t\t\t * @param bool $has_access True if a user has access, false otherwise.\n\t\t\t * @param Learndash_Product_Model $product Product model.\n\t\t\t * @param WP_User $user User.\n\t\t\t *\n\t\t\t * @return bool True if a user has access, false otherwise.\n\t\t\t */\n\t\t\treturn apply_filters( 'learndash_model_product_user_has_access', $has_access, $this, $user );\n\t\t}", "public function view(User $user)\n {\n return $user->hasRole('seller') && !is_null($user->client);\n }", "public function getReviewRating() : int {\n\t\treturn ($this->reviewRating);\n\t}", "public function isMarried()\n {\n return $this->getProfile() ? $this->getProfile()->isMarried() : false;\n }", "public function isActiveOrPending()\n {\n return $this->isApproved() || $this->isPending();\n }", "public function view(User $user, Attraction $attraction)\n {\n return $user->role === \"Guider\" || $user->role === \"Traveler\" && $user->id === $attraction->user_id;\n }", "public function canRateFor($recipe)\n {\n \t// only authenticated users can rate recipes\n if(!$this->isAuthenticated())\n {\n return false;\n }\n \n //Users can only rate a recipe once\n \n $c = new Criteria();\n $c->add(RatePeer::USER_ID, $this->getSubscriberId()) ;\n $c->add(RatePeer::RECIPE_ID, $recipe->getRecipeId());\n $rate = RatePeer::doSelectOne($c);\n\n return ($rate) ? false : true;\n }", "public function RateReview($bRateUp = true)\n {\n if (false == $this->ReviewRatedByActiveUser()) {\n $sRateString = 'helpful_count';\n //helpful_count\n //not_helpful_count\n if (false == $bRateUp) {\n $sRateString = 'not_helpful_count';\n }\n $query = 'UPDATE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"`\n SET `{$sRateString}` = `{$sRateString}`+1\n WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\n LIMIT 1\n \";\n MySqlLegacySupport::getInstance()->query($query);\n // get value from disc\n $query = \"SELECT `{$sRateString}` FROM `\".MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"` WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\";\n if ($aTmp = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {\n $this->sqlData[$sRateString] = $aTmp[$sRateString];\n if ($bRateUp) {\n $this->fieldHelpfulCount = $this->sqlData[$sRateString];\n } else {\n $this->fieldNotHelpfulCount = $this->sqlData[$sRateString];\n }\n }\n if (!array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION)) {\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'] = array();\n }\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'][(string) $this->id] = time();\n }\n }", "public function view(User $user, AnsweredTest $answeredTest)\n {\n $gr = GradeClass::find($answeredTest->grade_class_id);\n if($user->access_level > 1 && $gr->school_id == $user->school_id){\n return true;\n }\n else{\n\n foreach ($user->classes() as $class){\n if($class->id == $gr->id){\n return true;\n }\n }\n }\n }", "public function authorize()\n {\n $user = Auth::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }" ]
[ "0.79210323", "0.7343933", "0.73397344", "0.70348465", "0.6987907", "0.6938265", "0.6918459", "0.6846302", "0.6816862", "0.6707456", "0.65602124", "0.64457566", "0.6390543", "0.6310057", "0.62967175", "0.6293156", "0.6281764", "0.62218934", "0.61019486", "0.6051439", "0.60378516", "0.60016984", "0.59741", "0.5932592", "0.5929066", "0.59208304", "0.59155864", "0.5905382", "0.59031194", "0.5901636", "0.5901533", "0.5893781", "0.58855474", "0.5883919", "0.58833027", "0.58796847", "0.5871211", "0.58484745", "0.58318436", "0.58306545", "0.5815014", "0.580751", "0.5773601", "0.5758385", "0.5742772", "0.5735933", "0.57289326", "0.57241535", "0.57049006", "0.5688727", "0.56838757", "0.5680556", "0.56794935", "0.56725615", "0.56706685", "0.56639403", "0.56636584", "0.5659691", "0.5656362", "0.5648152", "0.5648047", "0.5646783", "0.56458986", "0.56420517", "0.56325436", "0.5624799", "0.55900085", "0.55883414", "0.55808705", "0.5576544", "0.5572621", "0.55673903", "0.5565364", "0.5565364", "0.55613136", "0.55578625", "0.55493164", "0.5549168", "0.55482644", "0.55477506", "0.5539799", "0.55328333", "0.55325764", "0.5520081", "0.5513097", "0.55072653", "0.55057913", "0.5500876", "0.54922277", "0.5489434", "0.5483785", "0.5477691", "0.5471029", "0.5459018", "0.5457286", "0.5453514", "0.54532397", "0.54478455", "0.544551", "0.54449826" ]
0.7973426
0
vote the review up or down.
public function RateReview($bRateUp = true) { if (false == $this->ReviewRatedByActiveUser()) { $sRateString = 'helpful_count'; //helpful_count //not_helpful_count if (false == $bRateUp) { $sRateString = 'not_helpful_count'; } $query = 'UPDATE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->table)."` SET `{$sRateString}` = `{$sRateString}`+1 WHERE `id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' LIMIT 1 "; MySqlLegacySupport::getInstance()->query($query); // get value from disc $query = "SELECT `{$sRateString}` FROM `".MySqlLegacySupport::getInstance()->real_escape_string($this->table)."` WHERE `id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'"; if ($aTmp = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { $this->sqlData[$sRateString] = $aTmp[$sRateString]; if ($bRateUp) { $this->fieldHelpfulCount = $this->sqlData[$sRateString]; } else { $this->fieldNotHelpfulCount = $this->sqlData[$sRateString]; } } if (!array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION)) { $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'] = array(); } $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'][(string) $this->id] = time(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postvoting()\n {\n $userid = Auth::user()->id; \n $reviewid = Input::get('review_id');\n $vote = Input::get('vote');\n\n $status = Vote::where('user_id', $userid)->where('review_id',$reviewid)->pluck('vote'); \n\n $up = Review::where('id',$reviewid)->pluck('upvote');\n $down = Review::where('id',$reviewid)->pluck('downvote');\n\n if($status == NULL)\n { \n\n $this->vote->user_id = $userid;\n $this->vote->review_id = $reviewid;\n $this->vote->vote = $vote;\n $this->vote->save();\n\n if($vote == 1)\n Review::where('id',$reviewid)->update(array('upvote' => ($up + 1)));\n else\n Review::where('id', $reviewid)->update(array('downvote' => ($down +1))); \n\n } \n\n else if($status != $vote)\n {\n Vote::where('user_id',$userid)->where('review_id',$reviewid)->update(array('vote' => $vote)); \n\n if($vote == 1)\n {\n Review::where('id',$reviewid)->update(array('upvote' => ($up + 1), 'downvote' =>($down -1)));\n }\n else\n {\n Review::where('id', $reviewid)->update(array('downvote' => ($down +1),'upvote' =>($up -1))); \n } \n }\n else\n {\n Vote::where('user_id',$userid)->where('review_id',$reviewid)->delete();\n\n\n if($vote == 1)\n Review::where('id',$reviewid)->update(array('upvote' => ($up - 1)));\n else\n Review::where('id', $reviewid)->update(array('downvote' => ($down -1))); \n\n\n\n }\n\n $up = Review::where('id',$reviewid)->pluck('upvote');\n $down = Review::where('id',$reviewid)->pluck('downvote');\n\n Review::where('id', $reviewid)->update(array('popularity_index' => ($up - $down))); \n\n }", "function user_vote()\n{\n\n // nonce check for an extra layer of security, the function will exit if it fails\n if (!wp_verify_nonce($_REQUEST['nonce'], \"user_vote_nonce\")) {\n exit(\"nonce error\");\n }\n\n $post_id = $_REQUEST[\"post_id\"];\n $vote_direction = $_REQUEST[\"vote_direction\"];\n\n // fetch vote_count for a post, set it to 0 if it's empty, increment it when a click is registered\n $old_vote_count = get_post_meta($post_id, \"votes\", true);\n $old_vote_count = ($old_vote_count == '') ? 0 : $old_vote_count;\n $new_vote_count = $old_vote_count;\n\n //voted post structure\n //$voted_posts = array(\"1\" => 0, \"5\" => 1, \"7\" => -1);\n\n $previous_vote_direction = get_vote_direction_meta($post_id);\n //if previous vote in middle regular vote apply: $previous_vote_direction == 0\n\n //if vote remove: $vote_direction == $previous_vote_direction\n // add negative vote direction to old vote count\n // set vote direction to middle\n\n //if vote swap: $vote_direction != $previous_vote_direction\n // add 2 times vote directions to old vote count\n // set vote meta to vote direction\n\n if($previous_vote_direction == 0){\n $new_vote_count += $vote_direction;\n set_user_vote_direction($post_id, $vote_direction);\n }elseif ($vote_direction == $previous_vote_direction){\n $new_vote_count = $old_vote_count - $vote_direction;\n set_user_vote_direction($post_id, 0);\n }elseif ($vote_direction != $previous_vote_direction){\n $new_vote_count = $old_vote_count + 2*$vote_direction;\n set_user_vote_direction($post_id, $vote_direction);\n }\n\n\n $vote = update_post_meta($post_id, \"votes\", $new_vote_count);\n\n\n // If above action fails, result type is set to 'error' and vote_count set to old value, if success, updated to new_vote_count\n if ($vote === false) {\n $result['type'] = \"error\";\n $result['vote_count'] = $old_vote_count;\n } else {\n $result['type'] = \"success\";\n $result['vote_count'] = $new_vote_count;\n }\n\n // Check if action was fired via Ajax call. If yes, JS code will be triggered, else the user is redirected to the post page\n if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {\n $result = json_encode($result);\n echo $result;\n } else {\n header(\"Location: \" . $_SERVER[\"HTTP_REFERER\"]);\n }\n\n die();\n}", "function btnUp($revid, $revUsr){\n\t\t\tglobal $dbLink;\n\t\t\t$temp = '<img src=\"img/voteup.png\" alt=\"Vote up button\">';\n\t\t\tif(isset($_SESSION['userid']) AND $_SESSION['userid'] != $revUsr){\n\t\t\t\t$sqlStr = \"SELECT * FROM votes WHERE user_id=\" . $_SESSION['userid'] . \" AND \" . \"review_id=\" . $revid;\n\t\t\t\t$result = mysqli_query($dbLink, $sqlStr) or die(\"Could not get items..\" . mysqli_error($dbLink));\n\t\t\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t\t\tif ($row[\"user_vote\"] == 1){\n\t\t\t\t\t\t$temp = '<img src=\"img/voteup2.png\" alt=\"Vote up button\">';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\treturn $temp;\n\t}", "public function upVoteAction()\n {\n $id = $this->params()->fromRoute(\"id\");\n $model = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\")->fetchById($id);\n $currentVotes = $model->getUpVotes();\n $model->setUpVotes(($currentVotes+1));\n $result = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\")->update($model);\n return $this->redirect()->toRoute('blog-post');\n }", "function postvote($postid,$vtype)\n\t{\n\t\tif ($vtype == 'up') {\n\t\t\t$this->db->set('upvotes','upvotes+1',FALSE);\n\t\t}\n\t\telse {\n\t\t\t$this->db->set('downvotes','downvotes+1',FALSE);\n\t\t}\n\t\t$this->db->where('id',$postid);\n\t\t$this->db->update($this->posts_table);\n\t\treturn true;\n\t}", "function commentvote($postid,$vtype)\n\t{\n\t\tif ($vtype == 'up') {\n\t\t\t$this->db->set('upvotes','upvotes+1',FALSE);\n\t\t}\n\t\telse {\n\t\t\t$this->db->set('downvotes','downvotes+1',FALSE);\n\t\t}\n\t\t$this->db->where('id',$postid);\n\t\t$this->db->update($this->comments_table);\n\t\treturn true;\n\t}", "public function vote()\n\t{\n\t\t// print \"Hello from JoomooratingController::vote() in file controller.php<br />\\n\";\n\n\t\t$link = JRequest::getVar( 'readmore_link', 'index.php' );\n\n\t\trequire_once $this->_parentModelPath;\n\t\trequire_once $this->_ratingModelPath;\n\t\t$this->_ratingModel = new JoomooRatingModelJoomooRating();\n\n\t\t$rating = JRequest::getVar( 'rating', null );\n\t\t$votedOk = $this->_ratingModel->vote( $rating );\n\t\t$message = '';\n\n\t\tif ( $votedOk )\n\t\t{\n\t\t\t$message .= 'Thanks for your vote (' . $rating . ')!';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errorMessage = $this->_ratingModel->getError();\n\t\t\tif ( 0 < strlen($errorMessage) )\n\t\t\t{\n\t\t\t\t$message .= \"Error saving vote: \" . $errorMessage . '<br />';\n\t\t\t\t$message .= 'Please try again.';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$message .= 'Something went wrong and we are unable to save your vote at this time.<br />';\n\t\t\t\t$message .= 'Please try again later.';\n\t\t\t}\n\t\t}\n\n\t\t//\tprint \"post_comment not redirecting; link = \" . $link . \"; message = \" . $message . \"<br />\\n\";\n\t\t$this->setRedirect( $link, $message );\n\n\t\treturn $votedOk;\n\t}", "public function testvote()\n {\n $this->vote_answer = Vote::vote($this->user->id, $this->answer->id, 1, 'answer_id');\n if (!$this->answer) return false;\n }", "public function vote()\n {\n if (!Auth::check()) {\n return redirect(route('login'));\n }\n\n #Let's Vote.\n\n if($this->hasVoted){\n #Yes, Remove Vote\n // dd('Voted');\n try {\n $this->idea->removeVote(Auth::user());\n } catch (VoteNotFoundException $ex) {\n // Do nothing.\n }\n\n $this->votesCount--;\n $this->hasVoted = false;\n\n }else{\n #No, Add Vote\n try {\n $this->idea->vote(Auth::user());\n } catch (DuplicateVoteException $ex) {\n // Do nothing.\n }\n\n $this->votesCount++;\n $this->hasVoted = true;\n }\n }", "public function update_to_upvote($target,$user,$type,$up,$down){\n $update = Vote::where('type','=',$type)\n ->where('target','=',$target)\n ->where('username','=',$user)\n ->update(array(\n 'up' => $up,\n 'down' => $down\n ));\n if($update){\n if($type === \"post\"){\n Notify::remove_postvote($target, $user);\n }\n \n if($type === \"comment\"){\n Notify::commentvote($target,$user);\n }\n \n \n if($type === \"reply\"){\n Notify::replyvote($target,$user);\n }\n \n \n $this->updatePoints($type,$target);\n return Response::json(array('action' => true,'count'=> $this->countVotes($type,$target)));\n }else{\n return Response::json(array('action' => false,'count'=> $this->countVotes($type,$target)));\n }\n }", "function btnDown($revid, $revUsr){\n\t\t\tglobal $dbLink;\n\t\t\t$temp = '<img src=\"img/votedown.png\" alt=\"Vote down button\">';\n\n\t\t\tif(isset($_SESSION['userid']) AND $_SESSION['userid'] != $revUsr){\n\t\t\t\t$sqlStr = \"SELECT * FROM votes WHERE user_id=\" . $_SESSION['userid'] . \" AND \" . \"review_id=\" . $revid;\n\t\t\t\t$result = mysqli_query($dbLink, $sqlStr) or die(\"Could not get items..\" . mysqli_error($dbLink));\n\t\t\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t\t\tif ($row[\"user_vote\"] == -1){\n\t\t\t\t\t\t$temp = '<img src=\"img/votedown2.png\" alt=\"Vote down button\">';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn $temp;\n\t}", "function vote_tip_up($id, $uname) {\n $sql = '\n UPDATE\n tips\n SET\n score = score + 1\n WHERE\n id=?\n ';\n \n $upd_res = $this->prep_and_exec($sql, [$id]);\n $ins_res = $this->insert_vote($id, $uname, true);\n \n return ($upd_res && $ins_res);\n }", "static function upVote($post_id){\n\n\t\tsession_start();\n\t\t$username = $_SESSION['user']->getUsername();\n\t\t$db = (new Database())->connectToDatabase();\n\t\t//fIRSTLY CHECK IF USER IS THE AUTHOR OF THE ANSWER?\n\t\t//\n\t\t\n\t\t$db->query(\"SELECT * FROM post WHERE user_name='$username' AND post_id=$post_id\");\n\n\n\t\t\n\t\tif($db->returned_rows==0)\n\t\t{\n\t\t\t//has this user already voted?\n\t\t\t$db->query(\"SELECT * FROM post_votes WHERE post_id=$post_id AND user_name='$username'\");\n\t\t\tif(($db->returned_rows)==1){\n\t\t\t//user has not voted on this answer\n\t\t\t//increase reputation of user who answered\n\t\t\t\n\t\t\t$db->query(\"DELETE FROM post_votes WHERE post_id=$post_id AND user_name='$username'\");\n\t\t\t}\n\t\t//finally insert his vote\n\t\t$db->insert('post_votes',array('post_id'=>$post_id,'user_name'=>$username,'vote_type'=>1));\n\t\t//200=OKAY\n\t\treturn array('status_code'=>200);\n\t\t}\n\t\telse{\n\t\t\t//user has already voted on this post\n\t\t\t//400=BAD REQUEST\n\t\t\treturn array('status_code'=>400,'detail'=>'user is the author of the answer');\n\t\t}\n\n\t}", "function upvote($videoid){\n \t$realid = pg_escape_string($videoid);\n \t$query1 = \"SELECT upvotes FROM video where idvideo = \".$realid;\n \t$link = createConection();\n \tif($row = pg_fetch_array(pg_exec($link,$query1))){\n \t\t$total = $row['upvotes'] + 1;\n \t\t$query2 = \"UPDATE video set upvotes = \".$total.\" where idvideo = \".$realid.\";\";\n \t\tpg_exec($link, $query2);\n \t\tcloseConection($link);\n \t\treturn true;\n \t}else{\n \t\tcloseConection($link);\n \t\treturn false;\n \t}\n }", "public function test_user_cannot_both_upvote_and_downvote() {\n\n $user = User::create('bar@email.com', 'secret', 'Jane Doe');\n $this->message->upvote($user);\n $this->message->downvote($user);\n $this->assertEquals(0, $this->message->getUpvotes());\n $this->assertEquals(1, $this->message->getDownvotes());\n\n $this->message->downvote($user);\n $this->message->upvote($user);\n $this->assertEquals(1, $this->message->getUpvotes());\n $this->assertEquals(0, $this->message->getDownvotes());\n\n }", "function vote_tip_down($id, $uname) {\n $sql = '\n UPDATE\n tips\n SET\n score = score - 1\n WHERE\n id=?\n ';\n \n $upd_res = $this->prep_and_exec($sql, [$id]);\n $ins_res = $this->insert_vote($id, $uname, false);\n \n return ($upd_res && $ins_res);\n }", "public function downVoteAction()\n {\n $id = $this->params()->fromRoute(\"id\");\n $model = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\")->fetchById($id);\n $currentVotes = $model->getDownVotes();\n $model->setDownVotes(($currentVotes+1));\n $result = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\")->update($model);\n return $this->redirect()->toRoute('blog-post');\n }", "public function update_to_downvote($target,$user,$type,$up,$down){\n $update = Vote::where('type','=',$type)\n ->where('target','=',$target)\n ->where('username','=',$user)\n ->update(array(\n 'up' => $up,\n 'down' => $down\n ));\n if($update){\n \n if($type === \"post\"){\n Notify::remove_postvote($target, $user);\n }\n \n if($type === \"comment\"){\n Notify::remove_commentvote($target,$user);\n }\n \n if($type === \"reply\"){\n Notify::remove_replyvote($target,$user);\n }\n $this->updatePoints($type,$target);\n return Response::json(array('action' => true,'count'=> $this->countVotes($type,$target)));\n }else{\n return Response::json(array('action' => false,'count'=> $this->countVotes($type,$target)));\n }\n }", "public function postUpvote(Request $request) {\n $post = Post::find($request->post_id);\n $post->upvotes = $post->upvotes + 1;\n $post->save();\n\n $userVoted = new UserVotedPost();\n $userVoted->user_id = auth()->user()->id;\n $userVoted->post_id = $post->id;\n $userVoted->vote_value = 1;\n $userVoted->save();\n\n return $post->upvotes;\n }", "public function calculate_votes()\r\n\t{\r\n\t\t$this->votes_total = $this->votes_up + $this->votes_down;\r\n\t\t$this->votes_balance = $this->votes_up - $this->votes_down;\r\n\r\n\t\t// Note: division by zero must be prevented\r\n\t\t$this->votes_pct_up = ($this->votes_total === 0) ? 0 : $this->votes_up / $this->votes_total * 100;\r\n\t\t$this->votes_pct_down = ($this->votes_total === 0) ? 0 : $this->votes_down / $this->votes_total * 100;\r\n\t}", "public function voteAction()\n {\n\n }", "public function upvote(Post $post)\n\t{\n\t\t$q = \"UPDATE in_posts \";\n\t\t$q .= \"SET upvote_count = upvote_count + 1 WHERE id=:post_id\";\n\t\t$vars = array(\n\t\t\t':post_id'=>$post->id\n\t\t);\n\t\t//$this->logger->logInfo($q);\n\t\t$ps = $this->execute($q, $vars);\n\n\t\t$q = \"UPDATE in_users \";\n\t\t$q .= \"SET total_upvotes_count = total_upvotes_count + 1 WHERE id=:user_id\";\n\t\t$vars = array(\n\t\t\t':user_id'=>$post->author_id\n\t\t);\n\t\t//$this->logger->logInfo($q);\n\t\t$ps = $this->execute($q, $vars);\n\n\t\t$q = \"INSERT INTO in_upvotes \";\n\t\t\t$q .= \"(user_id, post_id, vote) \";\n\t\t\t$q .= \"VALUES (:user_id, :post_id, :vote)\";\n\t\t\t$vars = array(\n\t\t\t\t':user_id'=>$post->author_id,\n\t\t\t\t':post_id'=>$post->id,\n\t\t\t\t':vote'=>1\n\t\t\t);\n\t\t\t//$this->logger->logInfo($q);\n\t\t\t$ps = $this->execute($q, $vars);\n\t}", "public function vote($object, $action);", "public function testDownvoteUpvotedPost()\n {\n $users_cnt = DB::table('users')->count();\n $links_cnt = DB::table('links')->count();\n $downvoted_cnt = DB::table('downvoted_links')->count();\n $upvoted_cnt = DB::table('upvoted_links')->count();\n $user = User::storeUser([\n 'username' => 'Lily',\n 'email' => 'lily@l.com',\n 'password' => '123456789',\n ]);\n\n $link = Link::storeLink([\n 'content' => 'test content',\n 'title' => 'test title',\n 'author_username' => $user->username\n ]);\n $this->assertEquals(DB::table('users')->count(), $users_cnt + 1);\n $this->assertEquals(DB::table('links')->count(), $links_cnt + 1);\n $token = auth()->login($user);\n $headers = [$token];\n UpvotedLink::store($user->username, $link->id);\n $this->assertEquals(DB::table('upvoted_links')->count(), $upvoted_cnt + 1);\n Link::incrementUpvotes($link->id);\n $payload = ['link_id' => $link->id];\n $this->json('POST', 'api/v1/auth/downvoteLink', $payload, $headers)\n ->assertStatus(200)\n ->assertJson([\n 'success' => 'true'\n ]);\n $this->assertEquals(DB::table('upvoted_links')->count(), $upvoted_cnt);\n $this->assertEquals(DB::table('downvoted_links')->count(), $downvoted_cnt + 1);\n $user->delete();\n $this->assertEquals(DB::table('users')->count(), $users_cnt);\n $this->assertEquals(DB::table('links')->count(), $links_cnt);\n $this->assertEquals(DB::table('downvoted_links')->count(), $downvoted_cnt);\n }", "public function testPostVoteOnAnswer(): void {\n $user = factory(User::class)->create();\n $q = factory(Question::class)->create();\n $a = factory(Answer::class)->create(['question_id' => $q->id]);\n $url = \"/api/answers/$a->id\";\n //up and cancel\n $this->get(url(\"$url/votes\"))\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 1, 'up' => 1]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0, 'up' => 0]);\n // down and cancel\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0, 'down' => 0]);\n //down up down\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 1, 'up' => 1]);\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n\n $this->get(url(\"$url/votes\"))\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1]);\n }", "public function testVote()\n {\n $vote = new Vote();\n $this\n ->voteDirector\n ->expects($this->any())\n ->method('findOneBy')\n ->will($this->returnValue(null));\n\n $this\n ->voteDirector\n ->expects($this->once())\n ->method('create')\n ->will($this->returnValue($vote));\n\n $this\n ->commentEventDispatcher\n ->expects($this->once())\n ->method('dispatchCommentOnVotedEvent')\n ->with(\n $this->equalTo($this->comment),\n $this->equalTo($vote),\n $this->equalTo(false)\n );\n\n $vote = $this\n ->voteManager\n ->vote(\n $this->comment,\n $this->authorToken,\n Vote::DOWN\n );\n\n $this->assertSame($this->authorToken, $vote->getAuthorToken());\n $this->assertSame($this->comment, $vote->getComment());\n $this->assertSame(Vote::DOWN, $vote->getType());\n }", "public function getUpVotes()\n\t{\n\t\treturn $this->up_votes;\n\t}", "public function upvote(): array {\n return $this->castVote(1);\n }", "public function testPostVoteOnQuestion(): void {\n $user = factory(User::class)->create();\n $q = factory(Question::class)->create();\n $url = \"/api/questions/$q->id\";\n //up and cancel\n $this->get(url(\"$url/votes\"))\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 1, 'up' => 1]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0, 'up' => 0]);\n //down and cancel\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0, 'down' => 0]);\n // down up down\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 1, 'up' => 1]);\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n\n $this->get(url(\"$url/votes\"))\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1]);\n }", "public function upvote(User $user) {\n // if the user already upvoted, delete upvote record\n if($this->isUpvotedBy($user)) {\n $this->upvotes()->where('user_id', $user->id)->delete($user);\n } else {\n // first checks if the user downvoted the post. if he did, then update record to make it an upvote\n if($this->isDownvotedBy($user)) {\n $this->upvotes()\n ->where(['user_id' => $user->id])\n ->update(['upvoted' => true]);\n } else {\n // if the user neither already upvoted or downvoted the post, create a record with an upvote\n $this->upvotes()->create(['user_id' => $user->id, 'upvoted' => true]);\n }\n }\n }", "public function test_message_can_be_upvoted() {\n\n $user = User::create('bar@email.com', 'secret', 'Jane Doe');\n $this->message->upvote($user);\n $this->assertEquals(1, $this->message->getUpvotes());\n\n }", "public function postDownvote(Request $request) {\n $post = Post::find($request->post_id);\n $post->downvotes = $post->downvotes + 1;\n $post->save();\n\n $userVoted = new UserVotedPost();\n $userVoted->user_id = auth()->user()->id;\n $userVoted->post_id = $post->id;\n $userVoted->vote_value = 0;\n $userVoted->save();\n\n return $post->downvotes;\n }", "function upVoteQuestion($idq) {\n\t$query = \"UPDATE question SET vote=vote-1 WHERE id='$idq'\";\n\t//select vote from question table\n\t$retquery =\"SELECT vote FROM question WHERE id='$idq' \";\n\t$data = mysql_query ($query)or die(mysql_error());\n\t$retdata = mysql_query ($retquery)or die(mysql_error());\n\t$row = mysql_fetch_array($retdata, MYSQL_ASSOC); \n\t\n\tif($data )\n\t{\n\t \techo $row['vote'];\n\t} \n}", "public function getUpvote(): bool {\n return $this->upvote;\n }", "public function vote()\r\n\t{\r\n\r\n\t\t$poll_id = $_POST['poll_id']; \r\n\r\n\t\t// Increate vote for desired field\r\n\t\tif (have_rows('polls_options', $poll_id)) {\r\n\t\t\twhile (have_rows('polls_options', $poll_id)) {\r\n\t\t\t\tthe_row();\r\n\t\t\t\tif (get_sub_field('poll_option') === $_POST[\"votes_question\"]) {\r\n\r\n\t\t\t\t\t// Update vote count into ACF field\r\n\t\t\t\t\t$current_votes_count = get_sub_field('poll_option_votes');\r\n\t\t\t\t\t$vote = update_sub_field('poll_option_votes', $current_votes_count ? ++$current_votes_count : 1, $poll_id);\r\n\r\n\t\t\t\t\t// Add poll ID to session \r\n\t\t\t\t\tsession_start();\r\n\t\t\t\t\tif (!isset($_SESSION['wppoll'])) {\r\n\t\t\t\t\t\t$_SESSION['wppoll'] = array();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarray_push($_SESSION['wppoll'], (int) $poll_id);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\twp_die();\r\n\r\n\t\tif (!$vote) {\r\n\t\t\t$data = array('type' => 'error', 'message' => 'Voting failed');\r\n\t\t\theader('HTTP/1.1 400 Bad Request');\r\n\t\t\theader('Content-Type: application/json; charset=UTF-8');\r\n\t\t\techo json_encode($data);\r\n\t\t}\r\n\t\twp_die();\r\n\t}", "public function approve()\n {\n $post = new PostBag();\n $id = $post->fetchInt('id');\n \n $this->db->query(\"UPDATE `film_review` SET `status` = 'show' WHERE `id` = {$id} LIMIT 1\");\n if (!empty($this->db->error)) {\n return false;\n }\n\n $result = $this->db->query(\"SELECT `userId` FROM `film_review` WHERE `id` = {$id} LIMIT 1\");\n if ($row = $result->fetch_assoc()) {\n $this->db->query(\"UPDATE `user` SET `count_review` = `count_review` + 1 WHERE `id` = {$row['userId']} LIMIT 1\");\n }\n \n return true;\n }", "public function vote(Voting $voting, User $user, $answerId);", "public function undoUpvote(Post $post)\n\t{\n\t\t$q = \"UPDATE in_posts \";\n\t\t$q .= \"SET upvote_count = upvote_count - 1 WHERE id=:post_id\";\n\t\t$vars = array(\n\t\t\t':post_id'=>$post->id\n\t\t);\n\t\t//$this->logger->logInfo($q);\n\t\t$ps = $this->execute($q, $vars);\n\n\t\t$q = \"UPDATE in_users \";\n\t\t$q .= \"SET total_upvotes_count = total_upvotes_count - 1 WHERE id=:user_id\";\n\t\t$vars = array(\n\t\t\t':user_id'=>$post->author_id\n\t\t);\n\t\t//$this->logger->logInfo($q);\n\t\t$ps = $this->execute($q, $vars);\n\n\t\t$q = \"DELETE FROM in_upvotes \";\n\t\t$q .= \"WHERE user_id=:user_id AND post_id=:post_id\";\n\t\t$vars = array(\n\t\t\t':user_id'=>$post->author_id,\n\t\t\t':post_id'=>$post->id\n\t\t);\n\t\t//$this->logger->logInfo($q);\n\t\t$ps = $this->execute($q, $vars);\n\t}", "function downvote($idvideo){\n \t$realid = pg_escape_string($idvideo);\n \t$query1 = \"SELECT downvotes FROM video where idvideo = \".$realid;\n \t$link = createConection();\n \tif($row = pg_fetch_array(pg_exec($link,$query1))){\n \t\t$total = $row['downvotes'] + 1;\n \t\t$query2 = \"UPDATE video set downvotes = \".$total.\" where idvideo = \".$realid.\";\";\n \t\tpg_exec($link, $query2);\n \t\tcloseConection($link);\n \t\treturn true;\n \t}else{\n \t\tcloseConection($link);\n \t\treturn false;\n \t}\n }", "public function testStaleVotes()\n {\n // create review to test with\n $review = new Review($this->p4);\n $review->setParticipants(array('foo', 'bar'))\n ->set('author', 'joe')\n ->save();\n\n // add several versions\n $review->setVersions(\n array(\n array('change' => 2, 'user' => 'joe', 'time' => 700, 'pending' => 1, 'difference' => 1),\n array('change' => 3, 'user' => 'joe', 'time' => 710, 'pending' => 1, 'difference' => 1),\n array('change' => 4, 'user' => 'joe', 'time' => 720, 'pending' => 1, 'difference' => 2),\n )\n )->save();\n\n // prepare connections for users 'foo', 'bar'\n $p4Foo = $this->connectWithAccess('foo', array('//...'));\n $p4Bar = $this->connectWithAccess('bar', array('//...'));\n $userFoo = User::fetch('foo', $this->p4);\n $userBar = User::fetch('bar', $this->p4);\n\n // test that voting without version applies to latest\n $services = $this->getApplication()->getServiceManager();\n $services->setService('p4_user', $p4Foo)\n ->setService('user', $userFoo);\n $this->getRequest()->setMethod('POST');\n $this->dispatch('/reviews/' . $review->getId() . '/vote/up');\n\n $votes = Review::fetch($review->getId(), $this->p4)->getVotes();\n $this->assertSame(1, count($votes));\n $this->assertSame(1, $votes['foo']['value']);\n $this->assertSame(3, $votes['foo']['version']);\n $this->assertSame(false, $votes['foo']['isStale']);\n\n // try voting on a particular version\n $this->resetApplication();\n $services = $this->getApplication()->getServiceManager();\n $services->setService('p4_user', $p4Foo)\n ->setService('user', $userFoo);\n $this->getRequest()->setMethod('POST')->setPost(new Parameters(array('version' => 2)));\n $this->dispatch('/reviews/' . $review->getId() . '/vote/up');\n\n $votes = Review::fetch($review->getId(), $this->p4)->getVotes();\n $this->assertSame(1, count($votes));\n $this->assertSame(1, $votes['foo']['value']);\n $this->assertSame(2, $votes['foo']['version']);\n $this->assertSame(false, $votes['foo']['isStale']);\n\n // vote as 'bar' on version 1 and verify its evaluated as stale vote\n $this->resetApplication();\n $services = $this->getApplication()->getServiceManager();\n $services->setService('p4_user', $p4Bar)\n ->setService('user', $userBar);\n $this->getRequest()->setMethod('POST')->setPost(new Parameters(array('version' => 1)));\n $this->dispatch('/reviews/' . $review->getId() . '/vote/down');\n\n $votes = Review::fetch($review->getId(), $this->p4)->getVotes();\n $this->assertSame(2, count($votes));\n $this->assertSame(1, $votes['foo']['value']);\n $this->assertSame(2, $votes['foo']['version']);\n $this->assertSame(false, $votes['foo']['isStale']);\n $this->assertSame(-1, $votes['bar']['value']);\n $this->assertSame(1, $votes['bar']['version']);\n $this->assertSame(true, $votes['bar']['isStale']);\n }", "public function cast_vote($vote, $num = 1)\r\n\t{\r\n\t\t$vote = min(1, max(0, (int) $vote));\r\n\r\n\t\tif( $vote )\r\n\t\t{\r\n\t\t\t// Add an \"up\" vote\r\n\t\t\t$this->votes_up += $num;\r\n\t\t\t$sql = 'votes_up = votes_up + '.$num;\r\n\t\t\t$vote_value = $num;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Add a \"down\" vote\r\n\t\t\t$this->votes_down += $num;\r\n\t\t\t$sql = 'votes_down = votes_down + '.$num;\r\n\t\t\t$vote_value = \"-\".$num;\r\n\t\t}\r\n\r\n\t\t// Recalculate the vote results, no need to reload the item from database\r\n\t\t$this->calculate_votes();\r\n\r\n\t\t// Update the item record\r\n\t\t$sth = ThumbsUp::db()->Query(\"UPDATE `acp_servers` SET \".$sql.\" WHERE id = '{server}'\", array('server'=>$this->id));\r\n\r\n\t\t// The current user has just cast a vote\r\n\t\t$this->user_voted = TRUE;\r\n\t\tThumbsUp_Cookie::add_id($this->id);\r\n\r\n\t\t// Combine the storage of the IP and user id into one query for optimization\r\n\t\t$ip = ThumbsUp::get_ip();\r\n\t\t$user_id = ThumbsUp::get_user_id();\r\n\r\n\t\tif( $ip OR $user_id )\r\n\t\t{\r\n\t\t\t$sth = ThumbsUp::db()->Query(\"INSERT INTO `acp_servers_votes` (item_id, ip, user_id, value, vote_value, date) VALUES ('{item_id}', '{ip}', '{user_id}', '{value}', '{vote_value}', '{date}')\", array('item_id'=>$this->id,'ip'=>$ip,'user_id'=>$user_id,'value'=>$vote,'vote_value'=>$vote_value,'date'=>time()));\r\n\t\t}\r\n\t}", "public function update_votes($student_currentclass, $vote){\n\n \tif ($vote == 'iGetIt'){ //Update classes table to increate iGetIt by 1, & decrease iDontGetIt by 1\n \t\techo \"Entered case iGetIt\";\n \t\t$query = \"SELECT igetit, total_enrolled FROM classes WHERE igetit = total_enrolled AND classname = $1;\";\n \t\t$query_result = pg_prepare($this->con, \"myquery11\", $query);\n \t\t$query_result = pg_execute($this->con, \"myquery11\", array($student_currentclass));\n \t\t$row = pg_fetch_row($query_result);\n\n \t\tif(!$row){ //If iGetIt == total, & user chooses iGetIt, don't do anything, else do this:\n \t\t\techo \"Entered in!\";\n \t\t\t$query = \"UPDATE classes SET igetit = igetit + 1, idontgetit = idontgetit - 1 WHERE classname = $1;\";\n \t\t\t$query_result = pg_prepare($this->con, \"myquery8\", $query);\n \t\t\t$query_result = pg_execute($this->con, \"myquery8\", array($student_currentclass));\n }\n \t}\n \telse if ($vote == 'iDontGetIt'){\n \t\t//If iDontGetIt is full, then don't do anything. Else ++iDontGetIt and --iGetIt by 1\n \t\t$query = \"SELECT idontgetit, total_enrolled FROM classes WHERE idontgetit = total_enrolled AND classname = $1;\";\n \t\t$query_result = pg_prepare($this->con, \"myquery9\", $query);\n \t\t$query_result = pg_execute($this->con, \"myquery9\", array($student_currentclass));\n \t\t$row = pg_fetch_row($query_result);\n\n \t\tif(!$row){ //They arent equal. Dont do anything\n \t\t\t$query = \"UPDATE classes SET idontgetit = idontgetit + 1, igetit = igetitt - 1 WHERE classname = $1;\";\n \t\t\t$query_result = pg_prepare($this->con, \"myquery10\", $query);\n \t\t $query_result = pg_execute($this->con, \"myquery10\", array($student_currentclass));\n \t\t }\n \t\t}\n\n \t}", "public function test_message_can_be_downvoted() {\n\n $user = User::create('bar@email.com', 'secret', 'Jane Doe');\n $this->message->downvote($user);\n $this->assertEquals(1, $this->message->getDownvotes());\n\n }", "private function vote()\n\t{\n\t\tif(!$this->owner->logged_in())\n\t\t\treturn new View('public_forum/login');\n\t\t\n\t\t$comment_id = valid::id_key($this->filter);\n\t\t$vote = $this->filter2;\n\t\t\n\t\t$has_voted = ORM::factory('forum_comment_vote')\n\t\t\t->where(array(\n\t\t\t\t'owner_id'\t\t \t=> $this->owner->get_user()->id,\n\t\t\t\t'forum_cat_post_comment_id' => $comment_id\n\t\t\t))\n\t\t\t->find();\t\n\t\tif(TRUE == $has_voted->loaded)\n\t\t\treturn 'already voted.';\n\t\t\t\n\t\t$vote = ('down' == $vote) ? -1 : 1 ;\n\t\t\n\t\t$comment = ORM::factory('forum_cat_post_comment', $comment_id);\t\t\n\t\t$comment->vote_count = ($comment->vote_count + $vote);\n\t\t$comment->save();\t\t\n\n\t\t# log the vote.\n\t\t$log_vote = ORM::factory('forum_comment_vote');\n\t\t$log_vote->owner_id = $this->owner->get_user()->id;\n\t\t$log_vote->forum_cat_post_comment_id = $comment_id;\n\t\t$log_vote->save();\n\n\t\treturn 'Vote has been accepted!';\n\t}", "public function save_votes() {\n\t\t\t$comment_id = absint( filter_input( INPUT_POST, 'comment_id', FILTER_SANITIZE_STRING ) );\n\t\t\t$vote_type = filter_input( INPUT_POST, 'vote_type', FILTER_SANITIZE_STRING );\n\t\t\t$user_id = $this->user_id;\n\t\t\t$users = get_comment_meta( $comment_id, 'votes', true );\n\t\t\t$vote_data = array();\n\t\t\t$vote_other = 'up' === $vote_type ? 'up' : 'down';\n\t\t\t$self_vote = $this->options['user-self-vote'];\n\n\t\t\t$comment_author_id = absint( get_comment( $comment_id, ARRAY_A )['user_id'] );\n\n\t\t\tif ( empty( $self_vote ) && $comment_author_id === $user_id ) {\n\t\t\t\twp_send_json_error(\n\t\t\t\t\tarray( esc_html( 'You cannot vote your own comment!' ) )\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( empty( $users ) ) {\n\t\t\t\t// The first vote.\n\t\t\t\t$vote_data = array( $user_id => $vote_type );\n\t\t\t\tif ( add_comment_meta( $comment_id, 'votes', $vote_data, true ) ) {\n\t\t\t\t\t$users_count = get_comment_meta( $comment_id, 'votes', true );\n\t\t\t\t\twp_send_json_success( array( 'count' => $this->count_votes( $users_count, $vote_type ) ) );\n\t\t\t\t} else {\n\t\t\t\t\twp_send_json_error();\n\t\t\t\t}\n\t\t\t} elseif ( isset( $users[ $user_id ] ) && $users[ $user_id ] === $vote_type ) {\n\t\t\t\t// Voting twice of the same type.\n\t\t\t\twp_send_json_error();\n\t\t\t} elseif ( isset( $users[ $user_id ] ) ) {\n\t\t\t\t// Switching votes.\n\t\t\t\t$users[ $user_id ] = $vote_other;\n\t\t\t\tif ( update_comment_meta( $comment_id, 'votes', $users ) ) {\n\t\t\t\t\twp_send_json_success(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'vote switched',\n\t\t\t\t\t\t\t$vote_type,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'count_up' => $this->count_votes( $users, 'up' ),\n\t\t\t\t\t\t\t\t'count_down' => $this->count_votes( $users, 'down' ),\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} else {\n\t\t\t\t\twp_send_json_error();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Add more votes.\n\t\t\t\t$users[ $user_id ] = $vote_type;\n\t\t\t\tif ( update_comment_meta( $comment_id, 'votes', $users ) ) {\n\t\t\t\t\t$users_count = get_comment_meta( $comment_id, 'votes', true );\n\t\t\t\t\twp_send_json_success( array( 'count' => $this->count_votes( $users_count, $vote_type ) ) );\n\t\t\t\t} else {\n\t\t\t\t\twp_send_json_error();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twp_die();\n\t\t}", "public function incrementVoteCount()\n {\n $this->setVotesCount( $this->getVotesCount() + 1 );\n }", "function recordVote()\n{\n\n //add voter and vote to database\n\n //mark voter as voted\n\n}", "public function showExperienceReview()\n {\n $review_id = Input::get('review_id');\n\n $check_review = DB::select(\"select status from product_reviews where id = '$review_id'\");\n $status = $check_review[0]->status;\n if($status == \"Pending\")\n {\n $statusUpdate = \"Approved\";\n }\n else if($status == \"Approved\")\n {\n $statusUpdate = \"Pending\";\n }\n\n $update = DB::update(\"update product_reviews set status ='$statusUpdate' where id = $review_id\");\n\n echo '1';\n\n }", "public function ChangeVote($db, $poi_id, $votes, $operation){\n if ($operation == \"up\"){\n $votes++;\n }else{\n $votes--;\n }\n $stmt = $db->prepare(\"UPDATE pois\n SET votes = :votes\n WHERE poi_id = :poi_id\");\n $stmt->bindParam(':votes', $votes, PDO::PARAM_INT);\n $stmt->bindParam(':poi_id', $poi_id, PDO::PARAM_INT);\n $stmt->execute();\n return $votes;\n }", "function changevote($idvideo, $iduser){\n \t$realid = pg_escape_string($idvideo);\n \t$realusr = pg_escape_string($iduser);\n \t$query1 = \"SELECT vote from votexuser where idvideo =\".$realid.\"and idusuario = \".$realusr;\n \t$link = createConection();\n if($row = pg_fetch_array(pg_exec($link, $query1))){\n \t$currentvote = ($row['vote'] == \"t\")?true:false;\n \t$query2 = \"UPDATE votexuser set vote = \".(($currentvote)?\"false\":\"true\").\" where idvideo = \".$realid.\" and idusuario = \".$realusr;\n \tif(pg_exec($link, $query2)){\n \t\t//now update the vote on the videos table\n \t\t$query3 = \"SELECT upvotes, downvotes from video where idvideo = \".$realid;\n \t\tif($row2 = pg_fetch_array(pg_exec($link, $query3))){\n \t\t\t$upvotes = $row2['upvotes'];\n \t\t\t$downvotes = $row2['downvotes'];\n \t\t\tif($currentvote){\n \t\t\t\t$query4 = \"UPDATE video SET upvotes = \".($upvotes - 1).\" ,downvotes = \".($downvotes + 1). \" where idvideo = \".$realid.\";\";\n \t\t\t\tif(pg_exec($link, $query4)){\n \t\t\t\t\tcloseConection($link);\n \t\t\t\t\treturn true;\n \t\t\t\t}else{\n \t\t\t\t\tcloseConection($link);\n \t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t}else{ //current vote id downvote\n \t\t\t\t$query4 = \"UPDATE video SET upvotes = \".($upvotes + 1).\" ,downvotes = \".($downvotes - 1). \" where idvideo = \".$realid.\";\";\n \t\t\t\tif(pg_exec($link, $query4)){\n \t\t\t\t\tcloseConection($link);\n \t\t\t\t\treturn true;\n \t\t\t\t}else{\n \t\t\t\t\tcloseConection($link);\n \t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t}\n \t\t}else{ //the search for the up and down votes did not work \n \t\t\tcloseConection($link);\n \t\t\treturn false;\n \t\t}\n \t}else{ //the table votexuser was not updated\n \t\tcloseConection($link);\n \t\treturn false;\n \t}\n }else{ //the search for the vote value did not work\n \tcloseConection($link);\n \treturn false;\n }\n\n }", "public function vote(Request $request, Answer $answer)\n {\n $action = $request->route('action');\n $allowedActions = [\"up\", \"down\"];\n if (array_key_exists($action, $allowedActions)) {\n return back();\n }\n\n $user = Auth::user();\n $vote = $user->getVote($answer);\n\n if ($vote instanceof Vote) {\n $vote->delete();\n }\n $user->vote($answer, $action);\n return back();\n }", "public function upVotesCount()\n {\n return $this->post_votes()\n ->selectRaw('post_id, count(*) as count')\n ->where('vote', '=', '1')\n ->groupBy('post_id');\n }", "function incrementCommentUpvotes($com, $u)\n{\n\t$com['upVotes']++;\n\t$sql = \"UPDATE comments SET upVotes=\".$com['upVotes'].\" WHERE commentID=\".$com['commentID'];\n\tmysql_query($sql) or die(mysql_error());\n\tif($u['commentVotes'] == '')\n\t{\n\t\t$sql = \"UPDATE user SET commentVotes='\".$com['commentID'].\"' WHERE userID=\".$u['userID'];\n\t}\n\telse\n\t{\n\t\t$sql = \"UPDATE user SET commentVotes='\".$u['commentVotes'].\",\".$com['commentID'].\"' WHERE userID=\".$u['userID'];\n\t}\n\t$result = mysql_query($sql) or die(mysql_error());\n}", "public function getDownVotes()\n\t{\n\t\treturn $this->down_votes;\n\t}", "public function add_voting_buttons( $args, $comment ) {\n\t\t\t$comment_id = $comment->comment_ID;\n\t\t\t$users = get_comment_meta( $comment_id, 'votes', true );\n\t\t\t$user_id = $this->user_id;\n\n\t\t\tif ( 'up' === $users[ $user_id ] ) {\n\t\t\t\t$voted = 'wce-voted-up';\n\t\t\t\t$vote_icon = '<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\"></i>';\n\t\t\t} else {\n\t\t\t\t$vote = null;\n\t\t\t\t$vote_icon = '<i class=\"fa fa-thumbs-o-up\" aria-hidden=\"true\"></i>';\n\t\t\t}\n\n\t\t\t$args['after'] = '<span class=\"wce-vote-button ' . $voted . '\" data-comment-id=\"' . $comment_id . '\" data-vote-type=\"up\">' . $vote_icon . '<span class=\"wce-vote-count\">' . $this->count_votes( $users, 'up' ) . '</span></span>';\n\n\t\t\t$voted = null;\n\n\t\t\tif ( 'down' === $users[ $user_id ] ) {\n\t\t\t\t$voted = 'wce-voted-down';\n\t\t\t\t$vote_icon = '<i class=\"fa fa-thumbs-down\" aria-hidden=\"true\"></i>';\n\t\t\t} else {\n\t\t\t\t$vote = null;\n\t\t\t\t$vote_icon = '<i class=\"fa fa-thumbs-o-down\" aria-hidden=\"true\"></i>';\n\t\t\t}\n\n\t\t\t$args['after'] .= '<span class=\"wce-vote-button ' . $voted . '\" data-comment-id=\"' . $comment_id . '\" data-vote-type=\"down\">' . $vote_icon . '<span class=\"wce-vote-count\">' . $this->count_votes( $users, 'down' ) . '</span></span>';\n\n\t\t\tif ( 'on' === $this->options['list-voters'] ) {\n\t\t\t\t$args['after'] .= '<span class=\"three-dots-container\" title=\"' . esc_html( 'Show list of voters' ) . '\" data-comment-id=\"' . $comment_id . '\"><span></span><span></span><span></span></span>';\n\n\t\t\t\t$args['after'] .= '<div class=\"wce-voter-list-overlay\"></div>';\n\n\t\t\t\t$args['after'] .= '<span class=\"wce-voter-list\"><div>' . esc_html__( 'Voters', 'wce' ) . '<span class=\"close-voter-list\"><i class=\"fa fa-times\" aria-hidden=\"true\"></i></span></div></span>';\n\t\t\t}\n\n\t\t\t$args['after'] .= '</div>';\n\n\t\t\treturn $args;\n\t\t}", "function testMarkAsVoted() {\n\t\t/*\n\t\t$mobilePoll = $this->ObjFromFixture('Poll', 'mobile-poll');\n\t\t$mobilePoll->markAsVoted();\n\t\t$this->assertTrue($mobilePoll->hasVoted());\n\t\t*/\n\t}", "public function modifyVotes($caselawID, $vote) {\n\t\t$caselawID = (int)$caselawID;\n\n\t\tif ($vote === 'up'){\n\t\t\t//DataBase connection & query\n\t\t\t$db = Dbconn::getDB();\n\t\t\t$sql = \"UPDATE votes SET votes_up = votes_up + 1 WHERE caselaw_id = {$caselawID}\";\n\t\t\t$db->query($sql);\n\t\t}\n\n\t\telseif ($vote === 'down'){\n\t\t\t//DataBase connection & query\n\t\t\t$db = Dbconn::getDB();\n\t\t\t$sql = \"UPDATE votes SET votes_down = votes_down + 1 WHERE caselaw_id = {$caselawID}\";\n\t\t\t$db->query($sql);\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t\techo \"error in script\";\n\t\t}\n\t}", "function vote($userid,$subjectid,$type,$vote) {\n\t$type = dbEscape($type);\n\t$userid = intval($userid);\n\t$subjectid = intval($subjectid);\n\t$vote = intval($vote);\n\n\tswitch($vote) {\n\tcase 0:\n\t\t// Unset/delete vote\n\t\tdbQuery(\"DELETE FROM votes WHERE userid=$userid AND subjectid=$subjectid AND type='$type'\");\n\t\tbreak;\n\tcase 1:\n\tcase -1:\n\t\t// Check if we've already voted\n\t\t$result = dbFirstResult(\"SELECT * FROM votes WHERE userid=$userid AND subjectid=$subjectid AND type='$type'\");\n\t\t\n\t\tif(empty($result)) { // Make a new vote if we haven't voted before\n\t\t\tdbQuery(\"INSERT INTO votes (userid,type,subjectid,vote) VALUES($userid,'$type',$subjectid,$vote)\");\t\n\t\t}\n\t\n\t\telseif($vote != $row[vote]) { // Update our old vote if we have voted before\n\t\t\tdbQuery(\"UPDATE votes SET vote=$vote WHERE userid=$userid AND subjectid=$subjectid AND type='$type'\");\n\t\t}\n\t\t\n\t\tbreak;\n\tdefault: // Any vote other than +1, -1 or 0\n\t\treturn(false);\n\t\tbreak;\n\t}\n\n\t// Grab and return the new vote count\n\t$result = dbFirstResult(\"SELECT points FROM totalvotes WHERE subjectid=$subjectid AND type='$type'\");\n\tif(empty($result)) { $result = 0; }\t\t\n\t$result .= ($result == 1 || $result == -1) ? ' point' : ' points';\n\treturn(\"$result\");\n}", "public function voteAction()\n {\n $return = 0;\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Checking if user is online and answer_id > 0 */\n if ($user && $_GET['id'] > 0) {\n \n /* Vote answer and return number of votes */\n $return = VotedAnswer::vote($user->id, $_GET['id']);\n }\n \n /* Return response */\n header('Content-Type: application/json');\n echo json_encode($return);\n }", "public function estaUpvoteado()\n {\n return $this->getVotos()->where(['usuario_id' => Yii::$app->user->id, 'positivo' => true])->one() !== null;\n }", "public function test_users_vote_can_be_retrieved() {\n\n $user = User::create('bar@email.com', 'secret', 'Jane Doe');\n\n $this->assertNull($this->message->getVote($user));\n\n $this->message->upvote($user);\n $this->assertEquals('up', $this->message->getVote($user));\n\n $this->message->downvote($user);\n $this->assertEquals('down', $this->message->getVote($user));\n\n }", "function voter() {\n\t\tif (isset($_GET['id']) && isset($_GET['vote'])) {\n\t\t\tif ($this -> modele -> getSondage($_GET['id']) && $this -> modele -> getAVote($_GET['id'], $_SESSION['id']) == 0) {\n\t\t\t\tif ($this -> modele -> insertAVote($_GET['id'], $_SESSION['id'], $_GET['vote']) != 0 && $this -> modele -> updateSondage($_GET['vote'], $_GET['id'])) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sondage = $this -> modele -> getSondage($_GET['id']);\n\t\t\t$resultats = '';\n\t\t\t$totalVote = $sondage[5] + $sondage[6] + $sondage[7] + $sondage[8];\n\t\t\tif (is_array($sondage) || is_object($sondage)) {\n\t\t\t\tforeach ($sondage as $key => $reponse) {\n\t\t\t\t\tif ($key > 0 && $key < 5 && $reponse != null) {\n\t\t\t\t\t\tif ($totalVote == 0)\n\t\t\t\t\t\t\t$resultats .= $this -> vue -> resultat($reponse, 0);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$resultats .= $this -> vue -> resultat($reponse, $sondage[$key + 4] / $totalVote * 100);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\techo $this -> vue -> resultatSondage($resultats);\n\t\t}\n\t}", "function DoVoting()\r\n\t\t\t{\r\n\t\t\t\tif (!$_SESSION[\"User\"])\r\n\t\t\t\t{\t// Display the login screen\r\n\t\t\t\t\tif (!VoterLogin())\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Step 2: Sign-In (only needed when using Mixing - Servers) \r\n\t\t\t\t\r\n\t\t\t\t// Step 3: Voting (only needed when using Mixing - Servers)\r\n\t\t\t\tVoterVote();\r\n\t\t\t}", "public function downvote(User $user) {\n // if the user already downvoted the post, delete the record of the upvote model relationship\n if($this->isDownvotedBy($user)) {\n $this->upvotes()->where('user_id', $user->id)->delete($user);\n } else {\n // if the user upvoted the post, update the record so that it's a downvote now\n if($this->isUpvotedBy($user)) {\n $this->upvotes()\n ->where(['user_id' => $user->id])\n ->update(['upvoted' => false]);\n } else {\n // if the user neither upvoted or downvoted the post, create a new record with a downvote\n $this->upvotes()->create(['user_id' => $user->id, 'upvoted' => false]);\n }\n }\n }", "private function uvote($catalogGuid)\r\n\t{\r\n\t\t$ip = Pandamp_Lib_Formater::getRealIpAddr();\r\n\t\t// get votes\r\n\t\t$modelVote = new Pandamp_Modules_Extension_Vote_Model_Vote();\r\n\t\t$decorator = new Pandamp_BeanContext_Decorator($modelVote);\r\n\t\t$rowRate = $decorator->getRatingAsEntity($catalogGuid,$ip);\r\n\t\t$val = ($rowRate)? $rowRate->getValue() : 0;\r\n\t\t$counter = ($rowRate)? $rowRate->getCounter() : 0;\r\n\t\t\r\n\t\tif ($counter < 1) {\r\n\t\t\t$count = 0;\r\n\t\t} else {\r\n\t\t\t$count=$counter; //how many votes total\r\n\t\t}\r\n\t\t$current_rating = $val;\r\n\t\t$tense=($count==1) ? \"vote\" : \"votes\"; //plural form votes/vote\r\n\t\t$rating = @number_format($current_rating/$count,1);\r\n\t\t\r\n\t\t$drawrating = '('.$count.' '.$tense.', average: '. $rating .' out of 5)';\r\n\t\t\r\n\t\treturn $drawrating;\r\n\t}", "public function upvotes() {\n return $this->morphMany(Upvote::class, 'upvoteable');\n }", "public function voteAction ()\n {\n /* @var $em \\Doctrine\\ORM\\EntityManager */\n $em = $this->get('doctrine')->getManager();\n \n $user = $this->getUser();\n if(!$user) {\n throw new UnauthorizedHttpException('You must be logged in to comment.');\n }\n \n $request = $this->getRequest();\n $decklist_id = filter_var($request->get('id'), FILTER_SANITIZE_NUMBER_INT);\n \n $decklist = $em->getRepository('NetrunnerdbBuilderBundle:Decklist')->find($decklist_id);\n $query = $em->getRepository('NetrunnerdbBuilderBundle:Decklist')\n ->createQueryBuilder('d')\n ->innerJoin('d.votes', 'u')\n ->where('d.id = :decklist_id')\n ->andWhere('u.id = :user_id')\n ->setParameter('decklist_id', $decklist_id)\n ->setParameter('user_id', $user->getId())\n ->getQuery();\n \n $result = $query->getResult();\n if (empty($result)) {\n $user->addVote($decklist);\n $author = $decklist->getUser();\n $author->setReputation($author->getReputation() + 1);\n $decklist->setTs(new \\DateTime());\n $decklist->setNbvotes($decklist->getNbvotes() + 1);\n $this->get('doctrine')\n ->getManager()\n ->flush();\n }\n \n return new Response(count($decklist->getVotes()));\n \n }", "public function voteVideoAction()\n\t{\n\t\t$userSession\t= new Container('fo_user');\n\t\t$request\t\t= $this->getRequest();\n\t\t\n\t\tif(isset($userSession->userSession['_id']) && trim($userSession->userSession['_id']) != '') {\n\t\t\tif($request->isPost()) {\n\t\t\t\t$formData\t= $request->getPost();\n\t\t\t\tif(!isset($userSession->mediaSession['rating'][base64_decode($formData['videoId'])]) && isset($formData['type']) && ($formData['type'] == '1' || $formData['type'] == '2')) {\n\t\t\t\t\t$this->doVote($formData['type'], $formData['videoId']);\n\t\t\t\t\t$typeText\t= ($formData['type'] == 1) ? 'like' : 'dislike';\n\t\t\t\t\tif(isset($userSession->mediaSession['rating'])) {\n\t\t\t\t\t\t$tempArray['rating']\t\t\t\t\t\t\t\t\t\t= $userSession->mediaSession['rating'];\n\t\t\t\t\t\t//$tempArray['rating'][base64_decode($formData['videoId'])]\t= base64_decode($formData['videoId']);\n\t\t\t\t\t\t$tempArray['rating'][base64_decode($formData['videoId'])]\t= $typeText;\n\t\t\t\t\t\t$userSession->mediaSession\t\t\t\t\t\t\t\t\t= $tempArray;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//$tempArray['rating'][base64_decode($formData['videoId'])]\t= base64_decode($formData['videoId']);\n\t\t\t\t\t\t$tempArray['rating'][base64_decode($formData['videoId'])]\t= $typeText;\n\t\t\t\t\t\t$userSession->mediaSession\t\t\t\t\t\t\t\t\t= $tempArray;\n\t\t\t\t\t}\n\t\t\t\t\techo trim($formData['type']);\n\t\t\t\t} else if(isset($userSession->mediaSession['rating'][base64_decode($formData['videoId'])])) {\n\t\t\t\t\techo \"-2\";\t// Voted\n\t\t\t\t} else {\n\t\t\t\t\techo \"-1\";\t//\timproper data\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo \"-1\";\t//\timproper data\n\t\t\t}\n\t\t} else {\n\t\t\techo \"0\";\t//\tuser session is in-active\n\t\t}\n\t\treturn $this->getResponse();\n\t}", "public function showAlacarteReview()\n {\n $review_id = Input::get('review_id');\n\n $check_review = DB::select(\"select status from vendor_location_reviews where id = '$review_id'\");\n $status = $check_review[0]->status;\n if($status == \"Pending\")\n {\n $statusUpdate = \"Approved\";\n }\n else if($status == \"Approved\")\n {\n $statusUpdate = \"Pending\";\n }\n\n $update = DB::update(\"update vendor_location_reviews set status ='$statusUpdate' where id = $review_id\");\n\n echo '1';\n\n }", "public function post_protest(){\n $stance = Stance::find(Input::get('stance_id'));\n $user = Auth::user();\n if(!($stance->can_vote($user))){\n return Redirect::to_route('stance_view', $stance->id)->with('error', \"Can't vote on this Stance: Invalid Stance id\");\n } else {\n //get this user's stancevotes for the input stance\n $vote = $user->stancevotes()->where('stancevotes.stance_id','=',Input::get('stance_id'))->first();\n\n if(is_null($vote)){\n //this user have never voted on this stance, add the data\n $vote = new StanceVote();\n $vote->user_id = $user->id;\n $vote->stance_id = $stance->id;\n $vote->isendorse = 0;\n $vote->isprotest = 1;\n $validation = $vote->validate();\n if ($validation->passes()){\n $vote->save();\n }\n } else {\n //this user has voted on this stance, update the data\n $vote->isendorse = 0;\n $vote->isprotest = 1;\n $validation = $vote->validate();\n if ($validation->passes()){\n $vote->save();\n }\n }\n\n //send them back to the stance page\n return Redirect::to_route('stance_view', $stance->id);\n }\n }", "public function testDownVotingButton()\n {\n $client = static::createClient();\n\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/tag');\n $link= $crawler->selectLink('Downvote')\n ->eq(\"1\")\n ->link();\n $this->assertEquals(\n\n $link->getUri(),'http://localhost/tag/2/downvote');\n\n }", "public function pro_II_vote(){\n\n\t\t//checking if the voter hase the right credential to vote\n\n\t\tif(!$this->session->userdata('logged_in')){\n\t\t\t\tredirect('Welcome');\n\t\t}\n\n\n\t\t\tif(isset($_POST['pro_II_vote'])){\n\n\t\t\t\t$candidate_id = $this->input->post('candidate_id');\n\t\t\t\t$candidate_name = $this->input->post('candidate_name');\n\n\t\t\t\t$vote_count = $this->input->post('vote_count');\n\n\t\t\t\t$vote_count = $vote_count + 1;\n\t\t\t\t\n\t\t\t\t$student_id = $this->session->userdata('student_id');\n\n\t\t\t\t//GETTING Student last name through their login id\n\t\t\t\t$student_full_name = $this->Evoting_model->stud_fullname($student_id);\n\n\t\t\t\t $student_full_name = $student_full_name->full_name;\n\n\t\t\t\t//setting the time the voting was carryout \n\t\t\t\t$datestring = ' %Y / %m / %d - %h:%i %a';\n\t\t\t\t$time = time();\n\n\t\t\t\t//collecting voting details here and pass them into an array\n\t\t\t\t$data = array(\n\t\t\t\t\t\t'student_id' \t=> $student_id,\n\t\t\t\t\t\t'stud_lastname'\t=> $student_full_name,\n\t\t\t\t\t\t'vote'\t\t\t=> '1', //the most critical part of the software\n\t\t\t\t\t\t'candidate_id'\t=> $candidate_id,\n\t\t\t\t\t\t'candidate_name'=> $candidate_name,\n\t\t\t\t\t\t\n\t\t\t\t\t\t'vote_status'\t=> '1'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t//pushing voting details to the to the destinated table in the db\n\t\t\t\t\t$voting = $this->Evoting_model->pro_II_vote($data);\n\n\n\t\t\t\t\t//update the candidate vote cout record\n\t\t\t\t\t\t$id = $candidate_id;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'vote_count'\t=> $vote_count\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$update_candidate = $this->Evoting_model->update_cand_pro_II($id, $data);\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t//if voting was successfully stored in the database send the voter\n\t\t\t\t\t\t// to the next voting position\n\n\t\t\t\t\t\tif($voting){\n\n\t\t\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t\t'student_id'\t=> $student_id,\n\t\t\t\t\t\t\t\t\t'candidate_id'\t=> $candidate_id,\n\t\t\t\t\t\t\t\t\t'candidate_name'\t=> $candidate_name,\n\t\t\t\t\t\t\t\t\t'position'\t\t=> \"PRO II\"\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t//add it to the student vote table\n\t\t\t\t\t\t\t$student_vote = $this->Evoting_model->student_add($data);\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t//set flash data and redirect to the next position\n\n\t\t\t\t\t\t\tredirect('Evoting/confirm_vote');\n\n\n\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\t//if erro occure redirect to home page, logout voter and kill all \n\t\t\t\t\t\t\t//session\n\t\t\t\t\t\t\tredirect('Autharization/logout');\n\n\t\t\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\tredirect('Welcome');\n\t\t\t}\n\n\n\n\t}", "public function Downstore(Request $request, $id)\n {\n $check = question_user_vote::where([\n ['user_id',Auth::user()->id],\n ['question_id',$id]\n ])->first();\n\n $check2 = User::where('id',Auth::user()->id)->first();\n\n if($check2->reputaion_point <= 15){\n return redirect('/question/explore/'. $request['question_id'])->with('success','Your Reputation Poin Is under 15');\n }else if($check2 != null){\n return redirect('/question/explore/'.$id)->with('success','You Have Been Vote Discusion');\n }else if ($check == null && $check2->reputaion_point > 15) {\n // dd($request->all());\n question_user_vote::create([\n 'user_id' => Auth::user()->id,\n 'question_id' => $id\n ]);\n\n User::where('id',Auth::user()->id)\n ->update([\n 'reputation_point' => DB::raw('reputation_point - 1')\n ]);\n\n return redirect('/question/explore/'.$id)->with('success','Success Vote Discusion');\n }\n\n }", "public function pro_vote(){\n\n\t\t//checking if the voter hase the right credential to vote\n\n\t\tif(!$this->session->userdata('logged_in')){\n\t\t\t\tredirect('Welcome');\n\t\t}\n\n\n\t\t\tif(isset($_POST['pro_vote'])){\n\n\t\t\t\t$candidate_id = $this->input->post('candidate_id');\n\t\t\t\t$candidate_name = $this->input->post('candidate_name');\n\n\t\t\t\t$vote_count = $this->input->post('vote_count');\n\n\t\t\t\t$vote_count = $vote_count + 1;\n\t\t\t\t\n\t\t\t\t$student_id = $this->session->userdata('student_id');\n\n\t\t\t\t//GETTING Student last name through their login id\n\t\t\t\t$student_full_name = $this->Evoting_model->stud_fullname($student_id);\n\n\t\t\t\t $student_full_name = $student_full_name->full_name;\n\n\t\t\t\t//setting the time the voting was carryout \n\t\t\t\t$datestring = ' %Y / %m / %d - %h:%i %a';\n\t\t\t\t$time = time();\n\n\t\t\t\t//collecting voting details here and pass them into an array\n\t\t\t\t$data = array(\n\t\t\t\t\t\t'student_id' \t=> $student_id,\n\t\t\t\t\t\t'stud_lastname'\t=> $student_full_name,\n\t\t\t\t\t\t'vote'\t\t\t=> '1', //the most critical part of the software\n\t\t\t\t\t\t'candidate_id'\t=> $candidate_id,\n\t\t\t\t\t\t'candidate_name'=> $candidate_name,\n\t\t\t\t\t\t\n\t\t\t\t\t\t'vote_status'\t=> '1'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t//pushing voting details to the to the destinated table in the db\n\t\t\t\t\t$voting = $this->Evoting_model->pro_vote($data);\n\n\n\t\t\t\t\t//update the candidate vote cout record\n\t\t\t\t\t\t$id = $candidate_id;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'vote_count'\t=> $vote_count\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$update_candidate = $this->Evoting_model->update_cand_pro($id, $data);\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t//if voting was successfully stored in the database send the voter\n\t\t\t\t\t\t// to the next voting position\n\n\t\t\t\t\t\tif($voting){\n\n\t\t\t\t\t\t\t//set flash data and redirect to the next position\n\t\t\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t\t'student_id'\t=> $student_id,\n\t\t\t\t\t\t\t\t\t'candidate_id'\t=> $candidate_id,\n\t\t\t\t\t\t\t\t\t'candidate_name'\t=> $candidate_name,\n\t\t\t\t\t\t\t\t\t'position'\t\t=> \"PRO I\"\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t//add it to the student vote table\n\t\t\t\t\t\t\t$student_vote = $this->Evoting_model->student_add($data);\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tredirect('Evoting/pro_II_candidate');\n\n\n\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\t//if erro occure redirect to home page, logout voter and kill all \n\t\t\t\t\t\t\t//session\n\t\t\t\t\t\t\tredirect('Autharization/logout');\n\n\t\t\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\tredirect('Welcome');\n\t\t\t}\n\n\n\n\t}", "public function submit_vote($user_id,$post_id,$vote_type)\n\t{\n\t\t$sql = 'SELECT COUNT(*) as cnt FROM vote WHERE user_id=? AND post_id=?';\n\t\t$query=$this->db->query($sql,array($user_id,$post_id))->row_array();\n\t\t\n\t\tif($query['cnt']!=0)\n\t\t{\n\t\t\t$sql='UPDATE `vote` SET `vote_type`=? WHERE user_id = ? AND post_id =? ';\n\t\t\t$query=$this->db->query($sql,array($vote_type,$user_id,$post_id));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql='INSERT INTO `vote`(`user_id`, `post_id`, `vote_type`) VALUES (?,?,?)';\n\t\t\t$query=$this->db->query($sql,array($user_id,$post_id,$vote_type));\n\t\t}\n\t}", "public function treasurer_vote(){\n\n\t\t//checking if the voter hase the right credential to vote\n\n\t\tif(!$this->session->userdata('logged_in')){\n\t\t\t\tredirect('Welcome');\n\t\t}\n\n\n\t\t\tif(isset($_POST['treasurer_vote'])){\n\n\t\t\t\t$candidate_id = $this->input->post('candidate_id');\n\t\t\t\t$candidate_name = $this->input->post('candidate_name');\n\n\t\t\t\t$vote_count = $this->input->post('vote_count');\n\n\t\t\t\t$vote_count = $vote_count + 1;\n\t\t\t\t\n\t\t\t\t$student_id = $this->session->userdata('student_id');\n\n\t\t\t\t//Getting student last name through their login id\n\t\t\t\t$student_full_name = $this->Evoting_model->stud_fullname($student_id);\n\n\t\t\t\t $student_full_name = $student_full_name->full_name;\n\n\t\t\t\t//setting the time the voting was carryout \n\t\t\t\t$datestring = ' %Y / %m / %d - %h:%i %a';\n\t\t\t\t$time = time();\n\n\t\t\t\t//collecting voting details here and pass them into an array\n\t\t\t\t$data = array(\n\t\t\t\t\t\t'student_id' \t=> $student_id,\n\t\t\t\t\t\t'stud_lastname'\t=> $student_full_name,\n\t\t\t\t\t\t'vote'\t\t\t=> '1', //the most critical part of the software\n\t\t\t\t\t\t'candidate_id'\t=> $candidate_id,\n\t\t\t\t\t\t'candidate_name'=> $candidate_name,\n\t\t\t\t\t\t\n\t\t\t\t\t\t'vote_status'\t=> '1'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t//pushing voting details to the to the destinated table in the db\n\t\t\t\t\t$voting = $this->Evoting_model->treasurer_vote($data);\n\n\t\t\t\t\t//update the candidate vote cout record\n\t\t\t\t\t\t$id = $candidate_id;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'vote_count'\t=> $vote_count\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$update_candidate = $this->Evoting_model->update_cand_treasurer($id, $data);\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t//if voting was successfully stored in the database send the voter\n\t\t\t\t\t\t// to the next voting position\n\n\t\t\t\t\t\tif($voting){\n\n\t\t\t\t\t\t\t//set flash data and redirect to the next position\n\n\t\t\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t\t'student_id'\t=> $student_id,\n\t\t\t\t\t\t\t\t\t'candidate_id'\t=> $candidate_id,\n\t\t\t\t\t\t\t\t\t'candidate_name'\t=> $candidate_name,\n\t\t\t\t\t\t\t\t\t'position'\t\t=> \"Treasurer\"\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t//add it to the student vote table\n\t\t\t\t\t\t\t$student_vote = $this->Evoting_model->student_add($data);\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tredirect('Evoting/welf_candidate');\n\n\n\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\t//if erro occure redirect to home page, logout voter and kill all \n\t\t\t\t\t\t\t//session\n\t\t\t\t\t\t\tredirect('Autharization/logout');\n\n\t\t\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\tredirect('Welcome');\n\t\t\t}\n\n\n\n\t}", "function updatereviewstatus($assid, $studentid, $datesubmitted, $tid, $pid){\n\t\t\t$strQuery=\"update review_assignments set pid = '$pid', date_submitted='$datesubmitted', status = 'not' where aid='$assid' and stid = '$studentid' and tid='$tid'\";\n\t\t\t$result = $this->query($strQuery);\n\t}", "public function update(Request $request)\n {\n $vote=UserParticipatesParty::find($request->id);\n $track = Track::where('id',$vote->vote)->first();\n $track->votes -=1;\n $track->save();\n $request->track_id;\n $track = Track::find($request->track_id);\n $track->votes += 1;\n $track->save();\n $vote->vote=$request->track_id;\n $vote->save();\n return redirect()->back()->with('success','vote changed successfully');\n }", "public function update(Request $request, vote $vote)\n {\n //\n }", "public function testUpVotingButton()\n {\n $client = static::createClient();\n\n\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/tag');\n $link= $crawler->selectLink('Upvote')\n ->eq(\"1\")\n ->link();\n $this->assertEquals(\n\n $link->getUri(),'http://localhost/tag/2/upvote');\n\n\n\n }", "public function vote(Request $request)\n {\n if(User::where('username', '=', $request->userName)->exists()){\n\n $followed_id = User::where('username', '=', $request->userName)\n ->first()->id;\n\n $follower_id = Auth::user()->id;\n\n // check if exist remove else add\n $following = Following::firstOrNew(array(\n 'followed_id' => $followed_id, 'follower_id' => $follower_id));\n\n if ($following->exists) {\n\n $following->where([\n ['followed_id', '=', $followed_id],\n ['follower_id', '=', $follower_id],\n ])->delete();\n return 0;\n\n } else {\n\n $following->followed_id = $followed_id;\n $following->follower_id = $follower_id;\n $following->save();\n return 1;\n }\n }\n }", "public function setUpVotes($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->up_votes !== $v || $v === 0) {\n\t\t\t$this->up_votes = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::UP_VOTES;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function testDownvoteNonUpvotedLink()\n {\n $users_cnt = DB::table('users')->count();\n $links_cnt = DB::table('links')->count();\n $downvoted_cnt = DB::table('downvoted_links')->count();\n $user = User::storeUser([\n 'username' => 'Lily',\n 'email' => 'lily@l.com',\n 'password' => '123456789',\n ]);\n\n $link = Link::storeLink([\n 'content' => 'test content',\n 'title' => 'test title',\n 'author_username' => $user->username\n ]);\n $this->assertEquals(DB::table('users')->count(), $users_cnt + 1);\n $this->assertEquals(DB::table('links')->count(), $links_cnt + 1);\n $token = auth()->login($user);\n $headers = [$token];\n\n $payload = ['link_id' => $link->id];\n $this->json('POST', 'api/v1/auth/downvoteLink', $payload, $headers)\n ->assertStatus(200)\n ->assertJson([\n 'success' => 'true'\n ]);\n $this->assertEquals(DB::table('downvoted_links')->count(), $downvoted_cnt + 1);\n $user->delete();\n $this->assertEquals(DB::table('users')->count(), $users_cnt);\n $this->assertEquals(DB::table('links')->count(), $links_cnt);\n $this->assertEquals(DB::table('downvoted_links')->count(), $downvoted_cnt);\n }", "protected function catch_vote() {\n\t\t// Immediately get out of here if no vote was cast\n\t\tif ( ! isset( $_POST['thumbsup_id'] ) or ! isset( $_POST['thumbsup_rating'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Ignore votes for invalid item ids\n\t\tif ( ! ctype_digit( (string) $_POST['thumbsup_id'] ) or ! $this->load_item( (int) $_POST['thumbsup_id'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// A new vote is cast\n\t\t$this->new_vote['item_id'] = $this->item['id'];\n\n\t\t// Check if one is still allowed to vote on this item\n\t\tif ( $this->item['closed'] ) {\n\t\t\t$this->new_vote['error'] = 'Voting is closed for this item.';\n\t\t\treturn false;\n\t\t}\n\n\t\t// Already voted for this item? Check cookie first.\n\t\tif ( isset( $this->cookie[ $this->item['id'] ] ) ) {\n\t\t\t$this->new_vote['error'] = 'You have already voted for this item.';\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check IP, if we found one for this user\n\t\tif ( $this->config['ip_check'] and ! empty( $this->ip ) ) {\n\t\t\tif ( ThumbsUp_Database::db()->singleQuery(\"\n\t\t\t\tSELECT 1\n\t\t\t\tFROM votes\n\t\t\t\tWHERE item_id = {$this->item['id']} AND ip = '$this->ip'\n\t\t\t\tLIMIT 1\") ) {\n\t\t\t\t$this->new_vote['error'] = 'You have already voted for this item.';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Store the vote data into the new_vote property\n\t\t$this->new_vote += array(\n\t\t\t'rating' => min( 1, max( 0, (int) $_POST['thumbsup_rating'] ) ), // Must be either 0 or 1\n\t\t\t'ip' => $this->ip,\n\t\t\t'date' => time(),\n\t\t);\n\n\t\t// Finally, it is time to cast the vote\n\t\tThumbsUp_Database::db()->queryExec(\"\n\t\t\tINSERT INTO votes (id, item_id, rating, ip, date)\n\t\t\tVALUES (NULL, {$this->new_vote['item_id']}, {$this->new_vote['rating']}, '{$this->new_vote['ip']}', {$this->new_vote['date']})\");\n\n\t\t// Add the current item id to the cookie list\n\t\t$this->update_cookie( $this->item['id'] );\n\n\t\t// Vote successfully registered\n\t\treturn true;\n\t}", "function updaterating($sel_id)\n{\n global $xoopsDB;\n $sel_id = intval($sel_id);\n $sql = \"SELECT COUNT(*), FORMAT(AVG(rating),4) FROM \" . $xoopsDB->prefix(\"mylinks_votedata\") . \" WHERE lid={$sel_id}\";\n $voteResult = $xoopsDB->query($sql);\n if ($voteResult) {\n list($votesDB, $finalrating) = $xoopsDB->fetchRow($voteResult);\n/*\n $query = \"SELECT rating FROM \" . $xoopsDB->prefix(\"mylinks_votedata\") . \" WHERE lid={$sel_id}\";\n $voteresult = $xoopsDB->query($query);\n $votesDB = $xoopsDB->getRowsNum($voteresult);\n $totalrating = 0;\n while(list($rating)=$xoopsDB->fetchRow($voteresult)){\n $totalrating += $rating;\n }\n $finalrating = $totalrating/$votesDB;\n $finalrating = number_format($finalrating, 4);\n*/\n $query = \"UPDATE \" . $xoopsDB->prefix(\"mylinks_links\") . \" SET rating={$finalrating}, votes={$votesDB} WHERE lid = {$sel_id}\";\n $xoopsDB->query($query) or exit();\n }\n}", "public function postUpdateReview()\n {\n \n $update_review = new Review();\n \n if( $update_review->updateReview() )\n {\n\n return Response::json(\"success\");\n }\n else\n {\n return Response::json(\"fail\");\n }\n \n }", "function setVote($id, $vote) { \n\ttry { \n\t\tif (($vote != 1) && ($vote != 2)) { \n\t\t\terror_log('vote must be 1 or 2');\n\t\t\treturn 0;\n\t\t} else { \n\t\t\t$question = ORM::for_table('questions')->where('id', $id)->find_one();\n\t\t\tif ($vote == 1) { \n\t\t\t\t$question->vote_answer1 += 1;\n\t\t\t} else { \n\t\t\t\t$question->vote_answer2 += 1;\n\t\t\t}\n\t\t\t$question->save();\n\t\t\treturn 1;\n\t\t}\n\t} catch (Exception $e) { \n\t\terror_log($e->getMessage());\n\t\treturn 0;\n\t}\n}", "function update_after_empoyer_review($project_id, $comment_id) {\n global $wpdb;\n \n $rate = 0;\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $freelancer_id = get_post_field('post_author', $bid_id_accepted);\n \n $profile_id = get_user_meta($freelancer_id, 'user_profile_id', true);\n \n //update status for project\n wp_update_post(array(\n 'ID' => $project_id,\n 'post_status' => 'complete'\n ));\n \n //update rate for profile\n wp_update_post(array(\n 'ID' => $bid_id_accepted,\n 'post_status' => 'complete'\n ));\n \n if (isset($_POST['score']) && $_POST['score']) {\n $rate = (int)$_POST['score'];\n if ($rate > 5) $rate = 5;\n update_comment_meta($comment_id, 'et_rate', $rate);\n update_post_meta($bid_id_accepted, 'rating_score', $rate);\n }\n \n $sql = \"select AVG(M.meta_value) as rate_point, COUNT(C.comment_ID) as count\n from $wpdb->posts as p \n Join $wpdb->comments as C \n on p.ID = C.comment_post_ID \n join $wpdb->commentmeta as M \n on C.comment_ID = M.comment_id\n Where p.post_author = $freelancer_id\n and p.post_status ='complete'\n and p.post_type ='\" . BID . \"' \n and M.meta_key = 'et_rate'\n and C.comment_type ='em_review'\n and C.comment_approved = 1 \";\n \n $results = $wpdb->get_results($sql);\n \n // update post rating score\n if ($results) {\n wp_cache_set(\"reviews-{$freelancer_id}\", $results[0]->count);\n update_post_meta($profile_id, 'rating_score', $results[0]->rate_point);\n } else {\n update_post_meta($profile_id, 'rating_score', $rate);\n }\n \n // send mail to freelancer.\n $this->mail->review_freelancer_email($project_id);\n }", "public function unvoteAction()\n {\n $return = 0;\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Checking if user is online and answer_id > 0 */\n if ($user && $_GET['id'] > 0) {\n \n /* Unvote answer and return number of votes */\n $return = VotedAnswer::unvote($user->id, $_GET['id']);\n }\n \n /* Return response */\n header('Content-Type: application/json');\n echo json_encode($return);\n }", "public function vote($id){\n $data['where'] = ['topic_id'=>$id,'user_id'=>Auth::user()->id];\n $collection = DB::table('topic_user')->where($data['where'])->first();\n $data['id'] = $id;\n if($collection) {\n DB::transaction(function ($data) use ($data) {\n try {\n $this->model->where('id', $data['id'])->decrement('vote_count');\n DB::table('topic_user')->where($data['where'])->delete();\n } catch (\\Exception $e) {\n throw $e;\n }\n });\n }else{\n DB::transaction(function ($data) use ($data) {\n try {\n $this->model->where('id', $data['id'])->increment('vote_count');\n DB::table('topic_user')->insert($data['where']);\n } catch (\\Exception $e) {\n throw $e;\n }\n });\n }\n }", "public function votePoll(PollPostRepositoryInterface $post, array $answer): PodiumResponse;", "function __bindToUpVotes($user_id, &$model, $foreign_key, $upvote){\n\t\t\t$upvote = $upvote ? '1' : '0';\n\n\t\t\t/*Get the submissions that this user upvoted*/\n\t\t\t$model->bindModel(array('hasOne'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Vote'=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'className' => 'Vote',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => $foreign_key,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('Vote.upvote' => $upvote,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Vote.user_id' => $user_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order' => 'Vote.created DESC'))), false);\n\t\t}", "static function add_voting(): void {\r\n\t\tself::add_acf_inner_field(self::roles, self::voting, [\r\n\t\t\t'label' => 'Automatic voting rights?',\r\n\t\t\t'type' => 'true_false',\r\n\t\t\t'instructions' => 'As opposed to earned.',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '25',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'message' => '',\r\n\t\t\t'default_value' => 0,\r\n\t\t\t'ui' => 1,\r\n\t\t]);\r\n\t}", "public function setDownVotes($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->down_votes !== $v || $v === 0) {\n\t\t\t$this->down_votes = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::DOWN_VOTES;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function test_a_user_can_vote_for_a_post()\n {\n $user = $this->defaultUser();\n\n $post = $this->createPost();\n\n $this->browse(function (Browser $browser) use($user,$post) {\n $browser->loginAs($user)\n ->visit($post->url)\n ->pressAndWaitFor('+1')\n ->assertSeeIn('current-vote',1);\n });\n }", "public function downVotesCount()\n {\n return $this->post_votes()\n ->selectRaw('post_id, count(*) as count')\n ->where('vote', '=', '-1')\n ->groupBy('post_id');\n }", "function utility_upVoteImage($request) {\n\n $request['piv_vote'] = 1;\n $res = utility_insertVote($request);\n\n return $res;\n}", "public function unlike() {\n\n $review = Input::get('review');\n\n if (!$review == \"\") {\n\n DB::table('review_likes')\n ->where('review_id', $review)\n ->where('user_id', Auth::user()->id)\n ->delete();\n }\n }", "public function vote()\n\t\t{\n\t\t\t$betId = $this->input->get_post('bet_id');\t\n\t\t\t$categoryId = $this->input->get_post('cat_id');\n\t\t\t$answerType = $this->input->get_post('answer_type');\n\t\t\t$userId = $this->input->get_post('user_id');\n\t\t\ttry{\n\t\t\t\tif($betId == false || $betId== \"\"){\n\t\t\t\t\t$this->_jsonData['status']=\"FAILURE\";\n\t\t\t\t\t$this->_jsonData['message']=\"Bet Id Missing\";\n\t\t\t\t}else if($categoryId == false || $categoryId == \"\"){\n\t\t\t\t\t$this->_jsonData['status']=\"FAILURE\";\n\t\t\t\t\t$this->_jsonData['message']=\"Category Id Missing\";\n\t\t\t\t}else if($answerType == false || $answerType == \"\"){\n\t\t\t\t\t$this->_jsonData['status']=\"FAILURE\";\n\t\t\t\t\t$this->_jsonData['message']=\"Answer Type Missing\";\n\t\t\t\t}else if($userId == false || $userId == \"\"){\n\t\t\t\t\t$this->_jsonData['status']=\"FAILURE\";\n\t\t\t\t\t$this->_jsonData['message']=\"User Id Missing\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t'bet_id'=>$betId,\n\t\t\t\t\t\t\t\t'cat_id'=>$categoryId,\n\t\t\t\t\t\t\t\t'answer_type'=>$answerType,\n\t\t\t\t\t\t\t\t'user_id'=>$userId,\n\t\t\t\t\t);\n\t\t\t\t\t$res=$this->userModel->vote($data);\n\t\t\t\t\tif($res){\n\t\t\t\t\t\t//echo 1;\n\t\t\t\t\t\t$this->_jsonData['status']=\"SUCCESS\";\n\t\t\t\t\t\t$this->_jsonData['message']=\"Voted Successfully\";\n\t\t\t\t\t\t$this->_jsonData['data']='';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//echo 0;\n\t\t\t\t\t\t$this->_jsonData['status']=\"FAILURE\";\n\t\t\t\t\t\t$this->_jsonData['message']=\"You already voted for this bet..\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(Exception $e){\n\t\t\t\t$this->_jsonData['status']=\"FAILURE\";\n\t\t\t\t$this->_jsonData['message']=\"You already voted.\";\n\t\t\t\t$this->_jsonData['data']='';\n\t\t\t}\n\t\t\techo json_encode($this->_jsonData);\n\t\t\t$this->ServicesModel->createService($_REQUEST,$this->_jsonData,$_SERVER['SERVER_ADDR'],'vote',$_FILES);\n\t\t}", "public function upVote( $volleyId, $userId, $targetId, $imgUrl ){\n $query = \"\n INSERT IGNORE INTO `hotornot-dev`.`tblChallengeVotes`\n (`challenge_id`, `user_id`, `challenger_id`, `added`)\n VALUES ( ?, ?, ?, NOW() )\n \";\n $params = array( $volleyId, $userId, $targetId );\n $stmt = $this->prepareAndExecute($query, $params);\n\n // first we try to update the creator likes\n $sql = '\n UPDATE `hotornot-dev`.tblChallenges\n SET creator_likes = creator_likes + 1\n where id = ? and creator_img = ?\n ';\n $params = array( $volleyId, $imgUrl );\n $this->prepareAndExecute($sql, $params);\n\n // if we did n ot update the creator likes\n // then we try to update the likes in the participants table\n //\n if( !$this->rowCount ){\n $sql = '\n UPDATE `hotornot-dev`.tblChallengeParticipants\n SET likes = likes + 1\n where user_id = ?\n and challenge_id = ?\n and img = ?';\n\n $params = array( $targetId, $volleyId, $imgUrl );\n $this->prepareAndExecute($sql, $params);\n }\n\n // if we see that either table was updated, we proceed with the final updates\n if( $this->rowCount ){\n $sql = '\n UPDATE `hotornot-dev`.tblChallenges\n SET votes = votes + 1,\n updated = now()\n where id = ?\n ';\n $params = array( $volleyId );\n $this->prepareAndExecute($sql, $params);\n\n\n $sql = '\n UPDATE `hotornot-dev`.tblUsers\n SET total_votes = total_votes + 1\n where id = ?';\n $params = array( $targetId );\n $this->prepareAndExecute($sql, $params);\n }\n }" ]
[ "0.7474092", "0.6667271", "0.66351986", "0.6631062", "0.65872675", "0.6474246", "0.6437143", "0.64349455", "0.6381117", "0.6380795", "0.6357129", "0.6346349", "0.6332876", "0.63215625", "0.631858", "0.62889934", "0.6274676", "0.6250554", "0.6239642", "0.62295765", "0.61907095", "0.61511534", "0.6146258", "0.61413395", "0.61141425", "0.6074616", "0.6054162", "0.6046619", "0.6032649", "0.60274583", "0.6026835", "0.6018674", "0.5978717", "0.59781224", "0.5970172", "0.58802974", "0.5867931", "0.58499765", "0.5840161", "0.58099544", "0.5808631", "0.5786832", "0.5786129", "0.5761311", "0.57288486", "0.572306", "0.5708705", "0.57063043", "0.5705012", "0.56866896", "0.5680361", "0.5668256", "0.5653568", "0.56483775", "0.5641883", "0.5638484", "0.56100005", "0.56045634", "0.56017655", "0.560129", "0.5597158", "0.5587038", "0.55857015", "0.556912", "0.55507624", "0.55378604", "0.553263", "0.551614", "0.55059415", "0.5499036", "0.5496152", "0.5492932", "0.5474944", "0.5467617", "0.54648906", "0.5461727", "0.54524094", "0.54511553", "0.54455507", "0.54442465", "0.543159", "0.54280126", "0.5420385", "0.5417998", "0.5412642", "0.5409932", "0.5401629", "0.5397516", "0.5397342", "0.5394864", "0.53842455", "0.537556", "0.5374901", "0.5366571", "0.5359869", "0.53552824", "0.5354705", "0.5354668", "0.5353528", "0.5347585" ]
0.5811501
39
Returns the URL to report a review.
public function GetReportURL($bUseFullUrl = false) { $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('ReportReview', $aParameter, $bUseFullUrl); return $sReportLink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function url()\n\t{\n\t\treturn Url::to(\"review/\".$this->id.\"/\".$this->slug.\"/\".Session::get('Lang'));\n\t}", "function dokan_get_review_url( $user_id ) {\n $userstore = dokan_get_store_url( $user_id );\n\n return $userstore .\"reviews\";\n}", "public function getUrl()\n {\n if (null === $this->data) {\n $this->initializeReport();\n }\n\n return $this->data['_links']['report']['href'];\n }", "public function SendReviewReportNotification()\n {\n $this->SaveActionIdToComment();\n $oMail = TDataMailProfile::GetProfile('report-review');\n $aData = array();\n $oShop = TdbShop::GetInstance();\n $oArticle = $this->GetFieldShopArticle();\n $aData['sArticleName'] = $oArticle->GetName();\n $aData['sReviewId'] = $this->id;\n $aData['sReviewTitle'] = $this->fieldTitle;\n $aData['sReviewText'] = $this->fieldComment;\n $aData['sReviewAuthor'] = $this->fieldAuthorName;\n $aData['sUnlockReviewLink'] = \"<a href='\".$this->GetUnlockURL(true).\"'>\".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.publish_comment')).'</a> ';\n $aData['sDeleteReviewLink'] = \"<a href='\".$this->GetDeleteWithActionIdURL(true).\"'>\".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.delete_comment')).'</a> ';\n $aData['shopname'] = $oShop->GetName();\n $oMail->AddDataArray($aData);\n $oMail->SendUsingObjectView('emails', 'Customer');\n }", "public function getPath(): string\n {\n if ($this->type === Constants::TOP_REVIEW_BEST_VOTED) {\n return 'https://myanimelist.net/reviews.php?'.http_build_query(\n [\n 'p' => $this->page,\n 'st' => $this->type,\n ]\n );\n }\n\n return 'https://myanimelist.net/reviews.php?'.http_build_query(\n [\n 'p' => $this->page,\n 't' => $this->type,\n ]\n );\n }", "function getURLView(){return \"/report/\".$this->getId();}", "protected function getFetchUrl() {\n $url = 'users/' . $this->user->id . '/instruments';\n return $url;\n }", "protected function apiUrl()\n {\n return '/api/reviews/create';\n }", "public function getRechargeUrl()\n {\n return $this->get(self::_RECHARGE_URL);\n }", "public function reviewGet($restaurant_id = null){\n if($restaurant_id != null){\n return $this->host.static::$url['reviewGet'].$restaurant_id;\n }\n return $this->host.static::$url['reviewGet'];\n }", "public function get_review_error_page() {\n $this->do_review_error_page();\n return $this->c_review_error_page;\n }", "public function getPreviewUrl()\n {\n return $this->getUrl('*/*/preview');\n }", "public function get_review_page() {\n $this->do_review_page();\n return $this->c_review_page;\n }", "function getPreviewUrl () {\n return link::preview($this->dir, $this->file);\n }", "public function view(Review $review);", "public function getBackUrl()\n {\n return $this->getUrl('review/customer');\n }", "public function getPageviewUrl () {\n $urlPixel = 'https://www.google-analytics.com/collect?v=1'\n . '&tid=' . $this->GAtrackingID\n . '&t=pageview'\n . '&dp=' . $this->getPath()\n . '&dt=' . urlencode($this->title)\n . '&cn=' . urlencode($this->campaign)\n . '&cs=' . urlencode($this->source)\n . '&cm=' . urlencode($this->medium)\n . '&cc=' . urlencode($this->content)\n . '&cid=' . $this->supporterID; \n return $urlPixel;\n }", "public function getDeveloperUrl()\n {\n return 'http://absoluteweb.solutions';\n }", "public function get_link()\r\n\t{\r\n\t\t$url = api_get_path(WEB_PATH)\r\n\t\t\t.'main/gradebook/exercise_jump.php?cid='.$this->get_course_code();\r\n\t\tif (!api_is_allowed_to_create_course()\r\n\t\t\t&& $this->calc_score(api_get_user_id()) == null)\r\n\t\t$url .= '&amp;doexercise='.$this->get_ref_id();\r\n\t\t\r\n\t\treturn $url;\r\n\t}", "public function getPostUrl()\n {\n return Util::getLinkHref($this->xml, 'http://schemas.google.com/g/2005#post');\n }", "public function get_report_url($result_id) {\n\t\ttry {\n\t\t\t$access_report = $this->soap->getAccessReport(array(\n\t\t\t\t\"Result_ID\" => $result_id\n\t\t\t));\n\t\t} catch(SoapFault $e) {\n\t\t\tthrow new QMWiseException($e);\n\t\t}\n\t\treturn $access_report->URL;\n\t}", "public function get_preview_url()\n {\n }", "public function getFailureUrl();", "public function getSubmitUrl()\n {\n \treturn $this->getUrl('Purchase/Misc/Savepayment');\n }", "public function url(): string\n\t{\n\t\tswitch ($this->type())\n\t\t{\n\t\t\tcase UgcType::Video:\n\t\t\t\treturn $this->generateUrls()->downloadUrl;\n\t\t\tbreak;\n\n\t\t\tcase UgcType::Image:\n\t\t\t\treturn $this->generateUrls()->screenshotUrl;\n\t\t\tbreak;\n\t\t}\n\t}", "public function getReentryURL()\n\t{ return $this->myReentryURL ; }", "public function getIssuesUrl()\n {\n return $this->issuesUrl;\n }", "public function getReview()\n {\n return $this->review;\n }", "public function getUrl()\n \t{\n \t\t$url=Yii::app()->createUrl(\"markingUpSkill/view\",array('id'=>$this->id));\n\t\treturn $url;\n \t}", "public function getOkUrl()\n {\n return $this->url('./receipt');\n }", "public function getReviewsLink($embed = true, $baseDomain = self::DEFAULT_BASE_DOMAIN)\n {\n if (!$this->domain) {\n throw new \\InvalidArgumentException('Parameter domain is required');\n }\n\n return sprintf(\n 'https://%s/evaluate%s/%s',\n $embed ? '/embed' : '',\n $baseDomain,\n $this->domain\n );\n }", "public function getAnalysisUrl() {\n return;\n }", "public function report(Request $request, $event_id, $review_id)\n {\n $this->eventReviewService->report($event_id,$review_id, $request->get('volunteer'));\n return response()->json(['message' => 'Success.'], 200);\n }", "public function GetChangeReviewReportNotificationStateURL($bUseFullUrl = false)\n {\n $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id);\n $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('ChangeReviewReportNotificationState', $aParameter, $bUseFullUrl);\n\n return $sReportLink;\n }", "public function review()\n {\n return view('company.review');\n }", "public function getUrl()\n {\n return $this->createUrl();\n }", "public function getSaveUrl()\n {\n return $this->getUrl('connector/customer_newsletter/save');\n }", "public function getSaveUrl()\n {\n return $this->getUrl('connector/customer/newsletter');\n }", "function getEditUrl()\r\n\t{\r\n\t\tglobal $config;\r\n\r\n\t\t// need full url for links placed inside email messages\r\n\t\t$link = \"http://\". $config[\"http_host\"] . \"/survey_response_form?survey_id={$this->survey_id}\";\r\n\t\tif($this->token)\r\n\t\t\t$link .= \"&token={$this->token}\";\r\n\t\t\t\r\n\t\treturn $link;\r\n\t}", "public function review()\n {\n return view('review');\n }", "public function getReturnUrl()\n {\n return Mage::getUrl('payulite/processing/return', array('_secure' => true, 'order' => '{{ORDER_ID}}'));\n }", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function GetDeleteURL($bUseFullUrl = false)\n {\n $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id);\n $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('DeleteReview', $aParameter, $bUseFullUrl);\n\n return $sReportLink;\n }", "public function getURL()\n {\n return $this->site->getURL() . 'unl_progress/edit/';\n\n }", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "public function getReviewId() {\n\t\t\t\treturn ($this->reviewId);\n\t\t\t}", "public function getReview(){\r\n\t\treturn $this->SupportReviews();\r\n\t}", "function GetPreviewUrl($courseId, $redirectOnExitUrl, $cssUrl = null)\r\n\t{\r\n $previewUrl = $this->courseApiClient->getCoursePreviewByCourseIdByExpiryByForceReviewByStartScoByRedirectOnExitUrl($courseId,0,false,\"\",$redirectOnExitUrl);\r\n\r\n //get the 2015 api url, and parse so we can add it to the return relative url.\r\n $engineUrl = $this->GetEngineServerUrl();\r\n return \"$engineUrl$previewUrl->launchLink\";\r\n\t}", "public function getSaveUrl()\n {\n return $this->getUrl('*/*/run', ['_current' => true]);\n }", "public function link($type='')\n\t{\n\t\tif (!isset($this->_base))\n\t\t{\n\t\t\t$this->_base = 'index.php?option=com_publications&id=' . $this->get('item_id') . '&active=reviews';\n\t\t}\n\t\t$link = $this->_base;\n\n\t\t// If it doesn't exist or isn't published\n\t\tswitch (strtolower($type))\n\t\t{\n\t\t\tcase 'edit':\n\t\t\t\t$link .= '&action=edit&comment=' . $this->get('id');\n\t\t\tbreak;\n\n\t\t\tcase 'delete':\n\t\t\t\t$link .= '&action=delete&comment=' . $this->get('id');\n\t\t\tbreak;\n\n\t\t\tcase 'reply':\n\t\t\t\t$link .= '&action=reply&category=review&refid=' . $this->get('id');\n\t\t\tbreak;\n\n\t\t\tcase 'report':\n\t\t\t\t$link = 'index.php?option=com_support&task=reportabuse&category=pubreview&id=' . $this->get('id') . '&parent=' . $this->get('publication_id');\n\t\t\tbreak;\n\n\t\t\tcase 'permalink':\n\t\t\tdefault:\n\t\t\t\t$link .= '#c' . $this->get('id');\n\t\t\tbreak;\n\t\t}\n\n\t\treturn $link;\n\t}", "public function getUrl()\n\t{\n\t\treturn '/akce/' . $this->getActionId();\n\t}", "public function getPostUrl()\n {\n return $this->scopeConfig->getValue(\n 'payment/eurobank/post_url',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "public function niceUrl()\n {\n return '/' . $this->recipe_id . '/' . $this->url;\n }", "public function getUrl()\n {\n return $this->url_format;\n }", "public function getScreenshotUrl()\n {\n return $this->screenshotUrl;\n }", "public function getFetchUrl()\n {\n return $this->getUrl(\"afbt/fetch/index\");\n }", "public function review($review_id) {\n if(!$this->that->config->get('koraki_review'))\n return;\n\n if (isset($this->that->request->server['HTTPS']) && (($this->that->request->server['HTTPS'] == 'on') || ($this->that->request->server['HTTPS'] == '1'))) {\n $base = $this->that->config->get('config_ssl');\n } else {\n $base = $this->that->config->get('config_url');\n }\n\n if(empty($review_id)){\n return;\n }\n\n $this->that->load->model('catalog/review');\n\n $review = $this->that->model_catalog_review->getReview($review_id);\n\n if(isset($review) && !empty($review['rating']) && !empty($review['rating'] >= 3) && $review['status']==1){\n\n $this->that->load->model('catalog/product');\n $this->that->load->model('tool/image');\n\n $p = $this->that->model_catalog_product->getProduct($review['product_id']);\n $popup = $this->that->model_tool_image->resize($p['image'], 150, 150);\n\n $item = array(\n \"product_id\" => $p['product_id'],\n \"product_name\" => $p['name'],\n \"thumbnail\" => $popup\n );\n\n $variables = array(\n \"number\" => $review['rating'] .\"/5\",\n \"item\" => array(\n $item\n )\n );\n $product = \"<a href='\" . $base . \"?route=product/product&product_id=\" . $p['product_id'] . \"' target='_blank'>\" . html_entity_decode($p['name'], ENT_QUOTES, 'UTF-8') . \"</a>\";\n\n $post = array(\n \"variables\" => json_encode($variables),\n \"notificationText\" => $review['author'] . \" made a \". $review['rating'] .\"/5 star rating on \" . $product,\n \"thumbnailUrl\" => $popup,\n \"location\" => \"\"\n );\n\n $this->post($post);\n }\n }", "public function url()\n\t{\n\t\treturn Url::to($this->id);\n\t}", "public function getSurveyLink()\n {\n $settings = $this->getSystemSettings();\n $link = filter_var($settings[\"redcap-survey-redirect\"]['value'], FILTER_SANITIZE_STRING);\n if (!$this->checkFormat($link))\n throw new \\Exception('Incorrect Format of url applied in em config');\n else\n return $link;\n }", "public function getSaveUrl()\n {\n return $this->getUrl('*/*/save');\n }", "protected function composeReentryURL()\n\t{\n\t\t$s = SERVER_URL\n\t\t\t\t. $this->model->director->getSiteUrl('account/password_reset_reentry')\n\t\t\t\t. '/' . $this->myAuthID . '/' . $this->myNewToken\n\t\t\t\t;\n//\t\t$this->debugLog( 'Created reentry URL [' . $s\n//\t\t\t\t. '] for email bound for [' . $this->myEmailAddr . '].'\n//\t\t\t\t);\n\t\treturn $s ;\n\t}", "public function returnUrl(): string\n {\n return Request::url() . '?' . http_build_query([\n 'return' => 'return',\n 'oc-mall_payment_id' => $this->getPaymentId(),\n ]);\n }", "public function getMytripUrl() {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ()->get ( 'Magento\\Store\\Model\\StoreManagerInterface' )->getStore ();\n return $objectManager->getUrl('booking/mytrip/currenttrip/');\n }", "public function getCommentText()\n {\n $helper = Mage::helper('tigo_tigomoney');\n return\n $helper->__('Your store has two URIs which will be used by Tigo Payment Server. They are:') . '<br />' .\n '<strong>Redirect URI:</strong> ' . $this->_getRedirectUri() . ' <br />' .\n '<strong>Callback URI:</strong> ' . $this->_getCallbackUrl() . ' <br />';\n }", "public function get_url() {\r\n\t\treturn $this->feed->get_url().\"/\".$this->id.\"/\".urlencode(strtolower($this->title));\r\n\t}", "public function show(Review $review)\n {\n return $review;\n }", "public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }", "public function url() {\n if ($this->no_results)\n return false;\n\n $config = Config::current();\n\n return url(\"view/\".$this->url, ExtendController::current());\n }", "public function getReviewAction()\n\t{\n\t\t$this->_ajaxValidation();\n\t\t$response['content']=$this->_getReviewHtml();\n\t\t$this->getResponse()->setBody(json_encode($response));\n\t}", "public function get_view_booking_url() {\n $view_booking_endpoint = YITH_WCBK()->endpoints->get_endpoint( 'view-booking' );\n\n $view_booking_url = wc_get_endpoint_url( $view_booking_endpoint, $this->id, wc_get_page_permalink( 'myaccount' ) );\n\n return apply_filters( 'yith_wcbk_get_view_booking_url', $view_booking_url, $this );\n }", "public function getTakeUrl() { }", "public function url($ticket)\n {\n return self::API_SHOW.\"?ticket={$ticket}\";\n }", "public static function gaReferrer()\n {\n return self::isReferred() ? 'ga(\"BaseTracker.set\", \"dimension3\", \"'.$_SERVER['HTTP_REFERER'].'\");' : '';\n }", "function getViewUrl() {\n \treturn assemble_url('reminder_view', array('reminder_id' => $this->getId()));\n }", "public function getDocumentationUrl();", "public function getUrl()\n {\n return Yii::app()->createUrl('/forum/thread/view', array('id' => $this->id));\n }", "public function createReferralLink() : string\n {\n $url = $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_WEB);\n $encrypt = urlencode($this->encryptor->encrypt($this->customerSession->getCustomerId()));\n $link = $url . \"?ref=\" . $encrypt;\n return $link;\n }", "public function makeUrlFromRequest()\n {\n $id = __Request::get('id', null);\n $resolvedVO = $this->createResolvedVO($id);\n return $resolvedVO->url;\n }", "public static function getURL()\r\n {\r\n $url = 'https://accounts.google.com/o/oauth2/auth?client_id=' . self::$details['client_id'] . '&redirect_uri=' . self::$details['redirect'] . '&scope=https://www.google.com/m8/feeds/&response_type=code';\r\n return $url;\r\n }", "public function get_url()\n {\n }", "function subject_url($report_subject, $non_html_amp = false)\n\t{\n\t\t$report_subject = (int)$report_subject;\n\t\treturn 'viewtopic.php?' . POST_POST_URL . '=' . $report_subject . '#' . $report_subject;\n\t}", "public function getUrlDetail()\n {\n \treturn \"cob_actadocumentacion/ver/$this->id_actadocumentacion\";\n }", "public function url(): string\n {\n return $this->url;\n }", "public function url(): string\n {\n return $this->url;\n }", "public function getUrl() {\n\t\treturn $this->rawUrl;\n\t}", "public function ReportComment(){ \r\n $this->comment();\r\n $this->reportPost();\r\n $this->_commentManager->getReportComment($this->_reportPostSecure,\"1\");\r\n header('location: '.$_GET[\"url\"].'&id='.$_GET[\"id\"]);\r\n }", "public function generate_url()\n {\n }", "function getRedirectLink()\n {\n global $wgRequest;\n if($this->user->isTemporary)\n {\n // User is viewing this from liveshow, means we have to redirect back to ViewSurvey page,\n // and not the wiki page.\n // In this case 'returnto' value does not mean anything, we know where to return.\n $t = Title::newFromText('Special:ViewSurvey');\n\n $url = $t->getLocalURL('liveshow='.$this->user->getTemporaryKey($this->page_id)\n .'&id='.$this->page_id\n .'&userID='.$this->user->userID).'#survey_id_'.$this->page_id;\n return $url;\n }\n else\n {\n $title = Title::newFromText($wgRequest->getVal('returnto'));\n return $title->getLocalURL();\n }\n }", "public function getUrl() {\n\t\t$this->getRublon()->log(__METHOD__);\n\t\treturn $this->getRublon()->getAPIDomain() .\n\t\t\tself::URL_PATH_CODE .\n\t\t\turlencode($this->getUrlParamsString());\n\t}", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "function getNotificationUrl($request, $notification) {\n\t\t$router = $request->getRouter();\n\t\t$dispatcher = $router->getDispatcher();\n\t\t$contextDao = Application::getContextDAO();\n\t\t$context = $contextDao->getById($notification->getContextId());\n\n\t\tswitch ($notification->getType()) {\n\t\t\tcase NOTIFICATION_TYPE_PUBLISHED_ISSUE:\n\t\t\t\treturn $dispatcher->url($request, ROUTE_PAGE, $context->getPath(), 'issue', 'current');\n\t\t\tdefault:\n\t\t\t\treturn parent::getNotificationUrl($request, $notification);\n\t\t}\n\t}", "public function getRssUrl()\n {\n return Mage::getUrl('tpl_eventsmanager/invitationstatus/rss');\n }", "public function get_return_url()\n {\n }", "protected function get_single_review_action_link( $review_id = 0, $action_name = '' ) {\n\n\t\t// Bail without the review ID or action name.\n\t\tif ( empty( $review_id ) || empty( $action_name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fetch the dataset for an edit link.\n\t\t$action_dataset = $this->get_row_action_dataset( $review_id, $action_name );\n\n\t\t// Bail without the action dataset.\n\t\tif ( empty( $action_dataset ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get our primary settings link.\n\t\t$settings_link = Helpers\\get_admin_menu_link( Core\\REVIEWS_ANCHOR );\n\n\t\t// Set the action link args.\n\t\t$action_linkset = array(\n\t\t\t'wbr-action-name' => $action_name,\n\t\t\t'wbr-item-id' => absint( $review_id ),\n\t\t\t'wbr-item-type' => 'review',\n\t\t\t'wbr-product-id' => $action_dataset['data']['product-id'],\n\t\t\t'wbr-nonce' => $action_dataset['nonce'],\n\t\t);\n\n\t\t// Create and return the string of the URL.\n\t\treturn add_query_arg( $action_linkset, $settings_link );\n\t}", "public function getReviewProfileId() {\n\t\t\t\treturn ($this->reviewProfileId);\n\t\t\t}", "public function getEventUrl () {\n $urlPixel = 'https://www.google-analytics.com/collect?v=1'\n . '&tid=' . $this->GAtrackingID\n . '&t=event'\n . '&ec=' . urlencode($this->category)\n . '&ea=' . urlencode($this->action)\n . '&cn=' . urlencode($this->campaign)\n . '&cs=' . urlencode($this->source)\n . '&cm=' . urlencode($this->medium)\n . '&cc=' . urlencode($this->content)\n . '&cid=' . $this->supporterID;\n return $urlPixel;\n }", "public function getDispatchesPageUrl()\n {\n return $this->getUrl('temando/dispatch/index');\n }" ]
[ "0.6717816", "0.65609324", "0.6401005", "0.61729616", "0.6155172", "0.61303866", "0.61246896", "0.6079438", "0.5972531", "0.59692407", "0.59291285", "0.5905093", "0.5902077", "0.58918417", "0.5848668", "0.5725033", "0.5717552", "0.5702126", "0.5679133", "0.56754863", "0.56445926", "0.5636212", "0.5605584", "0.55415446", "0.55147845", "0.5502896", "0.54933304", "0.5487175", "0.5471464", "0.5454552", "0.5446193", "0.5442052", "0.5438734", "0.54362917", "0.54263663", "0.54003733", "0.5398529", "0.5396102", "0.5395631", "0.53748906", "0.5361957", "0.53577274", "0.53577274", "0.53577274", "0.53577274", "0.535573", "0.5337549", "0.53330135", "0.53198874", "0.53176934", "0.53154373", "0.5312963", "0.5307032", "0.5302598", "0.5301876", "0.529543", "0.529326", "0.52880234", "0.52818537", "0.52747124", "0.52734745", "0.52623534", "0.5260775", "0.5257487", "0.524526", "0.5242351", "0.52253324", "0.52182853", "0.5197027", "0.5188851", "0.5188449", "0.5185803", "0.5182177", "0.5179714", "0.51768494", "0.5175666", "0.5164744", "0.51640534", "0.51610494", "0.5160196", "0.51526064", "0.5151448", "0.51507384", "0.51466423", "0.51429796", "0.51380944", "0.51380944", "0.51370305", "0.51360685", "0.5134611", "0.5132936", "0.5130903", "0.51277983", "0.5121513", "0.5119553", "0.5113927", "0.5113143", "0.5109706", "0.51091087", "0.51058716" ]
0.6855537
0
Returns URL to change report notification state for a review.
public function GetChangeReviewReportNotificationStateURL($bUseFullUrl = false) { $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('ChangeReviewReportNotificationState', $aParameter, $bUseFullUrl); return $sReportLink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SendReviewReportNotification()\n {\n $this->SaveActionIdToComment();\n $oMail = TDataMailProfile::GetProfile('report-review');\n $aData = array();\n $oShop = TdbShop::GetInstance();\n $oArticle = $this->GetFieldShopArticle();\n $aData['sArticleName'] = $oArticle->GetName();\n $aData['sReviewId'] = $this->id;\n $aData['sReviewTitle'] = $this->fieldTitle;\n $aData['sReviewText'] = $this->fieldComment;\n $aData['sReviewAuthor'] = $this->fieldAuthorName;\n $aData['sUnlockReviewLink'] = \"<a href='\".$this->GetUnlockURL(true).\"'>\".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.publish_comment')).'</a> ';\n $aData['sDeleteReviewLink'] = \"<a href='\".$this->GetDeleteWithActionIdURL(true).\"'>\".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.delete_comment')).'</a> ';\n $aData['shopname'] = $oShop->GetName();\n $oMail->AddDataArray($aData);\n $oMail->SendUsingObjectView('emails', 'Customer');\n }", "protected function getNotificationURL ()\n {\n return Mage::getUrl('securehosting/redirect/notify/', array('_secure' => true));\n }", "private function getNotificationURL()\n {\n if ($this->getConfigData('notification')) {\n $notificationUrl = $this->getConfigData('notification');\n } else {\n //default installation\n $notificationUrl = Mage::app()->getStore(0)->getBaseUrl() . 'pagseguro/notification/send/';\n }\n\n return $notificationUrl;\n }", "public function url()\n\t{\n\t\treturn Url::to(\"review/\".$this->id.\"/\".$this->slug.\"/\".Session::get('Lang'));\n\t}", "public function GetReportURL($bUseFullUrl = false)\n {\n $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id);\n $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('ReportReview', $aParameter, $bUseFullUrl);\n\n return $sReportLink;\n }", "function getNotificationUrl($request, $notification) {\n\t\t$router = $request->getRouter();\n\t\t$dispatcher = $router->getDispatcher();\n\t\t$contextDao = Application::getContextDAO();\n\t\t$context = $contextDao->getById($notification->getContextId());\n\n\t\tswitch ($notification->getType()) {\n\t\t\tcase NOTIFICATION_TYPE_PUBLISHED_ISSUE:\n\t\t\t\treturn $dispatcher->url($request, ROUTE_PAGE, $context->getPath(), 'issue', 'current');\n\t\t\tdefault:\n\t\t\t\treturn parent::getNotificationUrl($request, $notification);\n\t\t}\n\t}", "public function getNotificationLinkAttribute()\n { \n return \"/racing-excellence/{$this->id}\";\n }", "public function getNotifyUrl($storeId = null)\n {\n return $this->_getUrl('paypal/ipn', $storeId);\n }", "public function getNotificationUrl() {\n return (string) $this->getValue('notification_url');\n }", "public function getReviewstate() {}", "function dokan_get_review_url( $user_id ) {\n $userstore = dokan_get_store_url( $user_id );\n\n return $userstore .\"reviews\";\n}", "public static function getNewNotificationURL() {\n return admin_url().'admin.php?page=set-notification';\n }", "public function getRechargeUrl()\n {\n return $this->get(self::_RECHARGE_URL);\n }", "public function getUrl()\n {\n if (null === $this->data) {\n $this->initializeReport();\n }\n\n return $this->data['_links']['report']['href'];\n }", "public function getRssUrl()\n {\n return Mage::getUrl('tpl_eventsmanager/invitationstatus/rss');\n }", "public function getUpdateUrl()\n {\n return $this->urlBuilder->getUrl('walleycheckout/update');\n }", "public function getStatusUrl()\n {\n return Mage::helper('oro_ajax')->getAjaxStatusUrl($this->_urlParams);\n }", "public function getDataUpdaterUrl(): string\n {\n return $this->getUrl('realthanks/config/update');\n }", "protected function getFetchUrl() {\n $url = 'users/' . $this->user->id . '/instruments';\n return $url;\n }", "public function getReinitUrl()\n {\n return $this->urlBuilder->getUrl('walleycheckout/reinit');\n }", "public function getPreviewUrl()\n {\n return $this->getUrl('*/*/preview');\n }", "public function getOkUrl()\n {\n return $this->url('./receipt');\n }", "public function getWebhookUrl()\n\t{\n\t\t// TODO check loalhost\n\t\treturn 'http://'.$_SERVER['HTTP_HOST'].$this->getServiceLocator()->get('viewHelperManager')->get('url')->__invoke('hooks');\n\t}", "public function getRefundsNotificationUrl(): ?string\n {\n return $this->configuration[ConfigurationInterface::REFUNDS_NOTIFICATION_URL] ?? null;\n }", "public function routeNotificationForSlack()\n {\n return Config::get('base.slack_webhook_url');\n }", "function getURLView(){return \"/report/\".$this->getId();}", "public function getURL(Notification $notification)\n\t{\n\t\t$data = $notification->getData();\n\t\treturn '<URL>?topic=' . $notification->getObject() . '.0';\n\t}", "public function getActionUrl() : string\n {\n return $this->getUrl('pramp/api_store/switch');\n }", "public function getPath(): string\n {\n if ($this->type === Constants::TOP_REVIEW_BEST_VOTED) {\n return 'https://myanimelist.net/reviews.php?'.http_build_query(\n [\n 'p' => $this->page,\n 'st' => $this->type,\n ]\n );\n }\n\n return 'https://myanimelist.net/reviews.php?'.http_build_query(\n [\n 'p' => $this->page,\n 't' => $this->type,\n ]\n );\n }", "public function getInvitationsstatusUrl()\n {\n if ($listKey = Mage::getStoreConfig('tpl_eventsmanager/invitationstatus/url_rewrite_list')) {\n return Mage::getUrl('', array('_direct'=>$listKey));\n }\n return Mage::getUrl('tpl_eventsmanager/invitationstatus/index');\n }", "function getEditUrl()\r\n\t{\r\n\t\tglobal $config;\r\n\r\n\t\t// need full url for links placed inside email messages\r\n\t\t$link = \"http://\". $config[\"http_host\"] . \"/survey_response_form?survey_id={$this->survey_id}\";\r\n\t\tif($this->token)\r\n\t\t\t$link .= \"&token={$this->token}\";\r\n\t\t\t\r\n\t\treturn $link;\r\n\t}", "public function getBackUrl()\n {\n return $this->getUrl('review/customer');\n }", "public function getChangePasswordUrl()\n {\n $url = sprintf(\"%s/change-password?client_id=%s&state=%s\",\n $this->client->getBaseUrl(),\n $this->client->getConfig('client_id'),\n md5(uniqid())\n );\n\n return $url;\n }", "public function getExternalUpdateProfileUrl();", "function getPreviewUrl () {\n return link::preview($this->dir, $this->file);\n }", "public function getURL()\n {\n return $this->site->getURL() . 'unl_progress/edit/';\n\n }", "public function getReentryURL()\n\t{ return $this->myReentryURL ; }", "public function getSaveUrl()\n {\n return $this->getUrl('connector/customer/newsletter');\n }", "public function getSaveUrl()\n {\n return $this->getUrl('connector/customer_newsletter/save');\n }", "public function getUrlResume()\n {\n return isset($this->transaction['urlResume']) ? $this->transaction['urlResume'] : '';\n }", "public function getVacationModeSaveUrl() {\r\n /** To check vacation mode */\r\n return Mage::getUrl ( 'marketplace/general/vacationmodesave' );\r\n }", "protected function composeReentryURL()\n\t{\n\t\t$s = SERVER_URL\n\t\t\t\t. $this->model->director->getSiteUrl('account/password_reset_reentry')\n\t\t\t\t. '/' . $this->myAuthID . '/' . $this->myNewToken\n\t\t\t\t;\n//\t\t$this->debugLog( 'Created reentry URL [' . $s\n//\t\t\t\t. '] for email bound for [' . $this->myEmailAddr . '].'\n//\t\t\t\t);\n\t\treturn $s ;\n\t}", "public function routeNotificationForSlack()\n {\n return env('SLACK_WEBHOOK_URL');\n }", "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "public function getFetchUrl()\n {\n return $this->getUrl(\"afbt/fetch/index\");\n }", "public function get_review_error_page() {\n $this->do_review_error_page();\n return $this->c_review_error_page;\n }", "function notify_reviewer( $post_ID, $post, $dowhat='publish' ) {\n\t\t\tglobal $wpdb, $current_user;\n\t\t\t$last_revision = $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE post_parent=%d AND post_type=%s ORDER BY post_date DESC LIMIT 1\", $post_ID, 'revision' ) );\n\t\t\t$post_content = 'draft' == $dowhat ? get_post( $last_revision ) : get_post( $post_ID );\n\t\t\t$last_mod = $post_content->post_date;\n\t\t\t$post_content = $post_content->post_content;\n\t\t\t$revision_compare_link = admin_url( 'revision.php?action=diff&post_type=' . $post->post_type . '&right=' . $post->ID . '&left=' . $last_revision );\n\t\t\t$body = sprintf( __( \"New changes have been made to \\\"%s\\\" at <%s>. \", $this->text_domain ), $post->post_title, get_permalink( $post->ID ) );\n\t\t\tif( 'draft' == $dowhat ) {\n\t\t\t\t$body .= __( \"The author has requested that you review the new changes and determine whether to remove or approve them. These changes will not appear on the public website until you approve them.\\n\\n\", $this->text_domain );\n\t\t\t} else {\n\t\t\t\t$body .= __( \"The modifications have been published, but the author of the page has requested you be notified of them.\\n\\n\", $this->text_domain );\n\t\t\t}\n\t\t\t$body .= sprintf( __( \"The new content of the page is shown below if you would like to review it. You can also review %s the changes at %s. Thank you. \\n\\n======================================================= \\nRevisions made at %s \\n======================================================= \\n\\n%s\", $this->text_domain ), ( 'draft' == $dowhat ? __( \" and approve/reject \", $this->text_domain ) : '' ), $revision_compare_link, $last_mod, $post_content );\n\t\t\t\n\t\t\t$headers = \"From: {$current_user->display_name} <{$current_user->user_email}>\\r\\n\";\n\t\t\t\n\t\t\twp_mail( $this->reviewers, sprintf( __( '[%s] New modifications to %s' ), get_bloginfo('name'), $post->post_title ), $body, $headers );\n\t\t}", "protected function resetUrl($notifiable)\n {\n $appUrl = config('app_url');\n\n return url(\"$appUrl/password/reset/$this->token\") . '?email=' . urlencode($notifiable->email);\n }", "public function getIssuesUrl()\n {\n return $this->issuesUrl;\n }", "public function reviewGet($restaurant_id = null){\n if($restaurant_id != null){\n return $this->host.static::$url['reviewGet'].$restaurant_id;\n }\n return $this->host.static::$url['reviewGet'];\n }", "public function slackWebhookUrl()\n {\n return $this->getNotificationChannel('slack')['settings']['webhook_url'] ?? null;\n }", "public function get_report_url($result_id) {\n\t\ttry {\n\t\t\t$access_report = $this->soap->getAccessReport(array(\n\t\t\t\t\"Result_ID\" => $result_id\n\t\t\t));\n\t\t} catch(SoapFault $e) {\n\t\t\tthrow new QMWiseException($e);\n\t\t}\n\t\treturn $access_report->URL;\n\t}", "public function url()\n\t{\n\t\t/*\n\t\t * Retrieve the ping from the database.\n\t\t */\n\t\t$ping = db()->table('ping')->get('url', $_GET['url'])->where('deleted', null)->where('target', null)->all();\n\t\t\n\t\t/*\n\t\t * Pass the data onto the view.\n\t\t */\n\t\t$this->view->set('notifications', $ping);\n\t}", "public function getCommentText()\n {\n $helper = Mage::helper('tigo_tigomoney');\n return\n $helper->__('Your store has two URIs which will be used by Tigo Payment Server. They are:') . '<br />' .\n '<strong>Redirect URI:</strong> ' . $this->_getRedirectUri() . ' <br />' .\n '<strong>Callback URI:</strong> ' . $this->_getCallbackUrl() . ' <br />';\n }", "public function getSaveUrl()\n {\n return $this->getUrl('*/*/run', ['_current' => true]);\n }", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "public function get_review_page() {\n $this->do_review_page();\n return $this->c_review_page;\n }", "protected function resetPasswordUrl($notifiable)\n {\n return route('customer.password.reset', $this->token);\n }", "public static function getNotificationUrlById($id) {\n return admin_url().'admin.php?page=set-notification&id=' . $id;\n }", "protected function verificationUrl($notifiable)\n {\n $url = 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\n $frontend_url = env('APP_URL_FRONTEND','http://localhost:8080')\n .env('APP_SET_PASSWORD_PATH_FRONTEND','/auth/setPassword');\n return Str::replaceFirst(URL::route('verification.verify'),\n $frontend_url, $url);\n }", "public function getCommitUrl(): string\n {\n return $this->data->url;\n }", "function getViewUrl() {\n \treturn assemble_url('reminder_view', array('reminder_id' => $this->getId()));\n }", "public function getEditUrl()\n {\n return $this->_urlBuilder->getUrl('*/*/edit', ['id' => $this->getSubscription()->getId()]);\n }", "public function getPostUrl()\n {\n return $this->scopeConfig->getValue(\n 'payment/eurobank/post_url',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "public function getUrl()\n {\n if ((bool)$this->_action) {\n return $this->_vendorUrlModel->getUrl(\n (string)$this->_action,\n ['_cache_secret_key' => true]\n );\n }\n return '#';\n }", "function get_config_url() {\n global $CFG;\n return $CFG->wwwroot . '/blocks/php_report/config_params.php?id=' . $this->id . '&showcancel=1';\n }", "public function getFailureUrl();", "public function getSaveUrl()\n {\n return $this->getUrl('*/*/save');\n }", "public function toString()\n {\n return 'Product Review Report is visible in reports grid.';\n }", "public function getUrl($updateId);", "public function get_preview_url()\n {\n }", "public function report(Request $request, $event_id, $review_id)\n {\n $this->eventReviewService->report($event_id,$review_id, $request->get('volunteer'));\n return response()->json(['message' => 'Success.'], 200);\n }", "public function get_revoke_url() {\n\n $url = new moodle_url('/repository/repository_callback.php');\n $url->param('callback', 'yes');\n $url->param('repo_id', $this->id);\n $url->param('revoke', 'yes');\n $url->param('reloadparentpage', true);\n $url->param('sesskey', sesskey());\n return '<a target=\"_blank\" href=\"'.$url->out(false).'\">'.get_string('revokeyourgoogleaccount', 'repository_googledrive').'</a>';\n }", "public function getPaymentsNotificationUrl(): ?string\n {\n return $this->configuration[ConfigurationInterface::PAYMENTS_NOTIFICATION_URL] ?? null;\n }", "protected function apiUrl()\n {\n return '/api/reviews/create';\n }", "public function get_review_logs() {\n return $this->c_review_logs;\n }", "public function getUrl()\n {\n return WEB_SERVER_BASE_URL . '/badges/' . $this->data['id'];\n }", "public function getXmlrpcUrl()\n {\n return Mage::getStoreConfig('magebridge/settings/xmlrpc_url');\n }", "public function getCheckoutRedirectUrl()\n {\n return Mage::getUrl('radial_paypal_express/checkout/start');\n }", "function getUrl() {\n\t\treturn $this->repoObj->lobUrltitle;\n\t}", "public function boardingPointTrackUrl()\n {\n return route('bookings.track.boarding-point-route', ['bookingid' => $this->booking_id]);\n }", "public function getURL() {\n $defaultPorts= array(\n 'http' => 80,\n 'https' => 443\n );\n \n // Determine which settings we need to pass\n $xsr= array();\n if (\n ($this->getProduct() != $this->getDefaultProduct()) ||\n ($this->getLanguage() != $this->getDefaultLanguage())\n ) {\n $xsr[]= $this->getProduct();\n $xsr[]= $this->getLanguage();\n }\n if ($this->getSessionId()) $xsr[]= 'psessionid='.$this->getSessionId();\n\n $port= '';\n if (\n $this->getPort() &&\n (!isset($defaultPorts[$this->getScheme()]) ||\n $this->getPort() != $defaultPorts[$this->getScheme()])\n ) {\n $port= ':'.$this->getPort();\n }\n\n\n return sprintf(\n '%s://%s%s/xml/%s%s%s%s',\n $this->getScheme(),\n $this->getHost(),\n $port,\n (sizeof($xsr) ? implode('.', $xsr).'/' : ''),\n $this->getStateName(), \n $this->getQuery() ? '?'.$this->getQuery() : '',\n $this->getFragment() ? '#'.$this->getFragment() : ''\n );\n }", "public function view(Review $review);", "public function getUpdateSubscriberUrl()\n {\n return $this->UpdateSubscriberUrl;\n }", "function get_ipn_url()\n\t{\n\t\treturn ecommerce_test_mode()?'https://www.sandbox.paypal.com/cgi-bin/webscr':'https://www.paypal.com/cgi-bin/webscr';\n\t}", "public function getPostUrl()\n {\n return Util::getLinkHref($this->xml, 'http://schemas.google.com/g/2005#post');\n }", "function getResetPasswordUrl() {\n \treturn assemble_url('reset_password', array(\n \t 'user_id' => $this->getId(),\n \t 'code' => $this->getPasswordResetKey(),\n \t));\n }", "public function GetMarkAllAsReadURL();", "protected function verificationUrl($notifiable)\n {\n return URL::temporarySignedRoute(\n 'verificationapi.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey()]\n ); // this will basically mimic the email endpoint with get request\n }", "public function getTaxRateSaveUrl()\n {\n return $this->getUrl('tax/rate/ajaxSave/');\n }", "public function getReturnUrl()\n {\n return Mage::getUrl('payulite/processing/return', array('_secure' => true, 'order' => '{{ORDER_ID}}'));\n }", "protected function prepareStatusUpdateRequestUri($transaction_id) {\n $query = [\n 'NetworkToken' => $this->configuration['api_key'],\n 'Target' => 'Conversion',\n 'Method' => 'updateStatus',\n 'id' => $transaction_id,\n 'status' => 'rejected',\n ];\n return Url::fromUri($this->getApiUri(), ['query' => $query])->toUriString();\n }", "protected function get_single_review_action_link( $review_id = 0, $action_name = '' ) {\n\n\t\t// Bail without the review ID or action name.\n\t\tif ( empty( $review_id ) || empty( $action_name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fetch the dataset for an edit link.\n\t\t$action_dataset = $this->get_row_action_dataset( $review_id, $action_name );\n\n\t\t// Bail without the action dataset.\n\t\tif ( empty( $action_dataset ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get our primary settings link.\n\t\t$settings_link = Helpers\\get_admin_menu_link( Core\\REVIEWS_ANCHOR );\n\n\t\t// Set the action link args.\n\t\t$action_linkset = array(\n\t\t\t'wbr-action-name' => $action_name,\n\t\t\t'wbr-item-id' => absint( $review_id ),\n\t\t\t'wbr-item-type' => 'review',\n\t\t\t'wbr-product-id' => $action_dataset['data']['product-id'],\n\t\t\t'wbr-nonce' => $action_dataset['nonce'],\n\t\t);\n\n\t\t// Create and return the string of the URL.\n\t\treturn add_query_arg( $action_linkset, $settings_link );\n\t}", "public function getUrl()\n\t{\n\t\treturn '/akce/' . $this->getActionId();\n\t}", "public function getSaveUrl()\n {\n $this->setData('form_action_url', 'save');\n return $this->getFormActionUrl();\n }", "public static function get_webhook_url() {\n\t\treturn add_query_arg( 'wc-api', 'wc_stripe', trailingslashit( get_home_url() ) );\n\t}", "private function getServiceUrl()\n {\n $store = $this->storeRepository->getById($this->storeManager->getStore()->getId());\n return $this->url->getUrl(\n $this->service . \"/\" . $store->getCode() . \"/\" . $this->version\n );\n }", "public function linkNotification() {\n\n\n /*\n * \tWithin this function you should request the status of the transaction to get all transaction details, based on that information you should update the order and respond with a link\t\n */\n\n $return_url = substr(BASE_URL, 0, -12) . 'index.php';\n\n echo '<a href=\"' . $return_url . '\">Click here to return to the store.</a>';\n }", "public function getNewsletterUrl()\n {\n return $this->urlBuilder->getUrl('walleycheckout/newsletter');\n }", "public function get_edit_url() {\n\t\treturn $this->edit_link();\n\t}" ]
[ "0.61631596", "0.6058177", "0.5980761", "0.5963567", "0.5921378", "0.58467853", "0.58199763", "0.5770428", "0.57624984", "0.57478195", "0.57304883", "0.5726583", "0.56750053", "0.564266", "0.55702907", "0.55665797", "0.55359757", "0.55013573", "0.5479026", "0.54526186", "0.5435642", "0.5378938", "0.53788567", "0.537426", "0.5352066", "0.53486824", "0.5330669", "0.53185123", "0.53019494", "0.528981", "0.5287978", "0.5226541", "0.52184904", "0.52134013", "0.51996", "0.5191081", "0.51350206", "0.51231915", "0.5119891", "0.51170933", "0.511063", "0.510729", "0.509495", "0.509138", "0.5081539", "0.5080783", "0.5066308", "0.5053244", "0.5048587", "0.5037554", "0.5037397", "0.50371885", "0.5031451", "0.50160813", "0.5014391", "0.50135154", "0.5006811", "0.49959782", "0.49795365", "0.49768263", "0.4973739", "0.49715146", "0.49676576", "0.49613383", "0.49607503", "0.49586394", "0.49584237", "0.49545562", "0.49543142", "0.49492097", "0.49455696", "0.49443597", "0.49342677", "0.49299604", "0.4912967", "0.48950785", "0.48774868", "0.4875112", "0.48734945", "0.48727342", "0.48714927", "0.4868371", "0.486832", "0.48577526", "0.4854175", "0.48504567", "0.48500407", "0.48488864", "0.483515", "0.4832778", "0.48264372", "0.48221", "0.4814391", "0.48136413", "0.48130602", "0.48050073", "0.48029938", "0.4792083", "0.47898856", "0.47856283" ]
0.71689606
0
Returns the URL to delete a review.
public function GetDeleteURL($bUseFullUrl = false) { $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('DeleteReview', $aParameter, $bUseFullUrl); return $sReportLink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(Review $review);", "public function delete_review(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\t$id = $this->uri->segment(4,0);\n\t\t\t$condition = array('id' => $id);\n\t\t\t$this->review_model->commonDelete(REVIEW,$condition);\n\t\t\t$this->setErrorMessage('success','Review deleted successfully');\n\t\t\tredirect('admin/review/display_review_list');\n\t\t}\n\t}", "public function getDeleteUrl()\n {\n return $this->getUrl('*/*/delete', array('id' => $this->getRequest()->getParam('id')));\n }", "public function getDeleteUrl()\n {\n return $this->getUrl('*/*/delete', ['id' => $this->getTemplateId()]);\n }", "public function getDeleteUrl()\n {\n return $this->getUrl('*/*/delete', ['id' => $this->getModelId()]);\n }", "public function destroy(Review $review)\n {\n // dd($review);\n $deleteReview = DB::table('reviews')->where('id', $review->id)->delete();\n return Redirect::route('dashboard.reviews');\n }", "public function destroy(Review $review)\n {\n $review->delete();\n // redirect to a comments page\n }", "public function deleteAction() {\n\n\t\t//ONLY LOGGED IN USER CAN DELETE REVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n\t\t//SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('list_listing')->isValid())\n return;\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n\t\t//GET REVIEW ID AND REVIEW OBJECT\n $review_id = $this->_getParam('id');\n $review = Engine_Api::_()->getItem('list_reviews', $review_id);\n\n\t\t//ONLY REVIEW OWNER AND SUPER ADMIN CAN DELETE REVIEW\n if (!($review->owner_id == $viewer_id || $viewer->level_id == 1)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if ($this->getRequest()->isPost()) {\n\n $this->view->list = $list = Engine_Api::_()->core()->getSubject();\n $content_id = $this->_getParam('content_id');\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //DELETE REVIEW FROM DATABASE\n $review->delete();\n\n\t\t\t\t//DECREASE REVIEW COUNT\n\t\t\t\t$list->review_count--;\n\t\t\t\t$list->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //REDIRECT\n $url = $this->_helper->url->url(array('listing_id' => $list->getIdentity(), 'user_id' => $list->owner_id, 'slug' => $list->getSlug(), 'tab' => $content_id), 'list_entry_view', true);\n\n $this->_forward('success', 'utility', 'core', array(\n 'parentRefresh' => 3,\n 'parentRedirect' => $url,\n 'parentRedirectTime' => 1,\n 'messages' => array('Your Review has been deleted successfully.')\n ));\n } else {\n $this->renderScript('review/delete.tpl');\n }\n }", "public function destroy(Review $review)\n {\n //\n }", "public function destroy(Review $review)\n {\n //\n }", "public function destroy(Review $review)\n {\n //\n }", "public function deletereview()\n\n {\n $id = Input::get('id');\n Review::find(Input::get('id'))->delete();\n\n Vote::where('review_id',$id)->delete();\n\n return \"Your Review is successfully deleted\"; \n }", "public function destroy(Review $review)\n {\n $author = $review->author;\n $product_id = $review->product_id;\n $deleted = $review->delete();\n\n if($deleted) {\n $product = Product::where('id', $product_id)->first();\n return redirect()->route('products.show', $product->slug)->with('author', $author);\n }\n \n }", "public function actionDelete($id)\n\t{ \n GxcHelpers::deleteModel('Review', $id); \n\t}", "public function destroy(Request $request)\n {\n\n $delete = Reviews::findOrFail($request->id);\n $delete->delete();\n return redirect()->route('reviews.index')->with(\"message\",'تم الحذف بنجاح');\n\n \n \n }", "function cat_delete_link()\n{\n return Parrot::getInstance()->getUrl(\"admin/category/\" . discussion::encode_title(cat_title()) . \"/delete\");\n}", "public function delete() {\n\n $review = Input::get('review');\n\n $rev = DB::table('film_review')\n ->where('fr_usr_id', Auth::user()->id)\n ->where('fr_id', $review)\n ->first();\n\n if ($rev) {\n\n DB::table('user_actions')\n ->where('type_id', 2)\n ->where('subject_id', Auth::user()->id)\n ->where('object_id', $rev->fr_fl_id)\n ->delete();\n\n DB::table('user_notifications')\n ->where('type', 'liked')\n ->where('object_type', 'review')\n ->where('user_id', Auth::user()->id)\n ->where('object_id', $review)\n ->delete();\n\n DB::table('film_review')\n ->where('fr_usr_id', Auth::user()->id)\n ->where('fr_id', $review)\n ->delete();\n\n DB::table('review_likes')\n ->where('review_id', $review)\n ->delete();\n }\n return 'true';\n }", "protected function GetDeleteWithActionIdURL($bUseFullUrl = false)\n {\n $sDeleteURL = '';\n if (!empty($this->sqlData['action_id'])) {\n $aParameter = array(TdbShopArticleReview::URL_PARAM_ACTION_ID => $this->sqlData['action_id']);\n $sDeleteURL = TTools::GetExecuteMethodOnCurrentModuleURL('DeleteReview', $aParameter, $bUseFullUrl);\n }\n\n return $sDeleteURL;\n }", "public function getClientDeletionURL($id)\n\t{\n\t\treturn $this->baseURL . \"/action/confirm/\" . $id;\n\t}", "public function destroy(Review $review)\n {\n $review->delete();\n return back();\n }", "function getDeleteUrl() {\n return assemble_url('people_company_user_delete', array(\n 'company_id' => $this->getCompanyId(),\n 'user_id' => $this->getId(),\n ));\n }", "public function destroy($id)\n {\n Review::findOrFail($id)->delete();\n // Review::findOrFail($review)->delete();\n return redirect()->back(); \n }", "public function destroy(Request $request)\n {\n //\n $review = Review::findOrFail($request->review_id);\n $review->delete();\n\n Session::flash('deleted_review', 'The review has been deleted!');\n return redirect()->back();\n\n }", "public function destroy(reviews $reviews)\n {\n //\n }", "public function getDeleteLink($entity)\n {\n return '?action=delete&sampleId=' . $entity->getSampleId();\n }", "function getDeleteUrl() {\n \treturn assemble_url('people_company_delete', array('company_id' => $this->getId()));\n }", "function delete_link($title) {\n\treturn BASE . 'discussion' . DS . discussion::encode_title($title) . DS . 'delete';\n}", "public function getTaxRateDeleteUrl()\n {\n return $this->getUrl('tax/rate/ajaxDelete/');\n }", "public function getClientAskDeletionURL($id)\n\t{\n\t\treturn $this->baseURL . \"/action/delete/\" . $id;\n\t}", "public function productReviewDelete($id)\n {\n $review=ProductReview::find($id);\n $status=$review->delete();\n if($status){\n request()->session()->flash('success','Successfully deleted review');\n }\n else{\n request()->session()->flash('error','Something went wrong! Try again');\n }\n return redirect()->route('user.productreview.index');\n }", "public function destroy($id)\n {\n DB::table('ratings')->where('id', $id)\n \t\t\t\t\t->delete();\n //DB::table('ratings')->delete($id);\n\n return redirect()->route('admin.reviews')\n ->with('success',\n 'Review deleted successfully.');\n }", "public function url()\n\t{\n\t\treturn Url::to(\"review/\".$this->id.\"/\".$this->slug.\"/\".Session::get('Lang'));\n\t}", "public function delete($id) {\n\t\t$this->delete_reviews(['id'=>$id]);\n\t}", "public function delete_review_rating(Request $request){\n $data = $request->all();\n return BookReview::where('id',$data['id'])->delete();\n }", "public function deleteReview($userId)\n {\n }", "function get_publication_deleting_url($profile)\r\n {\r\n return $this->get_url(array(self :: PARAM_ACTION => self :: ACTION_DELETE_PUBLICATION, self :: PARAM_PROFILE_ID => $profile->get_id()));\r\n }", "protected function get_url_this_dele(){ return $this->input ['delete_url'] ;}", "public function getDeleteLink()\n {\n $params = array(\n 'id' => $this->id\n );\n $link = Globals::getRouter()->assemble($params, $this->_deleteRoute, true);\n return $link;\n }", "public function destroy($id)\n {\n Review::destroy($id);\n return redirect()->action('ReviewsController@index')->with('status', 'kommentaren är raderad!');\n }", "public function delete() {\n $mysqli = Database::getMYSQLI();\n \n $stmt = $mysqli->prepare(\"DELETE reviews FROM reviews WHERE id = ?\");\n \n $stmt->bind_param('i', $this->id);\n \n $stmt->execute();\n $stmt->close();\n $mysqli->close();\n }", "public function destroy(Request $req,TestReview $testReview)\n {\n $user = auth()->guard('client')->user();\n try{ \n $testReview->delete();\n return $this->sendResponse(\"\", 'testReview deleted successfully.');\n }catch(Exception $x){\n return $this->sendError('access error', 'either you dont have access to this record or it was deleted');\n }\n \n }", "public function destroy(ProductReview $productReview)\n {\n //\n }", "public function destroy(ProductReview $productReview)\n {\n //\n }", "public function getMessageDeleteUrl(): string\n {\n return $this->getUrl('webforms/message/delete');\n }", "public function getDeleteUrl()\n\t{\n\t\treturn '?module=TreesManager&parent=Settings&action=Delete&record=' . $this->getId();\n\t}", "function getDeleteLink() { return $this->_deletelink; }", "public function actionDelete($id)\n {\n $this->service->removeReview($id);\n\n return $this->redirect(['index']);\n }", "public function destroy(Review $review)\n {\n $review->delete();\n flash()->success('Review Deleted');\n\n return back();\n }", "protected function apiUrl()\n {\n return '/api/reviews/create';\n }", "public function destroy(Review $review)\n {\n $review->delete();\n }", "public function deleteAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n if (!($category_id = $this->_getParam('category_id'))) {\n die('No identifier specified');\n }\n\n //GENERATE FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Delete();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n foreach ($values as $key => $value) {\n if ($value == 1) {\n $reviewcat_id = explode('reviewcat_name_', $key);\n $reviewcat = Engine_Api::_()->getItem('sitestorereview_reviewcat', $reviewcat_id[1]);\n\n Engine_Api::_()->sitestorereview()->deleteReviewCategory($reviewcat_id[1]);\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //DELETE THE REVIEW PARAMETERS\n $reviewcat->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n $this->renderScript('admin-ratingparameter/delete.tpl');\n }", "function deleteReview($reviewId) {\n $db = phpmotorsConnect();\n $sql = 'DELETE FROM reviews WHERE reviewId = :reviewId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':reviewId', $reviewId, PDO::PARAM_INT);\n $stmt->execute();\n $rowsChanged = $stmt->rowCount();\n $stmt->closeCursor();\n return $rowsChanged;\n }", "function dokan_get_review_url( $user_id ) {\n $userstore = dokan_get_store_url( $user_id );\n\n return $userstore .\"reviews\";\n}", "public function destroy($book_id, $review_id)\n {\n $review = Review::findOrFail($review_id);\n\n $review->delete();\n\n session()->flash('success_message', 'The review was successfully deleted');\n\n return redirect()->action('BookController@show', $book_id);\n }", "public function delete() {\n $commentid = $_GET['commentid'];\n Comment::deleteComment($commentid);\n \n //note to self: might be a solution to redirect after deleting?\n// require_once('views/comments/readwithcomments.php');\n }", "public function destroy(Review $review)\n {\n return view('layouts.app')->with('status', 'Not implemented.');\n }", "public function delete($id) {\n if (!$id) {\n return response()->json([\n 'error' => [\n 'message' => 'reviews id does not exits'\n ]\n ], 422);\n }\n $review = $this->reviews->delete($id);\n return response()->json($review, 200);\n }", "public function destroy($prodId, $reviewId)\n {\n $review = Review::findOrFail($reviewId);\n\n if(Gate::allows('updateDelete-reviews',$review)) {\n $review->delete();\n $this->statusCode = 204;\n \n return response(null, $this->statusCode);\n }\n abort(403, 'Access Forbidden');\n\n }", "public function getDeleteAllUrl()\n {\n return $this->getUrl('*/product/deleteAll');\n }", "public function reviewGet($restaurant_id = null){\n if($restaurant_id != null){\n return $this->host.static::$url['reviewGet'].$restaurant_id;\n }\n return $this->host.static::$url['reviewGet'];\n }", "public function url_delete () {\n\t\tif ( ! $this->get(\"id\") ) {\n\t\t\t$this->response(array(\n\t\t\t\t\"status\" => false,\n\t\t\t\t\"error_code\" => 400\n\t\t\t), 400);\n\t\t}\n\n\t\t$this->db->delete(\"statistic_urls\", array(\n\t\t\t\"id\" => $this->get(\"id\")\n\t\t));\n\t}", "public function destroy($id)\n {\n $classreview = ClassReview::find($id);\n if (\\Auth::id() === $classreview->user_id) {\n $classreview->delete();\n }\n\n return redirect('/reviews');\n }", "public function deleteReview($review_id)\n\t{\n\t\t$model = self::model()->findByPk($review_id);\n\t\tif (empty($model)) throw new Exception('Review does not exists');\n\t\t$modelTransaction = $model->dbConnection->beginTransaction(); // Transaction for model begin\n\t\ttry {\n\t\t\tif (!$model->delete())\n\t\t\t\tthrow new Exception('Cannot delete review.');\n\t\t\t\n\t\t\tif ($model->is_draft==self::NO_DRAFT && $model->status==self::TYPE_APPROVED) {\n\t\t\t\t// Delete all comment & compliment of review\n\t\t\t\tYii::import('application.modules.reviews.models.JLComment');\n\t\t\t\tJLComment::model()->deleteAllByAttributes(array(\n\t\t\t\t\t'object_type' => JLComment::TYPE_REVIEW,\n\t\t\t\t\t'object_id' => $model->id,\n\t\t\t\t));\n\t\t\t\tYii::import('application.modules.reviews.models.JLCompliment');\n\t\t\t\tJLCompliment::model()->deleteAllByAttributes(array(\n\t\t\t\t\t'object_type' => JLCompliment::TYPE_REVIEW,\n\t\t\t\t\t'object_id' => $model->id,\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t// TODO: Delete top review in search page\n\t\t\t}\n\t\t\t\n\t\t\t$modelTransaction->commit();\n\t\t\t\n\t\t\tif ($model->is_draft==self::NO_DRAFT && $model->status==self::TYPE_APPROVED) {\n\t\t\t\t/***** Remove point of user *****/\n\t\t\t\t// Attach behavior for user\n\t\t\t\t$user = JLUser::getUserInfo($model->user_id);\n\t\t\t\tYii::import('application.modules.pointSystem.models.JLPointSystem');\n\t\t\t\t$user->attachBehavior('UserPoint', 'application.modules.pointSystem.components.behaviors.JLUserPointBehavior');\n\t\t\t\t$user->retrieveAction(JLPointSystem::WRITE_REVIEW, null, $model->id);\n\t\t\t\tif ($model->is_first)\n\t\t\t\t\t$user->retrieveAction(JLPointSystem::FIRST_REVIEW, null, $model->id);\n\t\t\t\t$user->detachBehavior('UserPoint');\n\t\t\t\t\n\t\t\t\t// Decrease reviews in business\n\t\t\t\tYii::import('application.modules.businesses.models.JLBusiness');\n\t\t\t\t$modelBiz = JLBusiness::model()->findByPk($model->business_id);\n\t\t\t\tif ($modelBiz) $modelBiz->decReviews();\n\t\t\t}\n\t\t\treturn array(\n\t\t\t\t'error' => false,\n\t\t\t\t'model' => $model,\n\t\t\t);\n\t\t} catch (Exception $e) {\n\t\t\t$modelTransaction->rollBack();\n\t\t\treturn array(\n\t\t\t\t'error' => true,\n\t\t\t\t'msg' => $e->getMessage(),\n\t\t\t);\n\t\t}\n\t}", "function deleteReview($reviewId) {\n $db = phpmotorsConnect();\n $sql = 'DELETE FROM reviews WHERE reviewId = :reviewId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':reviewId', $reviewId, PDO::PARAM_INT);\n $stmt->execute();\n $rowsChanged = $stmt->rowCount();\n $stmt->closeCursor();\n return $rowsChanged;\n }", "function get_publication_deleting_url($personal_message)\r\n {\r\n return $this->get_url(array(\r\n self :: PARAM_ACTION => self :: ACTION_DELETE_PUBLICATION,\r\n self :: PARAM_PERSONAL_MESSAGE_ID => $personal_message->get_id()));\r\n }", "public function commentDelete(){\n if (Security::isAuthenticated()) {\n $commentid = $_GET['id'];\n $commentRepository = new CommentRepository();\n //call to readById\n $comment = $commentRepository->readById($commentid);\n if ($comment->id == Security::getUserId()) {\n if($commentRepository->deleteById($commentid)){\n header('Location: /comment/showComments?id='.$comment->postid);\n }\n }\n }\n }", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "public function deleteAction() {\n\t\t$redirect_url = Minz_Request::param('r', false, true);\n\t\tif (!$redirect_url) {\n\t\t\t$redirect_url = array('c' => 'subscription', 'a' => 'index');\n\t\t}\n\t\tif (!Minz_Request::isPost()) {\n\t\t\tMinz_Request::forward($redirect_url, true);\n\t\t}\n\n\t\t$id = Minz_Request::param('id');\n\n\t\tif (self::deleteFeed($id)) {\n\t\t\tMinz_Request::good(_t('feedback.sub.feed.deleted'), $redirect_url);\n\t\t} else {\n\t\t\tMinz_Request::bad(_t('feedback.sub.feed.error'), $redirect_url);\n\t\t}\n\t}", "public function delete($id)\n {\n return $this->reviewRepositoryInterface->delete($id);\n }", "public function deleteAction()\n {\n $isPosted = $this->request->getPost('doDelete');\n if (!$isPosted) {\n $this->response->redirect($this->request->getPost('redirect'));\n }\n $comment = [\n 'id' => $this->request->getPost('id'),\n 'pageKey' => $this->request->getPost('pageKey')\n ];\n $comments = new \\Anax\\Comment\\CommentsInSession();\n $comments->setDI($this->di);\n $comments->delete($comment);\n $this->response->redirect($this->request->getPost('redirect'));\n }", "public function destroy($id)\n {\n try {\n $review = Review::findOrFail($id);\n $review->delete();\n\n return redirect()->route('reviews.review.index')\n ->with('success_message', 'Review was successfully deleted.');\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request.']);\n }\n }", "public function delete() {\n\t\t$url = UserUrl::where('id', request()->id)->firstOrFail();\n\t\t$url->delete();\n\t\treturn redirect('/dashboard');\n\t}", "function getDeleteAvatarUrl() {\n \treturn assemble_url('people_company_user_delete_avatar', array(\n \t 'company_id' => $this->getCompanyId(),\n \t 'user_id' => $this->getId(),\n \t));\n }", "function getDeleteLogoUrl() {\n return assemble_url('people_company_delete_logo', array('company_id' => $this->getId())); \n }", "public function get_admin_delete_url() {\n $url = add_query_arg( array(\n 'ruleset_id' => $this->post_id,\n 'action' => 'delete',\n ), admin_url( 'admin.php?page=wc-settings&tab=shipping&section=woo_conditional_shipping' ) );\n\n return $url;\n }", "public function destroy($id)\n {\n $review = Review::findOrFail($id);\n $review->status = -1;\n $date = Carbon::now()->toDateTimeString();\n $review->deleted_at = $date;\n $review->save();\n return redirect()->back()->withSuccess('Xoá đánh giá thành công');\n }", "public function deletePost(Request $request){\n PostReviewModel::find($request->id)->delete();\n return Response()->json(array('ok'=>$request->all()));\n }", "function getDismissUrl() {\n \treturn assemble_url('reminder_dismiss', array('reminder_id' => $this->getId()));\n }", "public function delete(Request $request)\n {\n //\n $res = Reviews::where('id',$request->rid)->delete();\n if($res) return 1;\n }", "public function getRouteDelete() {\n\t\treturn \"/delete\";\n\t}", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\n\t\t$result = Browser_Service_Recsite::deleteRecsite($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function getRemoveUrl()\n\t{\n\t\t$query = array_merge(\n\t\t\tarray($this->getFacet()->getName() => null),\n\t\t\t$this->unwantedUrlParameters\n\t\t);\n\n\t\treturn Mage::getUrl('*/*', array(\n\t\t\t'_current' => true,\n\t\t\t'_use_rewrite' => true,\n\t\t\t'_query' => $query\n\t\t));\n\t}", "public function getPreviewUrl()\n {\n return $this->getUrl('*/*/preview');\n }", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "public function destroy($id)\n {\n return $this->reviewRepository->delete($id);\n }", "function delete_related_reviews($company_id) {\n\t\t$str = \"DELETE FROM company_review WHERE Company_ID = $company_id\";\n\t\tmysqli_query($link,$str);\n\t}", "public function destroy($id)\n {\n $review = Comment::find($id);\n \n $book=Book::find($review->book->id);\n $this->authorize('delete', $review);\n $review ->delete();\n \n \n $comments = Comment::where('book_id',$review->book->id)->get();\n \n return back()->with(['book' => $book])->with(['storedComments'=> $comments]);\n //return view('books.book')->with(['book' => $book])->with(['storedComments'=> $comments]);\n }", "public function destroy($id)\n {\n // find review by id\n $review = ReviewBook::info()->find($id);\n\n // if review doesnt exist return error message\n if (!$review) return response()->json(['message' => 'Review does not exist']);\n \n // delete review\n $review->delete();\n\n // return success message\n $response = ['message' => \"Review delete success\"];\n return response()->json($response);\n }", "public function deleteImageRedirectPath(): string\n {\n return auth('rocXolid')->user()->is($this)\n ? route('rocXolid.auth.profile')\n : $this->getControllerRoute('show');\n }", "public function deleteUserAlbumReviewAction($albumID, $reviewID)\n {\n if(!$this->getUser()){\n throw new AccessDeniedException();\n }\n\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n\n $reviews = $em->getRepository(Review::class)->findOneBy(['reviewOf' => $albumID, 'id' => $reviewID]);\n if(!$reviews){\n //no review entry found\n //set the view and status code to 404\n $view = $this->view(null, 404);\n }\n else{\n if ($reviews->getReviewer() == $user)\n {\n //the review entry does exist\n //set the status code to 200 OK\n $em->remove($reviews);\n $em->flush();\n $view = $this->view(null, 200);\n }\n else\n {\n $view = $this->view(null, 403);\n }\n }\n return $this->handleView($view);\n\n\n }", "public function destroy($id)\n {\n $cat = UserReview::find($id);\n $value = $cat->delete();\n if($value){\n session()->flash(\"deleted\",\"Review Has Been Deleted\");\n return back();\n }\n }", "public function delete() {\n // we expect a url of form ?controller=posts&action=delete&id=x\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 and delete from the database\n $post = Post::delete($_GET['id']);\n require_once('view/posts/delete.php');\n }", "function deleteReview($reviewId) {\n $db = acmeConnect();\n $sql = 'DELETE FROM reviews WHERE reviewId = :reviewId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':reviewId', $reviewId, PDO::PARAM_INT);\n $stmt->execute();\n $rowsChanged = $stmt->rowCount();\n $stmt->closeCursor();\n return $rowsChanged;\n}", "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "public function actionDelete() {}", "public function actionDelete() {}", "public function destroy($id) {\r\n //\r\n $artikel = Comment::find($id);\r\n $artikel->delete();\r\n return Redirect::route('admin.comments.index');\r\n }", "public static function deleteComments(Request $request);", "public function destroy(Product $product, Review $review)\n {\n if($review->delete()){\n return redirect()->route('admin.product.review.index', $product->id)->withSuccess('Xoá đánh giá thành công!');\n }\n return redirect()->back()->withErrors('Xoá đánh giá thất bại!');\n }", "public function get_revoke_url() {\n\n $url = new moodle_url('/repository/repository_callback.php');\n $url->param('callback', 'yes');\n $url->param('repo_id', $this->id);\n $url->param('revoke', 'yes');\n $url->param('reloadparentpage', true);\n $url->param('sesskey', sesskey());\n return '<a target=\"_blank\" href=\"'.$url->out(false).'\">'.get_string('revokeyourgoogleaccount', 'repository_googledrive').'</a>';\n }" ]
[ "0.7332206", "0.69781685", "0.69773287", "0.6909138", "0.68477446", "0.68245745", "0.66255575", "0.6391823", "0.62940466", "0.62940466", "0.62940466", "0.62630254", "0.61408657", "0.61376476", "0.61148244", "0.61141974", "0.61131436", "0.6103144", "0.6102057", "0.609216", "0.6082091", "0.6062327", "0.60549223", "0.6021054", "0.60034835", "0.5998222", "0.59927547", "0.59729224", "0.5971164", "0.5960771", "0.59485316", "0.59137976", "0.59031856", "0.5889595", "0.5877867", "0.5871991", "0.58701813", "0.58306265", "0.58169526", "0.5799331", "0.5795073", "0.57757556", "0.57757556", "0.57730895", "0.5771679", "0.57615", "0.5760773", "0.57219875", "0.57157475", "0.5712878", "0.5710626", "0.56830513", "0.5672313", "0.5628163", "0.56227016", "0.56162155", "0.56138533", "0.55951285", "0.5584433", "0.55632114", "0.5556251", "0.5552827", "0.5542195", "0.552493", "0.5488487", "0.54563427", "0.54429954", "0.54397905", "0.542956", "0.5426762", "0.54142773", "0.5413867", "0.5407122", "0.540696", "0.54055756", "0.540217", "0.5401704", "0.53990394", "0.5388304", "0.5367586", "0.53596926", "0.53562945", "0.53499216", "0.5343414", "0.5338236", "0.53295994", "0.53245854", "0.5316799", "0.5315616", "0.52905697", "0.528166", "0.52598834", "0.52531266", "0.5252599", "0.52404076", "0.52404076", "0.5228623", "0.5228242", "0.5221972", "0.5215306" ]
0.66773546
6
send a review notification to the shop owner.
public function SendReviewReportNotification() { $this->SaveActionIdToComment(); $oMail = TDataMailProfile::GetProfile('report-review'); $aData = array(); $oShop = TdbShop::GetInstance(); $oArticle = $this->GetFieldShopArticle(); $aData['sArticleName'] = $oArticle->GetName(); $aData['sReviewId'] = $this->id; $aData['sReviewTitle'] = $this->fieldTitle; $aData['sReviewText'] = $this->fieldComment; $aData['sReviewAuthor'] = $this->fieldAuthorName; $aData['sUnlockReviewLink'] = "<a href='".$this->GetUnlockURL(true)."'>".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.publish_comment')).'</a> '; $aData['sDeleteReviewLink'] = "<a href='".$this->GetDeleteWithActionIdURL(true)."'>".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.delete_comment')).'</a> '; $aData['shopname'] = $oShop->GetName(); $oMail->AddDataArray($aData); $oMail->SendUsingObjectView('emails', 'Customer'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendToReviewAction(Request $request) {\n $resource = $this->findOr404($request);\n $arrangementProgramManager = $this->getArrangementProgramManager();\n\n if (!$arrangementProgramManager->isAllowToSendToReview($resource)) {\n throw $this->createAccessDeniedHttpException();\n }\n if ($arrangementProgramManager->isYouCanSendInRevision($resource)) {\n $resource->setStatus(ArrangementProgram::STATUS_IN_REVIEW);\n\n $user = $this->getUser();\n $details = $resource->getDetails();\n $details\n ->setSendToReviewBy($user)\n ->setSendToReviewDate(new DateTime());\n\n $this->domainManager->dispatchEvent('pre_send_to_review', new ResourceEvent($resource));\n\n $this->domainManager->update($resource);\n $this->flashHelper->setFlash('success', 'send_to_review');\n\n $this->domainManager->dispatchEvent('post_send_to_review', new ResourceEvent($resource));\n } else {\n $this->flashHelper->setFlash('error', 'planned_not_complete');\n }\n\n return $this->redirectHandler->redirectTo($resource);\n }", "private function sendReviewEvent(ReviewModel $review)\n {\n try {\n $this->_apiClient->sendEvent(\n $review->getData('customer_id'),\n 'review_submit',\n [\n 'item' => $review->getData('entity_pk_value'),\n 'review' => $review->getData('detail'),\n 'review_id' => $review->getData('review_id'),\n 'provider' => 'Magento2'\n ]\n );\n } catch (\\Exception $e) {\n // Failing silently...\n }\n }", "public function runreviewsyncAction()\n {\n $result = Mage::getModel('ddg_automation/review')->sync();\n if ($result['message']) {\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n }\n $this->_redirectReferer();\n }", "public function process_review_opened( $notification ) {\n\t\t$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->charge );\n\n\t\tif ( ! $order ) {\n\t\t\tWC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->charge );\n\t\t\treturn;\n\t\t}\n\n\t\t/* translators: 1) The URL to the order. 2) The reason type. */\n\t\t$message = sprintf( __( 'A review has been opened for this order. Action is needed. Please go to your <a href=\"%1$s\" title=\"Stripe Dashboard\" target=\"_blank\">Stripe Dashboard</a> to review the issue. Reason: (%2$s)', 'woocommerce-gateway-stripe' ), $this->get_transaction_url( $order ), $notification->data->object->reason );\n\n\t\tif ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) {\n\t\t\t$order->update_status( 'on-hold', $message );\n\t\t} else {\n\t\t\t$order->add_order_note( $message );\n\t\t}\n\t}", "function freelancer_review_action() {\n global $user_ID;\n $args = $_POST;\n $project_id = $args['project_id'];\n \n $status = get_post_status($project_id);\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $author_bid = (int)get_post_field('post_author', $bid_id_accepted);\n \n $freelancer_id = get_post_field('post_author', $bid_id_accepted);\n \n /*\n * validate data\n */\n if (!isset($args['score']) || empty($args['score'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('You have to rate this project.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n if (!isset($args['comment_content']) || empty($args['comment_content'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please post a review for this freelancer.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n /*\n * check permission\n */\n if ($user_ID !== $author_bid || !$user_ID) {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You don\\'t have permission to review.', ET_DOMAIN)\n ));\n }\n \n /*\n * check status of project\n */\n if ($status !== 'complete') {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You can\\'t not reivew on this project.', ET_DOMAIN)\n ));\n }\n \n /**\n * check user reviewed project owner or not\n * @author Dan\n */\n $role = ae_user_role($user_ID);\n $type = 'em_review';\n if ($role == FREELANCER) {\n $type = 'fre_review';\n }\n \n $comment = get_comments(array(\n 'status' => 'approve',\n 'type' => $type,\n 'post_id' => $project_id\n ));\n \n if (!empty($comment)) {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You have reviewed on this project.', ET_DOMAIN)\n ));\n }\n \n // end check user review project owner\n \n // add review\n $args['comment_post_ID'] = $project_id;\n $args['comment_approved'] = 1;\n $this->comment_type = 'fre_review';\n $review = Fre_Review::get_instance(\"fre_review\");\n \n $comment = $review->insert($args);\n \n if (!is_wp_error($comment)) {\n \n /**\n * fire action after freelancer review employer base on project\n * @param int $int project id\n * @param Array $args submit args (rating score, comment)\n * @since 1.2\n * @author Dakachi\n */\n do_action('fre_freelancer_review_employer', $project_id, $args);\n \n //update project, bid, bid author, project author after review\n $this->update_after_fre_review($project_id, $comment);\n wp_send_json(array(\n 'success' => true,\n 'msg' => __(\"Your review has been submitted.\", ET_DOMAIN)\n ));\n } else {\n \n // revert bid status\n wp_update_post(array(\n 'ID' => $bid_id_accepted,\n 'post_status' => 'publish'\n ));\n \n wp_send_json(array(\n 'success' => false,\n 'msg' => $comment->get_error_message()\n ));\n }\n }", "public function actionReview()\n\t{\n\t\t$review = new Review();\n\t\t$review->attributes = $_POST['Review'];\n\t\tif ($review->validate())\n\t\t{\n\t\t\t$noteId = $_POST['note_id'];\n\t\t\t$model = $this->loadModel($noteId);\n\n\t\t\t$model->addReview($review, Yii::app()->user->id);\n\n\t\t\techo $this->renderPartial('_review', array('data'=>$review), true);\n\t\t}\n\t}", "public function actionReview(){\r\n $user = $_REQUEST['pro'];\r\n $list = MvCouiManager::getReview($user);\r\n $aclist = MvCouiManager::getAcreview($user);\r\n $nolist = MvCouiManager::getNoreview($user);\r\n $dellist = MvCouiManager::getDelreview();\r\n $this->render('review',array('list'=>$list,'aclist'=>$aclist,'nolist'=>$nolist,'dellist'=>$dellist));\r\n }", "function employer_review_action() {\n global $user_ID, $current_user;\n $args = $_POST;\n \n if (!isset($args['project_id'])) {\n wp_send_json(array(\n 'success' => false,\n 'msg' => __('Invalid project id.', ET_DOMAIN)\n ));\n }\n \n $project_id = $args['project_id'];\n \n $author_id = (int)get_post_field('post_author', $project_id);\n \n $result = array(\n 'succes' => false,\n 'msg' => __('You can\\'t not access this action.', ET_DOMAIN)\n );\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $author_bid = get_post_field('post_author', $bid_id_accepted);\n \n $profile_id = get_user_meta($author_bid, 'user_profile_id', true);\n \n /*\n * validate data\n */\n if (!$bid_id_accepted) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please assign project before complete.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n if (!isset($args['score']) || empty($args['score'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('You have to rate for this profile.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n if (!isset($args['comment_content']) || empty($args['comment_content'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please post a review for this freelancer.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n /*\n * check permission for review action\n */\n \n if (!$user_ID || $user_ID !== $author_id) wp_send_json($result);\n \n $args['comment_post_ID'] = $bid_id_accepted;\n $args['comment_approved'] = 1;\n \n // insert review\n $review = Fre_Review::get_instance();\n $comment = $review->insert($args);\n \n if (!is_wp_error($comment)) {\n \n /**\n * fire an acction after project owner complete his project\n * @param int $project_id\n * @param Array $args\n * @since v1.2\n * @author Dakachi\n */\n do_action('fre_complete_project', $project_id, $args);\n \n /**\n * update project, bid, user rating scrore after review a project\n */\n $this->update_after_empoyer_review($project_id, $comment);\n \n $project_title = get_the_title($project_id);\n $freelancer_name = get_the_author_meta('display_name', $author_bid);\n wp_send_json(array(\n 'success' => true,\n 'msg' => sprintf(__(\"You have completed project %s and reviewed %s.\", ET_DOMAIN) , $project_title, $freelancer_name)\n ));\n } else {\n wp_send_json(array(\n 'success' => false,\n 'msg' => $comment->get_error_message()\n ));\n }\n }", "public function SendReviewCommentNotification($oComment)\n {\n if ($this->AllowSendAuthorReviewCommentNotification()) {\n $sAuthorEmail = $this->GetSendReviewCommentNotificationEmail();\n if (TTools::IsValidEMail($sAuthorEmail)) {\n $oMail = TDataMailProfile::GetProfile('review-comment');\n $aData = array();\n $oArticle = $this->GetFieldShopArticle();\n $aData['sArticleName'] = $oArticle->GetName();\n $aData['sReviewTitle'] = $this->fieldTitle;\n $aData['sReviewText'] = $this->fieldComment;\n $aData['sCommentText'] = $oComment->fieldComment;\n $oMail->AddDataArray($aData);\n $oMail->ChangeToAddress($this->fieldAuthorEmail, $this->fieldAuthorName);\n $oMail->SendUsingObjectView('emails', 'Customer');\n }\n }\n }", "public function postAction(){\n $return_result = array(\n 'code'=> 0,\n 'model'=> null,\n );\n $params = $this->postJsonParams();\n $product_id = $params('product_id');\n\n if ($data = Mage::getSingleton('review/session')->getFormData(true)) {\n $rating = array();\n if (isset($data['ratings']) && is_array($data['ratings'])) {\n $rating = $data['ratings'];\n }\n } else {\n $data = $params;\n $rating = isset($params['ratings'])?$params['ratings']:array();\n }\n $product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($product_id);\n if (($product) && !empty($data)) {\n $session = Mage::getSingleton('core/session');\n /* @var $session Mage_Core_Model_Session */\n $review = Mage::getModel('review/review')->setData($data);\n /* @var $review Mage_Review_Model_Review */\n $validate = $review->validate();\n if ($validate === true) {\n try {\n $review->setEntityId($review->getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE))\n ->setEntityPkValue($product->getId())\n ->setStatusId(Mage_Review_Model_Review::STATUS_PENDING)\n ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())\n ->setStoreId(Mage::app()->getStore()->getId())\n ->setStores(array(Mage::app()->getStore()->getId()))\n ->save();\n foreach ($rating as $ratingId => $optionId) {\n Mage::getModel('rating/rating')\n ->setRatingId($ratingId)\n ->setReviewId($review->getId())\n ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())\n ->addOptionVote($optionId, $product->getId());\n }\n $review->aggregate();\n $return_result['message'] = 'Your review has been accepted for moderation.';\n }\n catch (Exception $e) {\n $return_result['code'] = 1;\n $return_result['error'] = 'Unable to post the review.';\n }\n }\n else {\n $session->setFormData($data);\n if (is_array($validate)) {\n foreach ($validate as $errorMessage) {\n $return_result['error'] = $errorMessage;\n }\n }\n else {\n $return_result['error'] = 'Unable to post the review.';\n }\n }\n }\n echo json_encode($return_result);\n }", "function processreviewAction()\r\n {\r\n if (!$this->config->isPhaseOpen(Config::REVIEWING_PHASE)) {\r\n $this->view->content = $this->texts->reviewer->review_phase_is_closed;\r\n echo $this->view->render(\"layout\");\r\n return;\r\n }\r\n\r\n $this->view->setFile(\"content\", \"processreview.xml\");\r\n $this->view->setBlock(\"content\", \"review\");\r\n // Extract the block with marks.\r\n $this->view->set_block('review', \"review_mark\", \"review_marks\");\r\n // Extracts the block with answers\r\n $this->view->set_block('review', \"review_answer\", \"review_answers\");\r\n\r\n\r\n // Actions if the id of a paper is submitted\r\n if (isSet($_REQUEST['idPaper'])) {\r\n $idPaper = $this->getRequest()->getParam(\"idPaper\");\r\n $reviewTbl = new Review();\r\n $review = $reviewTbl->find($idPaper, $this->user->id)->current();\r\n\r\n // Check that the paper is REALLY assigned to the reviewer\r\n if (is_object($review)) {\r\n\r\n // Put the review in the database\r\n $review->updateFromArray ($_POST);\r\n\r\n // Create the review presentation\r\n $this->view->review = $review->showReview($this->view, true) ;\r\n // Resolve the entities replacement\r\n $this->view->assign(\"content\", \"content\");\r\n \r\n // Send a mail to confirm review submission\r\n $mail = new Mail (Mail::SOME_USER, $this->texts->mail->subj_ack_review,\r\n $this->view->getScriptPaths());\r\n $mail->setFormat(Mail::FORMAT_HTML);\r\n $mail->setTo($this->user->email);\r\n\r\n $mail->loadTemplate ($this->lang, \"ack_review\");\r\n $mailViewEngine = $mail->getEngine();\r\n $mailViewEngine->setBlock(\"template\", \"template_mark\", \"template_marks\");\r\n $mailViewEngine->setBlock(\"template\", \"template_answer\", \"template_answers\");\r\n\r\n $instantiatedMail = $review->showReview($mailViewEngine, true, \"template\");\r\n $mail->setTemplate ($instantiatedMail);\r\n if ($this->config->mailOnReview == \"Y\") {\r\n $mail->setCopyToChair(true);\r\n }\r\n\r\n $mail->send();\r\n }\r\n else {\r\n $this->view->content = $this->texts->def->access_denied;;\r\n }\r\n }\r\n else {\r\n $this->view->content = \"Invalid action<br/>\";\r\n }\r\n echo $this->view->render(\"layout\");\r\n }", "public function review($review_id) {\n if(!$this->that->config->get('koraki_review'))\n return;\n\n if (isset($this->that->request->server['HTTPS']) && (($this->that->request->server['HTTPS'] == 'on') || ($this->that->request->server['HTTPS'] == '1'))) {\n $base = $this->that->config->get('config_ssl');\n } else {\n $base = $this->that->config->get('config_url');\n }\n\n if(empty($review_id)){\n return;\n }\n\n $this->that->load->model('catalog/review');\n\n $review = $this->that->model_catalog_review->getReview($review_id);\n\n if(isset($review) && !empty($review['rating']) && !empty($review['rating'] >= 3) && $review['status']==1){\n\n $this->that->load->model('catalog/product');\n $this->that->load->model('tool/image');\n\n $p = $this->that->model_catalog_product->getProduct($review['product_id']);\n $popup = $this->that->model_tool_image->resize($p['image'], 150, 150);\n\n $item = array(\n \"product_id\" => $p['product_id'],\n \"product_name\" => $p['name'],\n \"thumbnail\" => $popup\n );\n\n $variables = array(\n \"number\" => $review['rating'] .\"/5\",\n \"item\" => array(\n $item\n )\n );\n $product = \"<a href='\" . $base . \"?route=product/product&product_id=\" . $p['product_id'] . \"' target='_blank'>\" . html_entity_decode($p['name'], ENT_QUOTES, 'UTF-8') . \"</a>\";\n\n $post = array(\n \"variables\" => json_encode($variables),\n \"notificationText\" => $review['author'] . \" made a \". $review['rating'] .\"/5 star rating on \" . $product,\n \"thumbnailUrl\" => $popup,\n \"location\" => \"\"\n );\n\n $this->post($post);\n }\n }", "public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }", "public function store(Request $request, $id)\n {\n $this->validate($request, [\n 'review' => 'required',\n ]);\n\n $rating = $request->rating;\n $reviewtext = $request->review;\n $userID = $id;\n $reviewerID = Auth::id();\n\n // STORE NEW REVIEW\n $review = new Review();\n $review->user_id = $userID;\n $review->reviewer_id = $reviewerID;\n $review->review_description = $reviewtext;\n $review->review_rating = $rating;\n $review->save();\n\n // ========== SENDING CONFIRMATION MAIL TO USER ========\n // GET RECIPIENT FOR MAIL\n $recipient = DB::table('users')\n ->where('id', '=', $userID)\n ->select('*')\n ->first();\n\n // SEND CONFIRMATION MAIL TO ORGANIZER\n Mail::to($recipient)->send(new NewReview());\n //=======================================================\n\n\n return Redirect::to('/profiel/' . $userID);\n }", "public function store(Request $request)\n {\n if($request -> hasAny(request()->get('anonymous'))){\n $anonymous = request()->get('anonymous');\n }else{\n $anonymous = 0;\n }\n\n DB::table('review')->updateOrInsert([\n 'reviewer'=>auth()->user()->user_id,'user' => request()->get('card-id')],['anonymous' => $anonymous ,'rating'=> request()->get('rating'),\n 'comment' => request()->get('comments'),'updated_at' => \\Carbon\\Carbon::now(),'created_at' => \\Carbon\\Carbon::now(),\n ]);\n $user =User::find(request()->get('card-id'));\n $details =['greeting' => 'Hi', 'body' => 'your Digital card has been reviewed' , 'thanks' => 'Please feel free to customize your notifications from CardMoja',\n 'actionText' => 'Check out who has reviewed your card', 'actionURL' => url('/'), 'notifiable_type' => '102' ];\n Notification::send($user, new reviewNotification($details));\n }", "public function review()\n {\n $data = request()->all();\n\n if (! session()->has('subscription_cart') && ! isset($data['token'])) {\n return redirect()->route($this->_config['redirect']);\n }\n\n $nvps = \"&USER=\" . company()->getSuperConfigData('subscription.payment.paypal.user_name')\n . \"&PWD=\" . company()->getSuperConfigData('subscription.payment.paypal.password')\n . \"&SIGNATURE=\" . company()->getSuperConfigData('subscription.payment.paypal.signature')\n . \"&METHOD=GetExpressCheckoutDetails\" \n . \"&VERSION=108\" \n . \"&TOKEN=\" . $data['token'];\n \n $getEC = $this->paypalHelper->request($nvps);\n\n if (isset($data['PayerID'])) {\n session()->put('PayerID', $data['PayerID']);\n } else {\n session()->put('PayerID', $getEC['PAYERID']);\n }\n\n session()->put('token', $data['token']);\n \n return redirect()->route('admin.subscription.paypal.payment');\n }", "public function saveProdReviewAction()\n\t{\n\t\tif($this->_request-> isPost() && $this->adminLogin->userId)\n\t\t{\n\t\t\t$prod_params=$this->_request->getParams();\n\t\t\t\n\t\t\t//echo \"<pre>\";print_r($_FILES);print_r($prod_params);exit;\n\n\t\t\t$quote_id=$prod_params['quote_id'];\n\n\t\t\tif(isset($prod_params['review_skip'])) $status='skipped';\n\t\t\telse if(isset($prod_params['review_challenge'])) $status='challenged';\n\t\t\telse if(isset($prod_params['review_save'])) $status='challenged';\n\t\t\telse if(isset($prod_params['review_validate'])) $status='validated';\n\n\t\t\tif($quote_id)\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\t//get Quote version\n\t\t\t\t\t$quote_obj=new Ep_Quote_Quotes();\n\t\t\t\t\t$version=$quote_obj->getQuoteVersion($quote_id);\n\n\t\t\t\t//Insert Quote log\n\t\t\t\t$log_params['quote_id']\t= $quote_id;\n\t\t\t\t$log_params['bo_user']\t= $this->adminLogin->userId;\t\t\t\t\t\n\t\t\t\t$log_params['version']\t= $version;\n\t\t\t\t$log_params['action']\t= 'prod_'.$status;\t\t\t\t\n\n\n\t\t\t\tif(isset($prod_params['review_skip'])|| isset($prod_params['review_challenge']))\n\t\t\t\t{\n\t\t\t\t\t\n\n\t\t\t\t\t$quote_obj=new Ep_Quote_Quotes();\n\t\t\t\t\t$update_quote['prod_review']=$status;\n\t\t\t\t\t\n\t\t\t\t\t//echo \"<pre>\";print_r($update_quote);exit;\n\t\t\t\t\t$quote_obj->updateQuote($update_quote,$quote_id);\n\n\t\t\t\t\tif($status=='skipped')\n\t\t\t\t\t\t$this->_redirect(\"/quote/sales-quotes-list?submenuId=ML13-SL2\");\n\t\t\t\t\telse if($status=='challenged')\n\t\t\t\t\t\t$this->_redirect(\"/quote/prod-quote-review?quote_id=\".$quote_id);\t\n\t\t\t\t}\n\t\t\t\telseif(isset($prod_params['review_save'])|| isset($prod_params['review_validate']))\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\tforeach($_POST as $key => $prod_missions)\n\t\t\t\t\t{\n\t\t\t\t\t if (strpos($key, 'pmission_cost_') === 0)\n\t\t\t\t\t {\n\t\t\t\t\t \t$mission_id=str_replace('pmission_cost_','',$key);\n\t\t\t\t\t \tforeach($prod_missions as $pkey=>$pcost)\n\t\t\t\t\t \t{\t\t\t\t\t\t \t\t\n\t\t\t\t\t \t\t$pcost=str_replace(\",\",\".\",$pcost);\n\t\t\t\t\t \t\t$staff=$prod_params['staff_'.$mission_id][$pkey];\n\t\t\t\t\t\t\t\t/*tempo changes*/\n\t\t\t\t\t\t\t\t\t//Mission level changes\n\t\t\t\t\t\t\t\t\t$mission_length=$prod_params['mission_length_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$mission_length_option=$prod_params['mission_length_option_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t//$volume=$prod_params['volume_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$volume_max=$prod_params['volume_max_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$delivery_volume_option=$prod_params['delivery_volume_option_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$tempo=$prod_params['tempo_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$tempo_length=$prod_params['tempo_length_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$tempo_length_option=$prod_params['tempo_length_option_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$staff_time=$prod_params['staff_time_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$staff_time_option=$prod_params['staff_time_option_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t//newduration volume\n\t\t\t\t\t\t\t\t\t$new_missiondur=$prod_params['new_missiondur_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t$new_tempolength=$prod_params['new_tempolength_'.$mission_id][0];\n\t\t\t\t\t\t\t\t\t//update quote mission table with above details\n\t\t\t\t\t\t\t\t\t$quoteMissionObj=new Ep_Quote_QuoteMissions();\n\t\t\t\t\t\t\t\t\t$updateQuoteMission['mission_length']=$mission_length;\n\t\t\t\t\t\t\t\t\t$updateQuoteMission['mission_length_option']=$mission_length_option;\n\t\t\t\t\t\t\t\t\t//if($volume) $updateQuoteMission['volume']=$volume;\n\t\t\t\t\t\t\t\t\tif($volume_max) $updateQuoteMission['volume_max']=$volume_max;\n\t\t\t\t\t\t\t\t\tif($delivery_volume_option) $updateQuoteMission['delivery_volume_option']=$delivery_volume_option;\n\t\t\t\t\t\t\t\t\tif($tempo)$updateQuoteMission['tempo']=$tempo;\n\t\t\t\t\t\t\t\t\tif($tempo_length)$updateQuoteMission['tempo_length']=$tempo_length;\n\t\t\t\t\t\t\t\t\tif($tempo_length_option)$updateQuoteMission['tempo_length_option']=$tempo_length_option;\n\t\t\t\t\t\t\t\t\t//newduration volume\n\t\t\t\t\t\t\t\t\tif($new_missiondur && $new_tempolength)$updateQuoteMission['mission_length_new']=$new_missiondur.','.$new_tempolength;\n\t\t\t\t\t\t\t\t\t$updateQuoteMission['staff_time']=$staff_time;\n\t\t\t\t\t\t\t\t\t$updateQuoteMission['staff_time_option']=$staff_time_option;\n\t\t\t\t\t\t\t\t\t$quoteMissionObj->updateQuoteMission($updateQuoteMission,$mission_id);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//echo \"<pre>\";print_r($updateQuoteMission);exit;\n\t\t\t\t\t\t\t\t/*End*/\t\n\t\t\t\t\t\t\t\t$pdelivery_time=$mission_length;\n\t\t\t\t\t \t\t$pdelivery_option=$mission_length_option;\t\t\t\t\t\t\n\t\t\t\t\t \t\t$prod_comments=isodec($prod_params['prodcomments_'.$mission_id][$pkey]);\n\t\t\t\t\t \t\t$product=$prod_params['prod_product_'.$mission_id][$pkey];\n\n\t\t\t\t\t \t\t//new fields added\n\t\t\t\t\t \t\t$pdelivery_volume=$volume_max ? $volume_max : ($volume ? $volume : 0);\n\t\t\t\t\t \t\t$pdelivery_volume_option=$delivery_volume_option ? $delivery_volume_option : 'within' ;\n\t\t\t\t\t \t\t$pdelivery_volume_time=$tempo_length ? $tempo_length : $mission_length;\n\t\t\t\t\t \t\t$pdelivery_volume_time_option=$tempo_length_option ? $tempo_length_option : $mission_length_option;\n\n\t\t\t\t\t \t\t//if($pdelivery_time && $staff && $staff_time)\n\t\t\t\t\t \t\t//{\n\t\t\t\t\t \t\t\t$prod_mission_obj=new Ep_Quote_ProdMissions();\n\n\t\t\t\t\t \t\t\t$prod_mission_data['quote_mission_id']=$mission_id;\n\t\t\t\t\t \t\t\t$prod_mission_data['product']=$product;\t\t\t\t\t\t \t\t\t\n\t\t\t\t\t \t\t\t$prod_mission_data['delivery_time']=$pdelivery_time;\n\t\t\t\t\t \t\t\t$prod_mission_data['delivery_option']=$pdelivery_option;\n\t\t\t\t\t \t\t\t$prod_mission_data['staff']=$staff;\n\t\t\t\t\t \t\t\t$prod_mission_data['staff_time']=$staff_time;\n\t\t\t\t\t \t\t\t$prod_mission_data['staff_time_option']=$staff_time_option;\n\t\t\t\t\t \t\t\t$prod_mission_data['cost']=$pcost;\n\t\t\t\t\t \t\t\t$prod_mission_data['currency']=$prod_params['currency'];\n\t\t\t\t\t \t\t\t$prod_mission_data['comments']=$prod_comments;\n\t\t\t\t\t \t\t\t$prod_mission_data['created_by']=$this->adminLogin->userId;\n\t\t\t\t\t \t\t\t$prod_mission_data['version']\t= $version;\n\n\t\t\t\t\t \t\t\t//new fields added\n\t\t\t\t\t \t\t\t$prod_mission_data['delivery_volume']\t= $pdelivery_volume;\n\t\t\t\t\t \t\t\t$prod_mission_data['delivery_volume_option']\t= $pdelivery_volume_option;\n\t\t\t\t\t \t\t\t$prod_mission_data['delivery_volume_time']\t= $pdelivery_volume_time;\n\t\t\t\t\t \t\t\t$prod_mission_data['delivery_volume_time_option']=$pdelivery_volume_time_option;\n\n\t\t\t\t\t \t\t\t//echo \"<pre>\";print_r($prod_mission_obj);\n\n\t\t\t\t\t \t\t\t$prod_mission_id=$prod_params['prod_mission_id_'.$mission_id][$pkey];\n\n\t\t\t\t\t \t\t\tif($prod_mission_id)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\t\t$prod_mission_data['updated_at']=date('Y-m-d H:i:s');\n\t\t\t\t\t \t\t\t\t$prod_mission_obj->updateProdMission($prod_mission_data,$prod_mission_id);\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t \t\t\telse\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\t\t$prod_mission_obj->insertProdMission($prod_mission_data);\t\n\t\t\t\t\t \t\t\t}\n\n\t\t\t\t\t \t\t\t//\n\t\t\t\t\t \t\t\t$package=$prod_params['package_'.$mission_id];\n\t\t\t\t\t\t \t\t$quoteMissionObj=new Ep_Quote_QuoteMissions();\n\t\t\t\t\t\t \t\t$updateQuoteMission['package']=$package;\n\t\t\t\t\t\t \t\tif($package=='lead')\n\t\t\t\t\t\t \t\t\t \t$updateQuoteMission['margin_percentage']=60;\n\t\t\t\t\t\t \t\telseif($package=='link')\n\t\t\t\t\t\t \t\t\t \t$updateQuoteMission['margin_percentage']=30;\n\t\t\t\t\t\t \t\telseif($package=='team')\n\t\t\t\t\t\t \t\t\t \t$updateQuoteMission['margin_percentage']=50;\n\t\t\t\t\t\t \t\t\t \t\t \n\t\t\t\t\t\t \t\t$quoteMissionObj->updateQuoteMission($updateQuoteMission,$mission_id);\n\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//}\n\n\t\t\t\t\t \t}\t\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\t\t$quote_obj=new Ep_Quote_Quotes();\t\n\t\t\t\t\t\tif(isset($prod_params['review_validate']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$update_quote_prod['prod_review']=$status;\n\t\t\t\t\t\t\t$update_quote_prod[\"sales_validation_expires\"]=time()+($this->configval['sales_validation_timeline']*60*60);\n\t\t\t\t\t\t\t$quote_obj->updateQuote($update_quote_prod,$quote_id);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($prod_params['prod_extra_info'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$update_quote_prod = array();\n\t\t\t\t\t\t\t$update_quote_prod['prod_extra_info']=$prod_params['prod_extra_info'];\n\t\t\t\t\t\t\tif($prod_params['prod_extra_info']=='yes')\n\t\t\t\t\t\t\t$update_quote_prod[\"prod_extra_comments\"] = $prod_params['prod_extra_comments'];\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$update_quote_prod[\"prod_extra_comments\"] = NULL;\n\t\t\t\t\t\t\t$quote_obj->updateQuote($update_quote_prod,$quote_id);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($status=='challenged')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$log_params['action']= 'prod_saved';\n\t\t\t\t\t\t\t$quiteActionId=4;\t\n\n\t\t\t\t\t\t\tif($prod_params['quote_updated_comments'])\n\t\t\t\t\t\t\t\t$log_params['comments']=$prod_params['quote_updated_comments'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$log_obj=new Ep_Quote_QuotesLog();\n\t\t\t\t\t\t\t$log_obj->insertLog($quiteActionId,$log_params);\n\n\t\t\t\t\t\t\t$this->_redirect(\"/quote/prod-quote-review?quote_id=\".$quote_id);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($status=='validated')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quoteDetails=$quote_obj->getQuoteDetails($quote_id);\n\t\t\t\t\t\t\tif($quoteDetails[0]['prod_timeline']>0)\n\t\t\t\t\t\t\t\t$prod_time_line=$quoteDetails[0]['prod_timeline'];\n\n\t\t\t\t\t\t\tif($prod_time_line>time())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$log_params['action']= 'prod_validated_ontime';\n\t\t\t\t\t\t\t\t$quiteActionId=5;\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\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$delay_hours=dateDiffHours($prod_time_line,time());\n\n\t\t\t\t\t\t\t\t$log_params['action']= 'prod_validated_delay';\n\t\t\t\t\t\t\t\t$log_params['delay_hours']=$delay_hours;\n\t\t\t\t\t\t\t\t$quiteActionId=6;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($prod_params['quote_updated_comments'])\n\t\t\t\t\t\t\t\t$log_params['comments']=$prod_params['quote_updated_comments'];\n\n\t\t\t\t\t\t\t//echo \"<pre>\";print_r($log_params);exit;\n\n\t\t\t\t\t\t\t$log_obj=new Ep_Quote_QuotesLog();\n\t\t\t\t\t\t\t$log_obj->insertLog($quiteActionId,$log_params);\n\n\t\t\t\t\t\t\t//sending email to sales user\n\t\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t$receiver_id=$quoteDetails[0]['quote_by'];\n\t\t\t\t\t\t\t$mail_parameters['sales_user']=$quoteDetails[0]['quote_by'];\n\t\t\t\t\t\t\t$mail_parameters['bo_user']=$this->adminLogin->userId;\n\t\t\t\t\t\t\t$mail_parameters['bo_user_type']='prod';\n\t\t\t\t\t\t\t$mail_parameters['quote_title']=$quoteDetails[0]['title'];\n\t\t\t\t\t\t\t$mail_parameters['followup_link']='/quote/quote-followup?quote_id='.$quoteDetails[0]['identifier'];\n\t\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiver_id,134,$mail_parameters);\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//sending intimation emails when quote edited\n\t\t\t\t $update_comments= $prod_params['quote_updated_comments'];\n\t\t\t\t if($update_comments)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$bo_user_type='prod';\t\t\t\t\n\t\t\t\t\t\t\t\t$this->sendIntimationEmail($quote_id,$bo_user_type,$update_comments,$newmissionAdded);\n\t\t\t\t\t\t\t\t//exit;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//head sales notify email in sales final stage\n\t\t\t\t\t\t\t$email_head_sale=array('139281941421499'=>'mfouris@edit-place.com'); // need add thaibault\n\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\n\t\t\t\t\t\t\t\t\t\tif(count($email_head_sale)>0){\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\tforeach($email_head_sale as $user=>$emails){\n\t\t\t\t\t\t\t\t\t\t\t\t$receiver_id=$user;\n\t\t\t\t\t\t\t\t\t\t\t\t$headmail_parameters['bo_user']=$user;\n\t\t\t\t\t\t\t\t\t\t\t\t$headmail_parameters['sales_user']=$quoteDetails[0]['quote_by'];\n\t\t\t\t\t\t\t\t\t\t\t\t$headmail_parameters['turn_over']=$quoteDetails[0]['turnover'];\n\t\t\t\t\t\t\t\t\t\t\t\t$headmail_parameters['client_name']=$quoteDetails[0]['company_name'];\n\t\t\t\t\t\t\t\t\t\t\t\t$headmail_parameters['followup_link']='/quote/quote-followup?quote_id='.$quoteDetails[0]['identifier'];\n\t\t\t\t\t\t\t\t\t\t\t\t$headmail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t\t\t\t\t\t$headmail_obj->sendQuotePersonalEmail($receiver_id,205,$headmail_parameters);\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\n\n\n\t\t\t\t\t\t\t$this->_redirect(\"/quote/sales-quotes-list?submenuId=ML13-SL2\");\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\t\t\n\t}", "function sendReviews($args, &$request) {\n\t\treturn $this->_initiateEditorDecision($args, $request, 'SendReviewsForm');\n\t}", "public function requestreview(CreatereviewRequest $request) {\n $user = $request->all();\n $message_data = array(\n \"data\" => ['customerName' => $user['customerName'], 'userId' => base64_encode(auth()->user()->id), 'name' => auth()->user()->name, 'BusinessName' => auth()->user()->userBusiness->business_name],\n \"user\" => $user\n );\n $this->dispatch((new StylerZoneEmails($message_data, 'emails.requestreview')));\n// return Mail::send('emails.requestreview',['customerName' => $user['customerName'], 'userId' => base64_encode(auth()->user()->id), 'name' => auth()->user()->name, 'BusinessName' => auth()->user()->userBusiness->business_name] , function ($message) use ($user) {\n// $message->from('info@createyour.com.au', app_name());\n// $message->to($user['customerEmail'], $user['customerEmail'])->subject(app_name() . ': Review Request!');\n// });\n\n return response()->json($request->all(), 200);\n }", "public function notificationAction() {\n global $CFG;\n\n // Full strength error logging\n error_reporting(E_ALL);\n ini_set('display_errors', 0);\n ini_set('log_errors', 1);\n\n // Library stuff\n $sagepay = new sagepayserverlib();\n $sagepay->setController($this);\n\n // POST data from SagePay\n $data = $sagepay->getNotification();\n\n // Log the notification data to debug file (in case it's interesting)\n $this->log(var_export($data, true));\n\n // Get the VendorTxCode and use it to look up the purchase\n $VendorTxCode = $data['VendorTxCode'];\n if (!$purchase = $this->bm->getPurchaseFromVendorTxCode($VendorTxCode)) {\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode('Purchase record not found');\n $this->log('SagePay notification: Purchase not found - ' . $url);\n $sagepay->notificationreceipt('INVALID', $url, 'Purchase record not found');\n die;\n }\n\n // Now that we have the purchase object, we can save whatever we got back in it\n $purchase = $this->bm->updateSagepayPurchase($purchase, $data);\n\n // Mailer\n $mail = new maillib();\n $mailpurchase = clone $purchase;\n $mail->initialise($this, $mailpurchase, $this->bm);\n $mail->setExtrarecipients($CFG->backup_email);\n\n // Check VPSSignature for validity\n if (!$sagepay->checkVPSSignature($purchase, $data)) {\n $purchase->status = 'VPSFAIL';\n $purchase->save();\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode('VPSSignature not matched');\n $this->log('SagePay notification: VPS sig no match - ' . $url);\n $sagepay->notificationreceipt('INVALID', $url, 'VPSSignature not matched');\n die;\n }\n\n // Check Status.\n // Work out what next action should be\n $status = $purchase->status;\n if ($status == 'OK' || ($status == 'OK REPEATED')) {\n\n // Send confirmation email\n $url = $this->Url('booking/complete') . '/' . $VendorTxCode;\n $mail->confirm();\n $this->log('SagePay notification: Confirm sent - ' . $url);\n $sagepay->notificationreceipt('OK', $url, '');\n } else if ($status == 'ERROR') {\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode($purchase->statusdetail);\n $this->log('SagePay notification: Booking fail - ' . $url);\n $mail->decline();\n $sagepay->notificationreceipt('OK', $url, $purchase->statusdetail);\n } else {\n $url = $this->Url('booking/decline') . '/' . $VendorTxCode;\n $this->log('SagePay notification: Booking decline - ' . $url);\n $mail->decline();\n $sagepay->notificationreceipt('OK', $url, $purchase->statusdetail);\n }\n\n $purchase->completed = 1;\n $purchase->save();\n\n die;\n }", "public function productReviewsAction()\n {\n $model = new shopProductReviewsModel();\n $model->repair();\n echo \"OK\";\n }", "public function actionAjaxReview()\n {\n if(isset(Yii::app()->user->isCustomer)){\n if(isset($_POST['deal_id']) && isset($_POST['review'])){\n $userID = Yii::app()->user->userId;\n $reviewModel = new Reviews;\n $record = $reviewModel->findByAttributes(array('fkUserID'=>$userID,'fkDealID'=>$_POST['deal_id']));\n if(!count($record)>0){\n $reviewModel->fkUserID = $userID;\n $reviewModel->fkDealID = $_POST['deal_id'];\n $reviewModel->nickname = $_POST['nickname'];\n $reviewModel->reviewSubject = $_POST['summary'];\n $reviewModel->reviewContent = $_POST['review'];\n $reviewModel->reviewStatus = '0';\n $reviewModel->reviewAddDate = time();\n $reviewModel->save();\n echo \"Success\";\n }else{\n echo \"AlreadyReviewed\";\n }\n }\n }else{\n echo \"LoginPlease\";\n }\n }", "function submitReview ($rating, $text, $productID) {\r\n //checks if the user is logged in\r\n if (checkLogin()) {\r\n if (userHasPurchashedProduct($productID) && ! userHasReviewedProduct($productID)) {\r\n $id = getUserID();\r\n //check if the ID didnt get an error\r\n if (isset($id)) {\r\n //create query\r\n $sql = \"INSERT INTO reviews\r\n (Rating, Comment, ProductID, PersonID)\r\n VALUES\r\n ($rating,'$text',$productID,$id)\r\n \";\r\n //execute query\r\n runQuery($sql);\r\n\r\n //verify if placing review was succesful\r\n }\r\n }\r\n }\r\n}", "public function send_notification(Request $request)\n\t\t{\t\n\t\t\t$quote_review = $request->quote_review;\n\t\t\t$phone_number = $request->phone_number;\n\t\t\t$recipient = $request->recipient;\n\t\t\t$pdf_data = base64_decode($request->pdf_base64_data);\n\t\t\t$quote_annotations = $request->quote_annotations;\n\t\t\t$quote_guid = $request->quote_guid;\n\t\t\t$to_company = is_null($request->company) ? '' : 'to ' . $request->company;\n\t\t\t \n\t\t\t$user_data = array(\n\t\t\t\t'phone_number' => $phone_number,\n\t\t\t\t'pdf_data' => $pdf_data,\n\t\t\t\t'quote_annotations' => $quote_annotations,\n\t\t\t\t'quote_guid' => $quote_guid,\n\t\t\t\t'to_company' => $to_company\n\t\t\t);\n\t\t\t \n\t\t\tswitch ($recipient) {\n\t\t\t\tcase \"laine\":\n\t\t\t\t\t$sales_rep_data = array(\n\t\t\t\t\t\t'mail' => 'laine@pahoda.com',\n\t\t\t\t\t\t'sales_rep' => 'Laine Dobson',\n\t\t\t\t\t);\n\t\t\t\t\t$user_data = array_merge($user_data, $sales_rep_data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"greg\":\n\t\t\t\t\t$sales_rep_data = array(\n\t\t\t\t\t\t'mail' => 'greg@pahoda.com',\n\t\t\t\t\t\t'sales_rep' => 'Greg Bentz'\n\t\t\t\t\t);\n\t\t\t\t\t$user_data = array_merge($user_data, $sales_rep_data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"jesse\":\n\t\t\t\tdefault:\n\t\t\t\t\t$sales_rep_data = array(\n\t\t\t\t\t\t'mail' => 'jesse@pahoda.com', \n\t\t\t\t\t\t'sales_rep' => 'Jesse Harwell'\n\t\t\t\t\t);\n\t\t\t\t\t$user_data = array_merge($user_data, $sales_rep_data);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($quote_review) {\n\t\t\t\tcase \"needs\":\n\t\t\t\t\tMail::send(\n\t\t\t\t\t\t'emails.notification_template_rejected',\n\t\t\t\t\t\t$user_data,\n\t\t\t\t\t\tfunction ($message) use ($user_data) {\n\t\t\t\t\t\t\t$message->from('noreply@perfectcopier.com', 'Pahoda Image Products');\n\t\t\t\t\t\t\t$message->to($user_data['mail'], $user_data['sales_rep'])->subject('Perfectcopier notification: Quote Rejected');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$message->attachData($user_data['pdf_data'], 'PahodaImageQuote_' . $user_data['quote_guid'] . '.pdf');\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"perfect\":\n\t\t\t\tdefault:\t\t\t\t\n\t\t\t\t\t$user_data = array(\n\t\t\t\t\t\t'phone_number' => $phone_number,\n\t\t\t\t\t\t'pdf_data' => $pdf_data,\n\t\t\t\t\t\t'quote_annotations' => $quote_annotations,\n\t\t\t\t\t\t'quote_guid' => $quote_guid,\n\t\t\t\t\t\t'to_company' => $to_company\n\t\t\t\t\t);\n\t\t\t\t\t//Send message to all three reps\n\t\t\t\t\t$sales_rep_data = array (\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'mail' => 'jesse@pahoda.com', \n\t\t\t\t\t\t\t'sales_rep' => 'Jesse Harwell'\n\t\t\t\t\t\t), \n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'mail' => 'greg@pahoda.com', \n\t\t\t\t\t\t\t'sales_rep' => 'Greg Bentz'\n\t\t\t\t\t\t), \n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'mail' => 'laine@pahoda.com', \n\t\t\t\t\t\t\t'sales_rep' => 'Laine Dobson'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\tforeach ($sales_rep_data as $sales_rep_array) {\t\t\t\t\t\t\n\t\t\t\t\t\t$new_user_data = array_merge($user_data, $sales_rep_array);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMail::send(\n\t\t\t\t\t\t\t'emails.notification_template_accepted',\n\t\t\t\t\t\t\t$new_user_data,\n\t\t\t\t\t\t\tfunction ($message) use ($new_user_data) {\n\t\t\t\t\t\t\t\t$message->from('noreply@perfectcopier.com', 'Pahoda Image Products');\n\t\t\t\t\t\t\t\t$message->to($new_user_data['mail'], $new_user_data['sales_rep'])->subject('Perfectcopier notification: Quote Accepted');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$message->attachData($new_user_data['pdf_data'], 'PahodaImageQuote_' . $new_user_data['quote_guid'] . '.pdf');\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\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\treturn response()->json(array('message' => $quote_annotations));\n\t\t}", "function saveSendReviews($args, &$request) {\n\t\treturn $this->_saveEditorDecision($args, $request, 'SendReviewsForm');\n\t}", "public function ratereviewpromotion() {\n\n $sessionstaff = $this->Session->read('staff');\n $options6['conditions'] = array('Promotion.clinic_id' => $sessionstaff['clinic_id'], 'Promotion.is_global' => 0,'Promotion.default'=>2,'Promotion.is_lite'=>0);\n $Promotionlist = $this->Promotion->find('all', $options6);\n $this->set('promotionlist', $Promotionlist);\n //function to check access control for practice staff\n if($sessionstaff['staff_role']=='Doctor' && $sessionstaff['staffaccess']['AccessStaff']['rate_review']==1){\n \n }else{\n $this->render('/Elements/access');\n }\n }", "public function check_auth_reviews() {\n\t\tif ( isset( $_GET['wp_confirm_reviews_insurance'] ) ) {\n\n\t\t\t//check auth Code\n\t\t\t$comment_id = Helper::check_auth_comment( $_GET['wp_confirm_reviews_insurance'] );\n\t\t\tif ( $comment_id != false ) {\n\n\t\t\t\t//remove meta Key\n\t\t\t\tdelete_comment_meta( $comment_id, 'auth_key' );\n\n\t\t\t\t//Add Validate User Reviews\n\t\t\t\tupdate_comment_meta( $comment_id, 'comment_approve_user', 'yes' );\n\n\t\t\t\t//Show Alert\n\t\t\t\techo '<div class=\"confirm-review-alert\">' . WP_REVIEWS_INSURANCE::$option['email_thanks_text'] . '</div>';\n\t\t\t\techo '\n\t\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t jQuery(\".confirm-review-alert\").delay(1500).fadeOut(\"normal\"); \n\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t}\n\t\t}\n\t}", "public function customerProductReview($observer)\n{ \n \n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n $fname=$customer->getFirstname();\n $lname=$customer->getLastname();\n $email= $customer->getEmail();\n\n $telephone= $customer->getAddressesCollection()->getFirstitem()->getTelephone();\n if ($telephone){\n $text = Mage::getStoreConfig('smsnotifications/customer_notification/customer_review');\n $text = str_replace('{{firstname}}', $fname, $text);\n $text = str_replace('{{lastname}}', $lname, $text);\n $text = str_replace('{{emailid}}', $email, $text);\n // $text = str_replace('{{name}}', $customer_name, $text);\n }\n array_push($settings['order_noficication_recipients'], $telephone);\n\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n return($result);\n}", "public function like() {\n\n $review = Input::get('review');\n $check = $this->likeCheck($review);\n\n if (!$check) {\n if (!$review == \"\") {\n // inserting the review like\n DB::table('review_likes')->insert(\n array(\n 'review_id' => $review,\n 'user_id' => Auth::user()->id\n )\n );\n $user = DB::table('film_review')->where('fr_id', $review)->first();\n // creating a notification\n $noti = new Notification; // notification instance\n $noti->user_id = $user->fr_usr_id; // the user who will get this notification\n $noti->subject_type = 'user'; // user\n $noti->subject_id = Auth::user()->id; // the uset who liked the review\n $noti->object_type = 'review'; // object is review \n $noti->object_id = $review; // id of the review in picture\n $noti->type = 'liked'; // liked - notification type\n $noti->read = '0'; // default '0' as it is unread\n $noti->time = time(); // default '0' as it is unread\n $noti->save(); // saves notification\n\n $mail = $this->newLikeMail($user->fr_usr_id, $user->fr_fl_id, $user);\n }\n }\n }", "public function testPostingASingleReview()\n {\n Bus::fake();\n\n // Create a post.\n $northstarId = $this->faker->northstar_id;\n $post = factory(Post::class)->create();\n\n $response = $this->withAccessToken($northstarId, 'admin')->postJson('api/v3/posts/' . $post->id . '/reviews', [\n 'status' => 'accepted',\n 'comment' => 'testing',\n ]);\n\n $response->assertStatus(201);\n Bus::assertDispatched(SendReviewedPostToCustomerIo::class);\n\n // Make sure the post status is updated & a review is created.\n $this->assertEquals('accepted', $post->fresh()->status);\n $this->assertDatabaseHas('reviews', [\n 'admin_northstar_id' => $northstarId,\n 'post_id' => $post->id,\n 'comment' => 'testing',\n ]);\n }", "public function store(Request $request)\n {\n //\n $review = new Review();\n $review->user_id = $request->user_id;\n $review->product_id = $request->product_id;\n $review->email = $request->email;\n $review->rating = $request->rating + 1;\n $review->description = $request->description;\n $review->save();\n Session::flash('created_review', 'The review has been submitted!');\n return redirect()->back();\n }", "function saveProductReview()\n{\n\t$cf = new Fwcore();\n\t\n\t$data = array();\n\t$data['auth_token'] = $_POST['auth_token'];\n\t$data['product_id'] = $_POST['product_id'];\n\t$data['email'] = $_POST['email'];\n\t$data['rating'] = $_POST['rating'];\n\t$data['review_title'] = isset($_POST['review_title']) != '' ? $_POST['review_title'] : '';\n\t$data['review'] = isset($_POST['review']) != '' ? $_POST['review'] : '';\n\t$data['app_id'] = isset($_POST['app_id']) != '' ? $_POST['app_id'] : '';\n\t$data['rating_id'] = isset($_POST['rating_id']) != '' ? $_POST['rating_id'] : '';\n\t\n\t$cf->saveProductReview($data);\n}", "public function update(Request $request, ProductReview $productReview)\n {\n //\n }", "public function update(Request $request, ProductReview $productReview)\n {\n //\n }", "public function notifyTransferedPlayers(){\n \n Service::loadModels('rally', 'rally');\n $peopleService = parent::getService('people','people');\n $carService = parent::getService('car','car');\n $teamService = parent::getService('team','team');\n $marketService = parent::getService('market','market');\n $notificationService = parent::getService('user','notification');\n \n /*\n * Players\n */\n $offersNoBid = $marketService->getFinishedOffersNotNotifiedNoBid();\n foreach($offersNoBid as $offerNoBid):\n $notificationService->addNotification($offerNoBid['Player']['first_name'].\" \".$offerNoBid['Player']['last_name'].\" was not sold. Player will return to your team tomorrow\",3,$offerNoBid['Team']['User']['id']);\n $offerNoBid->set('notified',1);\n $offerNoBid->save();\n endforeach;\n \n $offers = $marketService->getFinishedOffersNotNotified();\n // 1. Zaplacenie za transfer przez kupujacego\n \n foreach($offers as $offer): \n foreach($offer['Bids'] as $key => $bid){\n if($key==0){\n $notificationService->addNotification($offer['Player']['first_name'].\" \".$offer['Player']['last_name'].\" was successfully sold. Player will leave your team tomorrow\",3,$offer['Team']['User']['id']);\n $notificationService->addNotification($offer['Player']['first_name'].\" \".$offer['Player']['last_name'].\" has been bought. Player will join your team tomorrow\",3,$bid['Team']['User']['id']);\n }\n else{\n $notificationService->addNotification($offer['Player']['first_name'].\" \".$offer['Player']['last_name'].\" has not been bought.\",3,$bid['Team']['User']['id']);\n }\n } \n \n \n $offer->set('notified',1);\n $offer->save();\n endforeach;\n /*\n * Cars\n */\n \n $caroffersNoBid = $marketService->getFinishedCarOffersNotMovedNoBid();\n foreach($caroffersNoBid as $offerNoBid):\n $notificationService->addNotification($offerNoBid['Car']['name'].\" was not sold. The car will return to your team tomorrow\",3,$offerNoBid['Team']['User']['id']);\n $offerNoBid->set('notified',1);\n $offerNoBid->save();\n endforeach;\n \n $caroffers = $marketService->getFinishedCarOffersNotMoved();\n // 1. Zaplacenie za transfer przez kupujacego\n // 2. OTrzymanie kasy przez sprzedajacego\n // 3. Zmiana teamu przez kupujacego\n // 4. Ustawienie oferty na player_moved\n foreach($caroffers as $offer):\n foreach($offer['Bids'] as $key => $bid){\n if($key==0){\n $notificationService->addNotification($offer['Car']['name'].\" was successfully sold. The car will leave your team tomorrow\",3,$offer['Team']['User']['id']);\n $notificationService->addNotification($offer['Car']['name'].\" has been bought. The car will join your team tomorrow\",3,$bid['Team']['User']['id']);\n }\n else{\n $notificationService->addNotification($offer['Car']['name'].\" has not been bought.\",3,$bid['Team']['User']['id']);\n }\n }\n $offer->set('notified',1);\n $offer->save();\n endforeach;\n \n echo \"done\";exit;\n }", "function apptivo_ecommerce_checkout_order_review() {\t\r\n\t\r\n\tapptivo_ecommerce_get_template('checkout/checkout_review_order.php', false);\r\n}", "public function test_make_a_review()\n {\n $user = User::factory()->create();\n $film = Film::factory()->create();\n\n $response = $this->actingAs($user)->get(\"/review/{$film->id}\");\n $response->assertStatus(200);\n\n $response = $this->actingAs($user)->post(\"/review/{$film->id}\", [\"rate\" => 10]);\n $this->assertTrue($user->refresh()->reviews()->where(\"film_id\", $film->id)->first() !== null);\n }", "public function handle(ApplicationUnderReview $event)\n {\n // $account = Account::find(1002707);\n // $account->notify(new ApplicationReview($event->application));\n }", "public function update(Request $request, user_reviews $user_reviews)\n {\n //\n }", "public function postUpdateReview()\n {\n \n $update_review = new Review();\n \n if( $update_review->updateReview() )\n {\n\n return Response::json(\"success\");\n }\n else\n {\n return Response::json(\"fail\");\n }\n \n }", "public function store(Request $request)\n {\n $review = new Review;\n $review->name = $request->get(\"name\");\n $review->grade = $request->get(\"grade\");\n $review->comment = $request->get(\"comment\");\n $review->product_id = $request->get(\"product_id\");\n $review->type = $request->get(\"type\");\n $review->save();\n return redirect()->action('HomeController@index', ['id' => $review->product_id])->with('status', 'Comment saved!');\n }", "public function approve()\n {\n $type = $this->input->get('type');\n $id = $this->input->get('id');\n\n $this->model_review->approve($type, $id);\n\n redirect($_SERVER['HTTP_REFERER']);\n }", "private function notifyORS() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ORSNotification.php');\r\n\r\n $piDetails = $this->getPIDisplayDetails();\r\n $piName = $piDetails['firstName'] . \" \" . $piDetails['lastName'];\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted online [%s]', $this->trackingFormId, $piName);\r\n $emailBody = sprintf('A tracking form was submitted online :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nPrincipal Investigator : %s\r\nDepartment : %s\r\n\r\n', $this->trackingFormId, $this->projectTitle, $piName, $piDetails['departmentName']);\r\n\r\n $ORSNotification = new ORSNotification($subject, $emailBody);\r\n try {\r\n $ORSNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to ORS : '. $e);\r\n }\r\n }", "public function update(Request $request, Review $review)\n {\n //\n }", "public function update(Request $request, Review $review)\n {\n //\n }", "public function update(Request $request, Review $review)\n {\n //\n }", "public function update(Request $request, Review $review)\n {\n //\n }", "public function update(Request $request, reviews $reviews)\n {\n //\n }", "public function doReview($data)\n {\n $id = isset($data['ID']) ? (int)$data['ID'] : null;\n if (!$id) {\n user_error('Invalid ID passed for review action');\n $this->redirectBack();\n }\n return $this->owner->redirect(Controller::join_links($this->owner->Link('review'), $id));\n }", "function set_comment_on_receipt() {\n $this->sale_lib->set_comment_on_receipt($this->input->post('show_comment_on_receipt'));\n }", "protected function doActionSendTracking()\n {\n \\XLite\\Core\\Mailer::sendOrderTrackingInformationCustomer($this->getOrder());\n\n \\XLite\\Core\\TopMessage::addInfo('Tracking information has been sent');\n }", "public function store(Request $request)\n {\n $user = \\Auth::user();\n $product = Product::find($request->product_id);\n $review = new Review();\n $review->comment = $request->comment;\n $review->star = $request->star;\n $review->user()->associate($user);\n $review->product()->associate($product);\n $review->save();\n return redirect()->back();\n\n }", "public function report(Request $request, $event_id, $review_id)\n {\n $this->eventReviewService->report($event_id,$review_id, $request->get('volunteer'));\n return response()->json(['message' => 'Success.'], 200);\n }", "function wcfm_mark_as_recived() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderitemid'] ) ) {\r\n $order_id = $_POST['orderid']; \r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t$product_id = $_POST['productid'];\r\n $order_item_id = $_POST['orderitemid'];\r\n \r\n //$comment_id = $order->add_order_note( sprintf( __( 'Item(s) <b>%s</b> received by customer.', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ) ), '1');\r\n \r\n // Keep Tracking URL as Order Item Meta\r\n\t\t\t$sql = \"INSERT INTO {$wpdb->prefix}woocommerce_order_itemmeta\";\r\n\t\t\t$sql .= ' ( `meta_key`, `meta_value`, `order_item_id` )';\r\n\t\t\t$sql .= ' VALUES ( %s, %s, %s )';\r\n\t\t\t\r\n\t\t\t$confirm_message = __( 'YES', 'wc-frontend-manager-ultimate' );\r\n\t\r\n\t\t\t$wpdb->get_var( $wpdb->prepare( $sql, 'wcfm_mark_as_recived', $confirm_message, $order_item_id ) );\r\n\t\t\t\r\n\t\t\t$vendor_id = $WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product( $product_id );\r\n\t\t\t\r\n\t\t\t// WCfM Marketplace Table Update\r\n\t\t\tif( $vendor_id && (wcfm_is_marketplace() == 'wcfmmarketplace') ) {\r\n\t\t\t\t$wpdb->query(\"UPDATE {$wpdb->prefix}wcfm_marketplace_orders SET shipping_status = 'completed' WHERE order_id = $order_id and vendor_id = $vendor_id and item_id = $order_item_id\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Notification\r\n\t\t\t$wcfm_messages = sprintf( __( 'Customer marked <b>%s</b> received.', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ) );\r\n\t\t\t$WCFM->wcfm_notification->wcfm_send_direct_message( -1, 0, 0, 1, $wcfm_messages, 'shipment_received' );\r\n\t\t\t\r\n\t\t\t// Vendor Notification\r\n\t\t\tif( $vendor_id ) {\r\n\t\t\t\t$WCFM->wcfm_notification->wcfm_send_direct_message( -2, $vendor_id, 0, 1, $wcfm_messages, 'shipment_received' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// WC Order Note\r\n\t\t\t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\r\n\t\t\tdo_action( 'wcfm_after_order_mark_received', $order_id, $order_item_id, $product_id );\r\n }\r\n die;\r\n\t}", "public function update(Request $request, Reviews $reviews)\n {\n //\n }", "public function notifyPayment()\n {\n }", "function notify_reviewer( $post_ID, $post, $dowhat='publish' ) {\n\t\t\tglobal $wpdb, $current_user;\n\t\t\t$last_revision = $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE post_parent=%d AND post_type=%s ORDER BY post_date DESC LIMIT 1\", $post_ID, 'revision' ) );\n\t\t\t$post_content = 'draft' == $dowhat ? get_post( $last_revision ) : get_post( $post_ID );\n\t\t\t$last_mod = $post_content->post_date;\n\t\t\t$post_content = $post_content->post_content;\n\t\t\t$revision_compare_link = admin_url( 'revision.php?action=diff&post_type=' . $post->post_type . '&right=' . $post->ID . '&left=' . $last_revision );\n\t\t\t$body = sprintf( __( \"New changes have been made to \\\"%s\\\" at <%s>. \", $this->text_domain ), $post->post_title, get_permalink( $post->ID ) );\n\t\t\tif( 'draft' == $dowhat ) {\n\t\t\t\t$body .= __( \"The author has requested that you review the new changes and determine whether to remove or approve them. These changes will not appear on the public website until you approve them.\\n\\n\", $this->text_domain );\n\t\t\t} else {\n\t\t\t\t$body .= __( \"The modifications have been published, but the author of the page has requested you be notified of them.\\n\\n\", $this->text_domain );\n\t\t\t}\n\t\t\t$body .= sprintf( __( \"The new content of the page is shown below if you would like to review it. You can also review %s the changes at %s. Thank you. \\n\\n======================================================= \\nRevisions made at %s \\n======================================================= \\n\\n%s\", $this->text_domain ), ( 'draft' == $dowhat ? __( \" and approve/reject \", $this->text_domain ) : '' ), $revision_compare_link, $last_mod, $post_content );\n\t\t\t\n\t\t\t$headers = \"From: {$current_user->display_name} <{$current_user->user_email}>\\r\\n\";\n\t\t\t\n\t\t\twp_mail( $this->reviewers, sprintf( __( '[%s] New modifications to %s' ), get_bloginfo('name'), $post->post_title ), $body, $headers );\n\t\t}", "public function addReview($review) {\n $this->reviews[] = $review;\n }", "public function sendRatingEmails($session){\n $this->sendRatingToMentor($session);\n $this->sendRatingToMentee($session);\n }", "public function submitReview(Request $request, Order $order)\n {\n $this->authorize('view', $order);\n\n $input = $request->input();\n\n $validator = Validator::make($input, [\n 'products' => 'required|array',\n 'products.*.order_item_id' => 'required|exists:order_items,id',\n 'products.*.rating' => 'required|integer|min:1|max:5',\n ]);\n\n if ($validator->fails()){\n return response()->json($validator->errors(), 422);\n }\n\n if ($order->reviews()->count()) {\n return $this->respondBadRequestError('You have already submitted the review for this order.');\n }\n\n $reviews = [];\n DB::beginTransaction();\n foreach ($input['products'] as $item) {\n $orderItem = $order->items()->where('order_items.id', $item['order_item_id'])->first();\n if (empty($orderItem)) {\n DB::rollBack();\n return $this->respondBadRequestError('Order item id does not exist.');\n }\n $reviews[] = ProductReview::create([\n 'order_id' => $order->id,\n 'product_id' => $orderItem->product_id,\n 'user_id' => auth()->user()->id,\n 'rating' => $item['rating'],\n 'review' => $item['review'] ?? null,\n ]);\n }\n DB::commit();\n\n return $this->respondCreated($reviews);\n }", "public function confirm()\n {\n $addRecord = $this->reviews->create();\n\n $addRecord->ID = $this->input->post('ID');\n $addRecord->from = $this->input->post('from');\n $addRecord->to = $this->input->post('to');\n $addRecord->review = $this->input->post('review');\n $addRecord->rating = $this->input->post('rating');\n\n // Add validation here once log in is implemented\n // there shouldn't be an anonymous review\n\n // Create review if review doesn't exist\n // else update\n if($this->reviews->exists($addRecord->ID))\n {\n $this->reviews->update($addRecord);\n\n }\n else\n {\n $this->reviews->add($addRecord);\n }\n\n\n redirect('/user_detail/index/'. $addRecord->to);\n }", "public function actionReview($id)\n {\n $model = $this->findModel($id);\n\n if('in-review' == $model->status){\n /* no changing of reviewer permitted when module is in-review */\n $enquirySpecialistsList[\"$model->reviewer_id\"] = User::findOne($model->reviewer_id)['name'];\n } else { \n /* get (id,name) as (key,value) array/list of enquiry specialists */\n $subQuery = AuthAssignment::find()->where((['item_name' => 'enquiryspecialist']))->all();\n $subQuery = ArrayHelper::map($subQuery,'user_id','user_id');\n $mainQuery = User::find()->where(['in', 'id', $subQuery])->all();\n $enquirySpecialistsList = ArrayHelper::map($mainQuery, 'id', 'name' ); \n } \n $model->enquirySpecialistsList = $enquirySpecialistsList; \n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->status = 'in-review';\n if($model->owner_id == Yii::$app->user->getId()){\n /* meaning review is submitted by module owner. So review_status has to be 'in-review'*/\n $model->review_status = 'in-review'; \n } \n\n if( ($model->reviewer_id == Yii::$app->user->getId()) and ('approved' == $model->review_status)){\n /* review is approved so ALSO change model status to approved (along with review status).*/\n $model->status = 'approved';\n } \n\n /* adding review comment to review_comment model */\n $modelComment = new ReviewComment();\n $modelComment->commenter_id = Yii::$app->user->getId();\n $modelComment->module_id = $model->id;\n $modelComment->comment = $model->reviewComment;\n $modelComment->review_status_before = $model->review_status;\n $modelComment->review_status_after = $model->review_status;\n $modelComment->save();\n\n $model->save(); \n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('review', [\n 'model' => $model,\n ]);\n }\n }", "public function actionReview() {\n //echo \"<pre>\";print_r($_POST);die;\n $idstone = $_POST['idstone'];\n $model = Stone::model()->findByPk($idstone);\n if ($model->review == 0)\n $model->review = 1;\n else\n $model->review = 0;\n $model->save();\n echo \"success\";\n Yii::app()->end();\n }", "public function store(Request $request)\n {\n $review = new Review;\n $review->product_id = $request->input(\"product_id\");\n $review->comment = $request->input(\"comment\");\n $review->rating = $request->input(\"rating\");\n $review->save();\n return redirect()->action('ReviewsController@index')->with('status', 'Kommentaren är sparad!');\n }", "function _sf_send_user_publish_note($new_status, $old_status, $post) {\n\t\tif($post->post_type == 'spot') {\n\t\t\t\n\t\t\t$user = get_user_by('id', $post->post_author);\n\t\t\t\n\t\t\t//// IF THIS POST IS BEING PUBLISHED AND THE AUTHOR IS A SUBMITTER\n\t\t\tif($old_status != 'publish' && $new_status == 'publish' && isset($user->caps['submitter'])) {\n\t\t\t\t\n\t\t\t\t//// SENDS AN EMAIL SAYING HIS POST HAS BEEN SUBMITTED\n\t\t\t\t$message = sprintf2(__(\"Dear %user,\n\t\t\t\t\nThis is to inform you that your submission %title at %site_name has been approved and it is now published.\n\nYou can view it here at %link\n\nKind regards,\nthe %site_name team.\", 'btoa'), array(\n\t\t\t\n\t\t\t\t\t'user' => $user->display_name,\n\t\t\t\t\t'title' => $post->post_title,\n\t\t\t\t\t'site_name' => get_bloginfo('name'),\n\t\t\t\t\t'link' => get_permalink($post->ID),\n\t\t\t\t\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$subject = sprintf2(__('Submission approved at %site_name', 'btoa'), array('site_name' => get_bloginfo('name')));\n\t\t\t\t\n\t\t\t\t$headers = \"From: \".get_bloginfo('name').\" <\".get_option('admin_email').\">\";\n\t\t\t\t\n\t\t\t\twp_mail($user->user_email, $subject, $message, $headers);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t///// IF ITS A SPOT\n\t\t\tif($post->post_type == 'spot') {\n\t\t\t\t\n\t\t\t\tif(ddp('future_notification') == 'on' && $old_status != 'publish' && $new_status == 'publish') {\n\t\t\t\t\t\n\t\t\t\t\t//// ALSO CHECKS FOR USER NOTIFICATIONS FOR MATCHING CRITERIA\n\t\t\t\t\tif(function_exists('_sf_check_for_user_notifications_matching_spot')) { _sf_check_for_user_notifications_matching_spot($post->ID); }\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('submission_days') != '' && ddp('submission_days') != '0') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO PENDING IN X AMOUNT OF DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET FOR OUR FEATURED SUBMISSION - AND ITS INDEED FEATURED\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('price_featured_days') != '' && ddp('price_featured_days') != '0' && get_post_meta($post->ID, 'featured', true) == 'on') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO NORMAL SUBMISSION AFTER X DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date_featured($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public function review()\n\t{\n\t\t\n\t\t$this->templateFileName = 'review.tpl';\n\t\t\n\t\t// Get the cart data, shipping address, billing address, and payment method records for display.\n\t\t\n\t\t$cart_items = $this->dbConnection->prepareRecordSet( \"SELECT * FROM b_cart_item ci INNER JOIN b_item i ON ci.item_id = i.item_id WHERE cart_id = ?\", $this->session->cartID );\n\t\t$shipping_address = $this->dbConnection->prepareRecord(\"SELECT * FROM b_user_address WHERE address_id = ?\", $this->session->shippingAddressID);\n\t\t$billing_address = $this->dbConnection->prepareRecord(\"SELECT * FROM b_user_address WHERE address_id = ?\", $this->session->billingAddressID);\n\t\t$payment_method = $this->dbConnection->prepareRecord(\"SELECT payment_id, payment_type, credit_card_type, payment_name, RIGHT(account_number, 4) AS account_number_last_4, LPAD(RIGHT(account_number, 4), LENGTH(account_number), 'X') AS account_number, card_expiration_month, card_expiration_year, rp.description AS payment_type_description, rc.description AS credit_card_type_description FROM b_payment INNER JOIN b_reference rp ON rp.data_member = 'PAYMENT_TYPE' AND rp.data_value = payment_type LEFT OUTER JOIN b_reference rc ON rc.data_member = 'CREDIT_CARD_TYPE' AND rc.data_value = credit_card_type WHERE payment_id = ?\", $this->session->paymentMethodID);\n\n\t\t\n\t\t// Calculate the subtotal\n\t\t$cartCount = count($cart_items);\n\t\tfor($i=0; $i<$cartCount; $i++)\n\t\t{\n\t\t\t$item_extended_price = ($cart_items[$i]['quantity'] * $cart_items[$i]['price']);\n\t\t\t$cart_items[$i]['ext_price'] = $item_extended_price;\n\t\t\t$subtotal += $item_extended_price;\n\t\t}\n\t\t\n\t\t\n\t\t// Calculate the tax for the order\n\t\t$tax = $this->calculateTax( $this->session->shippingAddressID , $subtotal );\n\t\t\n\t\t// Calculate the shipping rate for the order\n\t\t$shipping_rate = $this->calculateShipping();\n\t\t\n\t\t$total = $subtotal + $shipping_rate + $tax;\n\t\t\n\t\t// Set output data\n\t\t$this->set('cart_items', $cart_items);\n\t\t$this->set('shipping_address', $shipping_address);\n\t\t$this->set('billing_address', $billing_address);\n\t\t$this->set('payment_method', $payment_method);\n\t\t\n\t\t$this->set('subtotal', $subtotal);\n\t\t$this->set('tax', $tax);\n\t\t$this->set('shipping_rate', $shipping_rate);\n\t\t$this->set('total', $total);\n\t\t\n\t\t\n\t\t\n\t\t// If the user clicked the submit button, then process the order\n\t\tif ( count($_POST) > 0 && isset($_POST['review_submit']) )\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t$errors = [];\n\t\t\t\n\t\t\t\n\t\t\t// Process the payment first\n\t\t\tif (!$this->processPayment( $this->session->paymentMethodID, $total ))\n\t\t\t{\n\t\t\t\t// Uh oh, there was an error processing the payment\n\t\t\t\t$errors[] = 'Error processing payment. Please try again.';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\n\t\t\t\t// The payment has been processed correctly.\n\t\t\t\t\n\t\t\t\t// Create the order record\n\t\t\t\t$this->dbConnection->begin_transaction();\n\n\t\t\t\t$orderInsertSQL = \"INSERT INTO b_order ( order_timestamp, user_id, shipping_address_id, billing_address_id, order_status, cart_id, subtotal, tax, shipping, total, payment_id )\"\n\t\t\t\t\t\t\t\t\t\t. \" VALUES( CURRENT_TIMESTAMP(), ?, ?, ?, 'P', ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t$orderLineInsertSQL = \"INSERT INTO b_order_item (order_id, item_id, item_sequence, quantity, price, extended_price, line_status)\"\n\t\t\t\t\t\t . \" VALUES(?, ?, ?, ?, ?, ?, 'P')\";\n\t\t\t\t$cartUpdateSQL = \"UPDATE b_cart SET record_status = 'C' WHERE cart_id = ?\";\n\n\n\t\t\t\tif ($this->dbConnection->prepareCommand($orderInsertSQL, $this->session->userID, $this->session->shippingAddressID, $this->session->billingAddressID, $this->session->cartID, $subtotal, $tax, $shipping_rate, $total, $this->session->paymentMethodID))\n\t\t\t\t{\n\n\t\t\t\t\t$orderID = $this->dbConnection->insert_id;\n\t\t\t\t\t$line_success = true;\n\n\t\t\t\t\t// The order was inserted, so insert the line records\n\t\t\t\t\tfor ($i=0; $i<$cartCount; $i++) \n\t\t\t\t\t{\n\t\t\t\t\t\t$item_sequence = $i+1;\n\t\t\t\t\t\tif ($this->dbConnection->prepareCommand($orderLineInsertSQL, $orderID, $cart_items[$i]['item_id'], $item_sequence, $cart_items[$i]['quantity'], $cart_items[$i]['price'], $cart_items[$i]['ext_price']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// the insert was succesful\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// There was an error inserting one of the lines\n\t\t\t\t\t\t\t$errors[] = 'Error creating order. (1)';\n\t\t\t\t\t\t\t$this->dbConnection->rollback();\n\t\t\t\t\t\t\t$line_success = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($line_success)\n\t\t\t\t\t{\n\t\t\t\t\t\t// The order was created succesfuly.\n\t\t\t\t\t\t// Update the cart record to close it\n\t\t\t\t\t\tif ($this->dbConnection->prepareCommand($cartUpdateSQL, $this->session->cartID))\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t// The process is done, so commit the changes to the database\n\t\t\t\t\t\t\t$this->dbConnection->commit();\n\n\t\t\t\t\t\t\t//Clear all of the checkout session variables\n\t\t\t\t\t\t\t$this->session->cartID = null;\n\t\t\t\t\t\t\t$this->session->billingAddressID = null;\n\t\t\t\t\t\t\t$this->session->shippingAddressID = null;\n\t\t\t\t\t\t\t$this->session->paymentMethodID = null;\n\n\t\t\t\t\t\t\t// Redirect the user to the receipt page for the order\n\t\t\t\t\t\t\theader(\"Location: /checkout/receipt?orderID={$orderID}\");\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// Error updating the cart record, so rolblack\n\t\t\t\t\t\t\t$this->dbConnection->rollback();\n\t\t\t\t\t\t\t$errors[] = 'Error clearing cart. (2)';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// There was an error inserting the order record\n\t\t\t\t\t// Display an error\n\t\t\t\t\t$errors[] = 'Error creating order. (3)';\n\t\t\t\t\t$this->dbConnection->rollback();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t$this->set('errors', $errors);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public function maybeShowReviewRequestNotice() {\n\t\t\t$dismissed_notices = muut()->getOption( 'dismissed_notices', array() );\n\t\t\tif ( !isset( $dismissed_notices['review_request'] ) || !$dismissed_notices['review_request'] ) {\n\t\t\t\t$update_timestamps = muut()->getOption( 'update_timestamps', array() );\n\t\t\t\t$update_time = !empty( $update_timestamps ) ? array_pop( $update_timestamps ) : false;\n\n\t\t\t\tif ( $update_time && ( time() - $update_time > 604800 ) ) {\n\t\t\t\t\techo '<div class=\"updated muut_admin_notice\" id=\"muut_dismiss_review_request_notice\">';\n\t\t\t\t\twp_nonce_field( 'muut_dismiss_notice', 'dismiss_nonce' );\n\t\t\t\t\techo '<span style=\"float: right\" class=\"dismiss_notice_button\"><a href=\"#\" class=\"dismiss_notice\">X</a></span>';\n\t\t\t\t\techo '<p>' . sprintf( __( 'Enjoying Muut? We\\'d love it you would pop over to the %splugin page%s and leave a rating and review!', 'muut' ), '<a class=\"dismiss_notice\" target=\"_blank\" href=\"https://wordpress.org/plugins/muut/\">', '</a>' ) . '</p>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function reviews()\n {\n try {\n //init\n $input = Input::all();\n $current = date('Y-m-d H:i:s');\n if (!empty($input['review']) && !empty($input['rating']) && !empty($input['show_id'])) {\n DB::table('show_reviews')->insert([\n 'show_id' => $input['show_id'],\n 'user_id' => Auth::user()->id,\n 'rating' => $input['rating'],\n 'review' => $input['review'],\n 'created' => $current,\n 'updated' => $current\n ]);\n $posts = DB::table('show_reviews')->where('show_id', $input['show_id'])->groupBy('show_id')->count();\n return ['success' => true, 'posts' => $posts, 'msg' => 'Review posted successfully!'];\n }\n return ['success' => false, 'msg' => 'You must fill out the form correctly.'];\n } catch (Exception $ex) {\n return ['success' => false, 'msg' => 'There is an error posting your reviews. Please, contact us.'];\n }\n }", "public function store(Request $request)\n {\n $confirmed = false;\n $comment = $request->comment;\n $approval = $request->approval;\n $documentId = $request->documentId;\n $id = Auth::id();\n $date = date(\"Y-m-d H:i:s\");\n if($approval === 'on'){\n $confirmed = true;\n }\n\n if($comment == null){\n $comment = \"\";\n }\n\n $review = Review::create(['user_id'=>$id, 'document_id'=>$documentId, \n 'comment'=>$comment, 'date'=>$date, 'confirmed'=>$confirmed]);\n //Find the people that already validated this document.\n $confirmedReviews = Review::where('document_id', $documentId)->where(\n function($query){$query->where('confirmed', true);})->get();\n //Find people that should validate this document.\n $userdoc = DocumentUser::where('doc_id', $documentId)->get();\n $doc = Document::findOrfail($documentId);\n if($confirmedReviews->count() === $userdoc->count()){\n $doc->status = \"REVIEWED\";\n }else{\n $doc->status = \"NOT_REVIEWED\";\n }\n $doc->save();\n\n $msg = \"\";\n if($confirmed){\n $msg = Auth::user()->name.\" has approved your document\";\n }else{\n $msg = Auth::user()->name.\" mentioned some changes he want you to include on this document\";\n }\n $note = Notification::create(['sender'=>Auth::id(), 'recipient'=>$doc->owner_id, \n 'doc_id'=>$doc->id, 'version'=>$doc->version, 'is_read'=>false,\n 'datetime'=>date('Y-m-d H:i:s'), \n 'message'=>$msg]);\n\n if($confirmed){\n return redirect()->action('DocumentController@index');\n }\n\n return redirect()->action('DocumentController@show', ['id'=>$doc->id]);\n }", "public function expReviewUpdateSave()\n {\n $review_id = Input::get('review_id');\n $review = Input::get('review');\n $rating = Input::get('rating');\n $show_review = Input::get('show_review');\n\n if($show_review == \"\")\n {\n $statusUpdate = \"Pending\";\n }\n else\n {\n $statusUpdate = \"Approved\";\n }\n \n $update = DB::update(\"update product_reviews set review ='$review', rating = '$rating', status ='$statusUpdate' where id = $review_id\");\n\n flash()->success('The Experience Review has been successfully updated.');\n return redirect('admin/review');\n }", "public function buyerReviewModify(Request $request, $id){\n $order = \\App::call('App\\Http\\Controllers\\ReviewController@storeReviewsByOrder', [$id]);\n $orders = $request->user()->order()->get();\n return view('buyer.order-list', compact('orders'));\n //return view('buyer.review-add', compact('request'));\n }", "public function run(Review $review): void\n {\n $review->insert($this->getDataReview());\n }", "public function review($id)\n {\n // Get all the things.\n $application = Application::getUserApplication($id);\n $profile = Profile::getUserProfile($id);\n $scholarship = Scholarship::getScholarshipLabels();\n\n $vars = (object) $this->settings->getSpecifiedSettingsVars(['application_submit_help_text']);\n\n $prof_complete = Profile::isComplete(Auth::user()->id);\n if (!$prof_complete) {\n return Redirect::route('status')->with('flash_message', ['text' => 'Please go back and answer all required questions in ' . link_to_route('profile.create', 'basic info.'), 'class' => '-warning']);\n }\n\n return View::make('status.review', compact('application', 'profile', 'scholarship', 'vars'));\n }", "function bwcr_process_review(){\n $items_reviewed = array();\n foreach( $_POST as $key => $data ){\n if( $key != \"username\" && $key != \"user_id\" && $key != 'action' ){\n\n // store items just reviewed for redirect\n array_push( $items_reviewed, $key );\n bwcr_insert_comment( $key, $data );\n // bwcr_process_the_ratings( $key, $data );\n }\n }\n wp_redirect( '/review?p_ids=' . implode( ',', $items_reviewed ) . '&action=thankyou' );\n}", "function update_after_fre_review($project_id, $comment_id) {\n global $wpdb;\n if (isset($_POST['score']) && $_POST['score']) {\n $rate = (int)$_POST['score'];\n if ($rate > 5) $rate = 5;\n update_comment_meta($comment_id, 'et_rate', $rate);\n update_post_meta($project_id, 'rating_score', $rate);\n }\n $employer_id = (int)get_post_field('post_author', $project_id);\n $profile_id = get_user_meta($employer_id, 'user_profile_id', true);\n $sql = \"SELECT AVG(M.meta_value) as rate_point, COUNT(C.comment_ID) as count\n FROM $wpdb->posts as p \n join $wpdb->comments as C \n ON p.ID = C.comment_post_ID \n join $wpdb->commentmeta as M \n ON C.comment_ID = M.comment_id\n WHERE \n p.post_author = $employer_id\n AND p.post_status ='complete'\n AND p.post_type ='\" . PROJECT . \"' \n AND M.meta_key = 'et_rate'\n AND C.comment_type ='fr_review'\n AND C.comment_approved = 1\";\n \n $results = $wpdb->get_results($sql);\n \n if ($results) {\n wp_cache_set(\"reviews-{$employer_id}\", $results[0]->count);\n \n // update post rating score\n update_post_meta($profile_id, 'rating_score', $results[0]->rate_point);\n } else {\n update_post_meta($profile_id, 'rating_score', $rate);\n }\n\n // send mail to employer.\n $this->mail->review_employer_email($project_id);\n }", "public function massStatusAction()\n {\n $reviewsIds = $this->getRequest()->getParam('salesreport');\n if(!is_array($reviewsIds)) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));\n } else {\n try {\n foreach ($reviewsIds as $reviewId) {\n $review = Mage::getSingleton('salesreport/review')\n ->load($reviewId)\n ->setStatusId($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d record(s) were successfully updated', count($reviewsIds))\n );\n } catch (Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n }\n }\n $this->_redirect('*/*/index');\n }", "public function proReviews(Request $request, User $pro)\n {\n $reviews = $pro->reviews();\n return view('reviews.index', ['reviews'=> $reviews]);\n }", "public function updateProductReviews( $post_id=0 )\n\t\t{\n\t\t\t$asin = $this->the_plugin->get_post_meta( $post_id, '_amzASIN', true, false );\n\t\t\t\n\t\t\t$product = $this->aaAmazonWS->responseGroup('Reviews')->optionalParameters(array('MerchantId' => 'All'))->lookup( $asin );\n \n\t\t\tif($product['Items'][\"Request\"][\"IsValid\"] == \"True\"){\n\t\t\t\t$thisProd = isset($product['Items']['Item']) ? $product['Items']['Item'] : array();\n\t\t\t\tif (isset($product['Items']['Item']) && count($product['Items']['Item']) > 0){\n\t\t\t\t\t$reviewsURL = $thisProd['CustomerReviews']['IFrameURL'];\n\t\t\t\t\tif( trim($reviewsURL) != \"\" ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tab_data = array();\n\t\t\t\t\t\t$tab_data[] = array(\n\t\t\t\t\t\t\t'id' => 'amzAff-customer-review',\n\t\t\t\t\t\t\t'content' => '<iframe src=\"' . ( $reviewsURL ) . '\" width=\"100%\" height=\"450\" frameborder=\"0\"></iframe>'\n\t\t\t\t\t\t); \n\t\t\t\t\t\t\n\t\t\t\t\t\tupdate_post_meta( $post_id, 'amzaff_woo_product_tabs', $tab_data );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $reviewsURL; \n\t\t}", "public function showreview(Request $request)\n {\n $data=$request->all();\n $user_id=Auth::user()->id;\n User::where('id',$user_id)->update(['show_review'=>$data['review_show']]);\n return back()->with('success','Your review has been hidden');\n }", "public function store(Request $request)\n {\n $productId = (int)$request['product-id'];\n $user_id = (int)$request['user-id'];\n $ratingScore = (int)$request['rating-score'];\n $description = $request['rating-review'];\n\n // validated data \n if(!Product::find($productId)){ // product\n return back()->with('error', 'Product not found or invalid product!');\n }\n if(!User::find($user_id)){ // user\n return back()->with('error', 'User not found!');\n }\n if($ratingScore < 0 || $ratingScore > 5) { // rating score\n return back()->with('error', 'Invalid rating score!');\n }\n\n $review = new Review([\n 'user_id' => $user_id,\n 'product_id' => $productId,\n 'description' => $description,\n 'rating' => $ratingScore,\n ]);\n\n $review->save();\n return back()->with('success', 'Your review has been added!');\n }", "public function giveRestaurantReview($restaurant_id,$customer_id,$rating,$review){\n $query=$this->db->query(\"INSERT INTO reviews(restaurant_id,customer_id,rating,review,date_added) VALUES(\".$restaurant_id.\",\".$customer_id.\",\".$rating.\",'\".$review.\"',CURDATE())\");\n if($query){\n return array(\"status\"=>\"success\");\n }\n else{\n return array(\"status\"=>\"fail\",\"error\"=>\"Unable to Give Review.\");\n }\n }", "public function review_save()\n\t{\n\t\t$validator = Validator::make(\n\t\t\tInput::all(),\n\t\t\tarray(\n\t\t\t\t'str' => 'bail|required|numeric',\n\t\t\t\t'rvw' => 'string',\n\t\t\t\t'bid' => 'required|numeric',\n\t\t\t\t'eid' => 'required|numeric',\n\t\t\t\t'cid' => 'required|numeric'\n\t\t\t)\n\t\t);\n\n\t\tif ($validator->passes()) {\n\n\t\t\t// Save to database\n\t\t\tReviewModel::save_review(array(\n\t\t\t\t'booking_id' => typecast(Input::get('bid'), 'int'),\n\t\t\t\t'client_id' => typecast(Input::get('cid'), 'int'),\n\t\t\t\t'employee_id' => typecast(Input::get('eid'), 'int'),\n\t\t\t\t'comment' => typecast(Input::get('rvw'), 'string'),\n\t\t\t\t'rating' => typecast(Input::get('str'), 'int')\n\t\t\t));\n\n\t\t\treturn self::success('<h3>Thank you very much for your feedback.<h3>');\n\n\t\t} else {\n\n\t\t\tlog_write('review_fail', array(\n\t\t\t\t'inputs' \t=> Input::all(), \n\t\t\t\t'validator' => $validator->failed(),\n\t\t\t));\n\n\t\t\treturn Msg::error('Invalid review information. Please reload the review page and check your review.', 200, false);\n\t\t}\n\t}", "public function order_review()\n\t{\n\t\tif ($this->checkLogin('A') == '') {\n\t\t\tredirect('admin');\n\t\t} else {\n\t\t\t$dealCode = $this->uri->segment(4, 0);\n\t\t\t$this->db->select('p.*,pAr.attr_name,pr.product_title,rq.prd_price,pr.price,pr.currency,rq.Bookingno,rq.secDeposit,rq.checkin,rq.NoofGuest,rq.subTotal,rq.serviceFee,rq.checkout,rq.numofdates,rq.currencyPerUnitSeller,pi.product_image,rq.currency_cron_id,rq.user_currencycode,rq.dateAdded');\n\t\t\t$this->db->from(PAYMENT . ' as p');\n\t\t\t$this->db->join(PRODUCT_ATTRIBUTE . ' as pAr', 'pAr.id = p.attribute_values', 'left');\n\t\t\t$this->db->join(RENTALENQUIRY . ' as rq', 'rq.id = p.EnquiryId', 'left');\n\t\t\t$this->db->join(PRODUCT . ' as pr', 'pr.id = p.product_id', 'left');\n\t\t\t$this->db->join(PRODUCT_PHOTOS . ' as pi', 'pi.product_id = p.product_id', 'left');\n\t\t\t$this->db->where('p.status = \"Paid\" and p.dealCodeNumber = \"' . $dealCode . '\"');\n\t\t\t$this->db->group_by(\"p.product_id\");\n\t\t\t$order_details = $this->db->get();\n\t\t\tif ($order_details->num_rows() == 0) {\n\t\t\t\tshow_404();\n\t\t\t} else {\n\t\t\t\tforeach ($order_details->result() as $order_details_row) {\n\t\t\t\t\t$this->data['prod_details'][$order_details_row->product_id] = $this->order_model->get_all_details(PRODUCT, array('id' => $order_details_row->product_id));\n\t\t\t\t}\n\t\t\t\t$this->data['order_details'] = $order_details;\n\t\t\t\t$this->data['heading'] = 'View Order Comments';\n\t\t\t\t$sortArr1 = array('field' => 'date', 'type' => 'desc');\n\t\t\t\t$sortArr = array($sortArr1);\n\t\t\t\t$this->data['order_comments'] = $this->order_model->get_all_details(REVIEW_COMMENTS, array('deal_code' => $dealCode), $sortArr);\n\t\t\t\t$this->data['sesson_price'] = $this->order_model->get_all_details(SCHEDULE, array('id' => $order_details_row->product_id));\n\t\t\t\t\n\t\t\t\t$checkin_date = explode(' ', $order_details->row()->checkin);\n\t\t\t\t$checkin_date_is = $checkin_date['0'];\n\t\t\t\t$data = json_decode($this->data['sesson_price']->row()->data, true);\n\t\t\t\t\n\t\t\t\tforeach ($data as $key => $entry) {\n \tif ($key == $checkin_date_is && $key <= $checkin_date_is) {\n if($entry['status'] == 'available')\n\t\t\t\t{\n\t\t\t\t\t$this->data['sesson_price_is'] = $entry['price'];\n\t\t\t\t}\n \n \t}\n\t\t}\n\t\t\n\t\t\t\t$this->load->view('admin/order/display_order_reviews', $this->data);\n\t\t\t}\n\t\t}\n\t}", "public function rewardNotesAction() {\n\t\t$this->_validateRequiredParameters(array('user_id', 'starbar_id'));\n\t\tif (in_array(APPLICATION_ENV, array('development', 'sandbox', 'testing', 'demo'))) {\n\t\t\tGame_Transaction::run($this->user_id, Economy::getIdforStarbar($this->starbar_id), 'TEST_REWARD_NOTES');\n\n\t\t\treturn $this->_resultType(true);\n\t\t} else {\n\t\t\treturn $this->_resultType(false);\n\t\t}\n\t}", "public function addReview($review)\n {\n $this->reviews()->create($review);\n }", "public function wrote_review_or_commented() {\n\n\t\t$type = get_post_type();\n\n\t\tif ( $type == 'product' ) {\n\t\t\tif ( $this->event_name['wrote_review'] ) {\n\t\t\t\t$this->api_record_event( $this->event_name['wrote_review'], array( $this->property_name['product_name'] => get_the_title() ) );\n\t\t\t}\n\t\t} elseif ( $type == 'post' ) {\n\t\t\tif ( $this->event_name['commented'] ) {\n\t\t\t\t$this->api_record_event( $this->event_name['commented'], array( $this->property_name['post_title'] => get_the_title() ) );\n\t\t\t}\n\t\t}\n\t}", "public function show(ProductReview $productReview)\n {\n //\n }", "public function show(ProductReview $productReview)\n {\n //\n }", "public function process_review_closed( $notification ) {\n\t\t$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->charge );\n\n\t\tif ( ! $order ) {\n\t\t\tWC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->charge );\n\t\t\treturn;\n\t\t}\n\n\t\t/* translators: 1) The reason type. */\n\t\t$message = sprintf( __( 'The opened review for this order is now closed. Reason: (%s)', 'woocommerce-gateway-stripe' ), $notification->data->object->reason );\n\n\t\tif ( 'on-hold' === $order->get_status() ) {\n\t\t\tif ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) {\n\t\t\t\t$order->update_status( 'processing', $message );\n\t\t\t} else {\n\t\t\t\t$order->add_order_note( $message );\n\t\t\t}\n\t\t} else {\n\t\t\t$order->add_order_note( $message );\n\t\t}\n\t}", "public function doRecommendationAction() {\n\t\t// check if user is logged in and fetch user's entity\n\t\t$loggedInUser = $this->_checkAndRedirect ();\n\t\t\n\t\t$request = $this->request;\n\t\t$redirect = IRouteStore::BOOK_ERROR;\n\t\tif ($request->isPost ()) {\n\t\t\t$bookingId = ( int ) $request->getPost ( \\Application\\Forms\\RecommendationForm::FIELD_BOOKING_ID );\n\t\t\t$driversRecomPrice = ( int ) $request->getPost ( \\Application\\Forms\\RecommendationForm::FIELD_RECOMM_PRICE );\n\t\t\tif (null !== $bookingId && null !== $driversRecomPrice) {\n\t\t\t\t$booking = $this->_getBooking ( $loggedInUser, $bookingId );\n\t\t\t\tif (null !== $booking) {\n\t\t\t\t\t$booking->setDriversRecomPrice ( $driversRecomPrice );\n\t\t\t\t\t// set correct state\n\t\t\t\t\t$booking->setState ( IBookingState::OFFER_FROM_DRIVER );\n\t\t\t\t\t// update entity\n\t\t\t\t\t$this->em->merge ( $booking );\n\t\t\t\t\t$this->em->flush ();\n\t\t\t\t\t$redirect = IRouteStore::BOOK_DRIVER_OVERVIEW;\n\t\t\t\t} else {\n\t\t\t\t\t$this->flashMessenger ()->clearMessages ();\n\t\t\t\t\t$this->flashMessenger ()->addErrorMessage ( \\JumpUpDriver\\Util\\Messages\\IControllerMessages::ERROR_NO_BOOKING );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->flashMessenger ()->addErrorMessage ( \\JumpUpDriver\\Util\\Messages\\IControllerMessages::ERROR_BOOKING_REQUEST );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// fallthrough: error\n\t\t$this->redirect ()->toRoute ( $redirect );\n\t}", "function submitReview()\n\t{\n\t\tglobal $conn;\n\t\tglobal $myObj;\n\n\t\t$comment = urldecode($_POST['comment']); \n\t\t$rating = intval(urldecode($_POST['rating'])); \n\t\t$book_id = intval(urldecode($_POST['book_id'])); \n\t\t$user_id = intval(urldecode($_POST['user_id'])); \n\t\t$anon = urldecode($_POST['anon']); \n\t\t\n\t\tif (empty($comment)){\n\t\t\t$comment = NULL;\n\t\t}\n\t\tif ($anon == 'true'){\n\t\t\t$anon = 1;\n\t\t}\n\t\telse if ($anon == 'false'){\n\t\t\t$anon = 0;\n\t\t}\n\t\telse {\n\t\t\techo \"anon not read\";\n\t\t}\n\n\t\t$sql = \"INSERT INTO `reviews` (`comment`, `rating`, `book_id`, `user_id`,`anon`)\n\t\t\t\t\tVALUES \n\t\t\t\t\t('$comment','$rating','$book_id','$user_id','$anon')\";\n\n\n\t\t//Executes query string\n\t\tif ($conn->query($sql) === TRUE) {\n\t\t\techo \"New record created successfully\";\n\t\t} else {\n\t\t\techo \"Error: \" . $sql . \"<br>\" . $conn->error;\n\t\t}\n\t\t\n\t\t$conn->close();\n\n\t}", "protected function notifyUserAboutRental(User $user, ItemRental $rental)\n\t{\n\t\t$user->notify(new ShippingReminder($user, $rental));\n\t}", "public function alaReviewUpdateSave()\n {\n $review_id = Input::get('review_id');\n $review = Input::get('review');\n $rating = Input::get('rating');\n $show_review = Input::get('show_review');\n if($show_review == \"\")\n {\n $statusUpdate = \"Pending\";\n }\n else\n {\n $statusUpdate = \"Approved\";\n }\n \n $update = DB::update(\"update vendor_location_reviews set review ='$review', rating = '$rating', status ='$statusUpdate' where id = $review_id\");\n\n flash()->success('The Alacarte Review has been successfully updated.');\n return redirect('admin/reviewalacarte');\n }", "public function tyche_update_review_data () {\n\t\t$review_id = absint( $_REQUEST['r'] );\n\t\t\n\t\tif ( isset( $_POST['edd_review_source'] ) ) {\n\t\t\t$updated_edd_review_source = sanitize_text_field( $_POST['edd_review_source'] );\n\t\t\tupdate_comment_meta( $review_id, 'edd_review_source', $updated_edd_review_source );\n\t\t}\n\n\t\tif ( isset( $_POST['edd_review_generic'] ) ) {\n\t\t\t$updated_edd_review_generic = sanitize_text_field( $_POST['edd_review_generic'] );\n\t\t\tupdate_comment_meta( $review_id, 'edd_review_generic', $updated_edd_review_generic );\n\t\t} else {\n\t\t\t$updated_edd_review_generic = \"off\";\n\t\t\tupdate_comment_meta( $review_id, 'edd_review_generic', $updated_edd_review_generic );\n\t\t}\n\n\t\tif ( isset( $_POST['edd_review_img_url'] ) ) {\n\t\t\t$updated_edd_review_img_url = esc_url( $_POST['edd_review_img_url'] );\n\t\t\tupdate_comment_meta( $review_id, 'edd_review_img_url', $updated_edd_review_img_url );\n\t\t}\n\t}", "public function reply($id)\n {\n $review = Review::find($id);\n $seller = $this->seller;\n return view('dashboard.seller.reply-review',compact(['review','seller']));\n }", "function addReviewAction()\n {\n $productId = (int) $this->getRequest()->getParam('product_id');\n $categoryId = (int) $this->getRequest()->getParam('category_id', false);\n \n if ($this->_getSession()->isLoggedIn()) {\n $this->_redirect('review/product/list', array('id' => $productId, 'category' => $categoryId));\n } else {\n $this->_getSession()->setBeforeAuthUrl(Mage::getUrl('review/product/list', \n array('id' => $productId, 'category' => $categoryId)));\n $this->_redirect('customer/account/login');\n }\n return;\n }", "private function isReviewSendingEnabled()\n {\n return $this->_scopeConfig->getValue(\n AntavoConfigInterface::XML_PATH_REVIEW_EVENT_SENDING,\n ScopeInterface::SCOPE_STORES,\n $this->_storeManager->getStore()->getId()\n );\n }", "public function create(CreateReviewRequest $request);", "public function actionSend(): void\n {\n $prizes = UserPrize::find()->alias('user_prize')->JoinWith(['prize','user'])\n ->where([\n 'user_prize.status' => UserPrize::STATUS_RECEIVED,\n 'prize_type' => Prize::TYPE_MONEY,\n ])\n ->limit(self::DEFAULT_NUMBER)\n ->all();\n\n if ($prizes) {\n $this->stdout(\\Yii::t('app', 'Sending {prizes} prize(s)...' . PHP_EOL,\n ['prizes' => count($prizes)]), Console::FG_GREEN);\n } else {\n $this->stdout(\\Yii::t('app', 'Nothing to send!' . PHP_EOL), Console::FG_YELLOW);\n }\n\n foreach ($prizes as $prize) {\n\n $prize->status = UserPrize::STATUS_SENT;\n $prize->save(false);\n\n $this->stdout(\\Yii::t('app', 'Sending {money} money to user {user}...', [\n 'money' =>$prize->quantity,\n 'user' => $prize->user->email\n ]));\n\n\n $this->stdout(\\Yii::t('app', ' [SENT]' . PHP_EOL), Console::FG_GREEN);\n }\n }", "public function reviews(){\n\t\t\t\n\t\t\tif(!$this->session->userdata('admin_logged_in')){\n\t\t\t\t\t\t\t\t\n\t\t\t\t$url = 'admin/login?redirectURL='.urlencode(current_url());\n\t\t\t\tredirect($url);\t\t\t\t\t\t\t\n\t\t\t\t//redirect('admin/login/','refresh');\n\t\t\t\t\n\t\t\t}else{\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t$username = $this->session->userdata('admin_username');\n\t\t\t\t\n\t\t\t\t\t$data['user_array'] = $this->Admin->get_user($username);\n\t\t\t\t\t\n\t\t\t\t\t$fullname = '';\n\t\t\t\t\tif($data['user_array']){\n\t\t\t\t\t\tforeach($data['user_array'] as $user){\n\t\t\t\t\t\t\t$fullname = $user->admin_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$data['fullname'] = $fullname;\n\t\t\t\t\t\n\t\t\t\t\t$data['unread_contact_us'] = $this->Contact_us->count_unread_messages();\n\t\t\t\t\t\n\t\t\t\t\t$messages_unread = $this->Messages->count_unread_messages($username);\n\t\t\t\t\tif($messages_unread == '' || $messages_unread == null){\n\t\t\t\t\t\t$data['messages_unread'] = 0;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data['messages_unread'] = $messages_unread;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$data['header_messages_array'] = $this->Messages->get_header_messages($username);\n\t\t\t\t\t\n\t\t\t\t\t$enquiries_unread = $this->Sale_enquiries->count_unread_enquiries();\n\t\t\t\t\tif($enquiries_unread == '' || $enquiries_unread == null){\n\t\t\t\t\t\t$data['enquiries_unread'] = 0;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data['enquiries_unread'] = $enquiries_unread;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$data['count_reviews'] = $this->Reviews->count_all();\n\t\t\t\t\t\t\n\t\t\t\t\t//assign page title name\n\t\t\t\t\t$data['pageTitle'] = 'Seller Reviews';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t//assign page title name\n\t\t\t\t\t$data['pageID'] = 'reviews';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//load header and page title\n\t\t\t\t\t$this->load->view('admin_pages/header', $data);\n\t\t\t\t\t\t\t\n\t\t\t\t\t//load main body\n\t\t\t\t\t$this->load->view('admin_pages/reviews_page', $data);\t\n\t\t\t\t\t\n\t\t\t\t\t//load footer\n\t\t\t\t\t$this->load->view('admin_pages/footer');\n\t\t\t}\n\t\t}" ]
[ "0.6523126", "0.63713783", "0.62911844", "0.6178938", "0.61446184", "0.6016523", "0.5987257", "0.59750175", "0.59638673", "0.59227663", "0.5913043", "0.589755", "0.57933325", "0.5778239", "0.57565194", "0.57469827", "0.5727987", "0.5674954", "0.56683207", "0.5650365", "0.56437457", "0.55835193", "0.55784255", "0.5554085", "0.55459976", "0.5539183", "0.5504011", "0.5501928", "0.548136", "0.54482293", "0.54406965", "0.5436336", "0.54311085", "0.54311085", "0.54230446", "0.54228866", "0.54159665", "0.5404262", "0.53951216", "0.53946066", "0.53907716", "0.53716207", "0.53701323", "0.5361991", "0.5361991", "0.5361991", "0.5361991", "0.5356945", "0.5345913", "0.5339724", "0.5337497", "0.53288984", "0.5318593", "0.5316792", "0.5303322", "0.5300387", "0.52969176", "0.5296284", "0.52773464", "0.527456", "0.5273789", "0.5273758", "0.52728426", "0.52626383", "0.5260074", "0.5259724", "0.5259206", "0.52465177", "0.52421725", "0.52387065", "0.5235121", "0.5230619", "0.52138823", "0.5213256", "0.5204744", "0.5198253", "0.51980907", "0.51957333", "0.51928174", "0.5175135", "0.5175095", "0.5173506", "0.5158187", "0.51550454", "0.51509565", "0.5141212", "0.513166", "0.513166", "0.5127709", "0.51218504", "0.5118928", "0.51115274", "0.5104575", "0.50709313", "0.50658816", "0.50632817", "0.5056876", "0.5052503", "0.50430423", "0.5040807" ]
0.7250929
0
Send comment notification to review owner. Send comment notification to owner only if owner set the option for the review.
public function SendReviewCommentNotification($oComment) { if ($this->AllowSendAuthorReviewCommentNotification()) { $sAuthorEmail = $this->GetSendReviewCommentNotificationEmail(); if (TTools::IsValidEMail($sAuthorEmail)) { $oMail = TDataMailProfile::GetProfile('review-comment'); $aData = array(); $oArticle = $this->GetFieldShopArticle(); $aData['sArticleName'] = $oArticle->GetName(); $aData['sReviewTitle'] = $this->fieldTitle; $aData['sReviewText'] = $this->fieldComment; $aData['sCommentText'] = $oComment->fieldComment; $oMail->AddDataArray($aData); $oMail->ChangeToAddress($this->fieldAuthorEmail, $this->fieldAuthorName); $oMail->SendUsingObjectView('emails', 'Customer'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function AllowSendAuthorReviewCommentNotification()\n {\n $bAllowSendAuthorCommentNotification = false;\n if ($this->fieldSendCommentNotification) {\n if (!empty($this->fieldAuthorEmail) || !empty($this->fieldDataExtranetUserId)) {\n $bAllowSendAuthorCommentNotification = true;\n }\n }\n\n return $bAllowSendAuthorCommentNotification;\n }", "public function notifyUser(&$comment) {\n if (!$comment instanceof modxTalksPost) {\n return false;\n }\n\n $this->modx->lexicon->load('modxtalks:emails');\n\n /**\n * Get User info\n */\n $user = $comment->getUserData();\n\n $cid = $comment->conversationId;\n $idx = $comment->idx;\n\n $link = $this->generateLink($cid, $idx, 'full');\n $images_url = $this->modx->getOption('site_url') . substr($this->config['imgUrl'], 1);\n\n $subject = $this->modx->lexicon('modxtalks.email_comment_approved');\n $text = $this->modx->lexicon('modxtalks.email_user_approve_comment', array(\n 'link' => $link,\n ));\n\n $params = array(\n 'title' => 'Заголовок',\n 'content' => $this->modx->stripTags($this->bbcode($comment->content)),\n 'images_url' => $images_url,\n 'avatar' => $this->getAvatar($user['email'], 50),\n 'text' => $text,\n 'date' => date($this->config['dateFormat'] . ' O', $comment->time),\n );\n\n /**\n * Get email body\n */\n $body = $this->getChunk('mt_send_mail', $params);\n\n /**\n * Send notifications to user\n */\n $success = false;\n if (!empty($user['email'])) {\n if ($this->sendEmail($subject, $body, $user['email'])) {\n $success = true;\n }\n }\n\n return $success;\n }", "public function SendReviewReportNotification()\n {\n $this->SaveActionIdToComment();\n $oMail = TDataMailProfile::GetProfile('report-review');\n $aData = array();\n $oShop = TdbShop::GetInstance();\n $oArticle = $this->GetFieldShopArticle();\n $aData['sArticleName'] = $oArticle->GetName();\n $aData['sReviewId'] = $this->id;\n $aData['sReviewTitle'] = $this->fieldTitle;\n $aData['sReviewText'] = $this->fieldComment;\n $aData['sReviewAuthor'] = $this->fieldAuthorName;\n $aData['sUnlockReviewLink'] = \"<a href='\".$this->GetUnlockURL(true).\"'>\".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.publish_comment')).'</a> ';\n $aData['sDeleteReviewLink'] = \"<a href='\".$this->GetDeleteWithActionIdURL(true).\"'>\".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.delete_comment')).'</a> ';\n $aData['shopname'] = $oShop->GetName();\n $oMail->AddDataArray($aData);\n $oMail->SendUsingObjectView('emails', 'Customer');\n }", "function set_comment_on_receipt() {\n $this->sale_lib->set_comment_on_receipt($this->input->post('show_comment_on_receipt'));\n }", "function wp_new_comment_notify_moderator($comment_id)\n {\n }", "public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }", "public function notify(quipComment &$comment) {\n if (!$this->_loadLexicon()) return false;\n $this->xpdo->lexicon->load('quip:emails');\n \n /* get the poster's email address */\n $posterEmail = false;\n $user = $comment->getOne('Author');\n if ($user) {\n $profile = $user->getOne('Profile');\n if ($profile) {\n $posterEmail = $profile->get('email');\n }\n }\n\n /* get email body/subject */\n $properties = $comment->toArray();\n $properties['url'] = $comment->makeUrl('',array(),array('scheme' => 'full'));\n $body = $this->xpdo->lexicon('quip.email_notify',$properties);\n $subject = $this->xpdo->lexicon('quip.email_notify_subject');\n\n /* send notifications */\n $success = true;\n $notifyEmails = $this->get('notify_emails');\n $emails = explode(',',$notifyEmails);\n\n /* send notifications to notify_emails subjects */\n if (!empty($emails)) {\n $this->sendEmail($subject,$body,$emails);\n }\n\n /* now send to notified users */\n $notifiees = $this->getMany('Notifications');\n /** @var quipCommentNotify $notification */\n foreach ($notifiees as $notification) {\n $email = $notification->get('email');\n /* remove invalid emails */\n if (empty($email) || strpos($email,'@') == false) {\n $notification->remove();\n continue;\n }\n /* don't notify the poster, since they posted the comment. */\n if ($posterEmail == $email) {\n continue;\n }\n\n $notification->send($comment,$properties);\n }\n\n return $success;\n }", "public function actionComment()\n {\n\n if(isset($_POST['Comment']))\n {\n $model = new Comment;\n //$model->attributes=$_POST['Comment'];\n $model->a_id = $_POST['answer_id'];\n $model->author_id = $_POST['author_id'];\n\n $model->text = strip_tags($_POST['Comment']['text']);\n\n if($model->save()) {\n $receivers = User::model()->with(array('follow_question' => array('condition' => 'follow_question.q_id = ' . $_POST['question_id'])))->findAll();\n if ($receivers) {\n foreach ($receivers as $key => $receiver) {\n $notifications = UserNotifications::model()->findByPk($receiver->id);\n\n if ($receiver && $notifications)\n if ($notifications->comment_on_question == 1) {\n\n $subject = 'Question has been commented at ' . Yii::app()->name . '!';\n $message = CHtml::link('Question',\n 'http://' . $_SERVER['HTTP_HOST']. Yii::app()->baseUrl . '/question/view/id/' . $_POST['question_id']) . ' you are following has been commented ';\n\n UserModule::sendMail($receiver->email,$subject,$message);\n }\n }\n }\n Yii::app()->user->setFlash('answerCommented', \"Comment was posted successfully\");\n $this->redirect($this->createUrl('/question/view/id/' . $_POST['question_id']));\n }\n\n }\n\n }", "private function notify_new_approved_comment( $comment, $post ) {\n\t\tif ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $comment->user_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $user = get_user_by( 'id', $comment->user_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$args = array(\n\t\t\t'action' => 'wporg_handle_activity',\n\t\t\t'source' => 'wordpress',\n\t\t\t'user' => $user->user_login,\n\t\t\t'comment_id' => $comment->comment_ID,\n\t\t\t'content' => get_comment_excerpt( $comment ),\n\t\t\t'title' => get_the_title( $post ),\n\t\t\t'blog' => get_bloginfo( 'name' ),\n\t\t\t'blog_url' => site_url(),\n\t\t\t'url' => get_comment_link( $comment ),\n\t\t);\n\n\t\tProfiles\\api( $args );\n\t}", "public function comment() {\n if (isLoggedIn() == false) {\n flash('login_to_post', 'Please, login to comment');\n redirect('/users/login');\n }\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n // Sanitize array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'body' => trim($_POST['body']),\n 'post_id' => trim($_POST['post_id']),\n 'user_id' => $_SESSION['user_id'],\n 'user_name' => $this->userModel->getUserById($_SESSION['user_id'])->name\n ];\n\n if (!empty($data['body']) && !empty($data['post_id']) && !empty($data['user_id']) && !empty($data['user_name'])) {\n // Save comment\n $this->postModel->comment($data);\n $post = $this->postModel->getPostById($data['post_id']);\n $receiver = $this->userModel->getUserById($post->user_id);\n if ($receiver->receive_email == true) {\n $this->mail($receiver->email, $receiver->name, $post->id);\n }\n }\n redirect('/posts/show/' . $_POST['post_id']);\n }\n\n }", "public function notifyModerators(&$comment) {\n if (!$comment instanceof modxTalksPost && !$comment instanceof modxTalksTempPost) {\n return false;\n }\n\n $this->modx->lexicon->load('modxtalks:emails');\n\n /**\n * Get User info\n */\n $user = $comment->getUserData();\n $images_url = $this->modx->getOption('site_url') . substr($this->config['imgUrl'], 1);\n\n if ($comment instanceof modxTalksPost) {\n $cid = $comment->conversationId;\n $idx = $comment->idx;\n $link = $this->generateLink($cid, $idx, 'full');\n $subject = $this->modx->lexicon('modxtalks.email_new_comment');\n $text = $this->modx->lexicon('modxtalks.email_added_new_comment', array(\n 'link' => $link,\n 'name' => $user['name'],\n ));\n } elseif ($comment instanceof modxTalksTempPost) {\n $subject = $this->modx->lexicon('modxtalks.email_new_premoderated_comment');\n $text = $this->modx->lexicon('modxtalks.email_user_add_premoderated_comment', array(\n 'name' => $user['name'],\n ));\n }\n\n $params = array(\n 'title' => 'Заголовок',\n 'content' => $this->modx->stripTags($this->bbcode($comment->content)),\n 'images_url' => $images_url,\n 'avatar' => $this->getAvatar($user['email'], 50),\n 'text' => $text,\n 'date' => date($this->config['dateFormat'] . ' O', $comment->time),\n );\n\n /**\n * get email body\n */\n $body = $this->getChunk('mt_send_mail', $params);\n\n /**\n * send notifications\n */\n $success = false;\n\n $emails = $this->getUsersEmailsByGroups($this->config['moderator'], $comment);\n\n /**\n * send notifications to moderators\n */\n if (!empty($emails)) {\n if ($this->sendEmail($subject, $body, $emails)) {\n $success = true;\n }\n }\n\n return $success;\n }", "public function flag_comment() {\n\t\t\tif ( empty( $_REQUEST[ 'comment_id' ] ) || (int) $_REQUEST[ 'comment_id' ] != $_REQUEST[ 'comment_id' ] ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_values_message ) );\n\t\t\t}\n\n\t\t\t$comment_id = (int) $_REQUEST[ 'comment_id' ];\n\t\t\tif ( $this->already_flagged( $comment_id ) ) {\n\t\t\t\t$this->cond_die( __( $this->already_flagged_message ) );\n\t\t\t}\n\n\t\t\t// checking if nonces help\n\t\t\tif ( ! isset( $_REQUEST[ 'sc_nonce' ] ) || ! wp_verify_nonce( $_REQUEST[ 'sc_nonce' ], $this->_plugin_prefix . '_' . $this->_nonce_key ) ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_nonce_message ) );\n\t\t\t} else {\n\t\t\t\t$this->mark_flagged( $comment_id );\n\t\t\t\t$this->cond_die( __( $this->thank_you_message ) );\n\t\t\t}\n\n\t\t}", "function wyz_business_post_comments_toggle() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\n\tif ( ! wp_verify_nonce( $nonce, 'wyz_ajax_custom_nonce' ) ) {\n\t\twp_die( 'busted' );\n\t}\n\n\tglobal $current_user;\n\twp_get_current_user();\n\n\t$_post_id = intval( $_POST['post-id'] );\n\t$_user_id = $current_user->ID;\n\t$_comm_stat = $_POST['comm-stat'];\n\t$_post = get_post( $_post_id );\n\n\tif ( ! $_post || ( $_user_id != $_post->post_author && ! user_can( $_user_id, 'manage_options' ) ) ) {\n\t\twp_die( false );\n\t}\n\t\n\tif ( 'open' == $_comm_stat || 'closed' == $_comm_stat ) { \n\t\t$_post->comment_status = $_comm_stat;\n\t}\n\twp_update_post( $_post );\n\twp_die( true );\n}", "public function approveCommentMethod()\n { \n $choice = $this->getGet()[\"approve\"];\n $data = [\"approved\" => (int) $choice]; \n $comment_id = (string) $this->getId();\n\n if ($choice === \"1\") {\n $message = \"Le commentaire a bien été approuvé et publié.\";\n } elseif ($choice === \"0\") {\n $message = \"Le commentaire a été refusé et ne sera pas publié.\";\n };\n\n ModelFactory::getModel(\"Comment\")->updateData($comment_id, $data);\n $this->setMessage($message);\n $this->redirect(\"user!admin\");\n }", "public function setOwner(NotificationManager $owner);", "public function post_order_comment()\n\t{\n\t\tif ($this->checkLogin('A') != '') {\n\t\t\t$product_id = $this->input->post('product_id');\n\t\t\t$comment_from = $this->input->post('comment_from');\n\t\t\t$commentor_id = $this->input->post('commentor_id');\n\t\t\t$deal_code = $this->input->post('deal_code');\n\t\t\t$comment = $this->input->post('comment');\n\t\t\t$data = array('date' => date(\"Y-m-d H:i:s\"),'product_id' => $product_id,'comment_from' => $comment_from,'commentor_id' => $commentor_id,'deal_code' => $deal_code,'comment' => $comment);\n\t\t\t$this->order_model->simple_insert(REVIEW_COMMENTS,$data);\n\t\t}\n\t}", "function postCommentNotify($id, $postId){\r\n $commentManager = new CommentsManager();\r\n $notify = $commentManager->postNotify($id);\r\n}", "public function add_comment( $id, $comment ) {\n\n\t\tif ( isset( $_POST['wp_reviews_score'] ) and ! empty( $_POST['wp_reviews_score'] ) ) {\n\n\t\t\t//Save Rating\n\t\t\tupdate_comment_meta( $id, 'score', sanitize_text_field( $_POST['wp_reviews_score'] ) );\n\n\t\t\t//Send Email\n\t\t\tif ( WP_REVIEWS_INSURANCE::$option['email_auth'] == 1 ) {\n\n\t\t\t\t//Generate User Link\n\t\t\t\t$auth_key = wp_generate_password( 50, false );\n\t\t\t\t$link = add_query_arg( array( 'wp_confirm_reviews_insurance' => $auth_key ), home_url() );\n\t\t\t\tupdate_comment_meta( $id, 'auth_key', sanitize_text_field( $auth_key ) );\n\n\t\t\t\t//Email text\n\t\t\t\t$email_opt = get_option( 'wp_reviews_email_opt' );\n\t\t\t\t$email_text = str_replace( array( '[fullname]', '[link]' ), array( $comment->comment_author, '<a href=\"' . $link . '\" target=\"_blank\">Confirm Your Review</a>' ), $email_opt['email_body'] );\n\t\t\t\t$email_subject = str_replace( array( '[fullname]', '[sitename]' ), array( $comment->comment_author, get_bloginfo( 'name' ) ), WP_REVIEWS_INSURANCE::$option['email_subject'] );\n\t\t\t\tUtility::send_mail( $comment->comment_author_email, $email_subject, $email_text );\n\n\t\t\t} else {\n\t\t\t\tupdate_comment_meta( $id, 'comment_approve_user', 'yes' );\n\t\t\t}\n\t\t}\n\t}", "function freelancer_review_action() {\n global $user_ID;\n $args = $_POST;\n $project_id = $args['project_id'];\n \n $status = get_post_status($project_id);\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $author_bid = (int)get_post_field('post_author', $bid_id_accepted);\n \n $freelancer_id = get_post_field('post_author', $bid_id_accepted);\n \n /*\n * validate data\n */\n if (!isset($args['score']) || empty($args['score'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('You have to rate this project.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n if (!isset($args['comment_content']) || empty($args['comment_content'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please post a review for this freelancer.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n /*\n * check permission\n */\n if ($user_ID !== $author_bid || !$user_ID) {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You don\\'t have permission to review.', ET_DOMAIN)\n ));\n }\n \n /*\n * check status of project\n */\n if ($status !== 'complete') {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You can\\'t not reivew on this project.', ET_DOMAIN)\n ));\n }\n \n /**\n * check user reviewed project owner or not\n * @author Dan\n */\n $role = ae_user_role($user_ID);\n $type = 'em_review';\n if ($role == FREELANCER) {\n $type = 'fre_review';\n }\n \n $comment = get_comments(array(\n 'status' => 'approve',\n 'type' => $type,\n 'post_id' => $project_id\n ));\n \n if (!empty($comment)) {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You have reviewed on this project.', ET_DOMAIN)\n ));\n }\n \n // end check user review project owner\n \n // add review\n $args['comment_post_ID'] = $project_id;\n $args['comment_approved'] = 1;\n $this->comment_type = 'fre_review';\n $review = Fre_Review::get_instance(\"fre_review\");\n \n $comment = $review->insert($args);\n \n if (!is_wp_error($comment)) {\n \n /**\n * fire action after freelancer review employer base on project\n * @param int $int project id\n * @param Array $args submit args (rating score, comment)\n * @since 1.2\n * @author Dakachi\n */\n do_action('fre_freelancer_review_employer', $project_id, $args);\n \n //update project, bid, bid author, project author after review\n $this->update_after_fre_review($project_id, $comment);\n wp_send_json(array(\n 'success' => true,\n 'msg' => __(\"Your review has been submitted.\", ET_DOMAIN)\n ));\n } else {\n \n // revert bid status\n wp_update_post(array(\n 'ID' => $bid_id_accepted,\n 'post_status' => 'publish'\n ));\n \n wp_send_json(array(\n 'success' => false,\n 'msg' => $comment->get_error_message()\n ));\n }\n }", "public function sendPrivateComment(Request $request, Application $app)\n {\n // get the id from check box to send comment to this id\n $getCheckedId = $request->get('check_id');\n $privateComment = $request->get('textareaPriavteComment');\n if ($privateComment == null) {\n echo ' no message to send - blank comment area...';\n }\n //\n foreach ($getCheckedId as $selectedId) {\n if ($selectedId == true) {\n echo $selectedId .\"</br>\";\n $student = Student::getOneById($selectedId);\n $student->setPrivateComment($privateComment);\n Student::update($student);\n } else {\n echo 'You must check a student to message '.\"</br>\";\n }\n return $this->lecturerHomeAction($request, $app);\n }\n }", "public function flag_contribution() {\n\n\t\t// Ensure we are actually flagging a contribution\n\t\tif ( 'POST' != $_SERVER['REQUEST_METHOD'] || ! isset( $_POST['action'] ) || 'flag_contribution' != $_POST['action'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail out if no comment ID was provided\n\t\tif ( ! isset( $_POST['comment_id'] ) || ! $_POST['comment_id'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$contribution = wc_product_reviews_pro_get_contribution( $_POST['comment_id'] );\n\t\t$reason = isset( $_POST['flag_reason'] ) ? $_POST['flag_reason'] : null;\n\n\t\tif ( ! $contribution ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Flag contribution\n\t\tif ( $contribution->flag( $reason ) ) {\n\n\t\t\twc_add_notice( __( 'Contribution was flagged. Thanks!', 'woocommerce-product-reviews-pro' ) );\n\n\t\t} else {\n\n\t\t\t$message = $contribution->get_failure_message();\n\t\t\twc_add_notice( $message ? $message : __( 'Could not flag contribution. Please try again later.', 'woocommerce-product-reviews-pro' ), 'error' );\n\t\t}\n\n\t\twp_safe_redirect( wp_get_referer() );\n\t\texit;\n\t}", "function employer_review_action() {\n global $user_ID, $current_user;\n $args = $_POST;\n \n if (!isset($args['project_id'])) {\n wp_send_json(array(\n 'success' => false,\n 'msg' => __('Invalid project id.', ET_DOMAIN)\n ));\n }\n \n $project_id = $args['project_id'];\n \n $author_id = (int)get_post_field('post_author', $project_id);\n \n $result = array(\n 'succes' => false,\n 'msg' => __('You can\\'t not access this action.', ET_DOMAIN)\n );\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $author_bid = get_post_field('post_author', $bid_id_accepted);\n \n $profile_id = get_user_meta($author_bid, 'user_profile_id', true);\n \n /*\n * validate data\n */\n if (!$bid_id_accepted) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please assign project before complete.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n if (!isset($args['score']) || empty($args['score'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('You have to rate for this profile.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n if (!isset($args['comment_content']) || empty($args['comment_content'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please post a review for this freelancer.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n /*\n * check permission for review action\n */\n \n if (!$user_ID || $user_ID !== $author_id) wp_send_json($result);\n \n $args['comment_post_ID'] = $bid_id_accepted;\n $args['comment_approved'] = 1;\n \n // insert review\n $review = Fre_Review::get_instance();\n $comment = $review->insert($args);\n \n if (!is_wp_error($comment)) {\n \n /**\n * fire an acction after project owner complete his project\n * @param int $project_id\n * @param Array $args\n * @since v1.2\n * @author Dakachi\n */\n do_action('fre_complete_project', $project_id, $args);\n \n /**\n * update project, bid, user rating scrore after review a project\n */\n $this->update_after_empoyer_review($project_id, $comment);\n \n $project_title = get_the_title($project_id);\n $freelancer_name = get_the_author_meta('display_name', $author_bid);\n wp_send_json(array(\n 'success' => true,\n 'msg' => sprintf(__(\"You have completed project %s and reviewed %s.\", ET_DOMAIN) , $project_title, $freelancer_name)\n ));\n } else {\n wp_send_json(array(\n 'success' => false,\n 'msg' => $comment->get_error_message()\n ));\n }\n }", "function notify_answer($comment){\n\t\tif (is_numeric($comment)) {\n\t\t\t$comment = $this->find('first', array(\n\t\t\t\t'conditions' => array('Comment.id' => $comment),\n\t\t\t\t'contain' => array()\t\n\t\t\t));\n\t\t}\n\n\t\tif ( isset( $comment['Comment']['email'] ) ){\n\t\t\t// natahnu si mailovaci skript\n\t\t\tinclude 'class.phpmailer.php';\n\t\t\t\n\t\t\t// notifikacni email zakaznikovi\n\t\t\t// o dotazu\n\t\t\t$mail = new phpmailer();\n\n\t\t\t// uvodni nastaveni\n\t\t\t$mail->CharSet = 'utf-8';\n\t\t\t$mail->Hostname = CUST_ROOT;\n\t\t\t$mail->Sender = CUST_MAIL;\n\t\t\t\n\t\t\t// nastavim adresu, od koho se poslal email\n\t\t\t$mail->From = CUST_MAIL;\n\t\t\t$mail->FromName = \"Automatické potvrzení\";\n\t\t\t\n\t\t\t$mail->AddReplyTo(CUST_MAIL, CUST_NAME);\n\n\t\t\t$mail->AddAddress($comment['Comment']['email'] , $comment['Comment']['author']);\n\t\t\t$mail->AddBCC(\"vlado@tovarnak.com\", \"Vlado Tovarnak\");\n\t\n\t\t\t$mail->Subject = $comment['Comment']['subject'] . \" - odpověď na váš dotaz\";\n\t\t\t$mail->Body = 'Dobrý den,' . \"\\n\";\n\t\t\t$mail->Body .= 'Váš dotaz v následujícím znění:' . \"\\n\\n\";\n\t\t\t$mail->Body .= $comment['Comment']['body']. \"\\n\\n\";\n\t\t\t$mail->Body .= 'byl zodpovězen, odpověď naleznete níže:' . \"\\n\\n\";\n\t\t\t$mail->Body .= $comment['Comment']['reply']. \"\\n\\n\";\n\t\t\t\n\t\t\t$mail->Body .= 's pozdravem' . \"\\n\" . 'team internetového obchodu ' . CUST_NAME;\n\n\t\t\treturn $mail->Send();\n\t\t}\n\t\treturn false;\n\t}", "function sendToReviewAction(Request $request) {\n $resource = $this->findOr404($request);\n $arrangementProgramManager = $this->getArrangementProgramManager();\n\n if (!$arrangementProgramManager->isAllowToSendToReview($resource)) {\n throw $this->createAccessDeniedHttpException();\n }\n if ($arrangementProgramManager->isYouCanSendInRevision($resource)) {\n $resource->setStatus(ArrangementProgram::STATUS_IN_REVIEW);\n\n $user = $this->getUser();\n $details = $resource->getDetails();\n $details\n ->setSendToReviewBy($user)\n ->setSendToReviewDate(new DateTime());\n\n $this->domainManager->dispatchEvent('pre_send_to_review', new ResourceEvent($resource));\n\n $this->domainManager->update($resource);\n $this->flashHelper->setFlash('success', 'send_to_review');\n\n $this->domainManager->dispatchEvent('post_send_to_review', new ResourceEvent($resource));\n } else {\n $this->flashHelper->setFlash('error', 'planned_not_complete');\n }\n\n return $this->redirectHandler->redirectTo($resource);\n }", "protected function sendOrderChangeNotification()\n {\n if ($this->getSendNotificationFlag()) {\n \\XLite\\Core\\Mailer::getInstance()->sendOrderAdvancedChangedCustomer($this->getOrder());\n }\n }", "public function sendOrderCommentMail($comment)\n {\n $customerLocale = $this->getLocale($comment);\n\n if (! $comment->customer_notified) {\n return;\n }\n\n try {\n /* email to customer */\n $this->prepareMail($customerLocale, new OrderCommentNotification($comment));\n } catch (\\Exception $e) {\n report($e);\n }\n }", "function wp_notify_postauthor($comment_id, $deprecated = \\null)\n {\n }", "public function mark_comment_moderated( $comment ) {\n\t\t\tif ( isset( $comment->comment_ID ) ) {\n\t\t\t\tupdate_comment_meta( $comment->comment_ID, $this->_plugin_prefix . '_moderated', true );\n\t\t\t}\n\t\t}", "function update_comment_status( $app_comment_id, $status ) {\n $wp_status = ( $status == 'unapproved' ? 'hold' : $status );\n $args = array( $app_comment_id, $wp_status );\n $this->without_wp_notifications( 'wp_set_comment_status', $args );\n \n }", "function warquest_home_comment_save_do() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $uid;\r\n\tglobal $other;\r\n\tglobal $comment;\r\n\r\n\t/* output */\r\n\tglobal $output;\r\n\r\n\tif (strlen($comment)>0) {\r\n\t\r\n\t\tif ($uid==0) {\r\n\t\t\twarquest_db_comment_insert(0, 0, $player->pid, $other->pid, $comment);\r\n\t\t} else {\t\t\r\n\t\t\twarquest_db_comment_update($uid, $comment);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($other->pid)) {\r\n\t\t\r\n\t\t\t$other->comment_notification++;\r\n\t\t\twarquest_comment_mail($other->pid, $comment, $player->name);\r\n\t\t\t$message = t('ALLIANCE_COMMENT_PLAYER', player_format($other->pid, $other->name, $other->country));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$message = t('ALLIANCE_COMMENT_ALL');\r\n\t\t\twarquest_info(\"Post message: \".$comment);\t\t\r\n\t\t}\t\t\r\n\r\n\t\t/* Clear input parameters */\r\n\t\t$uid = 0;\r\n\t\t\r\n\t\t$output->popup .= warquest_box_icon(\"info\", $message);\r\n\t}\r\n}", "public function after_comment_create($ticket_id, $comment_id){\n\n\t\t$admin_emails = $this->get_ticket_admin_emails($ticket_id);\n\t\t$author_email = wt_get_ticket_author_meta($ticket_id, 'email');\n\n\t\t// add html email header\n\t\tadd_filter( 'wp_mail_content_type', array($this, 'set_html_content_type') );\n\t\n\t\t// current comment author\n\t\t$comment_email = get_comment($comment_id)->comment_author_email;\n\t\tif(in_array($comment_email, $admin_emails)){\n\n\t\t\t// check to see if the current comment was not public or private then dont notify\n\t\t\tif( !in_array( get_comment_meta( $comment_id, '_comment_access',true), array('public', 'private') ) ){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// author posted\n\t\t\tif(is_member_ticket($ticket_id)){\n\n\t\t\t\t// send member email\n\t\t\t\t$email_subject = 'new comment member';\n\t\t\t\t$email_message = $this->get_email_content( 'member_update', array('test' => 'Member'));\n\t\t\t\t$template = $this->set_template_content($email_message, $email_subject);\n\t\t\t\twp_mail( $author_email, $email_subject, $template);\n\t\t\t}else{\n\n\t\t\t\t$email_vars = array(\n\t\t\t\t\t'pass' => get_post_meta( $ticket_id, '_view_key', true ),\n\t\t\t\t\t'name' => get_post_meta( $ticket_id, '_user_name', true ),\n\t\t\t\t);\n\n\t\t\t\t// send public email\n\t\t\t\t$email_subject = 'new comment public';\n\t\t\t\t$email_message = $this->get_email_content( 'public_update', $email_vars);\n\t\t\t\t$template = $this->set_template_content($email_message, $email_subject);\n\t\t\t\twp_mail( $author_email, $email_subject, $template);\n\t\t\t}\n\t\t}else{\n\n\t\t\t// non author, send admin emails\n\t\t\t$email_subject = 'new comment admin';\n\t\t\t$email_message = $this->get_email_content( 'admin_update', array('test' => 'Admin'));\n\t\t\t$template = $this->set_template_content($email_message, $email_subject);\n\t\t\twp_mail( $admin_emails, $email_subject, $template);\n\t\t}\n\n\t\t// remove html email header filter\n\t\tremove_filter( 'wp_mail_content_type', array($this, 'set_html_content_type') );\n\t}", "public function markCaseAsAccepted(Order $order, $comment): Order\n {\n $reviewAcceptStatus = $this->configHelper->getFraudStatus(\n Config::XML_STATUS_FRAUD_MANUAL_REVIEW_ACCEPT,\n $order->getStoreId()\n );\n\n // Empty used to cater for empty string and null cases\n if (!empty($reviewAcceptStatus)) {\n $order->addStatusHistoryComment(__($comment), $reviewAcceptStatus);\n $this->adyenLogger->addAdyenNotification(sprintf(\n 'Created comment history for this notification linked to order %s with status update to: %s',\n $order->getIncrementId(),\n $reviewAcceptStatus\n ), [\n 'pspReference' => $order->getPayment()->getData('adyen_psp_reference'),\n 'merchantReference' => $order->getPayment()->getData('entity_id')\n ]);\n } else {\n $order->addStatusHistoryComment(__($comment));\n $this->adyenLogger->addAdyenNotification(sprintf(\n 'Created comment history for this notification linked to order %s without any status update',\n $order->getIncrementId()\n ),\n array_merge(\n $this->adyenLogger->getOrderContext($order),\n ['pspReference' => $order->getPayment()->getData('adyen_psp_reference')]\n )\n );\n }\n\n return $order;\n }", "public function wrote_review_or_commented() {\n\n\t\t$type = get_post_type();\n\n\t\tif ( $type == 'product' ) {\n\t\t\tif ( $this->event_name['wrote_review'] ) {\n\t\t\t\t$this->api_record_event( $this->event_name['wrote_review'], array( $this->property_name['product_name'] => get_the_title() ) );\n\t\t\t}\n\t\t} elseif ( $type == 'post' ) {\n\t\t\tif ( $this->event_name['commented'] ) {\n\t\t\t\t$this->api_record_event( $this->event_name['commented'], array( $this->property_name['post_title'] => get_the_title() ) );\n\t\t\t}\n\t\t}\n\t}", "private function sendReviewEvent(ReviewModel $review)\n {\n try {\n $this->_apiClient->sendEvent(\n $review->getData('customer_id'),\n 'review_submit',\n [\n 'item' => $review->getData('entity_pk_value'),\n 'review' => $review->getData('detail'),\n 'review_id' => $review->getData('review_id'),\n 'provider' => 'Magento2'\n ]\n );\n } catch (\\Exception $e) {\n // Failing silently...\n }\n }", "public function setCustomerCommentDelivery($observer)\r\n {\r\n try{\r\n $order = $observer->getEvent()->getOrder();\r\n $order_id = $order->getData('increment_id') ;\r\n $orderComment = $this->_getRequest()->getPost('suvery');\r\n if(trim($orderComment)!= 'other'){\r\n $orderComment = trim($orderComment);\r\n }else{\r\n $orderComment = trim($this->_getRequest()->getPost('suvery_other'));\r\n }\r\n //save suvery to database\r\n $resource = Mage::getSingleton('core/resource');\r\n $writeConnection = $resource->getConnection('core_write');\r\n $query = \"INSERT INTO \".Mage::getConfig()->getTablePrefix().\"onepagecheckout_suvery VALUES ('','\".$order_id.\"','\".$orderComment.\"','','')\";\r\n $writeConnection->query($query);\r\n //save delivery to datbase\r\n $delivery_date = $this->_getRequest()->getPost('delivery_date');\r\n $delivery_time = $this->_getRequest()->getPost('delivery_time');\r\n $resource = Mage::getSingleton('core/resource');\r\n $writeConnection = $resource->getConnection('core_write');\r\n $query = \"INSERT INTO \".Mage::getConfig()->getTablePrefix().\"onepagecheckout_delivery VALUES ('','\".$order_id.\"','\".$delivery_date.\"','\".$delivery_time.\"','','')\";\r\n $writeConnection->query($query);\r\n }catch(exception $e){\r\n \r\n }\r\n }", "public function comment($comment) {\n $comment['InsertUserID'] = Gdn::session()->UserID;\n $comment['DateInserted'] = Gdn_Format::toDateTime();\n $comment['InsertIPAddress'] = ipEncode(Gdn::request()->ipAddress());\n\n $this->Validation->applyRule('ActivityID', 'Required');\n $this->Validation->applyRule('Body', 'Required');\n $this->Validation->applyRule('DateInserted', 'Required');\n $this->Validation->applyRule('InsertUserID', 'Required');\n\n $this->EventArguments['Comment'] = &$comment;\n $this->fireEvent('BeforeSaveComment');\n\n if ($this->validate($comment)) {\n $activity = $this->getID($comment['ActivityID'], DATASET_TYPE_ARRAY);\n\n $_ActivityID = $comment['ActivityID'];\n // Check to see if this is a shared activity/notification.\n if ($commentActivityID = val('CommentActivityID', $activity['Data'])) {\n Gdn::controller()->json('CommentActivityID', $commentActivityID);\n $comment['ActivityID'] = $commentActivityID;\n }\n\n $storageObject = FloodControlHelper::configure($this, 'Vanilla', 'ActivityComment');\n if ($this->checkUserSpamming(Gdn::session()->User->UserID, $storageObject)) {\n return false;\n }\n\n // Check for spam.\n $spam = SpamModel::isSpam('ActivityComment', $comment);\n if ($spam) {\n return SPAM;\n }\n\n // Check for approval\n $approvalRequired = checkRestriction('Vanilla.Approval.Require');\n if ($approvalRequired && !val('Verified', Gdn::session()->User)) {\n LogModel::insert('Pending', 'ActivityComment', $comment);\n return UNAPPROVED;\n }\n\n $iD = $this->SQL->insert('ActivityComment', $comment);\n\n if ($iD) {\n // Check to see if this comment bumps the activity.\n if ($activity && val('Bump', $activity['Data'])) {\n $this->SQL->put('Activity', ['DateUpdated' => $comment['DateInserted']], ['ActivityID' => $activity['ActivityID']]);\n if ($_ActivityID != $comment['ActivityID']) {\n $this->SQL->put('Activity', ['DateUpdated' => $comment['DateInserted']], ['ActivityID' => $_ActivityID]);\n }\n }\n\n // Send a notification to the original person.\n if (val('ActivityType', $activity) === 'WallPost') {\n $this->notifyWallComment($comment, $activity);\n }\n }\n\n return $iD;\n }\n return false;\n }", "protected function prepareSendEditComment(){\n if (!empty($_POST['comment'])) {\n $this->sendEditComment();\n header('Location: index.php?action=article&number='.$this->getNumber().'');\n }\n else{\n $this->prepareEditComment();\n }\n }", "public function setOwner(NotificationManager $owner)\n {\n $this->owner = $owner;\n }", "public function setOwner(NotificationManager $owner)\n {\n $this->owner = $owner;\n }", "private function sendDonationMail(User $donner, User $recipient, int $point, string $comment)\n {\n Mail::to($recipient->email)\n ->queue(new \\App\\Mail\\Donation($donner, $recipient, $point, $comment));\n\n Mail::to($donner->email)\n ->queue(new \\App\\Mail\\Donation($donner, $recipient, $point, $comment));\n }", "public function reply($user, Comment $comment) : bool\n {\n return $user->id != $comment->commenter_id;\n }", "public function onBeforeSave()\n\t{\n\t\tif (empty($this->allow_comments))\n\t\t{\n\t\t\t$this->allow_comments = $this->Channel->deft_comments;\n\t\t}\n\t}", "public function maybeShowReviewRequestNotice() {\n\t\t\t$dismissed_notices = muut()->getOption( 'dismissed_notices', array() );\n\t\t\tif ( !isset( $dismissed_notices['review_request'] ) || !$dismissed_notices['review_request'] ) {\n\t\t\t\t$update_timestamps = muut()->getOption( 'update_timestamps', array() );\n\t\t\t\t$update_time = !empty( $update_timestamps ) ? array_pop( $update_timestamps ) : false;\n\n\t\t\t\tif ( $update_time && ( time() - $update_time > 604800 ) ) {\n\t\t\t\t\techo '<div class=\"updated muut_admin_notice\" id=\"muut_dismiss_review_request_notice\">';\n\t\t\t\t\twp_nonce_field( 'muut_dismiss_notice', 'dismiss_nonce' );\n\t\t\t\t\techo '<span style=\"float: right\" class=\"dismiss_notice_button\"><a href=\"#\" class=\"dismiss_notice\">X</a></span>';\n\t\t\t\t\techo '<p>' . sprintf( __( 'Enjoying Muut? We\\'d love it you would pop over to the %splugin page%s and leave a rating and review!', 'muut' ), '<a class=\"dismiss_notice\" target=\"_blank\" href=\"https://wordpress.org/plugins/muut/\">', '</a>' ) . '</p>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function sendEmail($notifyCustomer = true, $comment = '')\r\n {\r\n $order = $this->getOrder();\r\n $storeId = $order->getStore()->getId();\r\n\r\n // Get the destination email addresses to send copies to\r\n $copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);\r\n $copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD);\r\n // Check if at least one recepient is found\r\n if (!$notifyCustomer && !$copyTo) {\r\n return $this;\r\n }\r\n\r\n // Start store emulation process\r\n $appEmulation = Mage::getSingleton('core/app_emulation');\r\n $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);\r\n\r\n try {\r\n // Retrieve specified view block from appropriate design package (depends on emulated store)\r\n $paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment())\r\n ->setIsSecureMode(true);\r\n $paymentBlock->getMethod()->setStore($storeId);\r\n $paymentBlockHtml = $paymentBlock->toHtml();\r\n } catch (Exception $exception) {\r\n // Stop store emulation process\r\n $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);\r\n throw $exception;\r\n }\r\n\r\n // Stop store emulation process\r\n $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);\r\n\r\n // Retrieve corresponding email template id and customer name\r\n if ($order->getCustomerIsGuest()) {\r\n $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE);\r\n $customerName = $order->getBillingAddress()->getName();\r\n } else {\r\n $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE);\r\n $customerName = $order->getCustomerName();\r\n }\r\n\r\n $mailer = Mage::getModel('core/email_template_mailer');\r\n if ($notifyCustomer) {\r\n $emailInfo = Mage::getModel('core/email_info');\r\n $emailInfo->addTo($order->getCustomerEmail(), $customerName);\r\n if ($copyTo && $copyMethod == 'bcc') {\r\n // Add bcc to customer email\r\n foreach ($copyTo as $email) {\r\n $emailInfo->addBcc($email);\r\n }\r\n }\r\n $mailer->addEmailInfo($emailInfo);\r\n }\r\n\r\n // Email copies are sent as separated emails if their copy method is 'copy' or a customer should not be notified\r\n if ($copyTo && ($copyMethod == 'copy' || !$notifyCustomer)) {\r\n foreach ($copyTo as $email) {\r\n $emailInfo = Mage::getModel('core/email_info');\r\n $emailInfo->addTo($email);\r\n $mailer->addEmailInfo($emailInfo);\r\n }\r\n }\r\n\r\n // Set all required params and send emails\r\n $mailer->setSender(Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY));\r\n $mailer->setStoreId($storeId);\r\n $mailer->setTemplateId($templateId);\r\n $mailer->setTemplateParams(array(\r\n 'order' => $order,\r\n 'shipment' => $this,\r\n 'comment' => $comment,\r\n 'billing' => $order->getBillingAddress(),\r\n 'payment_html' => $paymentBlockHtml\r\n )\r\n );\r\n $mailer->send();\r\n\r\n return $this;\r\n }", "function action_form_comment($form)\n {\n $user = User::identify();\n if ($user->loggedin) {\n return;\n }\n\n $this->load_options();\n if (!$this->ready) {\n return;\n }\n\n // If the commenter has been approved as valid before, don't show the captcha\n if (isset($_SESSION['recaptchaV2_commenter_validated'])\n && $_SESSION['recaptchaV2_commenter_validated'] == true) {\n $form->insert('cf_submit', 'static', 'recaptcha', '');\n } // If the commenter has been checked and not approved, show the captcha and add validation\n else if (isset($_SESSION['recaptchaV2_commenter_validated'])) {\n $html\n = '<script>\n window.onload = function() { \n document.getElementById(\"cf_submit\").style.display=\"none\";\n document.getElementById(\"g-recaptcha\").style.display=\"block\";\n }\n\t\t function YourOnSubmitFn(token) {\n\t\t document.getElementById(\"comment-public\").submit();\n\t\t }\n\t\t </script>';\n $html\n .= '<button class=\"g-recaptcha\" id=\"g-recaptcha\" data-sitekey=\"'.$this->options['public_key'].'\"\n\t\t\t\tdata-callback=\"YourOnSubmitFn\" style=\"display: none\">Senden</button>';\n\n $recaptcha = $form->insert('cf_submit', 'static', 'recaptcha', $html);\n $recaptcha->add_validator([$this, 'validate']);\n } // If the commenter has not yet been checked, don't show the captcha, but add validation for the commenter\n else {\n $form->cf_commenter->add_validator([$this, 'validate_commenter']);\n $form->insert('cf_submit', 'static', 'recaptcha', '');\n }\n }", "function sendThankYouEmail($customerId) {\n $params = array();\n if (!$this->generateMinimalDashboardParams($customerId, $params)) {\n return false;\n }\n\n $reviewWidget = $this->getReadReviewWidget($params['business']->getId());\n $respondToEmail = array($params['owner']->getEmail() => $params['business']->getName());\n\n $siteInfo = $this->container->get('e2w_siteinfo_service');\n $whitelabel = $siteInfo->getLabeledUrl($params['owner']->getLabel(), $params['owner']->getAgentId());\n $params['isAllstate'] = $siteInfo->isAllstate($whitelabel['domain']);\n $params['isWhitelabeled'] = $whitelabel['labeled'];\n\n if ($params['customer']->getRecommend() >= $reviewWidget->getShowSocialLinksRequired()) {\n $params['copyButtonBeforeSocialLinks'] = true;\n if (isset($params['kiosk']) && $params['kiosk']) {\n $this->generateNotification($params, 'kiosk-positive');\n $this->generateNotification($params, 'thanks-kiosk-positive');\n } else {\n $this->generateNotification($params, 'positive');\n $this->generateNotification($params, 'thanks-positive');\n }\n\n if (intval($reviewWidget->getShouldSendPositiveEmail()) === 1) {\n $this->sendNotificationEmail($respondToEmail, $params['customer']->getEmail(), $params);\n }\n } else {\n $this->generateNotification($params, 'negative');\n $this->generateNotification($params, 'thanks-negative');\n\n if (!$this->container->get('e2w_siteinfo_service')->isWhitesparkSeanHeffernanBusiness($params['business']->getId(), $params['business']->getAgentId())) {\n if (intval($reviewWidget->getShouldSendNegativeEmail()) === 1) {\n $this->sendNotificationEmail($respondToEmail, $params['customer']->getEmail(), $params);\n }\n }\n }\n\n return true;\n }", "public function comment(User $user, Request $request)\n {\n return $user->isAdmin() || $user->id == $request->owner_id;\n }", "public function process_review_opened( $notification ) {\n\t\t$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->charge );\n\n\t\tif ( ! $order ) {\n\t\t\tWC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->charge );\n\t\t\treturn;\n\t\t}\n\n\t\t/* translators: 1) The URL to the order. 2) The reason type. */\n\t\t$message = sprintf( __( 'A review has been opened for this order. Action is needed. Please go to your <a href=\"%1$s\" title=\"Stripe Dashboard\" target=\"_blank\">Stripe Dashboard</a> to review the issue. Reason: (%2$s)', 'woocommerce-gateway-stripe' ), $this->get_transaction_url( $order ), $notification->data->object->reason );\n\n\t\tif ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) {\n\t\t\t$order->update_status( 'on-hold', $message );\n\t\t} else {\n\t\t\t$order->add_order_note( $message );\n\t\t}\n\t}", "public function comment()\n {\n $commentManager = new CommentManager();\n \n $comment = $commentManager->getComment($_GET['id']);\n \n require (__DIR__ . '/../view/frontend/commentView.php');\n }", "public function comment($comment_id, $action = false) {\n\t\t$this->history = false;\n\n\t\tif ($action) {\n\t\t\tswitch ($action) {\n\n\t\t\t\t// Delete comment\n\t\t\t\tcase 'delete':\n\t\t\t\t\t$this->_comment_delete($comment_id);\n\t\t\t\t\treturn;\n\n\t\t\t\t// Set comment as private\n\t\t\t\tcase 'private':\n\t\t\t\t\t$this->_comment_private($comment_id);\n\t\t\t\t\treturn;\n\n\t\t\t}\n\t\t}\n\n\t\turl::back('members');\n\t}", "public function actionComment($modelName)\n\t{\n\t\t$model = new Comments;\n\t\t$object = $modelName::model() -> findByPk($_POST[\"object_id\"]);\n\t\t\n\t\t$isNew = true;\n\t\t\n\t\tif(isset($_POST['Comments']))\n\t\t{\n\t\t\t\n\t\t\t$model->attributes=$_POST['Comments'];\n\t\t\t$model->user_first_name = trim($_POST['Comments']['user_first_name']);\n\t\t\t$model->object_id = $_POST['object_id'];\n\t\t\t$model->object_type = Objects::model() -> getNumber($modelName);\n\t\t\t\n\t\t\t//print_r($_POST);\n\t\t\t\n\t\t\tif($model->save()) {\n\t\t\t\tYii::app()->user->setFlash('commentSuccessfull', CHtml::encode('Спасибо, Ваш комментарий будет добавлен после проверки администратором.'));\n\t\t\t\t//$this->redirect($this->createUrl('/'.$modelName.'/'. $_POST['verbiage'] .'/other'));\n\t\t\t\t$this -> redirect(Yii::app() -> baseUrl.'/'.$modelName.'/reviews/'.$object -> verbiage);\n\t\t\t\t$isNew = false;\n\t\t\t} else {\n\t\t\t\t$errors = $model->getErrors();\n\t\t\t\t$error_message = '';\n\t\t\t\t//$error_message = '<ul>';\n\t\t\t\tforeach ($errors as $error) {\n\t\t\t\t\t$error_message .= implode('<br/>', $error);\n\t\t\t\t\t//$error_message .= '<li>' . implode('<br/>', $error) . '</li>';\n\t\t\t\t}\n\t\t\t\t//$error_message .= '</ul>';\n\n\t\t\t\tYii::app()->user->setFlash('commentFailed', CHtml::encode('Не удалось добавить комментарий') . '<br/>'.$error_message.\"<br/>\");\n\t\t\t} \n\t\t\t\n\t\t\t$this -> redirect(Yii::app() -> baseUrl.'/'.$modelName.'/reviews/'.$object -> verbiage);\n\t\t\t/*$this->layout='main';\n\t\t\t$this->render($modelName.'Other', array('model' => $object, 'add_comment' => $model, 'isNew' => $isNew));*/\n\t\t}\n\t}", "public function updateCommentContent(Request $request, NotificationManager $notificationManager){\n $locale = $request->getLocale();\n $comId = $request->get('id');\n $evtId = $request->get('eid');\n $parentId = $request->get('cid');\n $comContent = $request->get('content');\n $stgId = $request->get('sid');\n $evtTypeId = $request->get('evtid');\n $oDateStr = $request->get('oDateStr');\n $expResDateStr = $request->get('expResDateStr');\n\n if($oDateStr != \"\"){$oDate = new DateTime($oDateStr);}\n $expResDate = $expResDateStr != \"\" ? new DateTime($expResDateStr) : null;\n $em = $this->em;\n /** @var EventComment */\n $comment = $comId ? $em->getRepository(EventComment::class)->find($comId) : new EventComment;\n $isCurrentlyModified = $comment->getContent() && $comContent != $comment->getContent();\n if(!$comId){\n \n $comment->setContent($comContent)\n ->setAuthor($this->user)\n ->setOrganization($this->org)\n ->setInitiator($this->user);\n if($parentId){\n $parent = $em->getRepository(EventComment::class)->find($parentId);\n $comment->setParent($parent);\n }\n\n if(!$evtId){\n /** @var Stage */\n $stage = $em->getRepository(Stage::class)->find($stgId);\n $eventType = $em->getRepository(EventType::class)->find($evtTypeId);\n $event = new Event;\n $event->setEventType($eventType)\n ->setOnsetDate($oDate)\n ->setExpResDate($expResDate)\n ->setOrganization($this->org)\n ->setInitiator($this->user);\n $stage->addEvent($event);\n } else {\n /** @var Event */\n $event = $em->getRepository(Event::class)->find($evtId);\n $stage = $event->getStage();\n }\n \n $recipients = $event->getStage()->getUniqueParticipations()->filter(fn(Participation $p) => $p->getUser() != $this->user)->map(fn(Participation $p) => $p->getUser())->getValues();\n $event->addComment($comment);\n $em->persist($event);\n //$em->flush();\n\n /*$response = $this->forward('App\\Controller\\MailController::sendMail', [\n 'recipients' => $recipients, \n 'settings' => [\n 'event' => $event, \n 'commentUpdate' => true,\n 'documentUpdate' => false\n ],\n 'actionType' => 'eventUpdate'\n ]);\n if($response->getStatusCode() == 500){ return $response; };*/\n\n } else {\n if($isCurrentlyModified){\n $comment->setContent($comContent)\n ->setModified(new DateTime);\n $em->persist($comment);\n //$em->flush();\n }\n }\n\n $notifiedUsers = $stage->getParticipants()->map(fn(Participation $p) => $p->getUser());\n\n if(!$evtId){\n $notificationManager->registerUpdates($event, $notifiedUsers, ElementUpdate::CREATION);\n }\n if(!$comId){\n $notificationManager->registerUpdates($comment, $notifiedUsers, ElementUpdate::CREATION, 'content');\n }\n\n $em->flush();\n /*\n foreach($event->getStage()->getParticipants() as $participation){\n $update = new Update;\n $update->setType($comId ? ElementUpdate::CHANGE : ElementUpdate::CREATION)\n ->setEventComment($comment)\n ->setUser($participation->getUser())\n ->setStage($stage)\n ->setActivity($stage->getActivity());\n $event->addUpdate($update);\n }*/\n\n $outputData = ['msg' => 'success', 'author' => $this->user->getFullName(), 'modified' => $comment->getModified() != null, 'inserted' => $this->nicetime($comment->getInserted(),$locale), 'cid' => $comment->getId()];\n if(!$evtId){\n $outputData['sid'] = $stgId;\n $outputData['eid'] = $event->getId();\n $eventName = $eventType->getEName();\n $eventGroup = $eventType->getEventGroup();\n $locale = $request->getLocale();\n $repoEG = $em->getRepository(EventGroup::class);\n $repoET = $em->getRepository(EventType::class);\n $outputData['od'] = $event->getOnsetdateU();\n $outputData['rd'] = $event->getExpResDateU();\n $outputData['p'] = $event->getPeriod();\n $outputData['it'] = $eventName->getIcon()->getType();\n $outputData['in'] = $eventName->getIcon()->getName();\n $outputData['gn'] = $eventGroup->getEventGroupName()->getId();\n $outputData['gt'] = $repoEG->getDTrans($eventGroup, $locale, $this->org);\n $outputData['tt'] = $repoET->getDTrans($eventType, $locale, $this->org);\n $outputData['nbc'] = $event->getComments()->count();\n $outputData['nbd'] = $event->getDocuments()->count();\n }\n return new JsonResponse($outputData, 200);\n }", "function approve_comment($approve_comment_id){\n\t\tif( isset($_POST[$approve_comment_id]) ){\n\t\t\t$comment_id = $_POST[$approve_comment_id];\n\t\t\tarticles_marks::approve_comment_status($comment_id);\n\t\t}\t\n\t}", "function notify_reviewer( $post_ID, $post, $dowhat='publish' ) {\n\t\t\tglobal $wpdb, $current_user;\n\t\t\t$last_revision = $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE post_parent=%d AND post_type=%s ORDER BY post_date DESC LIMIT 1\", $post_ID, 'revision' ) );\n\t\t\t$post_content = 'draft' == $dowhat ? get_post( $last_revision ) : get_post( $post_ID );\n\t\t\t$last_mod = $post_content->post_date;\n\t\t\t$post_content = $post_content->post_content;\n\t\t\t$revision_compare_link = admin_url( 'revision.php?action=diff&post_type=' . $post->post_type . '&right=' . $post->ID . '&left=' . $last_revision );\n\t\t\t$body = sprintf( __( \"New changes have been made to \\\"%s\\\" at <%s>. \", $this->text_domain ), $post->post_title, get_permalink( $post->ID ) );\n\t\t\tif( 'draft' == $dowhat ) {\n\t\t\t\t$body .= __( \"The author has requested that you review the new changes and determine whether to remove or approve them. These changes will not appear on the public website until you approve them.\\n\\n\", $this->text_domain );\n\t\t\t} else {\n\t\t\t\t$body .= __( \"The modifications have been published, but the author of the page has requested you be notified of them.\\n\\n\", $this->text_domain );\n\t\t\t}\n\t\t\t$body .= sprintf( __( \"The new content of the page is shown below if you would like to review it. You can also review %s the changes at %s. Thank you. \\n\\n======================================================= \\nRevisions made at %s \\n======================================================= \\n\\n%s\", $this->text_domain ), ( 'draft' == $dowhat ? __( \" and approve/reject \", $this->text_domain ) : '' ), $revision_compare_link, $last_mod, $post_content );\n\t\t\t\n\t\t\t$headers = \"From: {$current_user->display_name} <{$current_user->user_email}>\\r\\n\";\n\t\t\t\n\t\t\twp_mail( $this->reviewers, sprintf( __( '[%s] New modifications to %s' ), get_bloginfo('name'), $post->post_title ), $body, $headers );\n\t\t}", "function set_comment() {\n $this->sale_lib->set_comment($this->input->post('comment'));\n }", "public function create(StoreComments $request)\n {\n $commantable = true;\n $user_comment = null;\n\n $post = Post::find($request->post_id);\n $data = ['user_id' => get_auth('id')];\n\n if($request->parent_id){\n\n $step = explode(' ', $request->comment);\n $comment = Comment::find($request->parent_id);\n\n if($step[0] == $comment->user->name){\n\n $revise_comment = ltrim($request->comment, $comment->user->name);\n\n $data['comment'] = $revise_comment;\n $data['parent_id'] = $request->parent_id;\n\n $user_comment = $post->comments()->save(new Comment($data));\n\n if($user_comment){\n $notification_data = ['user' => get_auth(), 'post' => $request->post_id];\n $parent_notify = $user_comment->parent()->with('user')->first();\n $parent_notify->user->notify(new CommentNotify($notification_data));\n $commantable = false;\n }\n }else{\n $data['parent_id'] = $request->parent_id;\n }\n }\n\n if($commantable){\n $data['comment'] = $request->comment;\n $user_comment = $post->comments()->save(new Comment($data));\n }\n\n if($user_comment){\n\n $data = [\n 'status' => 'success',\n 'message'=> 'Comment send request successfully complete.',\n 'comment_id' => $user_comment->id,\n 'comment' => $user_comment->comment,\n 'comment_date' => $user_comment->created_at,\n 'commentator' => get_auth()\n ];\n\n if(!is_null($user_comment->parent_id)){\n $commentable = $user_comment->parent()->with('user')->first();\n $data['comment_to'] = $commentable->user;\n }\n\n return response($data, 200);\n }\n\n return response([\n 'status' => 'fail',\n 'message' => 'Comment don\\'t created, connection error!'\n ], 404);\n }", "function view_comment()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t$comment_id = $this->input->get('comment_id');\n\t\t$this->view_comments('', '', '', array($comment_id));\n\t}", "function slack_comment( $comment_id ) : void {\n\t$comment = get_comment( $comment_id );\n\t$post = get_post( $comment->comment_post_ID );\n\t$category = get_the_category( $post->ID )[0]->slug;\n\t$author = get_user_by( 'id', $comment->user_id );\n\t$message = stripslashes( wp_strip_all_tags( sanitize_textarea_field( wp_unslash( $comment->comment_content ) ) ) );\n\n\t$channel = [\n\t\t'air' => '#airseries',\n\t\t'air-pro' => '#airseries-pro',\n\t\t'capsules' => '#capsules',\n\t\t'in-training-exam-prep' => '#ite-prep',\n\t][ $category ] ?? '#aliemu';\n\n\tslack_message(\n\t\t$channel,\n\t\t[\n\t\t\t'fallback' => \"Comment from {$comment->comment_author} on {$post->post_title}: {$message}\",\n\t\t\t'pretext' => \"*Comment Received: <{$post->guid}|{$post->post_title}>*\",\n\t\t\t'author_name' => $comment->comment_author,\n\t\t\t'author_link' => \"https://www.aliemu.com/user/{$author->user_login}\",\n\t\t\t'author_icon' => add_query_arg(\n\t\t\t\t[\n\t\t\t\t\t'size' => 16,\n\t\t\t\t\t'default' => 'mp',\n\t\t\t\t],\n\t\t\t\t'https://www.gravatar.com/avatar/' . md5( strtolower( trim( $author->user_email ) ) )\n\t\t\t),\n\t\t\t'text' => $message,\n\t\t\t'actions' => [\n\t\t\t\t(object) [\n\t\t\t\t\t'type' => 'button',\n\t\t\t\t\t'text' => 'View Comment',\n\t\t\t\t\t'url' => get_comment_link( $comment ),\n\t\t\t\t],\n\t\t\t],\n\t\t]\n\t);\n}", "public function commentDo() {\n\t\tif($this->user() || $this->fbUser) { \n\t\t\tif(isset($this->args[1]) && isset($_POST['comment']) && isset($_POST['redirect'])) {\n\t\t\t\t$userName = ($this->user()) ? $this->user->model->userName : $this->fbUser['username'];\n\t\t\t\t$_POST['name'] = $userName;\n\n\t\t\t\ttry {\n\t\t\t\t\t$this->commentsModel->insertComment($this->args[1], $_POST);\t\n\t\t\t\t\tHTML::redirect($_POST['redirect']);\n\t\t\t\t} catch(Exception $excpt) {\n\t\t\t\t\t$this->view->setError($excpt);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->view->setError(new Exception('Unable to set up function'));\n\t\t\t}\n\t\t}\n\t}", "public function action_enqueue_comment_reply_script() {\n\n\t\t// If the AMP plugin is active, return early.\n\t\tif ( skeleton_wp()->is_amp() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Enqueue comment script on singular post/page views only.\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "function notifyComments($cids, $type)\r\n {\r\n $my = JFactory::getUser();\r\n\r\n $database =& JFactory::getDBO();\r\n\r\n\r\n if (is_array($cids)) {\r\n $cids = implode(',',$cids);\r\n }\r\n\r\n $sentemail = \"\";\r\n $database->setQuery(\"SELECT * FROM #__comment WHERE id IN ($cids)\");\r\n $rows = $database->loadObjectList();\r\n if ($rows) {\r\n $query = \"SELECT email FROM #__users WHERE id='\".$my->id.\"' LIMIT 1\";\r\n $database->SetQuery($query);\r\n $myemail = $database->loadResult();\r\n $_notify_users = $this->_notify_users;\r\n\r\n foreach($rows as $row) {\r\n $this->_notify_users = $_notify_users;\r\n $this->setIDs($row->id, $row->contentid);\r\n $this->resetLists();\r\n $this->lists['name'] \t= $row->name;\r\n $this->lists['title'] \t= $row->title;\r\n $this->lists['notify'] \t= $row->notify;\r\n $this->lists['comment']\t= $row->comment;\r\n\r\n $email_writer = $row->email;\r\n /*\r\n * notify writer of approval\r\n */\r\n if ($row->userid > 0) {\r\n $query = \"SELECT email FROM #__users WHERE id='\".$row->userid.\"' LIMIT 1\";\r\n $database->SetQuery($query);\r\n $result = $database->loadAssocList();\r\n if ($result) {\r\n $user = $result[0];\r\n $email_writer = $user['email'];\r\n }\r\n }\r\n\r\n if ($email_writer && $email_writer != $myemail) {\r\n switch ($type) {\r\n \t\t\tcase 'publish':\r\n $this->lists['subject'] = _JOOMLACOMMENT_NOTIFY_PUBLISH_SUBJECT;\r\n $this->lists['message'] = _JOOMLACOMMENT_NOTIFY_PUBLISH_MESSAGE;\r\n break;\r\n case 'unpublish':\r\n $this->lists['subject'] = _JOOMLACOMMENT_NOTIFY_UNPUBLISH_SUBJECT;\r\n $this->lists['message'] = _JOOMLACOMMENT_NOTIFY_UNPUBLISH_MESSAGE;\r\n break;\r\n case 'delete' :\r\n $this->lists['subject'] = _JOOMLACOMMENT_NOTIFY_DELETE_SUBJECT;\r\n $this->lists['message'] = _JOOMLACOMMENT_NOTIFY_DELETE_MESSAGE;\r\n break;\r\n }\r\n\r\n $sentemail .= ($sentemail ? ';' : '').$this->notifyMailList($temp=array($email_writer));\r\n $exclude = $myemail ? ($email_writer.','.$myemail): $email_writer;\r\n } else {\r\n $exclude = $myemail ? $myemail:\"\";\r\n }\r\n\t\t\t /*\r\n\t\t\t * notify users, moderators, admin\r\n\t\t\t */\r\n switch ($type) {\r\n case 'publish':\r\n $this->lists['subject']\t= _JOOMLACOMMENT_NOTIFY_PUBLISH_SUBJECT;\r\n $this->lists['message']\t= _JOOMLACOMMENT_NOTIFY_PUBLISH_MESSAGE;\r\n break;\r\n case 'unpublish':\r\n $this->_notify_users = false;\r\n $this->lists['subject']\t= _JOOMLACOMMENT_NOTIFY_UNPUBLISH_SUBJECT;\r\n $this->lists['message']\t= _JOOMLACOMMENT_NOTIFY_UNPUBLISH_MESSAGE;\r\n break;\r\n case 'delete' :\r\n $this->_notify_users = false;\r\n $this->lists['subject']\t= _JOOMLACOMMENT_NOTIFY_DELETE_SUBJECT;\r\n $this->lists['message']\t= _JOOMLACOMMENT_NOTIFY_DELETE_MESSAGE;\r\n break;\r\n }\r\n//\t \t \techo implode(',', $notification->getMailList($row->contentid));\r\n $templist = $this->getMailList($row->contentid, $exclude);\r\n $sentemail .= ($sentemail ? ';' : '').$this->notifyMailList($templist);\r\n }\r\n }\r\n return $sentemail;\r\n }", "public function saveCustomerComment()\n {\n\t$comment = Mage::app()->getRequest()->getParam('comment', null);\n\tif($comment && strlen(trim($comment))) {\n\t $this->_checkoutSession->setData('customer_comment', $comment);\n\t} else {\n\t $this->_checkoutSession->unsetData('customer_comment');\n\t}\n }", "function do_salmon_as_comment($module,$id,$self_url,$self_title,$title=NULL,$post=NULL,$email='',$poster_name_if_guest='',$forum=NULL,$validated=NULL)\n\t{\n\t\tif (!is_null($post)) $_POST['post'] = $post;\n\t\tif (!is_null($title)) $_POST['title'] = $title;\n\t\t$_POST['email'] = $email;\n\t\t$_POST['poster_name_if_guest'] = $poster_name_if_guest;\n\t\t\n\t\treturn do_comments(true,$module,$id,$self_url,$self_title,$forum,true,$validated,false,true);\n\t}", "public function addComment( $comment )\n\t{\n\t\tif ( Yii::app()->params['commentNeedApproval'] )\n\t\t\t$comment->status = Comment::STATUS_PENDING;\n\t\telse\n\t\t\t$comment->status = Comment::STATUS_APPROVED;\n\t\t$comment->howto_id = $this->id;\n\t\treturn $comment->save();\n\t}", "function wputh_disable_comments_send_spam($approved, $commentdata) {\n return 'spam';\n}", "function voyage_mikado_comment($comment, $args, $depth) {\n\n $GLOBALS['comment'] = $comment;\n\n global $post;\n\n $is_pingback_comment = $comment->comment_type == 'pingback';\n $is_author_comment = $post->post_author == $comment->user_id;\n\n $comment_class = 'mkdf-comment clearfix';\n\n if($is_author_comment) {\n $comment_class .= ' mkdf-post-author-comment';\n }\n\n if($is_pingback_comment) {\n $comment_class .= ' mkdf-pingback-comment';\n }\n\n ?>\n\n <li>\n <div class=\"<?php echo esc_attr($comment_class); ?>\">\n <?php if(!$is_pingback_comment) { ?>\n <div class=\"mkdf-comment-image\"> <?php echo voyage_mikado_kses_img(get_avatar($comment, 75)); ?> </div>\n <?php } ?>\n <div class=\"mkdf-comment-text\">\n <div class=\"mkdf-comment-info\">\n <h5 class=\"mkdf-comment-name\">\n <?php if($is_pingback_comment) {\n esc_html_e('Pingback:', 'voyage');\n } ?>\n <?php echo wp_kses_post(get_comment_author_link()); ?>\n </h5>\n <span class=\"mkdf-comment-date\"><?php comment_time(get_option('date_format')); ?><?php esc_html_e(' at ', 'voyage'); ?><?php comment_time(get_option('time_format')); ?></span>\n </div>\n\n <?php if(!$is_pingback_comment) { ?>\n <div class=\"mkdf-text-holder\" id=\"comment-<?php echo comment_ID(); ?>\">\n <?php comment_text(); ?>\n <div class=\"mkdf-comment-reply-holder\">\n <?php\n comment_reply_link(array_merge($args, array(\n 'depth' => $depth,\n 'max_depth' => $args['max_depth']\n )));\n edit_comment_link();\n ?>\n </div>\n </div>\n <?php } ?>\n </div>\n </div>\n <?php //li tag will be closed by WordPress after looping through child elements ?>\n\n <?php\n }", "public function commentAction() {\r\n $data = json_decode($_POST['data'], true);\r\n if (empty($data['comments'])) {\r\n exit('access deny!');\r\n }\r\n\r\n if (stristr($data['sourceid'], 'nav_fun_')) {\r\n $id = intval(str_ireplace('nav_fun_', '', $data['sourceid']));\r\n $info = Nav_Service_NewsDB::getRecordDao()->get($id);\r\n if (!empty($info['id'])) {\r\n $total = $info['c_num'] + 1;\r\n Nav_Service_NewsDB::getRecordDao()->update(array('c_num' => $total), $id);\r\n $rcKey = 'NAV_FUN_OP:' . intval($info['id']);\r\n Common::getCache()->hSet($rcKey, 'c_num', $total);\r\n }\r\n }\r\n\r\n $addData = array(\r\n 'content' => trim($data['comments'][0]['content']),\r\n 'ctime' => substr($data['comments'][0]['ctime'], 0, 10),\r\n 'ip' => $data['comments'][0]['ip'],\r\n 'cmtid' => $data['comments'][0]['cmtid'],\r\n 'userid' => $data['comments'][0]['user']['userid'],\r\n 'sourceid' => $data['sourceid'],\r\n 'url' => $data['url'],\r\n 'created_at' => Common::getTime(),\r\n );\r\n\r\n // error_log(date('Y-m-d H:i:s') . \" \" . Common::jsonEncode($addData) . \"\\n\", 3, '/tmp/3g_changyan_comment');\r\n User_Service_Changyan::getDao()->insert($addData);\r\n\r\n exit;\r\n }", "public function approve()\n {\n // Initialize variables\n $cid = JRequest::getVar('cid', array(), 'post', 'array');\n $task = JRequest::getCmd('task');\n $publish = ($task == 'approve');\n\n if(empty($cid))\n {\n $this->setRedirect($this->_ambit->getRedirectUrl(), JText::_('COM_JOOMGALLERY_COMMAN_MSG_NO_COMMENTS_SELECTED'));\n $this->redirect();\n }\n\n $model = $this->getModel('comments');\n if($count = $model->publish($cid, $publish, 'approve'))\n {\n if($count != 1){\n $msg = JText::sprintf($publish ? 'COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_APPROVED' : 'COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_REJECTED', $count);\n } else {\n $msg = JText::_($publish ? 'COM_JOOMGALLERY_COMMAN_MSG_COMMENT_APPROVED' : 'COM_JOOMGALLERY_COMMAN_MSG_COMMENT_REJECTED');\n }\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg);\n }\n else\n {\n $msg = JText::_('COM_JOOMGALLERY_COMMON_MSG_ERROR_APPROVING_REJECTING');\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg, 'error');\n }\n }", "private function sendUserNotification($userId) {\n $user = \\craft\\elements\\User::find()->id($userId)->one();\n if ($user && $user->getFieldValue('notifyOnAcceptance')) {\n CraftTradeAccountNotifications::sendMail('_emails/trade-account-approved.html', 'Trade Account Approved', $user->email);\n $user->setFieldValue('notifyOnAcceptance', false);\n Craft::$app->elements->saveElement($user);\n }\n }", "public function markCaseAsPendingReview(Order $order, string $pspReference, bool $autoCapture = false): Order\n {\n $manualReviewComment = sprintf(\n 'Manual review required for order w/pspReference: %s. Please check the Adyen platform.',\n $pspReference\n );\n\n $reviewRequiredStatus = $this->configHelper->getFraudStatus(\n Config::XML_STATUS_FRAUD_MANUAL_REVIEW,\n $order->getStoreId()\n );\n\n // Set is in process to false since on Auto Capture, the payment would have already gone trough on the Adyen\n // platform. The invoice should also be already generated.\n if ($autoCapture) {\n $order->setIsInProcess(false);\n }\n\n if (!empty($reviewRequiredStatus)) {\n // Ensure that when setting the reviewRequiredStatus, the state will be new.\n if ($order->getState() !== Order::STATE_NEW) {\n $order->setState(Order::STATE_NEW);\n }\n $order->addStatusHistoryComment(__($manualReviewComment), $reviewRequiredStatus);\n $this->adyenLogger->addAdyenNotification(sprintf(\n 'Order %s is pending manual review. The following status will be set: %s',\n $order->getIncrementId(),\n $reviewRequiredStatus\n ), [\n 'pspReference' => $pspReference,\n 'merchantReference' => $order->getPayment()->getData('entity_id')\n ]);\n } else {\n $order->addStatusHistoryComment(__($manualReviewComment));\n $this->adyenLogger->addAdyenNotification(sprintf(\n 'Order %s is pending manual review. No status update was configured',\n $order->getIncrementId()\n ), [\n 'pspReference' => $pspReference,\n 'merchantReference' => $order->getPayment()->getData('entity_id')\n ]);\n }\n\n return $order;\n }", "function update_after_fre_review($project_id, $comment_id) {\n global $wpdb;\n if (isset($_POST['score']) && $_POST['score']) {\n $rate = (int)$_POST['score'];\n if ($rate > 5) $rate = 5;\n update_comment_meta($comment_id, 'et_rate', $rate);\n update_post_meta($project_id, 'rating_score', $rate);\n }\n $employer_id = (int)get_post_field('post_author', $project_id);\n $profile_id = get_user_meta($employer_id, 'user_profile_id', true);\n $sql = \"SELECT AVG(M.meta_value) as rate_point, COUNT(C.comment_ID) as count\n FROM $wpdb->posts as p \n join $wpdb->comments as C \n ON p.ID = C.comment_post_ID \n join $wpdb->commentmeta as M \n ON C.comment_ID = M.comment_id\n WHERE \n p.post_author = $employer_id\n AND p.post_status ='complete'\n AND p.post_type ='\" . PROJECT . \"' \n AND M.meta_key = 'et_rate'\n AND C.comment_type ='fr_review'\n AND C.comment_approved = 1\";\n \n $results = $wpdb->get_results($sql);\n \n if ($results) {\n wp_cache_set(\"reviews-{$employer_id}\", $results[0]->count);\n \n // update post rating score\n update_post_meta($profile_id, 'rating_score', $results[0]->rate_point);\n } else {\n update_post_meta($profile_id, 'rating_score', $rate);\n }\n\n // send mail to employer.\n $this->mail->review_employer_email($project_id);\n }", "public function reportComment() {\n $commentId = $this->request->getParameter(\"comId\");\n $postId = $this->request->getParameter(\"postId\");\n $this->comment->report($commentId);\n $this->redirect('Post','index/'.$postId);\n }", "public function commentAction() {\n $ses = new Application_Model_Session();\n $ses->startSession();\n {\n $request = $this->getRequest();\n $ExpId = $this->_getParam('expid');\n $form = new Campuswisdom_Form_Comment();\n $this->view->form = $form;\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($request->getPost())) {\n $mapper = new Campuswisdom_Model_ExpMapper();\n $Comment = $form->getValue(\"comment\");\n $mapper->setDbTable('campuswisdom_Model_DbTable_Comments');\n $smthn = $mapper->save($ExpId, $Comment);\n if ($smthn == null) {\n //an error occurred so nothing was saved\n } else {\n $ses->setSessionParameter('comnt', 1);\n }\n $this->_helper->redirector('viewcomments', 'exps', 'default', array('expid' => $ExpId));\n }\n }\n }\n }", "function ffeeeedd_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) {\n case 'pingback' :\n case 'trackback' :\n // On affiche différemment les trackbacks. ?>\n <li <?php comment_class(); ?>>\n <p><?php _e( 'Pingback :', 'ffeeeedd' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'ffeeeedd' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php break;\n default :\n // On passe aux commentaires standards.\n global $post; ?>\n <li itemscope itemtype=\"http://schema.org/UserComments\">\n <article role=\"article\">\n <header>\n <?php echo get_avatar( $comment, 44 );\n printf( '<cite itemprop=\"creator\">%1$s %2$s</cite>',\n get_comment_author_link(),\n ( $comment->user_id === $post->post_author ) ? '<small> (' . __( 'Post author', 'ffeeeedd' ) . ' ) </small>' : ''\n );\n printf( '<time datetime=\"%2$s\" itemprop=\"commentTime\">%3$s</time>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n sprintf( '%1$s à %2$s', get_comment_date(), get_comment_time() )\n ); ?>\n </header>\n\n <?php if ( '0' == $comment->comment_approved ) { ?>\n <p><?php _e( 'Your comment is awaiting moderation.', 'ffeeeedd' ); ?>.</p>\n <?php } ?>\n\n <div itemprop=\"commentText\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'ffeeeedd' ), '<p>', '</p>' ); ?>\n </div>\n\n <div class=\"reply\" itemprop=\"replyToUrl\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'ffeeeedd' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n </article>\n <?php break;\n }\n }", "public function adminModerateComments() {\n $coManager = new CommentsManager();\n $comments = $coManager->getComments();\n require ('src/View/admin/moderateComments.php');\n }", "protected function addComposerModeNotification() {}", "public function actionAjaxReview()\n {\n if(isset(Yii::app()->user->isCustomer)){\n if(isset($_POST['deal_id']) && isset($_POST['review'])){\n $userID = Yii::app()->user->userId;\n $reviewModel = new Reviews;\n $record = $reviewModel->findByAttributes(array('fkUserID'=>$userID,'fkDealID'=>$_POST['deal_id']));\n if(!count($record)>0){\n $reviewModel->fkUserID = $userID;\n $reviewModel->fkDealID = $_POST['deal_id'];\n $reviewModel->nickname = $_POST['nickname'];\n $reviewModel->reviewSubject = $_POST['summary'];\n $reviewModel->reviewContent = $_POST['review'];\n $reviewModel->reviewStatus = '0';\n $reviewModel->reviewAddDate = time();\n $reviewModel->save();\n echo \"Success\";\n }else{\n echo \"AlreadyReviewed\";\n }\n }\n }else{\n echo \"LoginPlease\";\n }\n }", "public function ajax_comment( $comment ) {\n\t\t$comment = wp_handle_comment_submission( wp_unslash( $_POST ) );\n\n\t\t$comment_post_id = isset( $_POST['comment_post_ID'] ) ? (int) $_POST['comment_post_ID'] : 0;\n\n\t\tif ( check_ajax_referer( 'ajax_nonce', 'security', false ) && ! is_wp_error( $comment ) && 0 !== $comment_post_id ) {\n\t\t\tob_start();\n\t\t\t/**\n\t\t\t * Set Cookies checkbox\n\t\t\t *\n\t\t\t * @since 3.2\n\t\t\t */\n\t\t\t$user = wp_get_current_user();\n\t\t\tif ( isset( $_POST['wp-comment-cookies-consent'] ) && 'yes' === $_POST['wp-comment-cookies-consent'] ) {\n\t\t\t\tdo_action( 'set_comment_cookies', $comment, $user );\n\t\t\t}\n\n\t\t\t// Set the globals, so our comment functions below will work correctly\n\t\t\t$GLOBALS['comment'] = $comment;\n\n\t\t\t$this->html5_comment( $comment, '1', array( 'avatar_size' => '48' ) );\n\n\t\t\twp_send_json_success( ob_get_clean() );\n\n\t\t} else {\n\t\t\t$error = intval( $comment->get_error_data() );\n\t\t\tif ( ! empty( $error ) ) {\n\t\t\t\twp_send_json_error( $comment->get_error_message() );\n\t\t\t}\n\t\t}\n\n\t\twp_die();\n\t}", "function vfhky_send_email($parent_id,$comment){\n $adminEmail = get_option('admin_email'); //取得博主的邮箱\n $parent_comment=get_comment($parent_id);//取得被回复者的所有信息\n $author_email=trim($comment->comment_author_email);//取得评论者的邮箱\n $to = trim($parent_comment->comment_author_email);//取得被回复者的邮箱\n $spam_confirmed = $comment->comment_approved;\n if ($spam_confirmed != 'spam') {\n $wp_email = 'no-reply@' . preg_replace('#^www\\.#', '', strtolower($_SERVER['SERVER_NAME'])); // \n $subject = '尊敬的 ' . trim(get_comment($parent_id)->comment_author) . ',您在 [' . get_option(\"blogname\") . '] 中的评论有了新的回复';\n$message = '<b>尊敬的:' . trim(get_comment($parent_id)->comment_author) . ' </b><br/>\n<HR style=\"FILTER: alpha(opacity=100,finishopacity=0,style=1)\" width=\"100%\" color=#987cb9 SIZE=3>\n<font style=\"margin:0px 0px 0px 25px;\">您之前在 [' . get_option(\"blogname\") . '] 中的一篇文章《' . get_the_title($comment->comment_post_ID) . '》上发表了如下评论:</font>\n<p style=\"background-color:#EEE;border: 1px solid #DDD; padding: 20px;margin: 6px 0px 20px 25px;\">'\n. nl2br(trim(get_comment($parent_id)->comment_content)). '\n</p>\n<b>回复人:' . trim($comment->comment_author) . ' </b><br/>\n<HR style=\"FILTER: alpha(opacity=100,finishopacity=0,style=1)\" width=\"100%\" color=#987cb9 SIZE=3>\n<font style=\"margin:0px 0px 0px 25px;\">给您的回复如下:</font><p style=\"background-color:#EEE;border: 1px solid #DDD; padding: 20px;margin: 6px 0px 20px 25px;\">'\n. nl2br(trim($comment->comment_content)) .\n' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style=\"text-decoration:none;\" href=\"' . htmlspecialchars(get_comment_link($parent_id,array(\"type\" => \"all\"))) . '\" target=\"_blank\">' .'[查看回复详情]</a></p>\n<b>获取博客最新资讯:</b><br/>\n<HR style=\"FILTER: alpha(opacity=100,finishopacity=0,style=1)\" width=\"100%\" color=#987cb9 SIZE=3>\n<p style=\"background-color:#EEE;border: 1px solid #DDD; padding: 20px;margin: 15px 0px 15px 25px;\">\n新浪微博:<a style=\"text-decoration:none;\" href=\"'.stripslashes(get_option('vfhky_sinamblog')).'\" target=\"_blank\">'.stripslashes(get_option('vfhky_sinamblog')).'</a><br/>\n腾讯微博:<a style=\"text-decoration:none;\" href=\"'.stripslashes(get_option('vfhky_qqmblog')).'\" target=\"_blank\">'.stripslashes(get_option('vfhky_qqmblog')).'</a><br/>\nQQ邮箱订阅:<a style=\"text-decoration:none;\" href=\"http://mail.qq.com/cgi-bin/feed?u='.get_option(\"siteurl\").'/feed\" target=\"_blank\">http://mail.qq.com/cgi-bin/feed?u='.get_option(\"siteurl\").'/feed</a><br/>\nGitHub源码:<a style=\"text-decoration:none;\" href=\"https://github.com/vfhky/vfhky\" target=\"_blank\">WordPress主题[vfhky]</a><br/>\n</p>\n\n<div align=\"center\">感谢您对 <a href=\"'.get_option(\"siteurl\").'\" target=\"_blank\">黄克业的博客</a> 的支持!<br/>任何疑问,敬请访问 <a href=\"'.get_option(\"siteurl\").'/contact\" target=\"_blank\">'.get_option(siteurl).'/contact</a><br/>\nCopyright &copy;2012-'.date(\"Y\").' All Rights Reserved</div>';\n\t\t $message = convert_smilies($message);\n $from = \"From: \\\"\" . get_option('blogname') . \"\\\" <$wp_email>\";\n $headers = \"$from\\nContent-Type: text/html; charset=\" . get_option('blog_charset') . \"\\n\";\n wp_mail( $to, $subject, $message, $headers );\n }\n }", "public function report_comment(){\r\n\t\t\r\n\t\t/* Require user. */\r\n\t\tif (!$this->_requireUser('Please sign in to report a comment.')){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/* Get arguments */\r\n\t\t$commentId = Request::getInt('comment');\r\n\t\t\r\n\t\t/* Report object. */\r\n\t\tif ($this->report('comment', $commentId)){\r\n\t\t\t$message = $this->report_comment_success_message();\r\n\t\t\t$messageType = 'info';\r\n\t\t} else {\r\n\t\t\t$message = $this->report_comment_failure_message();\r\n\t\t\t$messageType = 'error';\r\n\t\t}\r\n\r\n\t\t/* Tidy up */\r\n\t\tMessages::addMessage($message, $messageType);\r\n\t\treturn $this->_redirect($this->get_redirect_page());\r\n\r\n\t}", "function notify_new_comment($id){\n\t\t// nactu si comment\n\t\t$comment = $this->find('first', array(\n\t\t\t'conditions' => array('Comment.id' => $id),\n\t\t\t'contain' => array()\n\t\t));\n\t\t// natahnu si mailovaci skript\n\t\tApp::import('Vendor', 'PHPMailer', array('file' => 'class.phpmailer.php'));\n\t\t$mail = new PHPMailer();\n\t\t\n\t\t// uvodni nastaveni\n\t\t$mail->CharSet = 'utf-8';\n\t\t$mail->Hostname = CUST_ROOT;\n\t\t$mail->Sender = 'no-reply@sportnutrition.cz';\n\t\t\n\t\t// nastavim adresu, od koho se poslal email\n\t\t$mail->From = 'no-reply@sportnutrition.cz';\n\t\t$mail->FromName = \"sportnutrition.cz\";\n\t\t\n//\t\t$mail->AddReplyTo(CUST_MAIL, CUST_NAME);\n\n\t\t$mail->AddAddress(CUST_MAIL, CUST_NAME);\n//\t\t$mail->AddBCC(\"vlado@tovarnak.com\", \"Vlado Tovarnak\");\n\t\t\n\t\t$mail->Subject = 'E-SHOP (' . CUST_ROOT . ') - NOVÝ DOTAZ';\n\t\t$mail->Body = 'Právě byl položen nový dotaz.' . \"\\n\\n\";\n\t\t$mail->Body .= $comment['Comment']['subject'] . \"\\n\";\n\t\t$mail->Body .= $comment['Comment']['author'] . ' - ' . $comment['Comment']['email'] . \"\\n\";\n\t\t$mail->Body .= $comment['Comment']['body'] . \"\\n\\n\";\n\t\t$mail->Body .= 'Spravovat jej můžete zde: http://www.' . CUST_ROOT . '/admin/comments/edit/' . $id . \"\\n\";\n\n\t\treturn $mail->Send();\n\t}", "private function sendSolutionComment($solution, Comment $comment): bool {\n if ($comment->isPrivate()) {\n // comment was private, therefore do not send email to others\n return true;\n }\n\n $baseSolution = $solution->getSolution();\n $recipients = [];\n if ($baseSolution->getAuthor() !== null) {\n $recipients[$baseSolution->getAuthor()->getEmail()] = $baseSolution->getAuthor();\n }\n\n foreach ($comment->getThread()->findAllPublic() as $pComment) {\n $user = $pComment->getUser();\n if ($user !== null) {\n $recipients[$user->getEmail()] = $user;\n }\n }\n\n // filter out the author of the comment, it is pointless to send email to that user\n unset($recipients[$comment->getUser()->getEmail()]);\n\n // filter out users which do not have allowed sending these kind of emails\n $recipients = array_filter($recipients, function (User $user) {\n return $user->getSettings()->getSolutionCommentsEmails();\n });\n\n if (count($recipients) === 0) {\n return true;\n }\n\n return $this->localizationHelper->sendLocalizedEmail(\n $recipients,\n function ($toUsers, $emails, $locale) use ($solution, $comment) {\n if ($solution instanceof AssignmentSolution) {\n $result = $this->createAssignmentSolutionComment($solution, $comment, $locale);\n } else {\n $result = $this->createReferenceSolutionComment($solution, $comment, $locale);\n }\n\n // Send the mail\n return $this->emailHelper->send(\n $this->sender,\n [],\n $locale,\n $result->getSubject(),\n $result->getText(),\n $emails\n );\n }\n );\n }", "public function processCommentModeration($sAction, $iId)\n\t{\t\tif ($sAction == 'approve')\n\t\t{\n\t\t\t// Update the blog comment count\n\t\t\tPhpfox::getService('photo.process')->updateCounter($iId, 'total_comment');\n\t\t\t\n\t\t\t// Get the blogs details so we can add it to our news feed\n\t\t\t$aPhoto = $this->database()->select('u.full_name, u.user_id, u.user_name, p.title_url, p.destination, ct.text_parsed, p.album_id, pa.name_url AS album_url, c.comment_id, c.user_id AS comment_user_id')\t\t\t\n\t\t\t\t->from($this->_sTable, 'p')\t\t\t\t\t\t\t\t\n\t\t\t\t->join(Phpfox::getT('comment'), 'c', 'c.type_id = \\'photo\\' AND c.item_id = p.photo_id')\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.user_id = c.user_id')\n\t\t\t\t->join(Phpfox::getT('comment_text'), 'ct', 'ct.comment_id = c.comment_id')\n\t\t\t\t->leftJoin(Phpfox::getT('photo_album'), 'pa', 'pa.album_id = p.album_id')\n\t\t\t\t->where('p.photo_id = ' . (int) $iId)\n\t\t\t\t->execute('getSlaveRow');\n\t\t\t\t\n\t\t\t// Add to news feed\n\t\t\t(Phpfox::isModule('feed') ? Phpfox::getService('feed.process')->add('comment_photo', $iId, $aPhoto['text_parsed'], Phpfox::getUserBy('user_name'), $aPhoto['user_id'], $aPhoto['full_name'], $aPhoto['destination'], $aPhoto['comment_id']) : null);\n\t\t\t\n\t\t\t// Send the user an email\t\t\t\n\t\t\t$sLink = ($aPhoto['album_id'] ? Phpfox::getLib('url')->makeUrl(Phpfox::getUserBy('user_name'), array('photo', $aPhoto['album_url'], $aPhoto['title_url'])) : Phpfox::getLib('url')->makeUrl(Phpfox::getUserBy('user_name'), array('photo', 'view', $aPhoto['title_url'])));\t\t\t\t\t\n\t\t\t\n\t\t\tPhpfox::getLib('mail')->to($aPhoto['comment_user_id'])\n\t\t\t\t->subject(array('photo.full_name_approved_your_comment_on_site_title', array('full_name' => Phpfox::getUserBy('full_name'), 'site_title' => Phpfox::getParam('core.site_title'))))\n\t\t\t\t->message(array('photo.full_name_approved_your_comment_on_site_title_message', array(\n\t\t\t\t\t\t\t'full_name' => Phpfox::getUserBy('full_name'),\n\t\t\t\t\t\t\t'site_title' => Phpfox::getParam('core.site_title'),\n\t\t\t\t\t\t\t'link' => $sLink\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t->notification('comment.approve_new_comment')\n\t\t\t\t->send();\n\t\t}\n\t}", "public function _action_wp_insert_comment( $comment_id, $comment ) {\n\n\t\tif ( ! post_type_supports( get_post_type( $comment->comment_post_ID ), $this->supports_feature_name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/** @var int $post_id */\n\t\t$post_id = $comment->comment_post_ID;\n\t\t/** @var int $user_id */\n\t\t$user_id = $comment->user_id;\n\n\t\t/** validate (decide if allow to create feedback) */\n\t\tdo {\n\t\t\t$allow = true;\n\n\t\t\tif ( ! $this->user_bought_product( $post_id, $user_id ) ) {\n\t\t\t\t// cheater, does not bought product, but tries to post comment with injected form in html\n\t\t\t\t$allow = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t/** to prevent the creation of responses to feedback */\n\t\t\tif ($comment->comment_parent != 0) {\n\t\t\t\t$allow = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while ( false );\n\n\n\t\t$allow = apply_filters( 'fw_ext_feedback_allow_create', $allow, array(\n\t\t\t'feedback_id' => $comment_id,\n\t\t\t'post_id' => $post_id,\n\t\t\t'user_id' => $user_id,\n\t\t\t'comment' => $comment\n\t\t) );\n\n\t\tif ( ! $allow ) {\n\t\t\t// delete this comment\n\t\t\twp_delete_comment( $comment_id, true );\n\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * remove previous comments by this user on this post, only last feedback is saved\n\t\t * user is allowed to have only one feedback per post\n\t\t */\n\t\tif (apply_filters('fw:ext:feedback:remove-previous-comments', true, array(\n\t\t\t'post_id' => $post_id,\n\t\t\t'comment' => $comment,\n\t\t))) {\n\t\t\tforeach (\n\t\t\t\tget_comments(array(\n\t\t\t\t\t'post_id' => $post_id,\n\t\t\t\t\t'author_email' => $comment->comment_author_email\n\t\t\t\t)) as $cmnt\n\t\t\t) {\n\t\t\t\t/** @var object $cmnt */\n\t\t\t\tif ($comment_id != $cmnt->comment_ID) { // do not delete current comment\n\t\t\t\t\twp_delete_comment($cmnt->comment_ID, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/** everything is ok, tell sub-modules to save other inputs values (feedback-stars, etc.) */\n\n\t\tdo_action( 'fw_ext_feedback_insert', $comment_id, array(\n\t\t\t'active' => is_numeric( $comment->comment_approved ) && $comment->comment_approved == 1,\n\t\t\t'post_id' => $post_id,\n\t\t\t'user_id' => $user_id\n\t\t) );\n\t}", "static function comment_post($id_comment){\n if(!(($id_user = PDOQueries::get_post_publisher_id_by_comment($id_comment)) > 0) || !(($id_post = PDOQueries::get_post_id_by_comment($id_comment)) > 0) || !(($id_publisher = PDOQueries::get_publisher_id($id_post)) > 0))\n throw new \\PersonalizeException(2001);\n $marker = '{comment_post}{id_publisher/'.$id_user.'}';\n $link = 'index.php?'.Navigation::$navigation_marker.'='.Timeline::$post_id_page.'#'.$id_post.$id_comment;\n return PDOQueries::add_notification($id_publisher,$marker,$link);\n }", "function add_comment($comment, $obj_id, $reply_to = NULL) {\n global $myquery, $db;\n\n if (!$this->topic_exists($obj_id))\n e(lang(\"grp_tpc_err4\"));\n else {\n $owner = $this->get_group_owner_from_topic($obj_id);\n $add_comment = $myquery->add_comment($comment, $obj_id, $reply_to, 't', $owner);\n if ($add_comment) {\n //Loggin Comment\t\t\t\n $log_array = array\n (\n 'success' => 'yes',\n 'details' => \"comment on a topic\",\n 'action_obj_id' => $obj_id,\n 'action_done_id' => $add_comment,\n );\n insert_log('topic_comment', $log_array);\n\n //Updating Number of comments of topics\n $this->update_comments_count($obj_id);\n }\n return $add_comment;\n }\n }", "public function testCreateComment() {\n // Find any active product\n $product = ShopProduct::model()->published()->find();\n $this->assertTrue($product instanceof ShopProduct);\n\n $email = 'tester@localhost.loc';\n $text = 'this is test comment' . microtime();\n\n // Open product page and post comment\n $this->open(Yii::app()->createAbsoluteUrl('/shop/product/view', array('seo_alias' => $product->seo_alias)));\n $this->type('id=Comment_name', 'tester');\n $this->type('id=Comment_email', $email);\n $this->type('id=Comment_text', $text);\n $this->clickAndWait(\"//input[@value='Отправить']\");\n\n $this->open(Yii::app()->createAbsoluteUrl('/shop/product/view', array('seo_alias' => $product->seo_alias)));\n $this->assertTrue($this->isTextPresent('Ваш комментарий успешно добавлен. Он будет опубликован после проверки администратором.'));\n\n $this->adminLogin();\n $this->open('/admin/shop/products/update?id=' . $product->id);\n $this->click('xpath=//a[contains(.,\"Отзывы\")]');\n $this->assertTrue($this->isTextPresent($email));\n $this->assertTrue($this->isTextPresent($text));\n }", "static public function comment_submission() {\n ?>\n\n /**\n * Déclenchement d'événements Google analytics lors de la soumission\n * d'un commentaire.\n *\n * source https://felix-arntz.me/blog/customizing-google-analytics-configuration-site-kit-plugin/\n */\n $('#commentform input[type=\"submit\"]').on('click',function(){\n console.log('SFP: Comment submited');\n if(typeof gtag=='function'){\n gtag('event','Commentaire',{\n 'event_category':'Implication',\n 'event_label':window.location.href\n });\n }\n });\n\n <?php\n }", "public function controllerActionPredispatch($observer)\n {\n // Run the feed\n Mage::getModel('googleplusone/feed')->updateIfAllowed();\n }", "public function setAllowSendToCustomer($var)\n {\n GPBUtil::checkBool($var);\n $this->allow_send_to_customer = $var;\n }", "public function setComentCreator($value)\n {\n $this->commentCreator=$value;\n }", "function wp_ajax_replyto_comment($action)\n {\n }", "function scheduleNewFeedbackAlert(User $owner, Business $business, Customer $customer) {\n $receivers = array();\n list($sendToManagers, $sendToAccountOwner, $sendToBusinessOwner) = $business->getNotifications();\n\n if ($sendToManagers) {\n $businessManageService = $this->container->get('e2w_business_manage_service');\n foreach ($businessManageService->getManagersSimplified($business->getId()) as $businessManager) {\n if (!in_array($businessManager['email'], $receivers)) {\n $receivers[] = strtolower($businessManager['email']);\n }\n }\n }\n\n if ($sendToAccountOwner) {\n $ownerAgent = $this->readRepo('E2wGetStarsBundle:User')->findOneBy(array(\n 'id' => $business->getAgentId()\n ));\n if ($ownerAgent && !in_array($ownerAgent->getEmail(), $receivers)) {\n $receivers[] = strtolower($ownerAgent->getEmail());\n }\n }\n if ($sendToBusinessOwner) {\n if (isset($owner) && intval($owner->getId()) === intval($business->getUserId())) {\n $businessOwner = $owner;\n } else {\n $businessOwner = $this->readRepo('E2wGetStarsBundle:User')->findOneBy(array(\n 'id' => $business->getUserId()\n ));\n }\n if ($businessOwner && !in_array($businessOwner->getEmail(), $receivers)) {\n $receivers[] = strtolower($businessOwner->getEmail());\n }\n }\n\n $this->disableAlertsForSpecifiedEmails($receivers);\n\n $tasks = array();\n foreach ($receivers as $receiver) {\n $tasks[] = array(\n 'receiver' => $receiver\n );\n }\n\n try {\n $delay = $this->container->getParameter('alert_delay_s');\n } catch (\\Exception $ex) {\n $delay = 5 * 60;\n }\n $this->addToQueue($customer->getId(), 'alert', $delay, $tasks);\n }", "function sendNotificationEmail($kind, $name, $email, $picture_id)\n{\n if ($kind == \"comment\")\n {\n $subject = 'New comment on your picture!';\n $sentence_1 = 'Someone left a comment on your picture! ';\n }\n\n $to = $email;\n $message = '\n \n Hello '.$name.'!\n '.$sentence_1.'\n \n Click here to check it:\n http://localhost:8100//index.php?view=picture&id='.$picture_id.'\n \n ';\n \n $headers = 'From:noreply@camagru.com' . \"\\r\\n\";\n mail($to, $subject, $message, $headers);\n}", "function wpachievements_wordpress_comment_app($cid){\r\n if( !empty($cid) ){\r\n $cdata = get_comment($cid);\r\n if( $cdata->user_id ){\r\n $uid=$cdata->user_id; $postid='';\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $comm_count = (int)get_blog_option(1, 'wpachievements_comm_min_count');\r\n $comm_deduct = (int)get_blog_option(1, 'wpachievements_comm_min_deduct');\r\n } else{\r\n $comm_count = (int)get_option('wpachievements_comm_min_count');\r\n $comm_deduct = (int)get_option('wpachievements_comm_min_deduct');\r\n }\r\n if( !empty($comm_count) && $comm_count > 0 ){\r\n if( str_word_count($cdata->comment_content) >= $comm_count ){\r\n $type='comment_added';\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_comment_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_comment_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, $points);\r\n } else{\r\n $type='comment_added_bad';\r\n if( !empty($comm_deduct) && $comm_deduct > 0 ){\r\n $points=$comm_deduct;\r\n } else{\r\n $points=0;\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, -$points);\r\n }\r\n } else{\r\n $type='comment_added';\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_comment_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_comment_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, $points);\r\n }\r\n }\r\n }\r\n }", "protected function updateCommentForUpdatableVersionsAction() {}", "protected function SaveActionIdToComment()\n {\n $sActionId = TTools::GetUUID();\n $this->sqlData['action_id'] = $sActionId;\n $this->AllowEditByAll(true);\n $this->Save();\n $this->AllowEditByAll(false);\n }", "public function commentaireAction(){\n\t\t\t$mode \t\t= \"backend\";\n\t\t\t$action = @$_GET['action']; \n\t\t\t$this->cmt->setIdentifiant(@$_GET['idcom']);\n\t\t\t\n\t\t\tswitch($action){\n\t\t\t\tcase \"reset\"; \n\t\t\t\t\t$commentaires = $this->com->resetReport($this->cmt);\n\t\t\t\t\tbreak; \t\n\t\t\t\t\t\n\t\t\t\tcase \"delete\"; \n\t\t\t\t\t$commentaires = $this->com->deleteComment($this->cmt); \n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"valide\"; \n\t\t\t\t\t$commentaires = $this->com->confirmComment($this->cmt); \n\t\t\t\t\tbreak; \t\n\t\t\t\t\t\t\n\t\t\t\tdefault;\n\t\t\t\t\t$this->cmt->setNbrReport(@$_POST['valRprt']);\n\t\t\t\t\t$mode = \"frontend\";\n\t\t\t\t\t$commentaires = $this->com->reportComment($this->cmt); \n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo $this->info->resultAff(\"commen\", \"commentaires\", $commentaires, $mode);\n\t\t}", "public function sendNotification($template, $data, $ticket, $notification_owner, $subject, $type)\n {\n /**\n * @var User\n */\n $to = null;\n\n if ($type != 'agent') {\n $to = $ticket->user;\n\n if ($ticket->user->email != $notification_owner->email) {\n $to = $ticket->user;\n }\n\n if ($ticket->agent->email != $notification_owner->email) {\n $to = $ticket->agent;\n }\n } else {\n $to = $ticket->agent;\n }\n\n $queue_emails = TicketsHelper::getDefaultSetting('email.template', '0')->value;\n $mail = new TicketitNotification($template, $data, $notification_owner, $subject);\n try {\n if ($queue_emails == 1) {\n Mail::to($to)->queue($mail);\n } else {\n Mail::to($to)->send($mail);\n }\n } catch (\\Exception $e) {\n //\n }\n }", "function wpachievements_wordpress_comment($cid, $status){\r\n if( !empty($cid) ){\r\n $cdata = get_comment($cid);\r\n if( $cdata->user_id ){\r\n if($status == 1){\r\n $uid=$cdata->user_id; $postid='';\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $comm_count = (int)get_blog_option(1, 'wpachievements_comm_min_count');\r\n $comm_deduct = (int)get_blog_option(1, 'wpachievements_comm_min_deduct');\r\n } else{\r\n $comm_count = (int)get_option('wpachievements_comm_min_count');\r\n $comm_deduct = (int)get_option('wpachievements_comm_min_deduct');\r\n }\r\n if( empty($comm_count) || $comm_count < 1 ){\r\n $comm_count = 1;\r\n }\r\n if( !empty($comm_count) ){\r\n if( str_word_count($cdata->comment_content) >= $comm_count ){\r\n $type='comment_added';\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_comment_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_comment_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, $points);\r\n } else{\r\n $type='comment_added_bad';\r\n if( !empty($comm_deduct) && $comm_deduct > 0 ){\r\n $points=$comm_deduct;\r\n } else{\r\n $points=0;\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, -$points);\r\n }\r\n } else{\r\n $type='comment_added';\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_comment_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_comment_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, $points);\r\n }\r\n }\r\n }\r\n }\r\n }" ]
[ "0.61347336", "0.6011406", "0.6006832", "0.5979806", "0.5773998", "0.56954956", "0.5688316", "0.5675263", "0.56726664", "0.5563218", "0.5540818", "0.5522766", "0.54995453", "0.54784584", "0.5454999", "0.5442764", "0.5426384", "0.5398721", "0.53564155", "0.53216", "0.53007823", "0.5298702", "0.52742004", "0.5269526", "0.52557564", "0.5254488", "0.5238664", "0.52127016", "0.51922214", "0.51904285", "0.5175732", "0.5166529", "0.5158149", "0.5141146", "0.51220995", "0.51167417", "0.511235", "0.5112081", "0.5112081", "0.507054", "0.5063108", "0.5053575", "0.5053496", "0.50454223", "0.50423723", "0.5023641", "0.50103277", "0.50014263", "0.49983257", "0.49979433", "0.49953625", "0.4993228", "0.49908015", "0.49886426", "0.4962866", "0.49605453", "0.49576473", "0.4949075", "0.49436992", "0.49416912", "0.4938975", "0.49304393", "0.49186176", "0.49156043", "0.4900879", "0.48955908", "0.48919782", "0.48892355", "0.48884225", "0.48829684", "0.48760474", "0.48635918", "0.48591033", "0.48507318", "0.4845243", "0.48405096", "0.48314598", "0.48220745", "0.48210907", "0.48154366", "0.4800721", "0.4790918", "0.47908536", "0.47877416", "0.4786649", "0.4784761", "0.47833627", "0.47811344", "0.47799832", "0.47731388", "0.47656333", "0.47611156", "0.47604933", "0.47568443", "0.47563535", "0.47522125", "0.47495365", "0.47479314", "0.47471416", "0.4741932" ]
0.6966325
0
Get owner email for comment notification.
protected function GetSendReviewCommentNotificationEmail() { $sSendReviewCommentNotificationEmail = ''; if (!empty($this->fieldAuthorEmail)) { $sSendReviewCommentNotificationEmail = $this->fieldAuthorEmail; } elseif (!empty($this->fieldDataExtranetUserId)) { $oAuthor = TdbDataExtranetUser::GetNewInstance(); if ($oAuthor->Load($this->fieldDataExtranetUserId)) { $sSendReviewCommentNotificationEmail = $oAuthor->GetUserEMail(); } } return $sSendReviewCommentNotificationEmail; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_comment_author_email($comment_id = 0)\n {\n }", "public function getOwnerMail(): ?Mail\n {\n\n return $this->ownerMail;\n\n }", "function wp_get_unapproved_comment_author_email()\n {\n }", "public function getEmailAttribute()\n {\n return $this->owner->email;\n }", "public function getOwner()\n {\n return isset($this->owner) ? $this->owner : '';\n }", "public function getAuthorEmail()\n {\n if ($this->Email) {\n return $this->Email;\n } elseif ($author = $this->Author()) {\n return $author->Email;\n }\n }", "public function getOwner()\n {\n return $this->data['owner'];\n }", "function getOwner() {\n $user =& Element_Factory::makeElement( 'Bm_Users' );\n $user->get( $this->author );\n\n return $user->login;\n }", "public function getAuthorEmail()\n\t{\n\t\tif(is_null($this->_authorEmail)){\n\t\t\t$this->loadData();\n\t\t}\n\t\treturn $this->_authorEmail;\n\t}", "public function getOwner()\n\t{\n\t\treturn $this->getObject('owner', null, 'user');\n\t}", "public function notificationEmailAddress()\n {\n $notification_email = $this->getNotificationChannel('mail')['settings']['email'] ?? null;\n\n return $notification_email ?? $this->email;\n }", "public function getOwner(): string\n {\n return $this->owner;\n }", "public function getOwner()\n {\n return isset($this->owner) ? $this->owner : null;\n }", "public function getAuthorEmail(){\n return $this->AUTHOR_EMAIL;\n }", "function comment_author_email($comment_id = 0)\n {\n }", "public function getOwner()\n {\n if (array_key_exists(\"owner\", $this->_propDict)) {\n return $this->_propDict[\"owner\"];\n } else {\n return null;\n }\n }", "protected function get_owner_id()\n {\n return $this->owner_id;\n }", "public function getOwner()\n {\n return $this->owner;\n }", "public function getOwner()\n {\n return $this->owner;\n }", "public function getOwner()\n {\n return $this->owner;\n }", "public function get_owner_id()\n {\n return $this->get_default_property(self::PROPERTY_OWNER_ID);\n }", "public function getReminderEmail()\n\t{\n\t\treturn $this->username;\n }", "protected function getEmail()\n {\n return $this->checkoutSession->getLastRealOrder()->getBillingAddress()->getEmail();\n }", "public function getowner_id()\n {\n return $this->owner_id;\n }", "public function getOwner() {\n\t\treturn $this->owner;\n\t}", "function getOwnerIdentifier()\n {\n return $this->ownerIdentifier;\n }", "public function getEmailAddress()\n {\n return $this->_checkoutSession->getLastRealOrder()->getCustomerEmail();\n }", "public function getEmailAddress()\n {\n $credential = $this->getCredentialObject();\n if($credential->isOAuthRequest())\n return $credential->getEmailFromOAuth();\n else\n return $this->session->get('email');\n }", "public function getOwnerId()\n {\n return $this->owner_id;\n }", "public function getOwnerId()\n {\n return $this->owner_id;\n }", "function get_owner()\n {\n return $this->get_default_property(self :: PROPERTY_OWNER);\n }", "public function getOwnerID() {\n\t\treturn $this->owner_id;\n\t}", "protected function _getContactOwner()\n {\n return $this->params['name'];\n }", "public function get_author_email()\n\t{\n\t\treturn '';\n\t}", "public function getOwnerId()\n {\n return $this->user_id;\n }", "public function GrabEmailFromComment()\n\t{\n\t\tif ($_POST['gr_comment_checkbox'] == 1 AND isset($_POST['email']))\n\t\t{\n\t\t\tif ($this->grApiInstance)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $_POST['author'], $_POST['email']);\n\t\t\t}\n\t\t}\n\t\telse if ($_POST['gr_comment_checkbox'] == 1 && is_user_logged_in())\n\t\t{\n\t\t\t$current_user = wp_get_current_user();\n\t\t\t$name = $current_user->user_firstname . ' ' . $current_user->user_lastname;\n\t\t\tif (strlen(trim($name)) > 1)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $current_user->user_email);\n\t\t\t}\n\t\t}\n\t}", "public function getCustomerEmail()\n {\n if ( ($this->getCustomerOrNot()) && (is_object($this->getCustomer())) ) {\n //Online Customer\n return $this->getCustomer()->getEmail();\n } elseif (is_object($this->getCustomerPotential())) {\n return $this->getCustomerPotential()->getEmail();\n }\n\n return '';\n }", "public function getOwner()\n {\n return $this->_owner;\n }", "public function getEmail()\n\t{\n\t\treturn $this->correo;\n\t}", "public function getOwner() {\r\n return $this->owner;\r\n }", "public function getNotificationEmail() {}", "public function getCreatedBy()\n {\n if (array_key_exists(\"createdBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\EmailIdentity\") || is_null($this->_propDict[\"createdBy\"])) {\n return $this->_propDict[\"createdBy\"];\n } else {\n $this->_propDict[\"createdBy\"] = new EmailIdentity($this->_propDict[\"createdBy\"]);\n return $this->_propDict[\"createdBy\"];\n }\n }\n return null;\n }", "public function getEmail()\n {\n return $this->getValue('nb_icontact_prospect_email');\n }", "public function getOwner()\n {\n return $this->get(self::_OWNER);\n }", "public function getOwnerNameAttribute()\n {\n return $this->user->{config('forum.user.username')};\n }", "function getOwner() {\n \n return $this->principalInfo['uri'];\n \n }", "public function getOwner() {\n // no need to check whether exist because of database constrain\n return User::getUserById($this->owner_id);\n }", "public function getOwner(): User\n {\n return $this->owner;\n }", "public function getEmail() {\r\n\t\t\t$email = null;\r\n\t\t\tif( $user != null ) {\r\n\t\t\t\t$email = $user->getEmail();\r\n\t\t\t}\r\n\t\t\treturn $email;\r\n\t\t}", "function GetAuthorEmail()\n {\n return 'rob@techcom.dyndns.org';\n }", "public function getUserEmail()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_EMAIL);\n }", "public function getOwnerGUID() {\n\t\treturn $this->owner_guid;\n\t}", "protected function getOwnerName() {\n $owner_name = 'user';\n return $owner_name;\n }", "public function getUserId() {\n\t\treturn (string) $this->photo->owner['nsid'];\n\t}", "public function getEmail()\n {\n return $this->__get(\"email\");\n }", "public function getEmail()\n {\n return isset($this->user['email']) ? $this->user['email'] : $this->user['id'].'@mail.com';\n }", "function bd_get_author($comment) {\n\t\t$author ='';\n\n\t\tif ( empty($comment->comment_author) )\n\t\t\t$author = __('Anonymous', 'wolf');\n\t\telse\n\t\t\t$author = $comment->comment_author;\n\n\t\treturn $author;\n\t}", "public function getOwnerId()\n {\n return $this->_OwnerId;\n }", "public function getEmail() {\n\t\treturn empty( $this->container['emails'] ) ? null : $this->container['emails'][0];\n\t}", "public function getAdminEmailSender ()\n {\n $emailSender = $this->scopeConfig->getValue(\n 'b2bregistration/admin_notification/admin_email_sender',\n ScopeInterface::SCOPE_STORE\n );\n return $emailSender;\n }", "public function getAssigneeEmail();", "public function getCustomerEmail(){\n return $this->_getData(self::CUSTOMER_EMAIL);\n }", "public function getOwnerNotes()\n {\n $node = $this->getXml()->getElementsByTagName('OwnerNotes');\n if ($node->length) {\n return $node->item(0)->nodeValue;\n }\n return null;\n }", "public function getEmail(): string\n\t{\n\t\treturn $this->email->getEmail();\n\t}", "function get_the_author_email()\n {\n }", "public function getCommentCreator()\n {\n return $this->commentCreator;\n }", "public function getEmailAddress()\n {\n return $this->_getVar('user_email');\n }", "public function getOwner() {\n\t\telgg_deprecated_notice(\"ElggExtender::getOwner deprecated for ElggExtender::getOwnerGUID\", 1.8);\n\t\treturn $this->getOwnerGUID();\n\t}", "protected function get_session_email_address() {\n\t\t// if we are in update_order_review, the entered email is in the post_data string.\n\t\t// as WooCommerce does not update the email on the customer.\n\t\t$sanitized_post_data = wp_verify_nonce( isset( $_POST['post_data'] ) );\n\n\t\tif ( isset( $sanitized_post_data ) ) {\n\t\t\t$post_data = array();\n\t\t\t\twp_parse_str( $sanitized_post_data, $post_data );\n\t\t\tif ( ! empty( $post_data['billing_email'] ) && is_email( $post_data['billing_email'] ) ) {\n\t\t\t\treturn sanitize_email( $post_data['billing_email'] );\n\t\t\t}\n\t\t}\n\n\t\t$customer = WC()->customer;\n\t\tif ( ! is_null( $customer ) ) {\n\t\t\tif ( ! empty( $customer->get_billing_email() ) ) {\n\t\t\t\treturn $customer->get_billing_email();\n\t\t\t}\n\t\t}\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$user = wp_get_current_user();\n\t\t\treturn $user->get( 'user_email' );\n\t\t}\n\n\t\treturn null;\n\t}", "public static function getAuthorAvatar($comment)\n {\n if ($comment->user_id !== null) {\n $avatar = getGravatar($comment->user->email);\n } else {\n $avatar = getGravatar($comment->author_email);\n }\n return $avatar;\n }", "public function getCommentProfileUserName() {\n\t\treturn ($this->commentProfileUserName);\n\t}", "public function getCustomerEmail()\n {\n return $this->customerEmail;\n }", "public function getEmail() {\n return $this->get('email', 'user');\n }", "public function getCustomerEmailAddress()\n {\n if (array_key_exists(\"customerEmailAddress\", $this->_propDict)) {\n return $this->_propDict[\"customerEmailAddress\"];\n } else {\n return null;\n }\n }", "public function getBuyerEmail() {\n return $this->params[\"original\"][\"buyer_email\"];\n }", "public function getReminderEmail()\n\t{\n\t\treturn $this->user_email;\n\t}", "public function email()\n {\n return $this->emails && isset($this->emails[0])\n ? $this->emails[0] : null;\n }", "public function getOwnerusername() {}", "function getOwner() \n {\n return $this->instance->getOwner();\n }", "public function getEmailForUserUpdate(): ?string\n {\n return $this->get(\"email\");\n }", "public function getReplenishmentOwnerDescription()\n {\n return $this->replenishmentOwnerDescription;\n }", "public function getEmail()\n {\n return $this->attributes['email'] ?? null;\n }", "public function oOwner(){\n\t\tif(is_null($this->__oOwner)){\n $this->__oOwner = CUser::oGetUser($this->__iOwnerNo);\n }\n return $this->__oOwner;\n\t}", "public function author()\n {\n if ($this->user_id) {\n $field = config(\"binshopsblog.comments.user_field_for_author_name\",\"name\");\n return optional($this->user)->$field;\n }\n\n return $this->author_name;\n }", "public function getCustomerEmailSender ()\n {\n $customerEmailSender = $this->scopeConfig->getValue(\n 'b2bregistration/email_setting/customer_email_sender',\n ScopeInterface::SCOPE_STORE\n );\n return $customerEmailSender;\n }", "public function getEmail()\r\n {\r\n if ($this->getChatHelper()->allowEmail() && strlen(Mage::helper('customer')->getCurrentCustomer()->getEmail()) > 0) {\r\n return \"\\$zopim.livechat.setEmail('\" . $this->jsQuoteEscape(Mage::helper('customer')->getCurrentCustomer()->getEmail()) . \"');\" . \"\\n\";\r\n }\r\n return null;\r\n }", "public function getEmail() {\n return $this->getValue('email');\n }", "public function getUserEmail()\n {\n return $this->user_email;\n }", "public function getUserEmail()\n {\n return $this->user_email;\n }", "public function getEmailForPasswordReset()\n {\n return $this->attributes['cu_email'];\n }", "public function getUserEmail() {\n\t\treturn $this->userEmail;\n\t}", "public function getUserEmail() {\n\t\treturn $this->userEmail;\n\t}", "public function getDeviceOwnerUserPrincipalName()\n {\n if (array_key_exists(\"deviceOwnerUserPrincipalName\", $this->_propDict)) {\n return $this->_propDict[\"deviceOwnerUserPrincipalName\"];\n } else {\n return null;\n }\n }", "public function getOwner()\n {\n return $this->hasOne(User::className(), ['id' => 'owner_id']);\n }", "public function getEmail()\n {\n return $this->get(self::EMAIL);\n }", "function getEmail() {\n\t\treturn $this->getData('email');\n\t}", "public function getEmail()\n {\n return $this->getAttribute('email');\n }", "public function getOwnerEntity() {\n\t\treturn get_entity($this->owner_guid);\n\t}", "public function getReminderEmail() {\r\n return $this -> email;\r\n }", "public function getOwner(): User\n {\n return $this->user;\n }" ]
[ "0.70286125", "0.6900428", "0.68679017", "0.6679677", "0.6670162", "0.6561274", "0.65531385", "0.6545833", "0.6483115", "0.6455202", "0.64541125", "0.645371", "0.6383405", "0.63832206", "0.635241", "0.6333773", "0.63196176", "0.6281746", "0.6281746", "0.6281746", "0.62696075", "0.6267815", "0.6264599", "0.6257066", "0.6226255", "0.6216092", "0.6215475", "0.6214627", "0.6213262", "0.6213262", "0.6204397", "0.6199908", "0.61991113", "0.61773986", "0.6171051", "0.61689055", "0.6152271", "0.6140293", "0.6139184", "0.6137901", "0.6133111", "0.6118293", "0.61004466", "0.6088483", "0.6086611", "0.6076989", "0.6070316", "0.60510975", "0.60467726", "0.6041493", "0.6039694", "0.6037417", "0.60331565", "0.6019573", "0.60150063", "0.6014015", "0.6006054", "0.60030067", "0.598486", "0.5984846", "0.5981522", "0.59725547", "0.5963361", "0.59607583", "0.5955589", "0.59553653", "0.59507406", "0.5947743", "0.59401894", "0.5940028", "0.5892798", "0.5890927", "0.588951", "0.587884", "0.5871394", "0.5868607", "0.58569175", "0.5853045", "0.585279", "0.5852063", "0.58472365", "0.5846375", "0.5843381", "0.5843079", "0.5837333", "0.5833925", "0.5829934", "0.58289325", "0.58289325", "0.5826338", "0.5809439", "0.5809439", "0.5803816", "0.57989144", "0.5792825", "0.5791296", "0.57859766", "0.57813334", "0.5772271", "0.5772111" ]
0.71502286
0
Checks if its allowed to send comment notification to owner.
protected function AllowSendAuthorReviewCommentNotification() { $bAllowSendAuthorCommentNotification = false; if ($this->fieldSendCommentNotification) { if (!empty($this->fieldAuthorEmail) || !empty($this->fieldDataExtranetUserId)) { $bAllowSendAuthorCommentNotification = true; } } return $bAllowSendAuthorCommentNotification; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function canReply(){\n return $this->canUserModify() &&\n $this->socialQuestion &&\n $this->isActive() &&\n $this->socialQuestion->SocialPermissions->canComment() &&\n !$this->connectObj->Parent->ID;\n }", "public function isTheCommentFromTheAuthor(): bool\n {\n if ($this->action->equals(Action::SYNCHRONIZE())) {\n return true;\n }\n\n if (null === $this->comment) {\n return false;\n }\n\n return $this->issueAuthor->id() === $this->comment->author()->id();\n }", "protected function check_is_comment_content_allowed($prepared_comment)\n {\n }", "public function ownsComment(Comment $comment)\n {\n return $this->id === $comment->user_id;\n }", "private function canComment(): bool\n {\n return true;\n }", "public static function canCommentTicket($ticket)\n\t{\n\t\tif (!auth()->check()) return false;\n\n\t\tif (\\PanicHDMember::canManageTicket($ticket->id)\n or \\PanicHDMember::isTicketOwner($ticket->id)\n or $ticket->commentNotifications()->where('member_id', auth()->user()->id)->count() > 0){\n\n return true;\n\t\t}\n\n return false;\n\t}", "protected function _isAllowed()\n {\n return parent::_isAllowed() && $this->_authorization->isAllowed('Vnecoms_VendorsProfileNotification::manage_process');\n }", "private function checkOwner() {\r\n if (!$this->model->isOwner()) {\r\n $this->api->redirect('contact/home?message=Cannot Be Accessed');\r\n }\r\n }", "public function comment(User $user, Request $request)\n {\n return $user->isAdmin() || $user->id == $request->owner_id;\n }", "public function authorize()\n {\n// $comment = Comment::find($this->route('comment')); // Get 'comment' route's params.\n// return $comment && $this->user()->can('update', $comment);\n\n return false;\n }", "protected function canCreate(){\n return $this->canUserModify() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_CREATE, $this->getEmptyComment());\n }", "public function isOwnedBy($comment, $user) {\n return $this->field('id', array('id' => $comment, 'user_id' => $user)) !== false;\n }", "protected function canUpdate(){\n $emptyComment = $this->getEmptyComment();\n\n return $this->canUserModify() &&\n ($this->isActive() || $this->isPending() ||\n ($this->isSuspended() && parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $emptyComment))) &&\n !$this->isDeleted() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE, $emptyComment);\n }", "public function isOwned()\n {\n return Auth::user() && $this->recipient_id === Auth::id();\n }", "public function notifyUser(&$comment) {\n if (!$comment instanceof modxTalksPost) {\n return false;\n }\n\n $this->modx->lexicon->load('modxtalks:emails');\n\n /**\n * Get User info\n */\n $user = $comment->getUserData();\n\n $cid = $comment->conversationId;\n $idx = $comment->idx;\n\n $link = $this->generateLink($cid, $idx, 'full');\n $images_url = $this->modx->getOption('site_url') . substr($this->config['imgUrl'], 1);\n\n $subject = $this->modx->lexicon('modxtalks.email_comment_approved');\n $text = $this->modx->lexicon('modxtalks.email_user_approve_comment', array(\n 'link' => $link,\n ));\n\n $params = array(\n 'title' => 'Заголовок',\n 'content' => $this->modx->stripTags($this->bbcode($comment->content)),\n 'images_url' => $images_url,\n 'avatar' => $this->getAvatar($user['email'], 50),\n 'text' => $text,\n 'date' => date($this->config['dateFormat'] . ' O', $comment->time),\n );\n\n /**\n * Get email body\n */\n $body = $this->getChunk('mt_send_mail', $params);\n\n /**\n * Send notifications to user\n */\n $success = false;\n if (!empty($user['email'])) {\n if ($this->sendEmail($subject, $body, $user['email'])) {\n $success = true;\n }\n }\n\n return $success;\n }", "function wp_check_comment_disallowed_list($author, $email, $url, $comment, $user_ip, $user_agent)\n {\n }", "public function only_post_user_can_answered_his_post()\n {\n $comment = factory(\\App\\Comment::class)->create();\n\n $policy = new CommentPolicy();\n\n $policy->accept($comment->post->user,$comment);\n\n $this->assertTrue($policy->accept($comment->post->user,$comment));\n }", "public function checkUserAccess() {\n $conversation = Conversation::find($this->conversation_id);\n if (!$conversation->isConversationMember($this->user_id)) {\n $this->addError('user_id', 'User can\\'t send messages to this conversation.');\n }\n }", "function isCommentable(){\n\t\tglobal $gBitSystem;\n\t\treturn $gBitSystem->isFeatureActive( 'blog_posts_comments' );\n\t}", "public function authorize()\n {\n abort_if(Gate::denies('comment_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n return false;\n }", "protected function canUpdateStatus() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $this->getEmptyComment());\n }", "public function authorize(): bool\n {\n return $this->user()->can('update_contact');\n }", "function wp_new_comment_notify_moderator($comment_id)\n {\n }", "public function canAddComment() {\n return Mage::getStoreConfigFlag(self::XML_PATH_ADD_COMMENT);\n }", "protected function checkPermission(): bool\n {\n // Must be the owner or the administrator in the group\n if ($this->message instanceof GroupMessage && $this->message->sender->permission == \"MEMBER\") {\n $this->setReply(\"deckDenied\");\n\n return false;\n }\n\n return true;\n }", "protected function _commenting_allowed($row)\n\t{\n\t\tif ($row['allow_comments'] == 'n')\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif (isset($row['comment_system_enabled']) && $row['comment_system_enabled'] == 'n')\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif (config_item('comment_moderation_override') === 'y')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telseif ($row['comment_expiration_date'] > 0 && $row['comment_expiration_date'] < ee()->localize->now)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "protected function check_edit_permission($comment)\n {\n }", "public function notificationCanSend( $metaData )\n\t{\n\t\treturn true;\n\t}", "protected function canDelete() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS_DELETE, $this->getEmptyComment());\n }", "public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('AVATOR_ContactUs::contact');\n }", "protected function isPending(){\n return parent::isStatusOf(STATUS_TYPE_SSS_COMMENT_PENDING);\n }", "public function canSend()\n {\n $flag = intval(setting(\"mail_notify_{$this->getTemplateTag()}\"));\n\n return !!$flag;\n }", "public function no_post_author_cannot_accept_a_comment_as_post_answer()\n {\n $comment = factory(\\App\\Comment::class)->create();\n\n $this->actingAs(factory(\\App\\User::class)->create());\n\n $this->visit($comment->post->url);\n\n $this->post(route('comment.accept',$comment));\n $this->seeInDatabase('posts',[\n 'id' => $comment->post_id,\n 'pending' => true\n ]);\n\n\n }", "public function iN_CheckNotificationLikeInsertedBeforeForComment($userID, $commentID, $postID) {\n\t\t$userID = mysqli_real_escape_string($this->db, $userID);\n\t\t$postID = mysqli_real_escape_string($this->db, $postID);\n\t\t$commentID = mysqli_real_escape_string($this->db, $commentID);\n\t\t$check = mysqli_query($this->db, \"SELECT not_iuid, not_post_id, not_comment_id FROM i_user_notifications WHERE not_iuid = '$userID' AND not_post_id = '$postID' AND not_comment_id = '$commentID' AND not_not_type = 'commentLike'\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($check) == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function restrict_to_author() {\n if ($this->post->author_id != $this->current_user->id) {\n forbidden();\n }\n }", "public function hasOwner()\n {\n return $this->owner !== null;\n }", "public function user_is_allowed()\n {\n //check if the record exist\n if (! $this->record) {\n $this->build_error('These record does not exist or it may not belong to you',404);\n }\n\n //check if the user is the owner of the entry\n if(!isOwner($this->record)) {\n $this->build_error('you are not the owner of this task');\n }\n\n //check if the incomming entries type is Array\n if (!is_array($this->request->entries)) {\n $this->build_error('Please the entries must be an Array');\n }\n }", "public function commentsEnabled()\n {\n return $this->getData('isEnabledComments', true) === true;\n }", "public function isResponsible()\n {\n return false;\n }", "public function reply($user, Comment $comment) : bool\n {\n return $user->id != $comment->commenter_id;\n }", "protected function mayContribute($a_posting_id = null, $a_author_id = null)\n\t{\n\t\tglobal $ilUser;\n\t\t\n\t\t// single author blog (owner) in personal workspace\n\t\tif($this->id_type == self::WORKSPACE_NODE_ID)\n\t\t{\n\t\t\treturn $this->checkPermissionBool(\"write\");\t\t\t\t\n\t\t}\n\t\t\t\n\t\tif($this->checkPermissionBool(\"contribute\"))\n\t\t{\t\t\n\t\t\t// check owner of posting\n\t\t\tif($a_posting_id)\n\t\t\t{\n\t\t\t\tif(!$a_author_id)\n\t\t\t\t{\n\t\t\t\t\tinclude_once \"Modules/Blog/classes/class.ilBlogPosting.php\";\n\t\t\t\t\t$post = new ilBlogPosting($a_posting_id);\n\t\t\t\t\t$a_author_id = $post->getAuthor();\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif($ilUser->getId() == $a_author_id)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function flag_comment() {\n\t\t\tif ( empty( $_REQUEST[ 'comment_id' ] ) || (int) $_REQUEST[ 'comment_id' ] != $_REQUEST[ 'comment_id' ] ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_values_message ) );\n\t\t\t}\n\n\t\t\t$comment_id = (int) $_REQUEST[ 'comment_id' ];\n\t\t\tif ( $this->already_flagged( $comment_id ) ) {\n\t\t\t\t$this->cond_die( __( $this->already_flagged_message ) );\n\t\t\t}\n\n\t\t\t// checking if nonces help\n\t\t\tif ( ! isset( $_REQUEST[ 'sc_nonce' ] ) || ! wp_verify_nonce( $_REQUEST[ 'sc_nonce' ], $this->_plugin_prefix . '_' . $this->_nonce_key ) ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_nonce_message ) );\n\t\t\t} else {\n\t\t\t\t$this->mark_flagged( $comment_id );\n\t\t\t\t$this->cond_die( __( $this->thank_you_message ) );\n\t\t\t}\n\n\t\t}", "final public function isNobody():bool\n {\n return $this->permission() <= 1;\n }", "public function onNewComment(CommentEvent $event): bool\n {\n $user = $event->user;\n $badges = Badge::where('type', 'onNewComment')->get();\n\n $collection = $badges->filter(function ($badge) use ($user) {\n return $badge->rule <= $user->comment_count;\n });\n\n $result = $user->badges()->syncWithoutDetaching($collection);\n\n return $this->sendNotifications($result, $badges, $user);\n }", "public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }", "public function isOwner(): bool {\n $f3 = \\Base::instance();\n\n return $f3->get('CURRENT_USER') && !is_null($this->owner) && $f3->get('CURRENT_USER') === $this->owner->id;\n }", "public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function manage_comments_page_access() {\n\t\tif ( ! current_user_can( 'moderate_comments' ) ) {\n\t\t\twp_die(\n\t\t\t\t__( 'You do not have permission to moderate comments.', 'wpcampus-network' ),\n\t\t\t\t__( 'Moderating Comments', 'wpcampus-network' ),\n\t\t\t\t[ 'back_link' => true ]\n\t\t\t);\n\t\t}\n\t}", "public function canMail() {\n\t\tif ($this->ignoredUser || ($this->onlyBuddyCanMail && !UserProfile::isBuddy($this->userID)) || (!$this->userCanMail && !$this->onlyBuddyCanMail)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function notifyModerators(&$comment) {\n if (!$comment instanceof modxTalksPost && !$comment instanceof modxTalksTempPost) {\n return false;\n }\n\n $this->modx->lexicon->load('modxtalks:emails');\n\n /**\n * Get User info\n */\n $user = $comment->getUserData();\n $images_url = $this->modx->getOption('site_url') . substr($this->config['imgUrl'], 1);\n\n if ($comment instanceof modxTalksPost) {\n $cid = $comment->conversationId;\n $idx = $comment->idx;\n $link = $this->generateLink($cid, $idx, 'full');\n $subject = $this->modx->lexicon('modxtalks.email_new_comment');\n $text = $this->modx->lexicon('modxtalks.email_added_new_comment', array(\n 'link' => $link,\n 'name' => $user['name'],\n ));\n } elseif ($comment instanceof modxTalksTempPost) {\n $subject = $this->modx->lexicon('modxtalks.email_new_premoderated_comment');\n $text = $this->modx->lexicon('modxtalks.email_user_add_premoderated_comment', array(\n 'name' => $user['name'],\n ));\n }\n\n $params = array(\n 'title' => 'Заголовок',\n 'content' => $this->modx->stripTags($this->bbcode($comment->content)),\n 'images_url' => $images_url,\n 'avatar' => $this->getAvatar($user['email'], 50),\n 'text' => $text,\n 'date' => date($this->config['dateFormat'] . ' O', $comment->time),\n );\n\n /**\n * get email body\n */\n $body = $this->getChunk('mt_send_mail', $params);\n\n /**\n * send notifications\n */\n $success = false;\n\n $emails = $this->getUsersEmailsByGroups($this->config['moderator'], $comment);\n\n /**\n * send notifications to moderators\n */\n if (!empty($emails)) {\n if ($this->sendEmail($subject, $body, $emails)) {\n $success = true;\n }\n }\n\n return $success;\n }", "public function is_comments_popup()\n {\n }", "protected function check_read_permission($comment, $request)\n {\n }", "public function isCommentsEnabled(): bool\n {\n if ($this->appState->getAreaCode() === Area::AREA_FRONTEND\n && !$this->config->getValue(self::CONFIG_PATH_COMMENTS_FRONTEND)\n || $this->appState->getAreaCode() === Area::AREA_ADMINHTML\n && !$this->config->getValue(self::CONFIG_PATH_COMMENTS_ADMINHTML)\n ) {\n return false;\n }\n\n return true;\n }", "function hasPermission(\\CharlotteDunois\\Livia\\Commands\\Context $context, bool $ownerOverride = true) {\n return true;\n }", "private function is_valid_comment(WP_Comment $comment)\n {\n return '1' == $comment->comment_approved && empty($comment->comment_type);\n }", "function can_submit_brief_project_proposal(ProjectRequest $projectRequest)\n {\n return in_array(auth()->user()->id, $projectRequest->projectRequestReceivers->pluck('receiver')->toArray());\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')\n ->isAllowed('admin/system/convert/professio_budgetmailer');\n }", "public function isOwner();", "public function isControlAllowed($userId = null)\n {\n if ($userId === null) {\n $userId = Yii::$app->user->id;\n }\n\n return ($this->isAwaiting() && (\n $this->isSendType() && $this->from_user_id == $userId\n || $this->isReceiveType() && $this->to_user_id == $userId\n ));\n }", "private function isReviewSendingEnabled()\n {\n return $this->_scopeConfig->getValue(\n AntavoConfigInterface::XML_PATH_REVIEW_EVENT_SENDING,\n ScopeInterface::SCOPE_STORES,\n $this->_storeManager->getStore()->getId()\n );\n }", "public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }", "public function isOwner()\n {\n return (\\Auth::check() and \\Auth::user()->id == $this->id);\n }", "public function getCanShareAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }", "public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }", "public function authorize()\n {\n $contact = $this->route('contact');\n\n return $contact->user_id == auth()->id() || user()->acl < 9;\n }", "private function shouldDisplayMessage()\n\t{\n\t\t// Only on admin app\n\t\tif (!$this->app->isClient('administrator'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only if authenticated\n\t\tif (JFactory::getUser()->guest)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on HTML documents\n\t\tif ($this->app->getDocument()->getType() !== 'html')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on full page requests\n\t\tif ($this->app->input->getCmd('tmpl', 'index') === 'component')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only to com_cpanel\n\t\tif ($this->app->input->get('option') !== 'com_cpanel')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function canPostComment($member = null)\n {\n return $this->Parent()\n && $this->Parent()->exists()\n && $this->Parent()->canPostComment($member);\n }", "protected function _isAllowedAction($action)\n {\n return Mage::getSingleton('admin/session')->isAllowed('blog/post_comment/' . $action);\n }", "public function authorize()\n {\n// $this->authorize('create', Reply::class);\n// Вместо authorize используем Gate:\n return Gate::allows('create', Reply::class); //проверка на спам сообщениями\n// return true;\n }", "public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }", "public function isOwner()\n\t{\n\t\treturn is_null($this->CreatedBy) || $this->CreatedBy === Yii::app()->user->GUID;\n\t}", "public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function getArticleAllowComment() {\n return $this->article_allow_comment;\n }", "public function is_comment_feed()\n {\n }", "function is_approved() {\n\t\treturn $this->get_data( 'comment_approved' );\n\t}", "public function isComment() {}", "private function checkEventNotBookedByCreator(){\n $event = Event::find($this->id);\n\n return($event->host != Auth::id());\n }", "function userCanChangeEmails( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function canBeReviewed(): bool\n {\n if (!$this->isOnline()) {\n return false;\n }\n\n if (new \\DateTimeImmutable('now') > $this->getReviewDeadline()) {\n return false;\n }\n\n return true;\n }", "private function check_is_owner($user_id)\n {\n if ($user_id != current_user_id()) {\n show_error(lang('not_authorized'), 403);\n }\n }", "public function isResponsibleFor(Visitor $visitor);", "public function isResponsibleFor(Visitor $visitor);", "public function isFromOwner()\n {\n return $this->fromOwner;\n }", "public static function ownerOnly(){\n return TRUE;\n }", "protected function check_permission()\n {\n return true;\n }", "public function canAdminCharge()\n\t{\n\t\t$settings = json_decode( $this->settings, TRUE );\n\t\treturn ( $settings['method'] === 'AIM' );\n\t}", "protected function validateOwner()\n {\n $value = $this->owner->getValue();\n if (!isset($value['error']) || UPLOAD_ERR_NO_FILE == $value['error']) {\n return true;\n }\n $mime = $this->getConfig();\n return is_array($mime)? in_array($value['type'], $mime):\n $value['type'] == $mime;\n }", "public function canComment($user_guid = 0, $default = null) {\n\t\t$result = parent::canComment($user_guid, $default);\n\t\tif ($result == false) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tif ($this->comments_on == 'Off') {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function canReply($user = null)\n {\n if (!$user = Auth::getUser()) {\n return false;\n }\n\n if ($this->isOwner($user)) {\n return false;\n }\n\n return true;\n }", "public function onBeforeSave()\n\t{\n\t\tif (empty($this->allow_comments))\n\t\t{\n\t\t\t$this->allow_comments = $this->Channel->deft_comments;\n\t\t}\n\t}", "public function viewableByOwnerOnly();", "function check_comment_agreement($comment_data) {\n \tglobal $tou_settings;\n\n \tif ($tou_settings->comment_form and $comment_data['comment_type'] == '' ) { // Do not check trackbacks/pingbacks\n \t if (!isset($_POST['terms']))\n wp_die('<strong>'. __( 'ERROR', 'terms_of_use' ) .'</strong>: '. $tou_settings->terms_error);\n\n \t if ($tou_settings->initials and !$_POST['tou_initials'])\n wp_die('<strong>'. __( 'ERROR', 'terms_of_use' ) .'</strong>: '. $tou_settings->initials_error);\n \t}\n\n \treturn $comment_data;\n }", "private function isCommentSuccess()\n {\n if (isset($_SESSION['pcf_success'])) {\n return true;\n } else {\n return false;\n }\n }", "function wp_notify_postauthor($comment_id, $deprecated = \\null)\n {\n }", "public function have_comments()\n {\n }", "public static function isOwner(): bool\n\t{\n\t\tif(in_array( 'owner', self::getUserRole()) || in_array('administrator', self::getUserRole())) return true;\n\t\treturn false;\n\t}", "public function isNotify($obj)\n {\n return $this->validate($obj, 'notify');\n }", "public function broadcastWhen() {\n $return = false;\n $ids_to_broadcast = [$this->message->userId, $this->message->receiverUserId];\n if (in_array($this->message->userId, $ids_to_broadcast) || in_array($this->message->receiverUserId, $ids_to_broadcast)) $return = true;\n return $return;\n }" ]
[ "0.64653766", "0.6453934", "0.64310145", "0.6379758", "0.6372009", "0.63331145", "0.6293883", "0.6226461", "0.60972184", "0.60948074", "0.60834444", "0.60129285", "0.6010414", "0.59709924", "0.59372663", "0.59035236", "0.584876", "0.58453953", "0.5842795", "0.5818542", "0.5792538", "0.5785563", "0.57433194", "0.5739419", "0.5737974", "0.5706971", "0.5686663", "0.56797653", "0.5675384", "0.566624", "0.5652029", "0.56473136", "0.5630989", "0.562713", "0.56201947", "0.55958664", "0.5594976", "0.5590232", "0.5588923", "0.5576561", "0.55758095", "0.55733687", "0.5572054", "0.55630696", "0.55538005", "0.5548535", "0.554369", "0.55425787", "0.5529419", "0.5507391", "0.54977494", "0.5494753", "0.54811555", "0.5474503", "0.5474125", "0.54688454", "0.546535", "0.54536307", "0.5452612", "0.5443649", "0.5439232", "0.5433565", "0.54318243", "0.5431582", "0.5431074", "0.5430829", "0.54197735", "0.54132384", "0.5402973", "0.5402484", "0.5399096", "0.5390817", "0.53832793", "0.53794146", "0.5370457", "0.536952", "0.53656775", "0.5363683", "0.5362209", "0.5361728", "0.5359347", "0.5351679", "0.5338797", "0.5338797", "0.5338529", "0.533522", "0.5332981", "0.5330961", "0.5319224", "0.5318177", "0.5317914", "0.5315818", "0.53154683", "0.5314525", "0.5312212", "0.5309907", "0.53059334", "0.5305816", "0.5304371", "0.5298474" ]
0.7350134
0
Add new unique action id to the comment. Action id was needed to run an action like unlock or delete via post.
protected function SaveActionIdToComment() { $sActionId = TTools::GetUUID(); $this->sqlData['action_id'] = $sActionId; $this->AllowEditByAll(true); $this->Save(); $this->AllowEditByAll(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(Action $action) {\r\n\t\t$stmt = $this->db->prepare(\"INSERT INTO accion(id_accion, nombre) values (?,?)\"); \r\n\t\t$stmt->execute(array($action->getCodaction(), $action->getActionname()));\r\n\r\n\t\treturn $this->db->lastInsertId();\r\n\t}", "public function addAction(Action $action);", "function addAction($postId, $author, $comment)\n{\n\n // if ($affectedLines === false) {\n // // Erreur gérée. Elle sera remontée jusqu'au bloc try du routeur !\n // throw new Exception('Impossible d\\'ajouter le commentaire !');\n // }\n // else {\n // header('Location: index.php?action=post&id=' . $postId);\n // }\n echo \"ajoute un commentaire\";\n}", "function addAction($action)\r\n {\r\n $this->_actions[] = $action;\r\n }", "public function addAction($url_mod, $target_id, $target_name, $action, $description, $creator_id, $creator_username){\n $query = \"INSERT INTO actions VALUES (DEFAULT, '$action', '$url_mod', '$description', '$target_id','$target_name','$creator_id', '$creator_username', DEFAULT)\";\n $db = Db::instance();\n $db->execute($query);\n }", "public function getIdAction() \n\t{\n\t\treturn $this->idAction;\n\t}", "public function comment($comment_id, $action = false) {\n\t\t$this->history = false;\n\n\t\tif ($action) {\n\t\t\tswitch ($action) {\n\n\t\t\t\t// Delete comment\n\t\t\t\tcase 'delete':\n\t\t\t\t\t$this->_comment_delete($comment_id);\n\t\t\t\t\treturn;\n\n\t\t\t\t// Set comment as private\n\t\t\t\tcase 'private':\n\t\t\t\t\t$this->_comment_private($comment_id);\n\t\t\t\t\treturn;\n\n\t\t\t}\n\t\t}\n\n\t\turl::back('members');\n\t}", "public function setActionIdAttribute($input)\n {\n $this->attributes['action_id'] = $input ? $input : null;\n }", "public function commentCard()\n {\n $action = Mage::getModel('trello/action')->load($this->getId(), 'action_id');\n\n if ($action && $action->getId()) {\n $this->getDataHelper()->log('Action ' . $this->getId() . ' already registered', Zend_Log::DEBUG);\n return false;\n }\n\n $comment = $this->getPayload()['text'];\n $comment = trim(strip_tags($comment));\n\n /** @var Emagedev_Trello_Model_Action $action */\n $action = Mage::getModel('trello/action');\n $action\n ->setText($comment)\n ->parseTextHeader();\n\n if ($action->getHistoryCommentId()) {\n /** @var Mage_Sales_Model_Order_Status_History $commentModel */\n $commentModel = Mage::getModel('sales/order_status_history')->load($action->getHistoryCommentId());\n\n if ($commentModel && $commentModel->getId()) {\n $this->getDataHelper()->log('Comment for action ' . $this->getId() . ' already existing (by header id)', Zend_Log::DEBUG);\n return false;\n } else {\n $this->getDataHelper()->log('Cannot load comment #' . $action->getHistoryCommentId() . ' fetched from header of action', Zend_Log::ERR);\n }\n } else {\n $this->getDataHelper()->log('Not found id in header for comment ' . $this->getId(), Zend_Log::DEBUG);\n }\n\n $member = $this->getActingMember();\n\n /** @var Emagedev_Trello_Model_Card $card */\n $card = Mage::getModel('trello/card');\n\n $card->loadFromTrello($this->getPayload()['card']['id']);\n\n if (!$card || !$card->getId()) {\n $this->getDataHelper()->log('Cannot find card to add comment ' . $this->getPayload()['card']['id'], Zend_Log::ERR);\n return false;\n }\n\n $order = $card->getOrder();\n\n if (!$order || !$order->getId()) {\n $this->getDataHelper()->log('Cannot find order to update comment ' . $this->getPayload()['card']['id'], Zend_Log::ERR);\n return false;\n }\n\n $this->getDataHelper()->log('Add comment to order #' . $order->getIncrementId(), Zend_Log::DEBUG);\n\n /** @var Mage_Sales_Model_Order_Status_History $commentModel */\n $commentModel = $order->addStatusHistoryComment($action->getText(), $order->getStatus());\n\n $commentModel\n ->setIsVisibleOnFront(false)\n ->setIsCustomerNotified(false);\n\n Mage::dispatchEvent(\n 'trello_webhook_comment_order_card_before', array(\n 'member' => $member,\n 'card' => $card,\n 'order' => $order,\n 'status_history' => $commentModel\n ));\n\n $commentModel->save();\n\n Mage::dispatchEvent(\n 'trello_webhook_comment_order_card_after', array(\n 'member' => $member,\n 'card' => $card,\n 'order' => $order,\n 'status_history' => $commentModel\n ));\n\n $action\n ->setStatusHistory($commentModel)\n ->setActionId($this->getId())\n ->setOrder($order)\n ->setOriginExternal(true)\n ->disableSync()\n ->save();\n\n return true;\n }", "public function addAction() {\r\n\t}", "function comment_action_handler( $comment_id ) {\n\t\tif ( !is_array( $comment_id ) ) {\n\t\t\tif ( wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t\t$this->add_ping( 'db', array( 'comment' => $comment_id ) );\n\t\t} else {\n\t\t\tforeach ( $comment_id as $id ) {\n\t\t\t\tif ( wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t\t\t$this->add_ping( 'db', array( 'comment' => $id) );\n\t\t\t}\n\t\t}\n\t}", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "private function updateAction($action){\r\n $r = $this->sql(\"SELECT max(id) FROM commands WHERE test_id = \" . $this->t_id);\r\n $last_id = mysql_result($r ,0);\r\n \r\n $r = $this->sql(\"SELECT action FROM commands WHERE id = \" . $last_id);\r\n $old_action = mysql_result($r ,0);\r\n \r\n $sql = \"UPDATE commands SET action='$action($old_action)' WHERE id = $last_id\";\r\n $this->sql($sql);\r\n }", "private function add_actions()\n {\n }", "private function undo_add_action($action, $id, $id_parent, $id_parent_prev) {\n global $db, $uid;\n $undo_node = array();\n $undo_node[\"ACTION\"] = mysql_escape_string($action);\n $undo_node[\"FK_KAT\"] = (int)$id;\n $undo_node[\"FK_PARENT\"] = (int)$id_parent;\n $undo_node[\"FK_PARENT_PREV\"] = (int)$id_parent_prev;\n $undo_node[\"FK_USER\"] = (int)$uid;\n if ($db->update($this->table.\"_undo\", $undo_node)) {\n return true;\n } else {\n $this->error = \"ERR_UNDO_ADD\";\n return false;\n }\n }", "public function record(Visitor $visitor, $idReferrerActionUrl, $idReferrerActionName)\n {\n $this->loadIdsFromLogActionTable();\n\n $visitAction = array(\n 'idvisit' => $visitor->getVisitorColumn('idvisit'),\n 'idsite' => $this->request->getIdSite(),\n 'idvisitor' => $visitor->getVisitorColumn('idvisitor'),\n 'idaction_url' => $this->getIdActionUrl(),\n 'idaction_url_ref' => $idReferrerActionUrl,\n 'idaction_name_ref' => $idReferrerActionName\n );\n\n /** @var ActionDimension[] $dimensions */\n $dimensions = ActionDimension::getAllDimensions();\n\n foreach ($dimensions as $dimension) {\n $value = $dimension->onNewAction($this->request, $visitor, $this);\n\n if ($value !== false) {\n if (is_float($value)) {\n $value = Common::forceDotAsSeparatorForDecimalPoint($value);\n }\n\n $visitAction[$dimension->getColumnName()] = $value;\n }\n }\n\n // idaction_name is NULLable. we only set it when applicable\n if ($this->isActionHasActionName()) {\n $visitAction['idaction_name'] = (int)$this->getIdActionName();\n }\n\n foreach ($this->actionIdsCached as $field => $idAction) {\n $visitAction[$field] = ($idAction === false) ? 0 : $idAction;\n }\n\n $customValue = $this->getCustomFloatValue();\n if (!empty($customValue)) {\n $visitAction[self::DB_COLUMN_CUSTOM_FLOAT] = Common::forceDotAsSeparatorForDecimalPoint($customValue);\n }\n\n $visitAction = array_merge($visitAction, $this->customFields);\n\n $this->idLinkVisitAction = $this->getModel()->createAction($visitAction);\n\n $visitAction['idlink_va'] = $this->idLinkVisitAction;\n\n Common::printDebug(\"Inserted new action:\");\n $visitActionDebug = $visitAction;\n $visitActionDebug['idvisitor'] = bin2hex($visitActionDebug['idvisitor']);\n Common::printDebug($visitActionDebug);\n }", "public function add($id) \n {\n $log = FezLog::get();\n if (!array_key_exists($id,$this->_ids) || !$this->_ids[$id]) {\n $this->_ids[$id] = self::ACTION_ADD;\n $log->debug(\"Added $id to queue\");\n }\n }", "public function addAction()\n\t{\n\n\t}", "function addAction($name, $action){\n\t\t$this->actions[$name] =& $action;\n\t}", "public function Log_Action($action, $document_id, $user_id, $hash = '', $ip_address = NULL)\n\t{\n\t\t$action_id = $this->Get_Action_Id($action);\n\t\t\t\n\t\t$query = \"\n\t\t\tINSERT INTO action_history\n\t\t\t(\n\t\t\t\tdocument_id,\n\t\t\t\tdocument_action_id,\n\t\t\t\tdate_created,\n\t\t\t\tdocument_hash,\n\t\t\t\tuser_id\n\t\t\t)\n\t\t\tVALUES\n\t\t\t(\n\t\t\t\t$document_id,\n\t\t\t\t$action_id,\n\t\t\t\tNOW(),\n\t\t\t\t'$hash',\n\t\t\t\t$user_id\n\t\t\t)\n\t\t\";\n\t\t\t\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->sql->Query($query);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t\t\n\t\t$insert_id = $this->sql->Insert_Id();\n\n\t\t// This is new, associates IP addresses with actions.\n\t\tif ($ip_address != NULL)\n\t\t{\n\t\t\t$query = \"\n\t\t\t\tINSERT INTO action_ip_address\n\t\t\t\t(\n\t\t\t\t\taction_history_id,\n\t\t\t\t\tip_address\n\t\t\t\t)\n\t\t\t\tVALUES\n\t\t\t\t(\n\t\t\t\t\t$insert_id,\n\t\t\t\t\t'$ip_address'\n\t\t\t\t)\n\t\t\t\";\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->sql->Query($query);\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\tdie($e->getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn $insert_id;\n\t}", "function add_actions()\n {\n }", "public function Get_Action_Id($action_name)\n\t{\n\t\t$action_id = FALSE;\n\t\t\n\t\t$query = \"\n\t\t\tSELECT\n\t\t\t\tdocument_action_id\n\t\t\tFROM\n\t\t\t\tdocument_action\n\t\t\tWHERE\n\t\t\t\tname = '$action_name'\";\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$result = $this->sql->Query($query);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t\t\n\t\tif(($row = $result->Fetch_Array_Row()))\n\t\t{\n\t\t\t$action_id = $row['document_action_id'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Action doesn't exist, add it\n\t\t\t$action_id = $this->Insert_New_Action($action_name);\n\t\t}\n\t\t\n\t\treturn intval($action_id);\n\t}", "public function __construct($action, $id)\n {\n $this->action = $action;\n $this->id = $id;\n }", "function owa_newAttachmentActionTracker($post_id) {\r\n\r\n\t$owa = owa_getInstance();\r\n\t$post = get_post($post_id);\r\n\t$label = $post->post_title;\r\n\t$owa->trackAction('wordpress', 'Attachment Created', $label);\r\n}", "public static function incrementActivityCount( $feedbackId, $action ) {\n\t\t$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();\n\n\t\t// get permission level that should be updated\n\t\t$permission = self::$actions[$action]['permissions'];\n\n\t\t$key = $cache->makeKey(\n\t\t\t'articlefeedbackv5-getActivityCount',\n\t\t\t$permission,\n\t\t\t$feedbackId\n\t\t);\n\t\t$count = $cache->get( $key );\n\n\t\t/*\n\t\t * if the data is not (yet) in cache, don't bother fetching it from db yet,\n\t\t * that'll happen in due time, when it's actually requested\n\t\t */\n\t\tif ( $count !== false ) {\n\t\t\t$cache->set( $key, $count + 1, 60 * 60 * 24 * 7 );\n\t\t}\n\t}", "private function Insert_New_Action($action_name, $description = '')\n\t{\n\t\t$query = \"\n\t\t\tINSERT INTO document_action\n\t\t\t(\n\t\t\t\tdate_created,\n\t\t\t\tname,\n\t\t\t\tdescription\n\t\t\t)\n\t\t\tVALUES\n\t\t\t(\n\t\t\t\tNOW(),\n\t\t\t\t'$action_name',\n\t\t\t\t'$description'\n\t\t\t)\n\t\t\";\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->sql->Query($query);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t\t\n\t\treturn $this->sql->Insert_Id();\n\t}", "public static function action_wp_insert_comment( $id, $comment ) {\n\t\tif ( 1 != $comment->comment_approved ) {\n\t\t\treturn;\n\t\t}\n\t\tpantheon_wp_clear_edge_keys( array( 'rest-comment-' . $comment->comment_ID, 'rest-comment-collection' ) );\n\t}", "public function addAction($postId, $author, $comment)\n {\n\n // if ($affectedLines === false) {\n // // Erreur gérée. Elle sera remontée jusqu'au bloc try du routeur !\n // throw new Exception('Impossible d\\'ajouter le commentaire !');\n // }\n // else {\n // header('Location: index.php?action=post&id=' . $postId);\n // }\n echo \"ajoute un commentaire\";\n }", "public function setAddAction($action)\n {\n $this->m_addAction = $action;\n }", "public function add_edit_activity_comment_button() {\r\n\r\n\t\tglobal $activities_template;\r\n\t\t\r\n\t\tif ( yzea_is_activity_editable( $activities_template->activity ) ) {\r\n\r\n\t\t\t?>\r\n\r\n\t\t\t<a class=\"bp-secondary-action yz-edit-activity\" data-activity-id=\"<?php echo $activities_template->activity->current_comment->id;?>\" data-activity-type=\"activity_comment\"><?php _e( 'Edit', 'youzer-edit-activity' ); ?>\r\n\t\t\t</a>\r\n\r\n\t\t\t<?php \r\n\t\t}\r\n\t}", "function dev_url_add_custom_action( $url, $action ) {\n\treturn dev_nonce_url( add_query_arg( array( 'dev-do' => sanitize_text_field( $action ) ), $url ) );\n}", "public function setIdAction($idAction) \n\t{\n\t\t$this->idAction = $idAction;\n\t\treturn $this;\n\t}", "public function registerAction($action){\r\n\t\t\t\t\r\n\t\t\t$this->_actions[] = $action;\r\n\t\t}", "private function recordUser($action) {\n $data = array(\n 'class_name' => $this->getClassName(),\n 'object_id' => $this->id,\n 'user_id' => Auth::user()->id,\n 'action' => $action\n );\n $this->user_counters()->updateOrCreate($data, $data);\n }", "function owa_editAttachmentActionTracker($post_id) {\r\n\r\n\t$owa = owa_getInstance();\r\n\t$post = get_post($post_id);\r\n\t$label = $post->post_title;\r\n\t$owa->trackAction('wordpress', 'Attachment Edit', $label);\r\n}", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', \r\n\t\t\t\t'link', 'activity', 'clientver', 'img', 'start_time', 'end_time', 'status', 'hits',\r\n\t\t\t\t'channel_id', 'module_id', 'cid', 'channel_code', 'ptype_id', 'is_recommend', 'action'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Ad::addAd($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function NewCommentManga(){\r\n $this->comment(); \r\n $this->pseudoPost();\r\n $this->contentPost();\r\n $this->_commentManager->AddComment($this->_pseudoPostSecure, $this->_contentPostSecure, $_GET['id'],true,false); \r\n header('location: Tome&id='.$_GET[\"id\"]); \r\n }", "function tp_comm_add_meta($comment_id) {\r\n\t$tw = tp_get_credentials();\r\n\tif ($tw) {\r\n\t\tupdate_comment_meta($comment_id, 'twuid', $tw->screen_name);\r\n\t}\r\n}", "function _action($action)\n\t{\n\t // Lay input\n\t $ids = $this->uri->rsegment(3);\n\t $ids = (!$ids) ? $this->input->post('id') : $ids;\n\t $ids = (!is_array($ids)) ? array($ids) : $ids;\n\t\n\t // Thuc hien action\n\t foreach ($ids as $id)\n\t {\n\t // Xu ly id\n\t $id = (!is_numeric($id)) ? 0 : $id;\n\t \t\n\t // Kiem tra id\n\t $info = model('user_bank')->get_info($id);\n\t if (!$info) continue;\n\t \n\t // Chuyen den ham duoc yeu cau\n\t $this->{'_'.$action}($info);\n\t }\n\t}", "public function getIdAction(): ?int {\n return $this->idAction;\n }", "function addComment($id){\n $newComment = $this->commentManager->postComment($id, $_POST['author'], $_POST['comment']);\n if($newComment === false){\n throw new \\Exception(\"Impossible d'ajouter le commentaire\");\n } else {\n header('Location: /episode/'.$id);\n }\n }", "function addCorrectiveAction($correctiveAction) {\n \n $submittedby_id = $_SESSION[\"loggedid\"];\n $correctiveAction->id = UUID::v4();\n \n $query = \"INSERT INTO corrective_action (id,finding_num,status,description,finding_priority,start_date,finding_priority_date,finish_date,submittedby_id)\"\n . \"VALUES ('$correctiveAction->id','$correctiveAction->finding_num','$correctiveAction->status','$correctiveAction->description','$correctiveAction->finding_priority','$correctiveAction->start_date','$correctiveAction->finding_priority_date','$correctiveAction->finish_date','$submittedby_id');\";\n\n mysqli_query($this->plink, $query);\n // close connection\n\n // mysqli_close($this->plink);\n \n $url = \"../view/correctiveActionList.php\";\n \n redirect($url);\n }", "public function actionAdd()\n {\n $apiName = 'comment/add';\n $sessionId = null;\n \n $_JSON = $this->getJsonInput();\n \n try\n {\n if(!isset($_JSON) || empty($_JSON))\n $result = $this->error($apiName, WS_ERR_POST_PARAM_MISSED, 'No input received.');\n else if(!isset($_JSON['sessionId']) || empty($_JSON['sessionId']))\n $result = $this->error($apiName, WS_ERR_POST_PARAM_MISSED, 'Please enter session id.');\n else if(!isset($_JSON['postId']) || empty($_JSON['postId']))\n $result = $this->error($apiName, WS_ERR_POST_PARAM_MISSED, 'Please enter post id.');\n else if(!isset($_JSON['comment']) || empty($_JSON['comment']))\n $result = $this->error($apiName, WS_ERR_POST_PARAM_MISSED, 'Please enter your comment.');\n else\n {\n $userId = $this->isAuthentic($_JSON['sessionId']);\n $user = User::model()->findByPk($userId);\n if (is_null($user))\n $result = $this->error($apiName, WS_ERR_WONG_USER, 'Please login before using this service.');\n else\n {\n $postId = filter_var($_JSON['postId'], FILTER_SANITIZE_NUMBER_INT);\n $post = Post::model()->findByPk($postId);\n if (is_null($post))\n $result = $this->error($apiName, WS_ERR_WONG_VALUE, 'Selected post does not exist.');\n else\n {\n $comment = new Comment('add_api');\n $comment->userId = $userId;\n $comment->postId = $postId;\n $comment->postUserId = $post->userId;\n $comment->comment = trim(mb_convert_encoding( $_JSON['comment'], \"UTF-8\", \"BASE64\" ));\n \n// $comment->comment = filter_var(base64_decode($_JSON['comment']), FILTER_SANITIZE_STRING | FILTER_SANITIZE_MAGIC_QUOTES);\n// $comment->comment = $_JSON['comment'];\n //$comment->comment = filter_var($_JSON['comment'], FILTER_SANITIZE_STRING | FILTER_SANITIZE_MAGIC_QUOTES);\n //save record\n $comment->save();\n \n $ignore_user = array(); \n \n if(isset($_JSON['userMentioned']) && count($_JSON['userMentioned']) > 0){\n \tforeach ($_JSON['userMentioned']as $userM){\t\n\t \t$userMentioned = new UserMentioned();\n\t \t$userMentioned->userId = filter_var($userM['userId'], FILTER_SANITIZE_NUMBER_INT);\n// \t \t$userMentioned->userName = filter_var(base64_decode($userM['userName']), FILTER_SANITIZE_STRING | FILTER_SANITIZE_MAGIC_QUOTES);\n\t \t$userMentioned->userName = $userM['userName'];\n\t \t$userMentioned->postId = $postId;\n\t \t$userMentioned->commentId = $comment->id;\n\t \t$userMentioned->save();\n\t \tEvent::saveEvent(Event::USER_MENTIONED_COMMENT, $userId, $comment->postId, $comment->createDate, $userMentioned->userId);\n\t \t$ignore_user[] = $userMentioned->userId;\n \t}\n }\n \n \n \n\n \n if ($comment->hasErrors()) \n {\n throw new Exception(print_r($comment->getErrors(), true), WS_ERR_UNKNOWN);\n }\n \n //save event\n if($post->type == 'question'){\n \t$eventtype = 14;\n \t$message1 = $user->userName.' answered your question.';\n }\n else{\n \t$eventtype = Event::COMMENT_CREATED;\n \t$message1 = false;\n }\n \n Event::saveEvent($eventtype, $userId, $comment->postId, $comment->createDate, $post->userId);\n \n $ignore_user[] = $post->userId;\n $sql = 'SELECT DISTINCT userId FROM `comment` WHERE postId = '.$postId;\n \n $user_comments = Yii::app()->db->createCommand($sql)->queryAll(true);\n \n \n// var_dump($post->user->userName);\n \n if($post->type == 'question'){\n \t$eventtype = 15;\n \t$message1 = $user->userName.' also answered '.$post->user->userName.\"'s question.\";\n }\n else{\n \t$eventtype = 12;\n \t$message1 = $user->userName.' also commented on '.$post->user->userName.\"'s post.\";\n }\n \n// $message = $user->userName.' also commented on '.$post->user->userName.\"'s post.\";\n \n \n foreach ($user_comments as $comm){\n \t\n \tif(!in_array($comm['userId'], $ignore_user))\n// \t\t Event::saveEvent(12, $userId, $comment->postId, $comment->createDate, $comm['userId']);\n \t\tEvent::saveEvent(12, $userId, $comment->postId, $comment->createDate, $comm['userId'], $message1 );\n }\n \n //send notifications to followers of the post user\n// $sql = Follower::getQueryForFollower($post->userId);\n// $sql .= \" AND (s.deviceToken is not null OR s.deviceToken!='')\";\n// $followers = Yii::app()->db->createCommand($sql)->queryAll(true);\n// $message = $user->userName . ' has commented on a post.';\n// \n// foreach($followers as $follower)\n// {\n// $session = Session::model()->findByAttributes(array('deviceToken'=>$follower['deviceToken']));\n// if($session)\n// {\n// $session->deviceBadge += 1;\n// $session->save();\n// sendApnsNotification($follower['deviceToken'], $message, $follower['deviceBadge']);\n// }\n// }\n \n $imagePath = Yii::app()->getBaseUrl(true) . '/images/user/';\n $thumbPath = Yii::app()->getBaseUrl(true) . '/images/user/thumb/';\n \n $sql = Comment::getQuery($imagePath, $thumbPath, $postId);\n $sql .= ' AND c.id=' . $comment->id;\n $newComment = Yii::app()->db->createCommand($sql)->queryRow(true);\n $newComment['timeElapsed'] = getTimeElapsed(date_create($newComment['createDate']), date_create($newComment['currentDate']));\n $newComment['userMentioned'] = UserMentioned::getUserByComment($newComment['id']);\n \n \n $result = array(\n 'api' => $apiName,\n 'apiMessage' => 'Comment saved successfully.',\n 'status' => 'OK',\n 'commentId' => $comment->id,\n 'comment' => $newComment\n );\n }\n }\n }\n } \n catch (Exception $e)\n {\n $result = $this->error($e->getCode(), Yii::t('app', $e->getMessage()),'TSASTT');\n }\n $this->sendResponse(json_encode($result, JSON_UNESCAPED_UNICODE));\n }", "public function add_action($actions){\r\n\t\t\t$actions[$this->id] = $this->name;\r\n\t\t\treturn $actions;\r\n\t\t}", "public static function store(string $identifier, Action $action): void\n {\n static::$all[$identifier] = $action;\n }", "public function addAction()\n {\n $ctrl = $this->dbController->find($this->checkControllerIdParam());\n $action = $this->getRequest()->getParam('actionname', NULL);\n\n IF($action === NULL || $ctrl->count() !== 1) {\n throw new Admin_Model_Acl_Exception('Invalid or no ActionName/ControllerId Parameter given');\n }\n\n $ctrl = new Admin_Model_DbRow_Controller($ctrl->current());\n $form = new Admin_Form_Action_Add($ctrl, $action);\n $form->setAction('/noc/admin/action/add');\n\n IF($this->getRequest()->isPost()) {\n IF($form->isValid($this->getRequest()->getParams())) {\n $actionRow = new Admin_Model_DbRow_Action(array(\n 'mcId' => $ctrl->get('id'),\n 'actionName' => $this->getRequest()->getParam('actionname'),\n 'enabled' => 0,\n 'description' => $this->getRequest()->getParam('description', '')\n ));\n\n $this->dbAction->insert($actionRow->toDbArray());\n $this->_redirect('admin/action/scan/control/' . $ctrl->get('id'));\n\n } ELSE {\n $form->addError('Exexpected error occured');\n }\n }\n\n $this->view->form = $form;\n $this->view->controller = $ctrl;\n }", "public function addAction(\\NMC\\Migration\\ActionInterface $action)\n {\n $this->actions[] = $action;\n }", "static public function constructRequestID($action, $ident)\n\t{\n\t\treturn base64_encode($action . '|' . $ident);\n\t}", "public function commentAction() {\r\n $data = json_decode($_POST['data'], true);\r\n if (empty($data['comments'])) {\r\n exit('access deny!');\r\n }\r\n\r\n if (stristr($data['sourceid'], 'nav_fun_')) {\r\n $id = intval(str_ireplace('nav_fun_', '', $data['sourceid']));\r\n $info = Nav_Service_NewsDB::getRecordDao()->get($id);\r\n if (!empty($info['id'])) {\r\n $total = $info['c_num'] + 1;\r\n Nav_Service_NewsDB::getRecordDao()->update(array('c_num' => $total), $id);\r\n $rcKey = 'NAV_FUN_OP:' . intval($info['id']);\r\n Common::getCache()->hSet($rcKey, 'c_num', $total);\r\n }\r\n }\r\n\r\n $addData = array(\r\n 'content' => trim($data['comments'][0]['content']),\r\n 'ctime' => substr($data['comments'][0]['ctime'], 0, 10),\r\n 'ip' => $data['comments'][0]['ip'],\r\n 'cmtid' => $data['comments'][0]['cmtid'],\r\n 'userid' => $data['comments'][0]['user']['userid'],\r\n 'sourceid' => $data['sourceid'],\r\n 'url' => $data['url'],\r\n 'created_at' => Common::getTime(),\r\n );\r\n\r\n // error_log(date('Y-m-d H:i:s') . \" \" . Common::jsonEncode($addData) . \"\\n\", 3, '/tmp/3g_changyan_comment');\r\n User_Service_Changyan::getDao()->insert($addData);\r\n\r\n exit;\r\n }", "private function setAction($action) {\n if (is_int($action) || is_string($action)) {\n $this->action = $action;\n }\n }", "function comment_ID()\n {\n }", "function owa_editPostActionTracker($post_id, $post) {\r\n\t\r\n\t// we don't want to track autosaves...\r\n\tif(wp_is_post_autosave($post)) {\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t$label = $post->post_title;\r\n\t$owa->trackAction('wordpress', $post->post_type.' edited', $label);\r\n}", "function action_comment_insert_after( $comment )\n\t{\n\t\tif ( $comment->status == Comment::STATUS_APPROVED ) {\n\t\t\t$this->update_post_modified( $comment->post_id );\n\t\t\tEventLog::log( 'bumped post ' . $comment->post_id, 'info', 'default', 'bumping' );\n\t\t}\n\t}", "public function post_as_comment($type,$id,$url,$self_title) {\n\t\t$time = strtotime($this->updated); \n \n\t\t$email = '';\n\t\t// Pulls user data\n\t\tif ($this->webfinger !== false) {\n\t\t\t$email = $this->webfinger->get_email();\n\t\t\tif (method_exists($GLOBALS['FORUM_DRIVER'], 'get_member_from_email_address'))\n\t\t\t{\n\t\t\t\t$uid = $GLOBALS['FORUM_DRIVER']->get_member_from_email_address($email);\n\t\t\t}\n\t\t}\n\t\t$this->do_salmon_as_comment($type,$id,$url,$self_title,$this->title,$this->content,$email,$this->author_name,NULL,NULL);\n\t}", "public function addActions()\n {\n }", "function setAction($action);", "public function addComment()\n {\n session_start();\n $superglobalsPost = $this->getSuperglobals()->get_POST();\n $newComment = new CommentManager;\n $superglobalsPost['status'] = \"waiting\";\n $newComment->createComment($superglobalsPost);\n if (isset($superglobalsPost['post_id'])) {\n $post_id = $superglobalsPost['post_id'];\n }\n $titleAction = \"Confirmation d'enregistrement\"; //confirmation message\n $actionConfirmation = \"/post?id=\" . $post_id;\n $textConfirmation = \"Votre commentaire a bien été enregistré\";\n echo $this->getRender()->render('confirmationTemplate.twig', [\n 'titleAction' => $titleAction,\n 'actionConfirmation' => $actionConfirmation,\n 'textConfirmation' => $textConfirmation,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }", "function addCommentHandler() {\n global $inputs;\n\n $content = $inputs['content'];\n $id = $inputs['id'];\n $replyId = insert('reply',[\n 'content' => $content\n ]);\n\n insert('posting_reply',[\n 'posting_id' => $id,\n 'reply_id' => $replyId\n ]);\n\n insert('member_reply',[\n 'member_id' => getLogin()['mid'],\n 'posting_id' => $id\n ]);\n\n formatOutput(true, 'success');\n}", "public function actionAddVehicleCommentInd(){\t \n\t date_default_timezone_set(\"Europe/London\");\n\t \n\t // Gets basic vehicle info used in the save\n\t $vehicle = Vehicles::model()->getBasicInfo($_POST['vehicle_id']);\n\t \n\t // Adds the vehicle comment\n\t $vC = new VehicleComments();\n\t $vC->added_by = Yii::app()->user->id;\n\t $vC->comment = $_POST['comment'];\n\t $vC->date_added = date(\"Y-m-d H:i:s\");\n\t $vC->vehicle_id = $_POST['vehicle_id'];\n\t $vC->make_model_id = $vehicle['make_model_id'];\n\t $vC->save();\n\t}", "public function annimalAddAction()\n {\n }", "public function addAction($action)\n {\n $this->guardLimitTen();\n /*if($action instanceof Action){\n return $this->actions()->save($action);\n }else if($action instanceof Collection){\n return $this->actions()->saveMany($action);\n } else{ //Assoc Array\n return $this->actions()->create($action);\n }*/\n return $this->actions()->create($action);\n }", "public function add_action( $action_name, $callback ){\n if ( !isset(self::$actions[$action_name]) ) {\n self::$actions[$action_name] = array();\n }\n self::$actions[$action_name][] = $callback;\t\n }", "function bp_activity_action_post_comment() {\n\n\tif ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'reply' ) )\n\t\treturn false;\n\n\t// Check the nonce\n\tcheck_admin_referer( 'new_activity_comment', '_wpnonce_new_activity_comment' );\n\n\t$activity_id = apply_filters( 'bp_activity_post_comment_activity_id', $_POST['comment_form_id'] );\n\t$content = apply_filters( 'bp_activity_post_comment_content', $_POST['ac_input_' . $activity_id] );\n\n\tif ( empty( $content ) ) {\n\t\tbp_core_add_message( __( 'Please do not leave the comment area blank.', 'buddypress' ), 'error' );\n\t\tbp_core_redirect( wp_get_referer() . '#ac-form-' . $activity_id );\n\t}\n\n\t$comment_id = bp_activity_new_comment( array(\n\t\t'content' => $content,\n\t\t'activity_id' => $activity_id,\n\t\t'parent_id' => false\n\t));\n\n\tif ( !empty( $comment_id ) )\n\t\tbp_core_add_message( __( 'Reply Posted!', 'buddypress' ) );\n\telse\n\t\tbp_core_add_message( __( 'There was an error posting that reply, please try again.', 'buddypress' ), 'error' );\n\n\tbp_core_redirect( wp_get_referer() . '#ac-form-' . $activity_id );\n}", "public function edit_postAction() {\n\t\t$info = $this->getPost(array('id', 'status'));\n\t\t$ret = Activity_Service_ShareQq::update($info, intval($info['id']));\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功.');\n\t}", "function logAction($action) {\n\tglobal $dbLog;\n\n\t$dbLog->exec('INSERT INTO log (descripcion) VALUES (\"'.$action.'\")');\n}", "public function add_comment( $id, $comment ) {\n\n\t\tif ( isset( $_POST['wp_reviews_score'] ) and ! empty( $_POST['wp_reviews_score'] ) ) {\n\n\t\t\t//Save Rating\n\t\t\tupdate_comment_meta( $id, 'score', sanitize_text_field( $_POST['wp_reviews_score'] ) );\n\n\t\t\t//Send Email\n\t\t\tif ( WP_REVIEWS_INSURANCE::$option['email_auth'] == 1 ) {\n\n\t\t\t\t//Generate User Link\n\t\t\t\t$auth_key = wp_generate_password( 50, false );\n\t\t\t\t$link = add_query_arg( array( 'wp_confirm_reviews_insurance' => $auth_key ), home_url() );\n\t\t\t\tupdate_comment_meta( $id, 'auth_key', sanitize_text_field( $auth_key ) );\n\n\t\t\t\t//Email text\n\t\t\t\t$email_opt = get_option( 'wp_reviews_email_opt' );\n\t\t\t\t$email_text = str_replace( array( '[fullname]', '[link]' ), array( $comment->comment_author, '<a href=\"' . $link . '\" target=\"_blank\">Confirm Your Review</a>' ), $email_opt['email_body'] );\n\t\t\t\t$email_subject = str_replace( array( '[fullname]', '[sitename]' ), array( $comment->comment_author, get_bloginfo( 'name' ) ), WP_REVIEWS_INSURANCE::$option['email_subject'] );\n\t\t\t\tUtility::send_mail( $comment->comment_author_email, $email_subject, $email_text );\n\n\t\t\t} else {\n\t\t\t\tupdate_comment_meta( $id, 'comment_approve_user', 'yes' );\n\t\t\t}\n\t\t}\n\t}", "static public function add($controller_id,$name,$description) {\n\t\t$mAction=new Maerdo_Model_Action();\n\t\t// verify if action exist\n\t\t$actions=$mAction->findByField('controller_id',$controller_id,$mAction);\n\t\tforeach($actions as $action) {\n\t\t\tif($action->name==$name)\n\t\t\t\treturn(\"-1\");\n\t\t}\n\t\t\n\t\t$newAction=new Maerdo_Model_Action();\t\t\t\n\t\t$newAction->controller_id=$controller_id;\n\t\t$newAction->name=$name;\n\t\t$newAction->description=$description;\n\t\t$newAction->save();\n\t\treturn(\"true\");\n\t}", "public function getActionType() {\n\t\t$comment_subtype = $this->comment->getSubtype();\n\n\t\t$object_type = $this->object->getType();\n\t\t$object_subtype = $this->object->getSubtype() ? : 'default';\n\t\t$keys = [\n\t\t\t\"interactions:action:$comment_subtype:on:$object_type:$object_subtype\",\n\t\t\t\"interactions:action:$comment_subtype:on:$object_type\",\n\t\t\t\"interactions:action:$comment_subtype\",\n\t\t];\n\t\tforeach ($keys as $key) {\n\t\t\tif (elgg_language_key_exists($key)) {\n\t\t\t\treturn elgg_echo($key, array(), $this->language);\n\t\t\t}\n\t\t}\n\t\treturn elgg_echo('interactions:action:comment', $this->language);\n\t}", "function registerAction($group, $action) {\n if (!(checkit::isNoHTML($group, TRUE) && checkit::isNoHTML($action, TRUE))) {\n return NULL;\n }\n $group = trim($group);\n $action = trim($action);\n $groupId = $this->getGroupIdByName($group);\n if ($groupId === NULL) {\n $groupId = $this->databaseInsertRecord(\n $this->tableGroups,\n 'actiongroup_id',\n array('actiongroup_name' => $group)\n );\n if ($groupId === FALSE) {\n return NULL;\n }\n }\n $actionId = $this->databaseInsertRecord(\n $this->tableActions,\n 'action_id',\n array('action_group' => $groupId, 'action_name' => $action)\n );\n if ($actionId !== FALSE) {\n $this->logMsg(\n MSG_INFO,\n PAPAYA_LOGTYPE_SYSTEM,\n 'Action dispatcher registered new action',\n sprintf(\n 'Automatically registered action %s in group %s',\n $action,\n $group\n )\n );\n return $actionId;\n }\n return NULL;\n }", "public function add() {\n $post_id = $this->request->data['Comment']['post_id'];\n $user_id = $this->Auth->user('id');\n \n \n if ($this->request->is('post')) {\n \n //Post id is not numeric (avoid SQL injection)\n if (!is_numeric($post_id)) {\n $this->Flash->setError(__(\"Vous ne pouvez pas commenter ce post\"));\n return $this->redirect($this->referer());\n }\n \n //Everything is ok, create the comment\n $this->Comment->create();\n $this->request->data['Comment']['user_id'] = $user_id;\n if ($this->Comment->save($this->request->data)) {\n return $this->redirect($this->referer());\n }\n \n $this->Flash->error(__('Ajout de commentaire impossible.'));\n }\n }", "private function comment_edit_submit( ) {\n\n if ( ! ( in('post_ID') || in('comment_ID') || in('comment_parent') ) ) ferror(-500481, \"None of post_ID, comment_ID, comment_parent has provided.\");\n $comment_ID = in( 'comment_ID' );\n $update = $comment_ID ? true : false;\n \n \n if ( $update ) {\n $comment = get_comment( $comment_ID );\n $post_ID = $comment->comment_post_ID;\n }\n else {\n $post_ID = in('post_ID');\n if ( empty( $post_ID ) ) {\n $comment = get_comment(in('comment_parent'));\n $post_ID = $comment->comment_post_ID;\n }\n }\n forum()->setCategoryByPostID($post_ID);\n\n\n\n //\n if ( $update ) { // update\n $this->endIfNotMyComment( $comment_ID );\n remove_filter( 'pre_comment_content', 'wp_filter_kses' );\n $re = wp_update_comment([\n 'comment_ID' => $comment_ID,\n 'comment_content' => in('comment_content')\n ]);\n add_filter( 'pre_comment_content', 'wp_filter_kses' );\n\n if ( ! $re ) {\n // error or content has not changed.\n }\n }\n else { // new\n $user_ID = $this->get_post_author();\n $user = get_user_by( 'id', $user_ID );\n $comment_ID = wp_insert_comment([\n 'comment_post_ID' => $post_ID,\n 'comment_parent' => in('comment_parent'),\n 'comment_author' => $user->user_login,\n 'user_id' => $user_ID,\n 'comment_content' => in('comment_content'),\n 'comment_approved' => 1,\n ]);\n if ( ! $comment_ID ) {\n $this->errorResponse(-50302, \"Comment was not created\");\n }\n }\n\n //$this->updateFileWithPost( FORUM_COMMENT_POST_NUMBER + $comment_ID );\n\n // $url = get_permalink( $post_ID ) . '#comment-' . $comment_ID ; // this is not used.\n\n //\n $files = in('files');\n if ( $files ) {\n $arr = explode('| |', $files);\n $files = array_filter( $arr );\n comment()->meta( $comment_ID, 'files', $files );\n }\n\n\n\n // Save All extra input into post meta.\n comment()->saveAllMeta( $comment_ID );\n\n\n $o = [ 'post_ID' => $post_ID, 'comment_ID' => $comment_ID ];\n // if ( in('response') == 'ajax' ) $o['comment'] = comment()->get_comment_with_meta( $comment_ID );\n $this->response( $o );\n }", "public function log( $action_id, $message, DateTime $date = null ) {\n\t\tif ( empty( $date ) ) {\n\t\t\t$date = as_get_datetime_object();\n\t\t} else {\n\t\t\t$date = clone $date;\n\t\t}\n\n\t\t$date_gmt = $date->format( 'Y-m-d H:i:s' );\n\t\tActionScheduler_TimezoneHelper::set_local_timezone( $date );\n\t\t$date_local = $date->format( 'Y-m-d H:i:s' );\n\n\t\t/** @var \\wpdb $wpdb */\n\t\tglobal $wpdb;\n\t\t$wpdb->insert( $wpdb->actionscheduler_logs, [\n\t\t\t'action_id' => $action_id,\n\t\t\t'message' => $message,\n\t\t\t'log_date_gmt' => $date_gmt,\n\t\t\t'log_date_local' => $date_local,\n\t\t], [ '%d', '%s', '%s', '%s' ] );\n\n\t\treturn $wpdb->insert_id;\n\t}", "static function RegisterAction($msg, $detail) {\r\n $date = date('y-m-d');\r\n $time = date('y-m-d-H-i-s');\r\n $user = '[' . $msg . '] : ';\r\n $message = \"\\n\" . $user . \"\" . $detail . \" : \" . $time;\r\n $errorFile = './' . ACTIONLOGFILE_FOLDER . \"/\" . $date . \".cvs\";\r\n if (file_exists(ACTIONLOGFILE_FOLDER)) {\r\n $file = fopen($errorFile, \"a+\");\r\n while (feof($file)) {\r\n fgets($file);\r\n }\r\n fwrite($file, $message);\r\n } else {\r\n $errorFile = '../' . ACTIONLOGFILE_FOLDER . \"/\" . $date . \".cvs\";\r\n $file = fopen($errorFile, \"a+\");\r\n while (feof($file)) {\r\n fgets($file);\r\n }\r\n fwrite($file, $message);\r\n }\r\n }", "public function setAction($action);", "public function _editAction() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$action_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$action_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->getAllWhere ( 'form_id = \"' . ( int ) $this->_getFormId () . '\"' );\n\t\t\n\t\t$action = $this->getModel ( 'action' );\n\t\t$action->get ( ( int ) $action_id );\n\t\t\n\t\t$this->loadPluginModel ( 'actions' );\n\t\t\n\t\t$this->setView ( 'edit_action' );\n\t\n\t}", "function commentmeta_insert_handler( $meta_id, $comment_id=null ) {\n\t\tif ( empty( $comment_id ) || wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t$this->add_ping( 'db', array( 'commentmeta' => $meta_id ) );\n\t}", "protected function createAction()\n {\n }", "function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "function map_action($action) {\n return $action . '_action';\n }", "public function processCommentModeration($sAction, $iId)\n\t{\t\tif ($sAction == 'approve')\n\t\t{\n\t\t\t// Update the blog comment count\n\t\t\tPhpfox::getService('photo.process')->updateCounter($iId, 'total_comment');\n\t\t\t\n\t\t\t// Get the blogs details so we can add it to our news feed\n\t\t\t$aPhoto = $this->database()->select('u.full_name, u.user_id, u.user_name, p.title_url, p.destination, ct.text_parsed, p.album_id, pa.name_url AS album_url, c.comment_id, c.user_id AS comment_user_id')\t\t\t\n\t\t\t\t->from($this->_sTable, 'p')\t\t\t\t\t\t\t\t\n\t\t\t\t->join(Phpfox::getT('comment'), 'c', 'c.type_id = \\'photo\\' AND c.item_id = p.photo_id')\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.user_id = c.user_id')\n\t\t\t\t->join(Phpfox::getT('comment_text'), 'ct', 'ct.comment_id = c.comment_id')\n\t\t\t\t->leftJoin(Phpfox::getT('photo_album'), 'pa', 'pa.album_id = p.album_id')\n\t\t\t\t->where('p.photo_id = ' . (int) $iId)\n\t\t\t\t->execute('getSlaveRow');\n\t\t\t\t\n\t\t\t// Add to news feed\n\t\t\t(Phpfox::isModule('feed') ? Phpfox::getService('feed.process')->add('comment_photo', $iId, $aPhoto['text_parsed'], Phpfox::getUserBy('user_name'), $aPhoto['user_id'], $aPhoto['full_name'], $aPhoto['destination'], $aPhoto['comment_id']) : null);\n\t\t\t\n\t\t\t// Send the user an email\t\t\t\n\t\t\t$sLink = ($aPhoto['album_id'] ? Phpfox::getLib('url')->makeUrl(Phpfox::getUserBy('user_name'), array('photo', $aPhoto['album_url'], $aPhoto['title_url'])) : Phpfox::getLib('url')->makeUrl(Phpfox::getUserBy('user_name'), array('photo', 'view', $aPhoto['title_url'])));\t\t\t\t\t\n\t\t\t\n\t\t\tPhpfox::getLib('mail')->to($aPhoto['comment_user_id'])\n\t\t\t\t->subject(array('photo.full_name_approved_your_comment_on_site_title', array('full_name' => Phpfox::getUserBy('full_name'), 'site_title' => Phpfox::getParam('core.site_title'))))\n\t\t\t\t->message(array('photo.full_name_approved_your_comment_on_site_title_message', array(\n\t\t\t\t\t\t\t'full_name' => Phpfox::getUserBy('full_name'),\n\t\t\t\t\t\t\t'site_title' => Phpfox::getParam('core.site_title'),\n\t\t\t\t\t\t\t'link' => $sLink\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t->notification('comment.approve_new_comment')\n\t\t\t\t->send();\n\t\t}\n\t}", "function add_action($tag = '', $function_to_add = '', $priority = 10, $accepted_args = 1)\n {\n }", "public function edit_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'id', 'ad_type', 'ad_ptype', \r\n\t\t\t\t'title', 'link', 'activity', 'clientver', 'img', 'start_time', 'end_time', 'status',\r\n\t\t\t\t'hits', 'channel_id', 'module_id', 'cid', 'channel_code', 'ptype_id', 'is_recommend', 'action'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$ret = Gou_Service_Ad::updateAd($info, intval($info['id']));\r\n\t\tif (!$ret) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功.'); \t\t\r\n\t}", "public function addCommentActionLinks($actions, $comment)\n {\n if(WPLMS_Assignments::hasAttachment($comment->comment_ID)){\n $url = $_SERVER[\"SCRIPT_NAME\"] . \"?c=$comment->comment_ID&deleteAtt=1\";\n $actions['deleteAtt'] = \"<a href='$url' title='\".esc_attr__('Delete Attachment','wplms-assignments').\"'>\".__('Delete Attachment','wplms-assignments').'</a>';\n }\n return $actions;\n }", "public function NewCommentEpisode(){\r\n $this->comment();\r\n $this->pseudoPost();\r\n $this->contentPost();\r\n $this->_commentManager->AddComment($this->_pseudoPostSecure, $this->_contentPostSecure, $_GET['id'],false,true); \r\n header('location: Episode&id='.$_GET[\"id\"]); \r\n }", "public function updateCartItem(string $id, string $action): void\n {\n $item = CartFcd::get($id);\n if (strcmp($action, '-') == 0){\n $qty = $item->qty - 1;\n }else{\n $qty = $item->qty + 1;\n }\n CartFcd::update($id, $qty);\n $this->updateCart();\n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'channel_id', 'link', 'start_time', 'end_time','hits', 'status'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Notice::addNotice($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "protected function updateCommentForUpdatableVersionsAction() {}", "public function addAction()\n {\n $isPosted = $this->request->getPost('doCreate');\n if (!$isPosted) {\n $this->response->redirect($this->request->getPost('redirect'));\n }\n $comment = $this->getCommentSessionValuesFromForm();\n $comments = new \\Anax\\Comment\\CommentsInSession();\n $comments->setDI($this->di);\n $comments->add($comment);\n $this->response->redirect($this->request->getPost('redirect'));\n }", "public function modifyAction($actionId, $request)\n {\n return $this->start()->uri(\"/api/user/action\")\n ->urlSegment($actionId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "function hook_dms_client_actions_alter(&$actions) {\r\n // Alter any action, add a new one...\r\n}", "public function addCommentToThePhotoAction()\n {\n \t$param = $this->getRequest()->getParams();\n \n \t$ret_r = array();\n \t\n \t$photo_id = $param['photo_id'] ;\n \t$photo_posted_by_user_id = $param['album_posted_by'];\n \t$comment = $param['comment'] ;\n \n \t//Making a entry to like table for wallpost.\n \t$filterObj = Zend_Registry::get('Zend_Filter_StripTags');\n \t$comm_text = nl2br($filterObj->filter($this->getRequest()->getParam( 'comment' ) ));\n \t$comment_on_photo_id = \\Extended\\comments::addComment( $comm_text, Auth_UserAdapter::getIdentity()->getId(), NULL, NULL, $photo_id );\n \t$comments_obj = \\Extended\\comments::getRowObject( $comment_on_photo_id );\n \n \t//setting comment count for photo\n \t\\Extended\\socialise_photo::commentCountIncreament( $photo_id );\n \t\t\t\n \t// get socialise photo object \n \t$socialisephoto_obj = \\Extended\\socialise_photo::getRowObject( $photo_id );\n \t\n \t\n \t//Adding comment for wallpost in comments table( for special case only. )\n \tif( $socialisephoto_obj->getWallPost() )\n \t{\n \t\tif( $socialisephoto_obj->getWallPost()->getPost_update_type() == \\Extended\\wall_post::POST_UPDATE_TYPE_PROFILE_PHOTO_CHANGED )\n \t\t{\n \t\t\t$wallpost_comment_id = \\Extended\\comments::addComment( $comm_text, Auth_UserAdapter::getIdentity()->getId(), null, $socialisephoto_obj->getWallPost()->getId() );\n \t\t\t//Adding same comment id in photo comment record.\n \t\t\t$photo_comment_obj = \\Extended\\comments::getRowObject($comment_on_photo_id);\n \t\t\t$photo_comment_obj->setSame_comment_id($wallpost_comment_id);\n \t\t\t$em = Zend_Registry::get('em');\n \t\t\t$em->persist( $photo_comment_obj );\n \t\t\t$em->flush();\n \t\t\t\n \t\t\t$ret_r['wallpost_id'] = $socialisephoto_obj->getWallPost()->getId();\n \t\t\t$ret_r['wallpost_comment_id'] = $wallpost_comment_id;\n \t\t}\n \t}\n \t\n \t/* \tIf there is single photo inside the group\n \t in default album, then also add comment for its\n \tassociated wallpost.\n \t*/\n \tif( $socialisephoto_obj->getPhotoGroup() )\n \t{\n \t\tif( $socialisephoto_obj->getPhotoGroup()->getSocialisePhoto()->count() == 1 )\n \t\t{\n \t\t\t$wallpost_comment_id = \\Extended\\comments::addComment( $comm_text, Auth_UserAdapter::getIdentity()->getId(), null, $socialisephoto_obj->getPhotoGroup()->getWallPost()->getId() );\n \t\t\t//Adding same comment id in photo comment record.\n \t\t\t$photo_comment_obj = \\Extended\\comments::getRowObject($comment_on_photo_id);\n \t\t\t$photo_comment_obj->setSame_comment_id($wallpost_comment_id);\n \t\t\t$em = Zend_Registry::get('em');\n \t\t\t$em->persist( $photo_comment_obj );\n \t\t\t$em->flush();\n \t\t\t$ret_r['wallpost_id'] = $socialisephoto_obj->getPhotoGroup()->getWallPost()->getId();\n \t\t\t$ret_r['wallpost_comment_id'] = $wallpost_comment_id;\n \t\t}\n \t}\n \t\n \t\t\t\n \t$ret_r['comment_id'] = $comment_on_photo_id;\n \t$ret_r['comm_text'] = $comm_text;\n \t$ret_r['commenter_id'] = Auth_UserAdapter::getIdentity()->getId();\n \t$ret_r['commenter_fname'] = Auth_UserAdapter::getIdentity()->getFirstname();\n \t$ret_r['commenter_lname'] = Auth_UserAdapter::getIdentity()->getLastname();\n \t$ret_r['commenter_small_image'] = Helper_common::getUserProfessionalPhoto(Auth_UserAdapter::getIdentity()->getId(), 3);\n \t$ret_r['comment_count'] = $socialisephoto_obj->getSocialise_photosComment()->count();\n \t$ret_r['created_at'] = Helper_common::nicetime( $comments_obj->getCreated_at()->format( \"Y-m-d H:i:s\" ));\n \t\n \t\n \t//gathering information for sending email to user on whom post, comment is done.\n \t$subject = \"iLook - User commented on your photo\";\n \t$msg='';\n \t$msg = \"<p style='margin:20px 20px 0 0; padding:0; font-size:14px; font-family:Arial, Helvetica, sans-serif; color:#3a3a3a'>\n \t\".ucfirst($ret_r['commenter_fname']).\" \".ucfirst($ret_r['commenter_lname']).\" commented on your photo</p>\n \t<p style='margin:20px 20px 0 0; padding:0; font-size:14px; font-family:Arial, Helvetica, sans-serif; color:#3a3a3a'>\n \t<b>'\".$ret_r['comm_text'].\"'</b>\n \t</p>\";\n \t$recipient_name = ucfirst($socialisephoto_obj->getSocialise_photosPosted_by()->getFirstname()).\" \".ucfirst($socialisephoto_obj->getSocialise_photosPosted_by()->getLastname());\n \t$recipient_email = $socialisephoto_obj->getSocialise_photosPosted_by()->getEmail();\n \t\t\n \t// check if user is not commenting on his own post, only then mail will be sent\n \tif(Auth_UserAdapter::getIdentity()->getId() != $socialisephoto_obj->getSocialise_photosPosted_by()->getId())\n \t{\n \t\t//sending email to user on whom post comment is done\n \t\t\\Email_Mailer::sendMail(\n $subject,\n \t\t\t\t$msg,\n \t\t\t\t$recipient_name,\n \t\t\t\t$recipient_email,\n \t\t\t\tarray(),\n \t\t\t\t\"iLook Team\",\n \t\t\t\tAuth_UserAdapter::getIdentity()->getEmail(),\n \t\t\t\t\"Hello \",\n \t\t\t\t\"Thank you\");\n \t}\n \t\n \techo Zend_Json::encode($ret_r);\n \t\t\n \tdie;\n }", "public function add_action($action, $method, $priority = 10, $accepted_args = 1)\n {\n }", "function log_admin_action($cat, $action, $forum_id = \"\", $thread_id = \"\", $subject = \"\", $new_forum_id = \"\", $post_id = \"\", $new_thread_id = \"\"){\r\n\tglobal $userdata;\r\n\t\r\n\t$result = dbquery(\"INSERT INTO \".DB_ADMIN_LOG.\"\r\n\t(u_id, cat, forum_id, movedto_forum_id, thread_id, movedto_thread_id, post_id, action, subject, datestamp, log_ip)\r\n\tVALUES\r\n\t(\"._db($userdata['user_id']).\", \"._db($cat).\", \"._db($forum_id).\", \"._db($new_forum_id).\", \"._db($thread_id).\", \"._db($new_thread_id).\",\r\n\t\"._db($post_id).\", \"._db($action).\", \"._db($subject).\", '\".time().\"', '\".USER_IP.\"');\");\r\n}", "public function xadmin_createaction() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$action_title = $args [1];\n\t\t$action_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$action = $this->getModel ( 'action' );\n\t\t$this->session->returnto ( 'actions' );\n\t\t\n\t\t/* create the form */\n\t\t$action->createNewAction ( $action_title, $action_type );\n\t\t\n\t\t$this->loadPluginModel ( 'actions' );\n\t\t$plug = Plugins_Actions::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateAction', $action );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateAction_ExtendDataTable', $action );\n\t\t\n\t\t/* set argument for the edit view */\n\t\t$this->setArguments ( array ($action->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t\n\t\t/* quiet redirect */\n\t\t$this->_redirect ( '_editAction' );\n\t}", "public function flag_comment() {\n\t\t\tif ( empty( $_REQUEST[ 'comment_id' ] ) || (int) $_REQUEST[ 'comment_id' ] != $_REQUEST[ 'comment_id' ] ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_values_message ) );\n\t\t\t}\n\n\t\t\t$comment_id = (int) $_REQUEST[ 'comment_id' ];\n\t\t\tif ( $this->already_flagged( $comment_id ) ) {\n\t\t\t\t$this->cond_die( __( $this->already_flagged_message ) );\n\t\t\t}\n\n\t\t\t// checking if nonces help\n\t\t\tif ( ! isset( $_REQUEST[ 'sc_nonce' ] ) || ! wp_verify_nonce( $_REQUEST[ 'sc_nonce' ], $this->_plugin_prefix . '_' . $this->_nonce_key ) ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_nonce_message ) );\n\t\t\t} else {\n\t\t\t\t$this->mark_flagged( $comment_id );\n\t\t\t\t$this->cond_die( __( $this->thank_you_message ) );\n\t\t\t}\n\n\t\t}", "public function addAction(NonKeyAction $a){\n\t\t$this->_on_click[] = $a;\n\t}", "public function addCommentToTheAlbumAction()\n{\n\t\t$current_user_obj = Auth_UserAdapter::getIdentity();\n\ttry {\n\t\t//getting the album's object.\n\t\t$album_obj = \\Extended\\socialise_album::getRowObject( $this->getRequest()->getParam( 'album_id' ) );\n\n\t\tif( $album_obj )\n\t\t{\n\t\t\t//Making a entry to comment table for album's comment .\n\t\t\t$filterObj = Zend_Registry::get('Zend_Filter_StripTags');\n\t\t\t$comm_text = $filterObj->filter( $this->getRequest()->getParam( 'comment' ) );\n\t\t\t \n\t\t\t$comment_on_album_id = \\Extended\\comments::addComment( $comm_text, $current_user_obj->getId(), null, NULL, NULL, $album_obj->getId() );\n\t\t\t \n\t\t\t$comments_obj = \\Extended\\comments::getRowObject( $comment_on_album_id );\n\t\t\t \n\t\t\t \n\t\t\t$ret_r = array();\n\t\t\t$ret_r['comm_id'] = $comment_on_album_id;\n\t\t\t$ret_r['comm_text'] = $comm_text;\n\t\t\t$ret_r['commenter_id'] = $current_user_obj->getId();\n\t\t\t$ret_r['commenter_fname'] = $current_user_obj->getFirstname();\n\t\t\t$ret_r['commenter_lname'] = $current_user_obj->getLastname();\n\t\t\t$ret_r['commenter_small_image'] = Helper_common::getUserProfessionalPhoto($current_user_obj->getId(), 3);\n\t\t\t$ret_r['comment_count'] = $album_obj->getSocialise_albumsComment()->count();\n\t\t\t$ret_r['wp_id'] = $album_obj->getId();\n\t\t\t$ret_r['created_at'] = Helper_common::nicetime( $comments_obj->getCreated_at()->format( \"Y-m-d H:i:s\" ));\n\t\t\t\n\t\t\t//gathering information for sending email to user on whom post, comment is done.\n\t\t\t$subject = \"iLook - User commented on your album\";\n\t\t\t$msg='';\n\t\t\t$msg = \"<p style='margin:20px 20px 0 0; padding:0; font-size:14px; font-family:Arial, Helvetica, sans-serif; color:#3a3a3a'>\n\t\t\t\".ucfirst($ret_r['commenter_fname']).\" \".ucfirst($ret_r['commenter_lname']).\" commented on your <a href='\".PROJECT_URL.'/'.PROJECT_NAME.\"profile/photos/uid/\".$album_obj->getSocialise_albumIlook_user()->getId().\"/id/\".$ret_r['wp_id'].\"'>album</a></p>\n\t\t\t<p style='margin:20px 20px 0 0; padding:0; font-size:14px; font-family:Arial, Helvetica, sans-serif; color:#3a3a3a'>\n\t\t\t<b>'\".$ret_r['comm_text'].\"'</b>\n\t\t\t</p>\";\n\t\t\t$recipient_name = ucfirst($album_obj->getSocialise_albumIlook_user()->getFirstname()).\" \".ucfirst($album_obj->getSocialise_albumIlook_user()->getLastname());\n\t\t\t$recipient_email = $album_obj->getSocialise_albumIlook_user()->getEmail();\n\t\t\t\n\t\t\t// check if user is not commenting on his own post, only then mail will be sent\n\t\t\tif(Auth_UserAdapter::getIdentity()->getId() != $album_obj->getSocialise_albumIlook_user()->getId())\n\t\t\t{\n\t\t\t\t//sending email to user on whom post comment is done\n\t\t\t\t\\Email_Mailer::sendMail($subject,\n\t\t\t\t\t\t$msg,\n\t\t\t\t\t\t$recipient_name,\n\t\t\t\t\t\t$recipient_email,\n\t\t\t\t\t\tarray(),\n\t\t\t\t\t\t\"iLook Team\",\n\t\t\t\t\t\tAuth_UserAdapter::getIdentity()->getEmail(),\n\t\t\t\t\t\t\"Hello \",\n\t\t\t\t\t\t\"Thank you\");\n \t\t\n\t\t\t}\n\t\t\techo Zend_Json::encode($ret_r);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Album does not exist anymore.\n\t\t\techo Zend_Json::encode(2);\n\t\t}\n\t}\n\tcatch (Exception $e)\n\t{\n\t\techo Zend_Json::encode(0);\n\t}\n\tdie;\n}", "public function edit(Action $action) {\r\n\t\t$stmt = $this->db->prepare(\"UPDATE accion set nombre=? where id_accion=?\");\r\n\t\t$stmt->execute(array($action->getActionname(),$action->getCodaction()));\r\n\t}" ]
[ "0.6026066", "0.59103847", "0.59017175", "0.58971786", "0.58580893", "0.5813083", "0.580871", "0.5801086", "0.5765656", "0.57079244", "0.56795454", "0.5637569", "0.5637569", "0.5637569", "0.5620889", "0.54837674", "0.5470566", "0.54642826", "0.5444568", "0.54409665", "0.54341334", "0.54257596", "0.54014784", "0.5385815", "0.53851956", "0.5382952", "0.5334958", "0.53251684", "0.53229755", "0.53103584", "0.53040445", "0.5295187", "0.52819586", "0.5279901", "0.5259818", "0.5246323", "0.5244897", "0.52426237", "0.52056766", "0.5186485", "0.51829314", "0.51720494", "0.51669425", "0.514323", "0.5141687", "0.51396966", "0.5136384", "0.5087988", "0.5077187", "0.5047381", "0.50408936", "0.50405663", "0.5029464", "0.50239915", "0.50172514", "0.50131047", "0.5003031", "0.49999574", "0.4989977", "0.4984503", "0.4982751", "0.4980595", "0.49752074", "0.49692398", "0.49665773", "0.4954735", "0.49546295", "0.49398667", "0.49366903", "0.49311057", "0.49181828", "0.4913224", "0.49127603", "0.4912549", "0.49111012", "0.49104568", "0.4907157", "0.49070743", "0.4897332", "0.48971024", "0.4887501", "0.48872596", "0.48852494", "0.48774254", "0.48767567", "0.48730564", "0.48676044", "0.486441", "0.48612973", "0.48606765", "0.4857349", "0.48424372", "0.48414344", "0.48376134", "0.48337072", "0.48329404", "0.48322743", "0.48307014", "0.48264498", "0.48203695" ]
0.71884966
0
Get URL to delete review with unique action id.
protected function GetDeleteWithActionIdURL($bUseFullUrl = false) { $sDeleteURL = ''; if (!empty($this->sqlData['action_id'])) { $aParameter = array(TdbShopArticleReview::URL_PARAM_ACTION_ID => $this->sqlData['action_id']); $sDeleteURL = TTools::GetExecuteMethodOnCurrentModuleURL('DeleteReview', $aParameter, $bUseFullUrl); } return $sDeleteURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeleteUrl()\n {\n return $this->getUrl('*/*/delete', array('id' => $this->getRequest()->getParam('id')));\n }", "public function delete_review(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\t$id = $this->uri->segment(4,0);\n\t\t\t$condition = array('id' => $id);\n\t\t\t$this->review_model->commonDelete(REVIEW,$condition);\n\t\t\t$this->setErrorMessage('success','Review deleted successfully');\n\t\t\tredirect('admin/review/display_review_list');\n\t\t}\n\t}", "public function getDeleteUrl()\n {\n return $this->getUrl('*/*/delete', ['id' => $this->getTemplateId()]);\n }", "public function actionDelete($id)\n\t{ \n GxcHelpers::deleteModel('Review', $id); \n\t}", "public function getClientDeletionURL($id)\n\t{\n\t\treturn $this->baseURL . \"/action/confirm/\" . $id;\n\t}", "public function getDeleteUrl()\n {\n return $this->getUrl('*/*/delete', ['id' => $this->getModelId()]);\n }", "public function getClientAskDeletionURL($id)\n\t{\n\t\treturn $this->baseURL . \"/action/delete/\" . $id;\n\t}", "public function delete(Review $review);", "protected function get_single_review_action_link( $review_id = 0, $action_name = '' ) {\n\n\t\t// Bail without the review ID or action name.\n\t\tif ( empty( $review_id ) || empty( $action_name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fetch the dataset for an edit link.\n\t\t$action_dataset = $this->get_row_action_dataset( $review_id, $action_name );\n\n\t\t// Bail without the action dataset.\n\t\tif ( empty( $action_dataset ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get our primary settings link.\n\t\t$settings_link = Helpers\\get_admin_menu_link( Core\\REVIEWS_ANCHOR );\n\n\t\t// Set the action link args.\n\t\t$action_linkset = array(\n\t\t\t'wbr-action-name' => $action_name,\n\t\t\t'wbr-item-id' => absint( $review_id ),\n\t\t\t'wbr-item-type' => 'review',\n\t\t\t'wbr-product-id' => $action_dataset['data']['product-id'],\n\t\t\t'wbr-nonce' => $action_dataset['nonce'],\n\t\t);\n\n\t\t// Create and return the string of the URL.\n\t\treturn add_query_arg( $action_linkset, $settings_link );\n\t}", "public function deleteAction() {\n\n\t\t//ONLY LOGGED IN USER CAN DELETE REVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n\t\t//SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('list_listing')->isValid())\n return;\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n\t\t//GET REVIEW ID AND REVIEW OBJECT\n $review_id = $this->_getParam('id');\n $review = Engine_Api::_()->getItem('list_reviews', $review_id);\n\n\t\t//ONLY REVIEW OWNER AND SUPER ADMIN CAN DELETE REVIEW\n if (!($review->owner_id == $viewer_id || $viewer->level_id == 1)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if ($this->getRequest()->isPost()) {\n\n $this->view->list = $list = Engine_Api::_()->core()->getSubject();\n $content_id = $this->_getParam('content_id');\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //DELETE REVIEW FROM DATABASE\n $review->delete();\n\n\t\t\t\t//DECREASE REVIEW COUNT\n\t\t\t\t$list->review_count--;\n\t\t\t\t$list->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //REDIRECT\n $url = $this->_helper->url->url(array('listing_id' => $list->getIdentity(), 'user_id' => $list->owner_id, 'slug' => $list->getSlug(), 'tab' => $content_id), 'list_entry_view', true);\n\n $this->_forward('success', 'utility', 'core', array(\n 'parentRefresh' => 3,\n 'parentRedirect' => $url,\n 'parentRedirectTime' => 1,\n 'messages' => array('Your Review has been deleted successfully.')\n ));\n } else {\n $this->renderScript('review/delete.tpl');\n }\n }", "public function destroy(Review $review)\n {\n // dd($review);\n $deleteReview = DB::table('reviews')->where('id', $review->id)->delete();\n return Redirect::route('dashboard.reviews');\n }", "public function GetDeleteURL($bUseFullUrl = false)\n {\n $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id);\n $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('DeleteReview', $aParameter, $bUseFullUrl);\n\n return $sReportLink;\n }", "public function actionDelete($id)\n {\n $this->service->removeReview($id);\n\n return $this->redirect(['index']);\n }", "public function delete($id) {\n\t\t$this->delete_reviews(['id'=>$id]);\n\t}", "public function destroy($id)\n {\n Review::findOrFail($id)->delete();\n // Review::findOrFail($review)->delete();\n return redirect()->back(); \n }", "public function deletereview()\n\n {\n $id = Input::get('id');\n Review::find(Input::get('id'))->delete();\n\n Vote::where('review_id',$id)->delete();\n\n return \"Your Review is successfully deleted\"; \n }", "public function getDeleteLink($entity)\n {\n return '?action=delete&sampleId=' . $entity->getSampleId();\n }", "public function destroy($id)\n {\n DB::table('ratings')->where('id', $id)\n \t\t\t\t\t->delete();\n //DB::table('ratings')->delete($id);\n\n return redirect()->route('admin.reviews')\n ->with('success',\n 'Review deleted successfully.');\n }", "public function productReviewDelete($id)\n {\n $review=ProductReview::find($id);\n $status=$review->delete();\n if($status){\n request()->session()->flash('success','Successfully deleted review');\n }\n else{\n request()->session()->flash('error','Something went wrong! Try again');\n }\n return redirect()->route('user.productreview.index');\n }", "function cat_delete_link()\n{\n return Parrot::getInstance()->getUrl(\"admin/category/\" . discussion::encode_title(cat_title()) . \"/delete\");\n}", "public function delete() {\n\n $review = Input::get('review');\n\n $rev = DB::table('film_review')\n ->where('fr_usr_id', Auth::user()->id)\n ->where('fr_id', $review)\n ->first();\n\n if ($rev) {\n\n DB::table('user_actions')\n ->where('type_id', 2)\n ->where('subject_id', Auth::user()->id)\n ->where('object_id', $rev->fr_fl_id)\n ->delete();\n\n DB::table('user_notifications')\n ->where('type', 'liked')\n ->where('object_type', 'review')\n ->where('user_id', Auth::user()->id)\n ->where('object_id', $review)\n ->delete();\n\n DB::table('film_review')\n ->where('fr_usr_id', Auth::user()->id)\n ->where('fr_id', $review)\n ->delete();\n\n DB::table('review_likes')\n ->where('review_id', $review)\n ->delete();\n }\n return 'true';\n }", "public function destroy($id)\n {\n Review::destroy($id);\n return redirect()->action('ReviewsController@index')->with('status', 'kommentaren är raderad!');\n }", "public function destroy(Review $review)\n {\n $review->delete();\n // redirect to a comments page\n }", "public function url_delete () {\n\t\tif ( ! $this->get(\"id\") ) {\n\t\t\t$this->response(array(\n\t\t\t\t\"status\" => false,\n\t\t\t\t\"error_code\" => 400\n\t\t\t), 400);\n\t\t}\n\n\t\t$this->db->delete(\"statistic_urls\", array(\n\t\t\t\"id\" => $this->get(\"id\")\n\t\t));\n\t}", "public function reviewGet($restaurant_id = null){\n if($restaurant_id != null){\n return $this->host.static::$url['reviewGet'].$restaurant_id;\n }\n return $this->host.static::$url['reviewGet'];\n }", "public function getDeleteLink()\n {\n $params = array(\n 'id' => $this->id\n );\n $link = Globals::getRouter()->assemble($params, $this->_deleteRoute, true);\n return $link;\n }", "function dokan_get_review_url( $user_id ) {\n $userstore = dokan_get_store_url( $user_id );\n\n return $userstore .\"reviews\";\n}", "protected function get_url_this_dele(){ return $this->input ['delete_url'] ;}", "function getDeleteUrl() {\n return assemble_url('people_company_user_delete', array(\n 'company_id' => $this->getCompanyId(),\n 'user_id' => $this->getId(),\n ));\n }", "public function getTaxRateDeleteUrl()\n {\n return $this->getUrl('tax/rate/ajaxDelete/');\n }", "public function deleteReview($review_id)\n\t{\n\t\t$model = self::model()->findByPk($review_id);\n\t\tif (empty($model)) throw new Exception('Review does not exists');\n\t\t$modelTransaction = $model->dbConnection->beginTransaction(); // Transaction for model begin\n\t\ttry {\n\t\t\tif (!$model->delete())\n\t\t\t\tthrow new Exception('Cannot delete review.');\n\t\t\t\n\t\t\tif ($model->is_draft==self::NO_DRAFT && $model->status==self::TYPE_APPROVED) {\n\t\t\t\t// Delete all comment & compliment of review\n\t\t\t\tYii::import('application.modules.reviews.models.JLComment');\n\t\t\t\tJLComment::model()->deleteAllByAttributes(array(\n\t\t\t\t\t'object_type' => JLComment::TYPE_REVIEW,\n\t\t\t\t\t'object_id' => $model->id,\n\t\t\t\t));\n\t\t\t\tYii::import('application.modules.reviews.models.JLCompliment');\n\t\t\t\tJLCompliment::model()->deleteAllByAttributes(array(\n\t\t\t\t\t'object_type' => JLCompliment::TYPE_REVIEW,\n\t\t\t\t\t'object_id' => $model->id,\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t// TODO: Delete top review in search page\n\t\t\t}\n\t\t\t\n\t\t\t$modelTransaction->commit();\n\t\t\t\n\t\t\tif ($model->is_draft==self::NO_DRAFT && $model->status==self::TYPE_APPROVED) {\n\t\t\t\t/***** Remove point of user *****/\n\t\t\t\t// Attach behavior for user\n\t\t\t\t$user = JLUser::getUserInfo($model->user_id);\n\t\t\t\tYii::import('application.modules.pointSystem.models.JLPointSystem');\n\t\t\t\t$user->attachBehavior('UserPoint', 'application.modules.pointSystem.components.behaviors.JLUserPointBehavior');\n\t\t\t\t$user->retrieveAction(JLPointSystem::WRITE_REVIEW, null, $model->id);\n\t\t\t\tif ($model->is_first)\n\t\t\t\t\t$user->retrieveAction(JLPointSystem::FIRST_REVIEW, null, $model->id);\n\t\t\t\t$user->detachBehavior('UserPoint');\n\t\t\t\t\n\t\t\t\t// Decrease reviews in business\n\t\t\t\tYii::import('application.modules.businesses.models.JLBusiness');\n\t\t\t\t$modelBiz = JLBusiness::model()->findByPk($model->business_id);\n\t\t\t\tif ($modelBiz) $modelBiz->decReviews();\n\t\t\t}\n\t\t\treturn array(\n\t\t\t\t'error' => false,\n\t\t\t\t'model' => $model,\n\t\t\t);\n\t\t} catch (Exception $e) {\n\t\t\t$modelTransaction->rollBack();\n\t\t\treturn array(\n\t\t\t\t'error' => true,\n\t\t\t\t'msg' => $e->getMessage(),\n\t\t\t);\n\t\t}\n\t}", "public function deleteAction() {\n\t\t$redirect_url = Minz_Request::param('r', false, true);\n\t\tif (!$redirect_url) {\n\t\t\t$redirect_url = array('c' => 'subscription', 'a' => 'index');\n\t\t}\n\t\tif (!Minz_Request::isPost()) {\n\t\t\tMinz_Request::forward($redirect_url, true);\n\t\t}\n\n\t\t$id = Minz_Request::param('id');\n\n\t\tif (self::deleteFeed($id)) {\n\t\t\tMinz_Request::good(_t('feedback.sub.feed.deleted'), $redirect_url);\n\t\t} else {\n\t\t\tMinz_Request::bad(_t('feedback.sub.feed.error'), $redirect_url);\n\t\t}\n\t}", "function delete_link($title) {\n\treturn BASE . 'discussion' . DS . discussion::encode_title($title) . DS . 'delete';\n}", "function getDeleteUrl() {\n \treturn assemble_url('people_company_delete', array('company_id' => $this->getId()));\n }", "public function get_admin_delete_url() {\n $url = add_query_arg( array(\n 'ruleset_id' => $this->post_id,\n 'action' => 'delete',\n ), admin_url( 'admin.php?page=wc-settings&tab=shipping&section=woo_conditional_shipping' ) );\n\n return $url;\n }", "function deleteReview($reviewId) {\n $db = phpmotorsConnect();\n $sql = 'DELETE FROM reviews WHERE reviewId = :reviewId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':reviewId', $reviewId, PDO::PARAM_INT);\n $stmt->execute();\n $rowsChanged = $stmt->rowCount();\n $stmt->closeCursor();\n return $rowsChanged;\n }", "public function url()\n\t{\n\t\treturn Url::to(\"review/\".$this->id.\"/\".$this->slug.\"/\".Session::get('Lang'));\n\t}", "public function getDelete($actionId = '')\n {\n if (!empty($actionId)) {\n $dataHelpAction = new TfHelpAction();\n $dataHelpAction->getDelete($actionId);\n }\n return redirect()->back();\n }", "function get_action_post_link( $post_id, $action = 'trash' ) {\n\t$post = get_post( $post_id);\n\t$post_type_object = get_post_type_object( $post->post_type );\n\n\tif ( $action == 'trash' )\n\t\treturn get_delete_post_link( $post->ID );\n\t\n\n\t$admin_link = admin_url( sprintf( $post_type_object->_edit_link.'&amp;action='.$action, $post->ID ) );\n\n\tswitch ( strtolower( $action ) ) {\n\t\tcase 'edit' :\n\t\t\treturn $admin_link;\n\n\t\tdefault :\n\t\t\treturn wp_nonce_url( $admin_link, $action.'-'.$post->post_type.'_'.$post->ID );\n\n\n\t}\n\n}", "function get_action_post_link( $post_id, $action = 'trash' ) {\n\t$post = get_post( $post_id);\n\t$post_type_object = get_post_type_object( $post->post_type );\n\n\tif ( $action == 'trash' )\n\t\treturn get_delete_post_link( $post->ID );\n\t\n\n\t$admin_link = admin_url( sprintf( $post_type_object->_edit_link.'&amp;action='.$action, $post->ID ) );\n\n\tswitch ( strtolower( $action ) ) {\n\t\tcase 'edit' :\n\t\t\treturn $admin_link;\n\n\t\tdefault :\n\t\t\treturn wp_nonce_url( $admin_link, $action.'-'.$post->post_type.'_'.$post->ID );\n\n\n\t}\n\n}", "public function getDeleteUrl()\n\t{\n\t\treturn '?module=TreesManager&parent=Settings&action=Delete&record=' . $this->getId();\n\t}", "private static function get_url( $action ) {\n\t\tif ( ! isset( $action->url ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( isset( $action->url_is_admin_query ) && $action->url_is_admin_query ) {\n\t\t\treturn wc_admin_url( $action->url );\n\t\t}\n\n\t\treturn $action->url;\n\t}", "public function deleteAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n if (!($category_id = $this->_getParam('category_id'))) {\n die('No identifier specified');\n }\n\n //GENERATE FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Delete();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n foreach ($values as $key => $value) {\n if ($value == 1) {\n $reviewcat_id = explode('reviewcat_name_', $key);\n $reviewcat = Engine_Api::_()->getItem('sitestorereview_reviewcat', $reviewcat_id[1]);\n\n Engine_Api::_()->sitestorereview()->deleteReviewCategory($reviewcat_id[1]);\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //DELETE THE REVIEW PARAMETERS\n $reviewcat->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n $this->renderScript('admin-ratingparameter/delete.tpl');\n }", "public function delete($id) {\n if (!$id) {\n return response()->json([\n 'error' => [\n 'message' => 'reviews id does not exits'\n ]\n ], 422);\n }\n $review = $this->reviews->delete($id);\n return response()->json($review, 200);\n }", "public function getAskDeletionUser($id){\n return $this->rootUrl().$id.'/supprimerUser';\n }", "public function getDeleteAction(): string {\n return $this->deleteAction;\n }", "public function delete_review_rating(Request $request){\n $data = $request->all();\n return BookReview::where('id',$data['id'])->delete();\n }", "public function destroy($id)\n {\n $review = Review::findOrFail($id);\n $review->status = -1;\n $date = Carbon::now()->toDateTimeString();\n $review->deleted_at = $date;\n $review->save();\n return redirect()->back()->withSuccess('Xoá đánh giá thành công');\n }", "public function deleteAction($id)\n {\n if(!parent::isValidId($id)) {\n return parent::redirect('url');\n }\n\n $manager = new TransactionManager();\n $transaction = $manager->get();\n \n try {\n $url = Url::findFirst($id);\n if($url) {\n $url->setTransaction($transaction);\n \n $batches = $url->getBatch();\n foreach($batches as $batch) {\n $batch->setTransaction($transaction);\n \n $pings = $batch->getPing();\n foreach($pings as $ping) {\n $ping->setTransaction($transaction);\n $ping->delete();\n }\n \n $batch->delete();\n }\n $url->delete();\n \n $this->flash->success('Url deleted succesfully.');\n $transaction->commit();\n \n } else {\n $this->flash->notice('Url not found, operation aborted.');\n }\n } catch(\\Exception $ex) {\n $this->flash->error('Error deleting url.');\n $transaction->rollback($ex->getMessage());\n }\n \n return $this->redirect('url');\n }", "public function deleteImageRedirectPath(): string\n {\n return auth('rocXolid')->user()->is($this)\n ? route('rocXolid.auth.profile')\n : $this->getControllerRoute('show');\n }", "public function actionDelete($id, $returl)\n {\n $this->findModelOwn($id)->delete();\n if (strpos($returl,'/picture/massupdate') !== false) {\n return $this->redirect($returl);\n } \n else {\n return $this->redirect(['manage']);\n }\n }", "public function getMessageDeleteUrl(): string\n {\n return $this->getUrl('webforms/message/delete');\n }", "protected function getApiUrl($action)\n {\n return self::API_BASE_URL.$action;\n }", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\n\t\t$result = Browser_Service_Recsite::deleteRecsite($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function destroy(Review $review)\n {\n $author = $review->author;\n $product_id = $review->product_id;\n $deleted = $review->delete();\n\n if($deleted) {\n $product = Product::where('id', $product_id)->first();\n return redirect()->route('products.show', $product->slug)->with('author', $author);\n }\n \n }", "public function deleteReview($userId)\n {\n }", "public function destroy(Request $request)\n {\n\n $delete = Reviews::findOrFail($request->id);\n $delete->delete();\n return redirect()->route('reviews.index')->with(\"message\",'تم الحذف بنجاح');\n\n \n \n }", "public function destroy($id)\n {\n $classreview = ClassReview::find($id);\n if (\\Auth::id() === $classreview->user_id) {\n $classreview->delete();\n }\n\n return redirect('/reviews');\n }", "public function show($action, Request $request)\n {\n $this->validate($request, [\n 'comments' => 'required'\n ]);\n\n InstagramAutoComments::whereIn('id', $request->get('comments'))->delete();\n\n return redirect()->back()->with('message', 'Deleted successfully!');\n }", "public function getDeletionUser($id){\n return $this->rootUrl().$id.'/confirmSuppressionUser';\n }", "public function getDelete($id)\n {\n //\n DB::table('stories')->where('story_id',$id)->delete();\n return redirect()->back();\n }", "public function destroy($id)\n {\n $cat = UserReview::find($id);\n $value = $cat->delete();\n if($value){\n session()->flash(\"deleted\",\"Review Has Been Deleted\");\n return back();\n }\n }", "public function destroy(Review $review)\n {\n //\n }", "public function destroy(Review $review)\n {\n //\n }", "public function destroy(Review $review)\n {\n //\n }", "public function postDelete($id) {\n\t\t//echo $pageId;exit;\n\t\t$gallery_image = GalleryImage::find($id);\n\t\t// Was the role deleted?\n\t\tif ($gallery_image -> delete()) {\n\t\t\t// Redirect to last page\n\t\t\treturn Redirect::to('admin/galleryimages') -> with('success', Lang::get('admin/galleries/messages.delete.success'));\n\t\t}\n\t\t// There was a problem deleting the comment post\n\t\treturn Redirect::to('admin/galleryimagecomments') -> with('error', Lang::get('admin/galleryimagecomments/messages.delete.error'));\n\t}", "function get_publication_deleting_url($profile)\r\n {\r\n return $this->get_url(array(self :: PARAM_ACTION => self :: ACTION_DELETE_PUBLICATION, self :: PARAM_PROFILE_ID => $profile->get_id()));\r\n }", "function deleteReview($reviewId) {\n $db = phpmotorsConnect();\n $sql = 'DELETE FROM reviews WHERE reviewId = :reviewId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':reviewId', $reviewId, PDO::PARAM_INT);\n $stmt->execute();\n $rowsChanged = $stmt->rowCount();\n $stmt->closeCursor();\n return $rowsChanged;\n }", "public function delete($id = 0) {\n if (isset($_POST['btnAction']) AND is_array($_POST['action_to']))\n {\n // pass the ids and let MY_Model delete the items\n $this->personality_quizzes_m->delete_many($this->input->post('action_to'));\n }\n elseif (is_numeric($id))\n {\n // they just clicked the link so we'll delete that one\n $this->personality_quizzes_m->delete($id);\n }\n redirect('admin/personality_quizzes');\n }", "function delete_related_reviews($company_id) {\n\t\t$str = \"DELETE FROM company_review WHERE Company_ID = $company_id\";\n\t\tmysqli_query($link,$str);\n\t}", "public function destroy($prodId, $reviewId)\n {\n $review = Review::findOrFail($reviewId);\n\n if(Gate::allows('updateDelete-reviews',$review)) {\n $review->delete();\n $this->statusCode = 204;\n \n return response(null, $this->statusCode);\n }\n abort(403, 'Access Forbidden');\n\n }", "public static function deleteReviewsById($id)\n\t{\n\t\t$review = Review::find($id);\n\t\t$review->delete();\n\t}", "public function delete($id)\n {\n return $this->reviewRepositoryInterface->delete($id);\n }", "function url($id)\r\n\t{\r\n\t\treturn '';\r\n\t}", "public function deleteUserAlbumReviewAction($albumID, $reviewID)\n {\n if(!$this->getUser()){\n throw new AccessDeniedException();\n }\n\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n\n $reviews = $em->getRepository(Review::class)->findOneBy(['reviewOf' => $albumID, 'id' => $reviewID]);\n if(!$reviews){\n //no review entry found\n //set the view and status code to 404\n $view = $this->view(null, 404);\n }\n else{\n if ($reviews->getReviewer() == $user)\n {\n //the review entry does exist\n //set the status code to 200 OK\n $em->remove($reviews);\n $em->flush();\n $view = $this->view(null, 200);\n }\n else\n {\n $view = $this->view(null, 403);\n }\n }\n return $this->handleView($view);\n\n\n }", "public function destroy($id)\n {\n try {\n $review = Review::findOrFail($id);\n $review->delete();\n\n return redirect()->route('reviews.review.index')\n ->with('success_message', 'Review was successfully deleted.');\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request.']);\n }\n }", "static function delete($action_id) {\n\t\t$mAction=new Maerdo_Model_Action();\n\t\treturn($mAction->deleteByPrimarykey($action_id));\n\t}", "function getDeleteAvatarUrl() {\n \treturn assemble_url('people_company_user_delete_avatar', array(\n \t 'company_id' => $this->getCompanyId(),\n \t 'user_id' => $this->getId(),\n \t));\n }", "public function destroy($book_id, $review_id)\n {\n $review = Review::findOrFail($review_id);\n\n $review->delete();\n\n session()->flash('success_message', 'The review was successfully deleted');\n\n return redirect()->action('BookController@show', $book_id);\n }", "public function getUrl($updateId);", "protected function getAction() {\n return Wsu_Auditing_Helper_Data::ACTION_DELETE;\n }", "public function destroy($id)\n {\n // find review by id\n $review = ReviewBook::info()->find($id);\n\n // if review doesnt exist return error message\n if (!$review) return response()->json(['message' => 'Review does not exist']);\n \n // delete review\n $review->delete();\n\n // return success message\n $response = ['message' => \"Review delete success\"];\n return response()->json($response);\n }", "function getDismissUrl() {\n \treturn assemble_url('reminder_dismiss', array('reminder_id' => $this->getId()));\n }", "public function delete() {\n $mysqli = Database::getMYSQLI();\n \n $stmt = $mysqli->prepare(\"DELETE reviews FROM reviews WHERE id = ?\");\n \n $stmt->bind_param('i', $this->id);\n \n $stmt->execute();\n $stmt->close();\n $mysqli->close();\n }", "public function destroy($id)\n {\n $this->marketReviewRepository->pushCriteria(new MarketReviewsOfUserCriteria(auth()->id()));\n $marketReview = $this->marketReviewRepository->findWithoutFail($id);\n\n if (empty($marketReview)) {\n Flash::error('Market Review not found');\n\n return redirect(route('marketReviews.index'));\n }\n\n $this->marketReviewRepository->delete($id);\n\n Flash::success(__('lang.deleted_successfully',['operator' => __('lang.market_review')]));\n\n return redirect(route('marketReviews.index'));\n }", "public function actionDelete() {}", "public function actionDelete() {}", "protected function getActionUrl($actionId, array $action, $item)\n {\n return null;\n }", "public function getDeleteAllUrl()\n {\n return $this->getUrl('*/product/deleteAll');\n }", "public function getUrl()\n\t{\n\t\treturn rtrim(Mage::helper('wordpress')->getUrlWithFront($this->getId()), '/') . '/';\n\t}", "protected function deleteAction()\n {\n }", "public static function delete($id, $delete_reviews = true) {\n global $lC_Database, $lC_Session;\n\n $error = false;\n\n $lC_Database->startTransaction();\n\n if ( $delete_reviews === true ) {\n $Qreviews = $lC_Database->query('delete from :table_reviews where customers_id = :customers_id');\n $Qreviews->bindTable(':table_reviews', TABLE_REVIEWS);\n $Qreviews->bindInt(':customers_id', $id);\n $Qreviews->setLogging($_SESSION['module'], $id);\n $Qreviews->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n }\n } else {\n $Qcheck = $lC_Database->query('select reviews_id from :table_reviews where customers_id = :customers_id limit 1');\n $Qcheck->bindTable(':table_reviews', TABLE_REVIEWS);\n $Qcheck->bindInt(':customers_id', $id);\n $Qcheck->execute();\n\n if ( $Qcheck->numberOfRows() > 0 ) {\n $Qreviews = $lC_Database->query('update :table_reviews set customers_id = null where customers_id = :customers_id');\n $Qreviews->bindTable(':table_reviews', TABLE_REVIEWS);\n $Qreviews->bindInt(':customers_id', $id);\n $Qreviews->setLogging($_SESSION['module'], $id);\n $Qreviews->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n }\n }\n }\n\n if ( $error === false ) {\n $Qab = $lC_Database->query('delete from :table_address_book where customers_id = :customers_id');\n $Qab->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);\n $Qab->bindInt(':customers_id', $id);\n $Qab->setLogging($_SESSION['module'], $id);\n $Qab->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n }\n }\n\n if ( $error === false ) {\n $Qsc = $lC_Database->query('delete from :table_shopping_carts where customers_id = :customers_id');\n $Qsc->bindTable(':table_shopping_carts', TABLE_SHOPPING_CARTS);\n $Qsc->bindInt(':customers_id', $id);\n $Qsc->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n }\n }\n\n if ( $error === false ) {\n $Qsccvv = $lC_Database->query('delete from :table_shopping_carts_custom_variants_values where customers_id = :customers_id');\n $Qsccvv->bindTable(':table_shopping_carts_custom_variants_values', TABLE_SHOPPING_CARTS_CUSTOM_VARIANTS_VALUES);\n $Qsccvv->bindInt(':customers_id', $id);\n $Qsccvv->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n }\n }\n\n if ( $error === false ) {\n $Qpn = $lC_Database->query('delete from :table_products_notifications where customers_id = :customers_id');\n $Qpn->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);\n $Qpn->bindInt(':customers_id', $id);\n $Qpn->setLogging($_SESSION['module'], $id);\n $Qpn->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n }\n }\n\n if ( $error === false ) {\n $Qcheck = $lC_Database->query('select session_id from :table_whos_online where customer_id = :customer_id');\n $Qcheck->bindTable(':table_whos_online', TABLE_WHOS_ONLINE);\n $Qcheck->bindInt(':customer_id', $id);\n $Qcheck->execute();\n\n if ( $Qcheck->numberOfRows() > 0 ) {\n $lC_Session->delete($Qcheck->value('session_id'));\n\n $Qwho = $lC_Database->query('delete from :table_whos_online where customer_id = :customer_id');\n $Qwho->bindTable(':table_whos_online', TABLE_WHOS_ONLINE);\n $Qwho->bindInt(':customer_id', $id);\n $Qwho->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n }\n }\n }\n\n if ( $error === false ) {\n $Qcustomers = $lC_Database->query('delete from :table_customers where customers_id = :customers_id');\n $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);\n $Qcustomers->bindInt(':customers_id', $id);\n $Qcustomers->setLogging($_SESSION['module'], $id);\n $Qcustomers->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n }\n }\n\n if ( $error === false ) {\n $lC_Database->commitTransaction();\n\n return true;\n }\n\n $lC_Database->rollbackTransaction();\n\n return false;\n }", "public function getReviewId() {\n\t\t\t\treturn ($this->reviewId);\n\t\t\t}", "public function getActionUrl()\n {\n return $this->actionUrl;\n }", "public function delete($id)\n {\n Url::find($id)->delete();\n session()->flash('message', 'Shorten URL Deleted Successfully.');\n }", "public function destroy($id)\n {\n $review = Comment::find($id);\n \n $book=Book::find($review->book->id);\n $this->authorize('delete', $review);\n $review ->delete();\n \n \n $comments = Comment::where('book_id',$review->book->id)->get();\n \n return back()->with(['book' => $book])->with(['storedComments'=> $comments]);\n //return view('books.book')->with(['book' => $book])->with(['storedComments'=> $comments]);\n }", "public function destroy(Review $review)\n {\n $review->delete();\n return back();\n }", "function getDeleteLink() { return $this->_deletelink; }", "public function delete($idPost);", "public function deletedon($id)\n\t{\n $url = explode('/',$_GET['url']);\t\n\t$this->model->deletedon($id);\n\theader('location: ' . URL . 'Dnr/view/'.$url[3]); \n\t}" ]
[ "0.67922795", "0.6603721", "0.65538806", "0.65424556", "0.6391048", "0.63593847", "0.6320469", "0.6225798", "0.60167235", "0.60041153", "0.59995776", "0.59921724", "0.5990401", "0.59749204", "0.59652007", "0.5897696", "0.5835979", "0.5822569", "0.58034843", "0.57653785", "0.5697878", "0.5663671", "0.565181", "0.56494254", "0.56139684", "0.56046987", "0.5599123", "0.55795676", "0.55785316", "0.55636936", "0.5559584", "0.55307645", "0.5523518", "0.5514369", "0.54696", "0.54666054", "0.54555887", "0.54524755", "0.5452399", "0.5452399", "0.54509073", "0.5450088", "0.544375", "0.543164", "0.54287106", "0.54276633", "0.54254264", "0.54087245", "0.54039305", "0.5401591", "0.5399579", "0.5379423", "0.53785944", "0.5355592", "0.5351375", "0.5345299", "0.53416455", "0.5341464", "0.53401613", "0.5321214", "0.53022224", "0.53020936", "0.5282436", "0.5282436", "0.5282436", "0.52813256", "0.5277132", "0.52735204", "0.52619565", "0.52611905", "0.5257046", "0.52487004", "0.52367413", "0.52224904", "0.5220267", "0.52197975", "0.5211851", "0.51970416", "0.51835597", "0.51815456", "0.5177073", "0.5174069", "0.5172327", "0.5167944", "0.5166759", "0.5156581", "0.5156581", "0.5148759", "0.5147072", "0.514682", "0.5146303", "0.51419103", "0.51251924", "0.5123687", "0.51229805", "0.51207834", "0.51051587", "0.5096473", "0.50928134", "0.509152" ]
0.6624106
1
Get URL to unlock a review with unique action id.
protected function GetUnlockURL($bUseFullUrl = false) { $sUnlockURL = ''; if (!empty($this->sqlData['action_id'])) { $aParameter = array(TdbShopArticleReview::URL_PARAM_ACTION_ID => $this->sqlData['action_id']); $sUnlockURL = TTools::GetExecuteMethodOnCurrentModuleURL('UnlockReview', $aParameter, $bUseFullUrl); } return $sUnlockURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_single_review_action_link( $review_id = 0, $action_name = '' ) {\n\n\t\t// Bail without the review ID or action name.\n\t\tif ( empty( $review_id ) || empty( $action_name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fetch the dataset for an edit link.\n\t\t$action_dataset = $this->get_row_action_dataset( $review_id, $action_name );\n\n\t\t// Bail without the action dataset.\n\t\tif ( empty( $action_dataset ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get our primary settings link.\n\t\t$settings_link = Helpers\\get_admin_menu_link( Core\\REVIEWS_ANCHOR );\n\n\t\t// Set the action link args.\n\t\t$action_linkset = array(\n\t\t\t'wbr-action-name' => $action_name,\n\t\t\t'wbr-item-id' => absint( $review_id ),\n\t\t\t'wbr-item-type' => 'review',\n\t\t\t'wbr-product-id' => $action_dataset['data']['product-id'],\n\t\t\t'wbr-nonce' => $action_dataset['nonce'],\n\t\t);\n\n\t\t// Create and return the string of the URL.\n\t\treturn add_query_arg( $action_linkset, $settings_link );\n\t}", "function dokan_get_review_url( $user_id ) {\n $userstore = dokan_get_store_url( $user_id );\n\n return $userstore .\"reviews\";\n}", "public function get_revoke_url() {\n\n $url = new moodle_url('/repository/repository_callback.php');\n $url->param('callback', 'yes');\n $url->param('repo_id', $this->id);\n $url->param('revoke', 'yes');\n $url->param('reloadparentpage', true);\n $url->param('sesskey', sesskey());\n return '<a target=\"_blank\" href=\"'.$url->out(false).'\">'.get_string('revokeyourgoogleaccount', 'repository_googledrive').'</a>';\n }", "public function getEditPostAction()\n {\n return $this->getUrl('myblog/myblog/editpost');\n }", "public function reviewGet($restaurant_id = null){\n if($restaurant_id != null){\n return $this->host.static::$url['reviewGet'].$restaurant_id;\n }\n return $this->host.static::$url['reviewGet'];\n }", "public function getUrl($updateId);", "function getDismissUrl() {\n \treturn assemble_url('reminder_dismiss', array('reminder_id' => $this->getId()));\n }", "public function url()\n\t{\n\t\treturn Url::to(\"review/\".$this->id.\"/\".$this->slug.\"/\".Session::get('Lang'));\n\t}", "public function CMSEditLink($action = null)\n {\n return CMSEditLinkAPI::find_edit_link_for_object($this->owner);\n }", "public function getUrl()\n\t{\n\t\treturn '/akce/' . $this->getActionId();\n\t}", "public function getPostActionUrl() {\n return $this->_customerUrl->getLoginPostUrl ();\n }", "public function getRevokeAccessTokenUrl() {\n return Mage::helper('adminhtml')->getUrl('adminhtml/aw_vidtest_authsub/revoke', array('api_model_code' => $this->getApiModelCode()));\n }", "function wp_nonce_url($actionurl, $action = -1, $name = '_wpnonce')\n {\n }", "public function getUrl()\n {\n if ((bool)$this->_action) {\n return $this->_vendorUrlModel->getUrl(\n (string)$this->_action,\n ['_cache_secret_key' => true]\n );\n }\n return '#';\n }", "function getResetPasswordUrl() {\n \treturn assemble_url('reset_password', array(\n \t 'user_id' => $this->getId(),\n \t 'code' => $this->getPasswordResetKey(),\n \t));\n }", "public function getReviewId() {\n\t\t\t\treturn ($this->reviewId);\n\t\t\t}", "protected function GetDeleteWithActionIdURL($bUseFullUrl = false)\n {\n $sDeleteURL = '';\n if (!empty($this->sqlData['action_id'])) {\n $aParameter = array(TdbShopArticleReview::URL_PARAM_ACTION_ID => $this->sqlData['action_id']);\n $sDeleteURL = TTools::GetExecuteMethodOnCurrentModuleURL('DeleteReview', $aParameter, $bUseFullUrl);\n }\n\n return $sDeleteURL;\n }", "protected function getApiUrl($action)\n {\n return self::API_BASE_URL.$action;\n }", "function get_action_post_link( $post_id, $action = 'trash' ) {\n\t$post = get_post( $post_id);\n\t$post_type_object = get_post_type_object( $post->post_type );\n\n\tif ( $action == 'trash' )\n\t\treturn get_delete_post_link( $post->ID );\n\t\n\n\t$admin_link = admin_url( sprintf( $post_type_object->_edit_link.'&amp;action='.$action, $post->ID ) );\n\n\tswitch ( strtolower( $action ) ) {\n\t\tcase 'edit' :\n\t\t\treturn $admin_link;\n\n\t\tdefault :\n\t\t\treturn wp_nonce_url( $admin_link, $action.'-'.$post->post_type.'_'.$post->ID );\n\n\n\t}\n\n}", "function get_action_post_link( $post_id, $action = 'trash' ) {\n\t$post = get_post( $post_id);\n\t$post_type_object = get_post_type_object( $post->post_type );\n\n\tif ( $action == 'trash' )\n\t\treturn get_delete_post_link( $post->ID );\n\t\n\n\t$admin_link = admin_url( sprintf( $post_type_object->_edit_link.'&amp;action='.$action, $post->ID ) );\n\n\tswitch ( strtolower( $action ) ) {\n\t\tcase 'edit' :\n\t\t\treturn $admin_link;\n\n\t\tdefault :\n\t\t\treturn wp_nonce_url( $admin_link, $action.'-'.$post->post_type.'_'.$post->ID );\n\n\n\t}\n\n}", "public function getWholesalePostActionUrl()\n {\n return $this->helper('customer')->getWholesaleRegisterPostUrl();\n }", "public function CMSEditLink($action = null) {\r\n\t\treturn Controller::join_links(\r\n\t\t\tDirector::baseURL(),\r\n\t\t\t\"/admin/sales/\".$this->ClassName.\"/EditForm/field/\".$this->ClassName.\"/item/\".$this->ID.\"/\",\r\n\t\t\t$action\r\n\t\t);\r\n\t}", "function getEditUrl()\r\n\t{\r\n\t\tglobal $config;\r\n\r\n\t\t// need full url for links placed inside email messages\r\n\t\t$link = \"http://\". $config[\"http_host\"] . \"/survey_response_form?survey_id={$this->survey_id}\";\r\n\t\tif($this->token)\r\n\t\t\t$link .= \"&token={$this->token}\";\r\n\t\t\t\r\n\t\treturn $link;\r\n\t}", "public function get_edit_url() {\n\t\treturn $this->edit_link();\n\t}", "public function actionView()\n\t{ \n $id=isset($_GET['id']) ? (int) ($_GET['id']) : 0 ;\n $this->menu=array_merge($this->menu, \n array(\n array('label'=>t('Update this Review'), 'url'=>array('update','id'=>$id),'linkOptions'=>array('class'=>'btn btn-mini'))\n )\n );\n\t\t$this->render('review_view');\n\t}", "public function getEditUrl() { }", "public function getActionUrl()\n {\n return $this->actionUrl;\n }", "public function getEditUrl() {\n return $this->getUrl('customer/cardmanagement/editcard');\n }", "private static function get_url( $action ) {\n\t\tif ( ! isset( $action->url ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( isset( $action->url_is_admin_query ) && $action->url_is_admin_query ) {\n\t\t\treturn wc_admin_url( $action->url );\n\t\t}\n\n\t\treturn $action->url;\n\t}", "public function getUrlEditPost(){\n\t\t\n\t\t$this->validateInited();\n\t\t\n\t\t$urlEdit = get_edit_post_link($this->id);\n\t\t\n\t\treturn($urlEdit);\n\t}", "public function getActionUrl() : string\n {\n return $this->getUrl('pramp/api_store/switch');\n }", "public function getOkUrl()\n {\n return $this->url('./receipt');\n }", "function getEditPasswordUrl() {\n return assemble_url('people_company_user_edit_password', array(\n 'company_id' => $this->getCompanyId(),\n 'user_id' => $this->getId(),\n ));\n }", "public function getActionUrl()\n {\n return Mage::getUrl('supplier/plan/buy');\n }", "public function getPostURL($id, $key = '')\n {\n $url = Pal::getHostURL() . $id;\n if ($key !== '') {\n $url .= '?key=' . $key;\n }\n return $url;\n }", "public function getForgetPasswordUrl() {\n\t\treturn $this->getEmailActionLink('email/changePassword');\n\t}", "public function review($review_id) {\n if(!$this->that->config->get('koraki_review'))\n return;\n\n if (isset($this->that->request->server['HTTPS']) && (($this->that->request->server['HTTPS'] == 'on') || ($this->that->request->server['HTTPS'] == '1'))) {\n $base = $this->that->config->get('config_ssl');\n } else {\n $base = $this->that->config->get('config_url');\n }\n\n if(empty($review_id)){\n return;\n }\n\n $this->that->load->model('catalog/review');\n\n $review = $this->that->model_catalog_review->getReview($review_id);\n\n if(isset($review) && !empty($review['rating']) && !empty($review['rating'] >= 3) && $review['status']==1){\n\n $this->that->load->model('catalog/product');\n $this->that->load->model('tool/image');\n\n $p = $this->that->model_catalog_product->getProduct($review['product_id']);\n $popup = $this->that->model_tool_image->resize($p['image'], 150, 150);\n\n $item = array(\n \"product_id\" => $p['product_id'],\n \"product_name\" => $p['name'],\n \"thumbnail\" => $popup\n );\n\n $variables = array(\n \"number\" => $review['rating'] .\"/5\",\n \"item\" => array(\n $item\n )\n );\n $product = \"<a href='\" . $base . \"?route=product/product&product_id=\" . $p['product_id'] . \"' target='_blank'>\" . html_entity_decode($p['name'], ENT_QUOTES, 'UTF-8') . \"</a>\";\n\n $post = array(\n \"variables\" => json_encode($variables),\n \"notificationText\" => $review['author'] . \" made a \". $review['rating'] .\"/5 star rating on \" . $product,\n \"thumbnailUrl\" => $popup,\n \"location\" => \"\"\n );\n\n $this->post($post);\n }\n }", "public function delete_review(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\t$id = $this->uri->segment(4,0);\n\t\t\t$condition = array('id' => $id);\n\t\t\t$this->review_model->commonDelete(REVIEW,$condition);\n\t\t\t$this->setErrorMessage('success','Review deleted successfully');\n\t\t\tredirect('admin/review/display_review_list');\n\t\t}\n\t}", "function url($id)\r\n\t{\r\n\t\treturn '';\r\n\t}", "public function getBaseRevokeTokenUrl()\n {\n return 'https://oauth.accounting.sage.com/revoke';\n }", "public function doReview($data)\n {\n $id = isset($data['ID']) ? (int)$data['ID'] : null;\n if (!$id) {\n user_error('Invalid ID passed for review action');\n $this->redirectBack();\n }\n return $this->owner->redirect(Controller::join_links($this->owner->Link('review'), $id));\n }", "public function createURL($action) {\r\n\t\tvar mode = 'payment'\r\n $host = $this->is_local_test ? self::WMMERCHANT_HOST_TEST : self::WMMERCHANT_HOST;\r\n\t\tif ($this->is_local_test) mode = \"sandbox\";\r\n \r\n return $host .'/'. mode. '/' . $action;\r\n }", "public function displayUpdateReceiptLink($token = null, $id)\n {\n }", "protected function buildRequestUrl($action = \"url\"){\n return \"https://{$this->host}/urlshortener/{$this->version}/{$action}?key={$this->token}\";\n }", "public function getBackUrl()\n {\n return $this->getUrl('review/customer');\n }", "protected function get_api_url($action){\n switch($action){\n case 'connect':\n case 'login':\n $state = sha1(uniqid('amazon_'.$action, true));\n $this->session_write('state', $state);\n return 'https://www.amazon.com/ap/oa?'.http_build_query(array(\n 'client_id' => $this->amazon_client_id,\n 'scope' => 'profile',\n 'response_type' => 'code',\n 'state' => $state,\n 'redirect_uri' => $this->get_redirect_endpoint(),\n ));\n break;\n default:\n return false;\n break;\n }\n }", "public static function get_url( $action = false ) {\n\t\t$url = home_url( 'ht-dms-internal-api' );\n\t\tif ( $action ) {\n\t\t\t$url = add_query_arg( 'action', $action, $url );\n\t\t}\n\n\t\treturn $url;\n\n\t}", "function admin_act_url( $action, $subaction ) {\r\n\t\t\t$url = $this->get_current_url();\r\n\t\t\t$url = add_query_arg( 'um_adm_action', $action, $url );\r\n\t\t\t$url = add_query_arg( 'sub', $subaction, $url );\r\n\t\t\t$url = add_query_arg( 'user_id', um_user('ID'), $url );\r\n\t\t\treturn $url;\r\n\t\t}", "public function getEditUrl()\n {\n return $this->_urlBuilder->getUrl('*/*/edit', ['id' => $this->getSubscription()->getId()]);\n }", "public function getReviewId(): int\n\t{\n\t\treturn $this->review_id;\n\t}", "public static function Link($action = null) {\r\n\t\treturn \"UsernameSecurity/$action\";\r\n\t}", "function getViewUrl() {\n \treturn assemble_url('reminder_view', array('reminder_id' => $this->getId()));\n }", "public function get_link()\r\n\t{\r\n\t\t$url = api_get_path(WEB_PATH)\r\n\t\t\t.'main/gradebook/exercise_jump.php?cid='.$this->get_course_code();\r\n\t\tif (!api_is_allowed_to_create_course()\r\n\t\t\t&& $this->calc_score(api_get_user_id()) == null)\r\n\t\t$url .= '&amp;doexercise='.$this->get_ref_id();\r\n\t\t\r\n\t\treturn $url;\r\n\t}", "public function getPostActionUrl()\n {\n return $this->helper('customer')->getRegisterPostUrl();\n }", "public function getUpdateUser($id){\n return $this->rootUrl().'confirmUpdateUser';\n }", "protected function _getActionUrl()\n {\n return Mage::helper('adminhtml')->\n getUrl(\n Smile_DatabaseCleanup_Block_Button_Abstract::ACTION_URL,\n array('entity_type'=>'attribute', 'action'=>'analyze')\n );\n }", "public function getUrl()\n \t{\n \t\t$url=Yii::app()->createUrl(\"markingUpSkill/view\",array('id'=>$this->id));\n\t\treturn $url;\n \t}", "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "protected function resetPasswordUrl($notifiable)\n {\n return route('customer.password.reset', $this->token);\n }", "public function get_rider_url( $id ) {\n\t\treturn sprintf(\n\t\t\t'http://www.hippomundo.com/nl/competitions/rider/%s',\n\t\t\t$id\n\t\t);\n\t}", "protected function getEditActionRoute()\n {\n return 'admin.payment_method.edit';\n }", "public function actionDelete($id)\n\t{ \n GxcHelpers::deleteModel('Review', $id); \n\t}", "function getResetApiKeyUrl() {\n return assemble_url('people_company_user_api_reset_key', array(\n 'company_id' => $this->getCompanyId(),\n 'user_id' => $this->getId(),\n ));\n }", "protected function resetUrl($notifiable)\n {\n $appUrl = config('app_url');\n\n return url(\"$appUrl/password/reset/$this->token\") . '?email=' . urlencode($notifiable->email);\n }", "protected function getReviewByIdKey($revId){\n\t\treturn \"ReviewDAO\" . \"getReviewById\" . $revId;\n\t}", "protected function getFetchUrl() {\n $url = 'users/' . $this->user->id . '/instruments';\n return $url;\n }", "public function reject()\n {\n $type = $this->input->get('type');\n $id = $this->input->get('id');\n\n $this->model_review->reject($type, $id);\n\n redirect($_SERVER['HTTP_REFERER']);\n }", "public function url()\n {\n return '/recipe/' . $this->recipe->getKey();\n }", "public function getRevokeAssignmentLink()\n\t{\n\t\treturn CHtml::linkButton(Menus::t('core', 'Revoke'), array(\n\t\t\t'submit'=>array('assignment/revoke', 'id'=>$this->userId, 'name'=>urlencode($this->owner->name)),\n\t\t\t'class'=>'revoke-link',\n\t\t\t'csrf'=>Yii::app()->request->enableCsrfValidation,\n\t\t));\n\t}", "public function getEditUrl()\r\n {\r\n if (empty(parent::getEditUrl())) {\r\n return \"\";\r\n }\r\n\r\n if ($this->contentObject instanceof File) {\r\n return $this->contentObject->content->container->createUrl($this->editRoute, ['id' => $this->contentObject->getItemId(), 'fromWall' => true]);\r\n }\r\n\r\n return \"\";\r\n }", "public function getUrlId();", "public function urlOfResetPasswordPage()\n {\n return sprintf(\n '%s/password/phone?client_id=%s&redirect_uri=%s&response_type=code',\n $this->root,\n $this->client_id,\n $this->redirect_uri\n );\n }", "public function getFormActionUrl()\n {\n return $this->_customerUrl->getLoginPostUrl();\n }", "public function getActionUrl($action, $prm)\n {\n // for object menu\n $req = $this->request->getActionReq($action);\n $res = $this->checkARight($req, $this->attrObjs, false, true);\n if (!$res) {\n return null;\n }\n return $req->getUrl($prm);\n }", "public function getForgotPasswordUrl()\n {\n return $this->helper('customer')->getForgotPasswordUrl();\n }", "public function actionUpdate()\n\t{ \n $id=isset($_GET['id']) ? (int) ($_GET['id']) : 0 ; \n \n\t\t$this->render('review_update',array('id'=>$id));\n\t}", "public function Link($action = null)\n {\n return Controller::join_links(Director::baseURL(), 'vision6', $action);\n }", "public function url(string $act = 'show'): string {\n return $this->profile_panel->url($act);\n }", "public function getFormAction()\n {\n return $this->getUrl('faq/index/email');\n }", "public function getActionUrlRaw()\n {\n return $this->rawActionUrl;\n }", "public function get_view_booking_url() {\n $view_booking_endpoint = YITH_WCBK()->endpoints->get_endpoint( 'view-booking' );\n\n $view_booking_url = wc_get_endpoint_url( $view_booking_endpoint, $this->id, wc_get_page_permalink( 'myaccount' ) );\n\n return apply_filters( 'yith_wcbk_get_view_booking_url', $view_booking_url, $this );\n }", "public function get_action() {\r\n\t\treturn esc_url_raw( $this->action ? $this->action : wp_unslash( $_SERVER['REQUEST_URI'] ) );\r\n\t}", "protected function _getSaveAndContinueUrl() \n {\n\treturn $this->getUrl('Brituy_SimpleBlog/*/save', ['_current' => true, 'back' => 'edit', 'active_tab' => '{{tab_id}}']);\n }", "public function niceUrl()\n {\n return '/' . $this->recipe_id . '/' . $this->url;\n }", "function get_reddit_oauth_url()\n{\n\t$state = sprintf(\"%s,%s\", time(), hash_hmac('sha256', strval(time()), REDDIT_OAUTH_CLIENT_SECRET));\n\treturn sprintf(\"https://www.reddit.com/api/v1/authorize?client_id=%s&response_type=code&state=%s&redirect_uri=%s&duration=temporary&scope=identity,read,mysubreddits\",\n\t\tREDDIT_OAUTH_CLIENT_ID,\n\t\t$state,\n\t\tget_reddit_redirect_uri()\n\t);\n}", "public function deleteAction() {\n\n\t\t//ONLY LOGGED IN USER CAN DELETE REVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n\t\t//SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('list_listing')->isValid())\n return;\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n\t\t//GET REVIEW ID AND REVIEW OBJECT\n $review_id = $this->_getParam('id');\n $review = Engine_Api::_()->getItem('list_reviews', $review_id);\n\n\t\t//ONLY REVIEW OWNER AND SUPER ADMIN CAN DELETE REVIEW\n if (!($review->owner_id == $viewer_id || $viewer->level_id == 1)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if ($this->getRequest()->isPost()) {\n\n $this->view->list = $list = Engine_Api::_()->core()->getSubject();\n $content_id = $this->_getParam('content_id');\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //DELETE REVIEW FROM DATABASE\n $review->delete();\n\n\t\t\t\t//DECREASE REVIEW COUNT\n\t\t\t\t$list->review_count--;\n\t\t\t\t$list->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //REDIRECT\n $url = $this->_helper->url->url(array('listing_id' => $list->getIdentity(), 'user_id' => $list->owner_id, 'slug' => $list->getSlug(), 'tab' => $content_id), 'list_entry_view', true);\n\n $this->_forward('success', 'utility', 'core', array(\n 'parentRefresh' => 3,\n 'parentRedirect' => $url,\n 'parentRedirectTime' => 1,\n 'messages' => array('Your Review has been deleted successfully.')\n ));\n } else {\n $this->renderScript('review/delete.tpl');\n }\n }", "private function constructApiUrl($action)\n {\n return $this->url . '/gwprocessor2.php?a=' . $action;\n }", "public function getReturnUrl()\n {\n return Mage::getUrl('payulite/processing/return', array('_secure' => true, 'order' => '{{ORDER_ID}}'));\n }", "public function wpnonceGenerateUrl(string $paramActionurl): string\n {\n $name = $this->fetchName();\n $action = $this->fetchAction();\n $actionurl = str_replace('&amp;', '&', $paramActionurl);\n return wp_nonce_url($actionurl, $action, $name);\n }", "public function getSubmitUrl()\n {\n \treturn $this->getUrl('Purchase/Misc/Savepayment');\n }", "public function getRechargeUrl()\n {\n return $this->get(self::_RECHARGE_URL);\n }", "public function getIdLinkVisitAction()\n {\n return $this->idLinkVisitAction;\n }", "public function getEditLink()\n {\n if(empty($this->id)){\n return $this->getCreateLink();\n }\n\n $params = array(\n 'id' => $this->id,\n );\n $link = Globals::getRouter()->assemble($params, $this->_editRoute, true);\n return $link;\n }", "public function getURL()\n {\n return $this->site->getURL() . 'unl_progress/edit/';\n\n }", "public function getUrl()\n\t{\n\t\treturn rtrim(Mage::helper('wordpress')->getUrlWithFront($this->getId()), '/') . '/';\n\t}", "protected function composeReentryURL()\n\t{\n\t\t$s = SERVER_URL\n\t\t\t\t. $this->model->director->getSiteUrl('account/password_reset_reentry')\n\t\t\t\t. '/' . $this->myAuthID . '/' . $this->myNewToken\n\t\t\t\t;\n//\t\t$this->debugLog( 'Created reentry URL [' . $s\n//\t\t\t\t. '] for email bound for [' . $this->myEmailAddr . '].'\n//\t\t\t\t);\n\t\treturn $s ;\n\t}", "public function actionReview($id)\n {\n $model = $this->findModel($id);\n\n if('in-review' == $model->status){\n /* no changing of reviewer permitted when module is in-review */\n $enquirySpecialistsList[\"$model->reviewer_id\"] = User::findOne($model->reviewer_id)['name'];\n } else { \n /* get (id,name) as (key,value) array/list of enquiry specialists */\n $subQuery = AuthAssignment::find()->where((['item_name' => 'enquiryspecialist']))->all();\n $subQuery = ArrayHelper::map($subQuery,'user_id','user_id');\n $mainQuery = User::find()->where(['in', 'id', $subQuery])->all();\n $enquirySpecialistsList = ArrayHelper::map($mainQuery, 'id', 'name' ); \n } \n $model->enquirySpecialistsList = $enquirySpecialistsList; \n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->status = 'in-review';\n if($model->owner_id == Yii::$app->user->getId()){\n /* meaning review is submitted by module owner. So review_status has to be 'in-review'*/\n $model->review_status = 'in-review'; \n } \n\n if( ($model->reviewer_id == Yii::$app->user->getId()) and ('approved' == $model->review_status)){\n /* review is approved so ALSO change model status to approved (along with review status).*/\n $model->status = 'approved';\n } \n\n /* adding review comment to review_comment model */\n $modelComment = new ReviewComment();\n $modelComment->commenter_id = Yii::$app->user->getId();\n $modelComment->module_id = $model->id;\n $modelComment->comment = $model->reviewComment;\n $modelComment->review_status_before = $model->review_status;\n $modelComment->review_status_after = $model->review_status;\n $modelComment->save();\n\n $model->save(); \n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('review', [\n 'model' => $model,\n ]);\n }\n }", "public function getFailureUrl();", "protected function getOneTimeLoginUrl() {\n $user = User::load(1);\n \\Drupal::moduleHandler()->load('user');\n return user_pass_reset_url($user);\n }", "public function url()\n\t{\n\t\treturn Url::to($this->id);\n\t}" ]
[ "0.5809444", "0.5557255", "0.55287206", "0.54425627", "0.53288734", "0.5316336", "0.531524", "0.5310713", "0.5269684", "0.52492505", "0.5232289", "0.52133954", "0.5196422", "0.518875", "0.51698506", "0.5164712", "0.50643003", "0.5060052", "0.50469863", "0.50469863", "0.5021604", "0.5020408", "0.49997342", "0.49988854", "0.49900207", "0.49830464", "0.49738112", "0.49663612", "0.4961368", "0.49599102", "0.49377117", "0.49195087", "0.4917156", "0.49154067", "0.49130243", "0.49129075", "0.49122313", "0.49093893", "0.48983678", "0.48928186", "0.48737246", "0.48641074", "0.48625728", "0.48579228", "0.48430604", "0.48206067", "0.48201987", "0.48197463", "0.4817733", "0.48113734", "0.48098186", "0.48050347", "0.4798784", "0.47917274", "0.47720397", "0.47617286", "0.47520742", "0.47432575", "0.47387075", "0.47386506", "0.47359154", "0.4733643", "0.47320455", "0.47305444", "0.47181875", "0.47168386", "0.47136092", "0.47061235", "0.4701236", "0.47011736", "0.46987525", "0.46956247", "0.4693061", "0.4691359", "0.4689546", "0.46884608", "0.46861658", "0.46852183", "0.4682995", "0.46806005", "0.46702713", "0.46690243", "0.4665478", "0.46651205", "0.46644273", "0.4663196", "0.46624154", "0.4659943", "0.46535042", "0.46504882", "0.4648572", "0.46474382", "0.46432608", "0.4640925", "0.46401975", "0.46397632", "0.4637907", "0.46374378", "0.46295667", "0.4627981" ]
0.58332115
0
Get cache trigger for comments.
protected function GetCacheTrigger($id, $aCallTimeVars = array()) { $aCacheTrigger = parent::GetCacheTrigger($id, $aCallTimeVars); if (array_key_exists('oPkgCommentModuleConfig', $aCallTimeVars) && !is_null($aCallTimeVars['oPkgCommentModuleConfig'])) { $aCallTimeVars['oPkgCommentModuleConfig']->SetActiveItem($this); $aCacheTrigger = array_merge($aCacheTrigger, $aCallTimeVars['oPkgCommentModuleConfig']->GetCacheTrigger()); } return $aCacheTrigger; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_cache_set_comments_last_changed()\n {\n }", "function get_comments(){\n\n\t}", "function update_comment_cache($comments, $update_meta_cache = \\true)\n {\n }", "public function getComment() {}", "public function GetTrigger()\n {\n return $this->trigger;\n }", "public function getComment();", "public function getComment();", "public function getComment();", "public function getComment();", "public function getComment();", "public function getComment();", "function getComment() {\n return DataObjectPool::get($this->getAdditionalProperty('comment_type'), $this->getAdditionalProperty('comment_id'));\n }", "public function getCommentsData()\n {\n $query = $this->getComments()->orderBy(['tree' => SORT_ASC, 'lft' => SORT_ASC]);\n $dependency = new TagDependency(['tags' => [self::CACHE_TAG_POST_ALL_COMMENTS]]);\n return self::getDb()->cache(static function () use ($query) {\n return $query->all();\n }, self::CACHE_DURATION, $dependency);\n }", "function fbComments_getCachedCommentCount($xid, $wpCommentCount) {\n\tfbComments_log('In ' . __FUNCTION__ . \"(xid=$xid, wpCommentCount=$wpCommentCount)\");\n\tglobal $fbc_options;\n\n\t$fbCommentCount = get_option(\"fbComments_commentCount_$xid\");\n\n\treturn fbComments_getProperCommentCount($fbCommentCount, $wpCommentCount);\n}", "function get_comment_ID()\n {\n }", "public function getCommentId() {\n\t\treturn ($this->commentId);\n\t}", "public function getCommentTime() {\n\t\treturn ($this->commentTime);\n\t}", "function get_comment() {\n\t\treturn $this->comment;\n\t}", "function getCache() {\n\t\tif ( !$this->postID )\n\t\t\treturn false;\n\t\t\t\n\t\t$sql = \"SELECT cached_result FROM $this->cacheTable WHERE post_id = '\" . $this->db->escape( $this->postID ) . \"'\";\n\t\t\t\n\t\t$results = $this->db->get_results( $sql );\n\t\t\n\t\tif ( !$results[0] )\n\t\t\treturn false;\n\t\t\t\n\t\treturn $results[0]->cached_result;\n\t}", "public function getLatestComment() {\n\t\t$lastComment = NULL;\n\t\tforeach ($this->comments as $comment) {\n\t\t\t$lastComment = $comment;\n\t\t}\n\t\treturn $lastComment;\n\t}", "public function get_comment()\n\t{\n\t\treturn $this->comment;\n\t}", "function getCache()\n {\n $query = $this->db->get_where(self::LOG_TABLE, $this->cacheQuery);\n return $query->row();\n }", "public function get_comment()\n {\n return $this->get_default_property(self::PROPERTY_COMMENT);\n }", "public function getComment()\n {\n return $this->_comment;\n }", "public function getCommentID()\n {\n return $this->commentID;\n }", "public function getCaching()\n {\n return (!is_null($this->_cache) ? $this->_cache : Cache::instance('redis'));\n }", "public function getCommentId()\n {\n return $this->comment_id;\n }", "public function GetComment()\n\t{\n\t\tif (!$this->dataRead)\n\t\t\t$this->ReadData();\n\n\t\treturn $this->comment;\n\t}", "public function getComment()\n\t{\n\t\treturn $this->comment;\n\t}", "static public function getComment($id) {\r\n //return decoded cached object if the comment are cached\r\n if(Cache::has(SELF::CACHE_INDENTIFIER.$id)) {\r\n $comment = json_decode(Cache::get(SELF::CACHE_INDENTIFIER.$id));\r\n //else retrieve comment from database and cache comment in json format\r\n } else{\r\n $comment = SELF::find($id);\r\n Cache::put(SELF::CACHE_INDENTIFIER.$id, json_encode($comment), SELF::CACHE_DURATION_MINUTES);\r\n }\r\n return $comment;\r\n }", "public function comment() {\n\t\treturn $this->comment;\n\t}", "public function comment_query ()\n {\n include_once ('webcore/db/entry_comment_query.php');\n return new ENTRY_COMMENT_QUERY ($this);\n }", "public function get_comments()\n {\n }", "function get_lastcommentmodified($timezone = 'server')\n {\n }", "public function get_comments($column=null)\n\t{\n\t\tstatic $comments=null;\n\n\t\tif (is_null($comments))\n\t\t{\n\t\t\tforeach($this->db_cols as $db_col => $col)\n\t\t\t{\n\t\t\t\t$comments[$col] = $this->table_def['fd'][$db_col]['comment'];\n\t\t\t}\n\t\t}\n\t\treturn is_null($column) ? $comments : $comments[$column];\n\t}", "public function getComment(): string;", "public function comments() {\r\n\t\treturn new Engine_ProxyObject($this, Engine_Api::_() -> getDbtable('comments', 'core'));\r\n\t}", "private function get_cache_id() {\n $handlername = get_class($this);\n if($this->id)\n $cache_id = '_cache_' . $handlername . '_' . $this->id;\n else \n $cache_id = '_cache_' . $handlername . '_all'; \n return $cache_id;\n\t}", "function getComment()\n {\n return $this->comment;\n }", "public function getLastCommentTime()\n {\n return $this->last_comment_time;\n }", "public function getCommentText() {\n\t\treturn $this->commentText;\n\t}", "protected function get__comments()\n\t{\n\t\treturn NULL;\n\t}", "public function getCronDefinition()\n {\n return $this->cron_script; \n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function getComment()\n {\n return $this->comment;\n }", "public function comments()\r\n\t{\r\n\t\treturn new Engine_ProxyObject($this, Engine_Api::_() -> getDbtable('comments', 'core'));\r\n\t}", "public function getComment()\r\n {\r\n return $this->comment;\r\n }", "public function getComment() {\n return $this->comment;\n }", "public static function getCacheTag()\n\t{\n\t\treturn get_called_class() . '_common_cache';\n\t}", "public static function getCacheTag()\n\t{\n\t\treturn get_called_class() . '_common_cache';\n\t}", "public function cache() {\n\t\treturn $this->_cache;\n\t}", "function _get_cron_lock() {\n\tglobal $wpdb;\n\n\t$value = 0;\n\tif ( wp_using_ext_object_cache() ) {\n\t\t/*\n\t\t * Skip local cache and force re-fetch of doing_cron transient\n\t\t * in case another process updated the cache.\n\t\t */\n\t\t$value = wp_cache_get( 'doing_cron', 'transient', true );\n\t} else {\n\t\t$row = $wpdb->get_row( $wpdb->prepare( \"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1\", '_transient_doing_cron' ) );\n\t\tif ( is_object( $row ) )\n\t\t\t$value = $row->option_value;\n\t}\n\n\treturn $value;\n}", "function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Lougis_cms_comment',$k,$v); }", "public function getComments() {}", "public function cache()\n {\n return $this->cache;\n }", "public function getComment()\n { \n return $this->comment;\n }", "public function getComment()\n {\n $value = $this->get(self::comment);\n return $value === null ? (string)$value : $value;\n }", "public function getComment()\n {\n $value = $this->get(self::COMMENT);\n return $value === null ? (string)$value : $value;\n }", "public function getCache()\r\n\t{\r\n\t\treturn $this->m_cache;\r\n\t}", "protected function get_cache_engine() {\n\n if ($this->caching && !$this->cache) {\n $rcube = rcube::get_instance();\n $ttl = $rcube->config->get('dbmail_cache_ttl', '10d');\n $this->cache = $rcube->get_cache('DBMAIL', $this->caching, $ttl);\n }\n\n return $this->cache;\n }", "public function getCommentTimestamp(): \\DateTime {\n\t\treturn ($this->commentTimestamp);\n\t}", "protected function getCache()\n {\n return $this->cache;\n }", "public function getCache()\r\n {\r\n \treturn $this->_cache;\r\n }", "function ds_views_row_render_render_cache_comment($entity, $view_mode, $load_comments) {\n $element = render_cache_entity_view_single('comment', $entity, $view_mode);\n return $element;\n}", "public function getComments ()\n {\n $db = $this->dbConnect ();\n $req = $db->prepare ('SELECT id_comment,signalement,id_chapter,author,comment,DATE_FORMAT(dateComment, \\'%d/%m/%Y \\') AS dateComment FROM comments WHERE ? ORDER BY id_comment DESC ');\n $req->execute (array ( 1 ));\n return $req;\n }", "public function getComments()\n\t{\n\n\t\treturn $this->comments;\n\t}", "public function getCommentTxt()\n {\n return $this->commentTxt;\n }", "public function getComments() {\n\t\treturn $this->arrComments;\n\t}", "public function getCache()\n\t{\n\t\treturn $this->cache;\n\t}", "public function getCommentText()\n {\n return $this->commentText;\n }", "function getCache() {\n return $this->cache;\n }", "public function getLastCommentTime()\n\t{\n\t\treturn NULL;\n\t}", "function get_comment_guid($comment_id = \\null)\n {\n }", "protected function get_cache_id() {\n\t\treturn wponion_hash_string( $this->module() . '_' . $this->unique() );\n\t}", "protected function getCache()\n {\n return $this->cacheManager->getCache('cache_beautyofcode');\n }", "public function getCache()\n {\n return $this->_cache;\n }", "static public function getCache(){\n return static::$cache;\n }", "public function getID(): string {\n\t\treturn 'comments';\n\t}", "function getCache() {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->Cache;\n }", "public function getCommentCount()\n {\n return $this->commentCount = $this->get()->comment_count;\n }", "public function getNumberOfComments()\n {\n return count($this->comments);\n \n /*$redis = Yii::$app->redis;\n $key = 'post:'. $this->id .':comments';\n \n return ($redis->get($key)>0)?$redis->get($key):0;*/\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "function get_commentdata($comment_id, $no_cache = 0, $include_unapproved = \\false)\n {\n }", "public function getCache()\n\t{\n\t\treturn CacheBot::get($this->getCacheKey(), self::$objectCacheLife);\n\t}", "public function getCommentsCnt() {\n return $this->commentCounter;\n }", "protected function get_cache() {\n\t\n // uncomment next line to flush previous cache\n\t //delete_transient($this->get_cache_id()); \n\t\n \treturn get_transient( $this->get_cache_id() ); \t \n\t}", "public function getCommentContent()\n {\n return $this->commentContent;\n }", "public function getCommentContent(): string {\n\t\treturn ($this->commentContent);\n\t}" ]
[ "0.58304894", "0.5426775", "0.54266536", "0.5408191", "0.5381708", "0.5366707", "0.5366707", "0.5366707", "0.5366707", "0.5366707", "0.5366707", "0.53490573", "0.53460306", "0.53417796", "0.53217816", "0.5321274", "0.53129745", "0.5301551", "0.52231133", "0.51853734", "0.51835227", "0.5178183", "0.51763475", "0.5173493", "0.5164058", "0.5163826", "0.513927", "0.51229084", "0.51111007", "0.510224", "0.5101718", "0.50990254", "0.5082389", "0.5079201", "0.50746375", "0.5071259", "0.50651", "0.5062428", "0.50608927", "0.50551546", "0.5047736", "0.50368583", "0.5033688", "0.50322986", "0.50322986", "0.50322986", "0.50322986", "0.50322986", "0.50322986", "0.50322986", "0.5031216", "0.5021036", "0.50186014", "0.49988106", "0.49988106", "0.4995794", "0.49844", "0.49830377", "0.4969268", "0.4947469", "0.49459675", "0.4945263", "0.49449864", "0.49440786", "0.49179795", "0.49078402", "0.49010542", "0.48896766", "0.48889145", "0.48812616", "0.48796156", "0.4875829", "0.48747814", "0.4873527", "0.48706716", "0.48649463", "0.4864145", "0.4862848", "0.48592788", "0.48576584", "0.48563427", "0.48540175", "0.48530796", "0.485221", "0.4847489", "0.48462957", "0.48437476", "0.48410717", "0.48410717", "0.48410717", "0.48410717", "0.48410717", "0.48410717", "0.48410717", "0.4840883", "0.48350644", "0.48324135", "0.48320267", "0.48272088", "0.4824961" ]
0.6080455
0
Get the value of first_name
public function getFirst_name() { return $this->first_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirstname() {\n return $this->getValue('firstname');\n }", "public function getFirstName() {\n\t\treturn $this->getCustomField( 'first_name' );\n\t}", "public function getFirstname() {\n return $this->firstname;\n }", "public function getFirstName() {\n\t\treturn $this->first_name;\n\t}", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstName()\n\t{\n\t\treturn $this->first_name;\n\t}", "public function getFirstname() {\n\t\treturn $this->firstname;\n\t}", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstName(){\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstname()\n {\n return $this->firstname;\n }", "function getPersonFirstName()\n {\n return $this->getValueByFieldName('person_fname');\n }", "public function getFirstname()\n\t{\n\t\treturn $this->firstname;\n\t}", "public function getFirstName()\r\n\t{\r\n\t\treturn $this['firstName'];\r\n\t}", "public function getFirstName(){\n \n return $this->first_name;\n \n }", "public function getFirstname()\n\t\t{\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstName()\n {\n return $this->firstname;\n }", "public function getFirstName() :string {\n\t\treturn (string)$this->first_name;\n\t}", "public function getFirstName() {\n return $this->firstname;\n }", "public function getFirstName()\n {\n return App_Formatting::emptyToNull($this->firstName->getValue());\n }", "public function getFirstname()\n {\n return $this->firstName;\n }", "public function getFirstName(): string\n {\n return $this->firstName;\n }", "public function getFirstName(): string\n {\n return $this->firstName;\n }", "public function getFirstName(): string\n {\n return $this->firstName;\n }", "public function getFirstname(): string\n {\n return $this->_firstname;\n }", "public function getFirstName()\n {\n return $this->first_name ?? $this->nickname ?? $this->name;\n }", "public function getFirstName():string\n {\n return $this->firstName;\n }", "public function getFirstName() {\n return($this->firstName);\n }", "public function getFirstName() {\n return($this->firstName);\n }", "public function getUserFirstName () {\n\t\treturn ($this->userFirstName);\n\t}", "public function GetFirstName()\n {\n return $this->firstname;\n }", "function getFirstName() {\n\t\treturn $this->getInfo('FirstName');\n\t}", "public function getFirstNameOrUsername() {\n return $this->first_name ? : $this->username;\n }", "public function getuserFirstName()\n {\n return $this->userFirstName;\n }", "public function getFirstName()\n {\n return $this->response['first_name'] ?: null;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName() {\n return $this->f_name;\n }", "public function getFirstName() {\n return $this->firstName;\n }", "public function getFirstName() {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->get('FirstName');\n }", "public function getUserFirstName() :string {\n\t\treturn($this->userFirstName);\n\t}", "public function getFirstName()\n {\n return $this->getValue('nb_icontact_prospect_first_name');\n }", "public function getFirstName() {}", "public function getFirstName() {}", "public function getFirstName();", "public function getFirstName()\n {\n $name = $this->getAttribute('name');\n if (isset($name)) {\n return $name['firstName'];\n }\n return null;\n }", "function getFirstName() {\n return $this->first_name;\n }", "function getFirstName()\r\n\t{\r\n\t\treturn $this->FirstName;\r\n\t}", "function getStudentFirstName() {\n\t\treturn $this->getData('studentFirstName');\n\t}", "public function getCustomerFirstname();", "function getRHUL_FirstName() {\n return getRHUL_LDAP_FieldValue(\"first_name\");\n}", "public function getFirstName()\n {\n if (is_null($this->firstName)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_FIRST_NAME);\n if (is_null($data)) {\n return null;\n }\n $this->firstName = (string) $data;\n }\n\n return $this->firstName;\n }", "public function getFirstName()\n {\n if(isset($this->facebookData['first_name'])) {\n return $this->facebookData['first_name'];\n } else {\n return $this->getName();\n }\n }", "public function getFirstName() { return $this->firstName; }", "function getFirstname()\n {\n return $this->firstname;\n }", "public function getHonoreeFirstName();", "function getFirstName(){\n\t\treturn $this->firstName;\n\t}", "public function getUserProfileFirstName(): string {\n\t\treturn ($this->userProfileFirstName);\n\t}", "public function getFirstNameAttribute(): string\n {\n if ($this->user !== null) {\n return $this->user->first_name;\n }\n return '';\n }", "public function getFirstName()\n {\n if (isset($this->response['name']) && isset($this->response['name']['givenName']))\n {\n return $this->response['name']['givenName'];\n }\n\n return null;\n }", "public function getFirstName(): ?string\n {\n return $this->getParam(self::FIRST_NAME);\n }", "function getFirst_Name() {\n $user = $this->loadUser(Yii::app()->user->id);\n return $user->first_name;\n }", "public function getReqFirstName()\n\t{\n\t\treturn $this->req_first_name;\n\t}", "public function getFirstname(): string\n {\n return $this->export('Firstname');\n }", "public function getFirstName()\n {\n $name = explode(' ', $this->getName());\n return $name[0];\n }", "public function getFirstName()\n {\n return $this->getBillingFirstName();\n }", "public function getFirstName()\n {\n return parent::getFirstName();\n }", "public function getFirstName(): ?string\n {\n return $this->FirstName;\n }", "public function getFirstName()\n {\n return $this->getProfile() ? $this->getProfile()->getFirstName() : null;\n }", "public function getFirstName()\n {\n //Parse the name and set it\n $namePieces = preg_split(\"/\\s/\", $this->name);\n return $namePieces[0];\n }", "public function name() {\n $a = $this->firstname;\n return $a;\n }", "public function getFirstName(): ?string\n {\n return $this->_first_name;\n }", "public function firstName()\n {\n $name = explode(' ', $this->name);\n\n return $name[0];\n }" ]
[ "0.8745679", "0.8370747", "0.82813454", "0.8278489", "0.82673126", "0.82673126", "0.82673126", "0.82673126", "0.82673126", "0.82610357", "0.82610357", "0.82610357", "0.82610357", "0.82610357", "0.82610357", "0.82610357", "0.82610357", "0.82610357", "0.8240553", "0.8236498", "0.8233827", "0.82301736", "0.8226953", "0.82146597", "0.8208133", "0.82042885", "0.8196618", "0.81732875", "0.817288", "0.81702715", "0.81702554", "0.8169044", "0.8166422", "0.81524074", "0.81524074", "0.81524074", "0.81421465", "0.81320953", "0.81233966", "0.8113923", "0.8113923", "0.80977", "0.80942905", "0.80863994", "0.80586994", "0.80461943", "0.8035936", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.80182415", "0.8009006", "0.8003559", "0.8003559", "0.7976657", "0.7953414", "0.7920012", "0.7904821", "0.7888122", "0.7888122", "0.7883832", "0.7883401", "0.78764635", "0.78755635", "0.783384", "0.7826963", "0.7807818", "0.78037685", "0.7802456", "0.77943194", "0.778466", "0.7782883", "0.7779579", "0.7776778", "0.7744772", "0.7737562", "0.7724109", "0.7718636", "0.76854694", "0.7679672", "0.7647461", "0.7625163", "0.76172024", "0.7614171", "0.7593481", "0.7588558", "0.75692075", "0.75600064", "0.75361454" ]
0.8294397
2
Set the value of first_name
public function setFirst_name($first_name) { $this->first_name = $first_name; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFirstName($value){\n $this->first_name = $value;\n }", "public function setFirstname($value)\n {\n $this->_firstname = $value;\n }", "public function setFirstName($first_name) {\n $this->user_first_name = $first_name;\n }", "public function setFirstName($value) { $this->setState('__firstname',$value); }", "public function setFirstName($first_name)\n\t{\n\t\t$this->first_name = $first_name;\n\t}", "public function setFirstName(string $first_name): void\n {\n $this->_first_name = $first_name;\n }", "public function setFirstName(string $first_name);", "public function setFirstName($newFirstName) {\n //sanitize the string\n $newFirstName = filter_var($newFirstName, FILTER_SANITIZE_STRING);\n \n //if the string got here, it's passed all our tests - assign it!\n $this->firstName = $newFirstName;\n }", "function setFirstName($name)\n {\n $this->addParam('first_name', (string)$name);\n }", "function setFirstName( $fname )\n {\n $this->setValueByFieldName( 'person_fname', $fname );\n }", "function setFirstName($firstName);", "function setFirstName($newVal)\r\n\t{\r\n\t\t$this->FirstName = $newVal;\r\n\t}", "public function setFirstname(string $firstname): void\n {\n $this->_firstname = $firstname;\n }", "public function setFirstNameAttribute($value)\n {\n $this->attributes['first_name'] = ucfirst($value);\n }", "public function setFirstName($firstname){\n\t\t\t$this->firstname = $firstname;\n\t\t}", "public function set_firstname($firstname) {\n $this->firstname = $firstname;\n }", "public function setFirstname($firstname) {\n $this->firstname = $firstname;\n }", "public function setFirstName(string $firstName): void\n {\n $this->firstName = $firstName;\n }", "private function setFirstName()\n {\n \tif ( empty($_POST['first_name'] ) ) {\n \t\t$this->data['error']['first_name'] = \"Please provide your first name.\";\n $this->error = true;\n return;\n }\n \n $fn = trim( $_POST['first_name'] );\n \n\t\tif ( preg_match('/^[A-Z \\'.-]{1,40}$/i', $fn ) ) {\n\t\t\t$this->data['first_name'] = $fn;\n\t\t} else {\n\t\t\t$this->data['error']['first_name'] = \"Your first name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }", "public function setFirstNameAttribute($value)\n\t{\n\t\t$this->attributes['name'] = $value;\n\t}", "public function setFirstname($firstname) {\n\t\t$this->firstname = $firstname;\n\t}", "public function setFirstName($newFirstName) {\n //first trim the input of excess whitespace\n \n $newFirstName = trim($newFirstName);\n if($newFirstName === null) {\n $this->firstName = null;\n return;\n }\n //sanitize for special characters\n $newFirstName = filter_var($newFirstName, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n \n //validate that value is string\n if(gettype($newFirstName) !== \"string\"){\n throw(new UnexpectedValueException(\"The input First Name format is invalid\"));\n }\n \n //set value of first name\n $this->firstName = $newFirstName;\n }", "function set_first_name($first_name='*')\r\n{\r\n\t$this->first_name = '';\t\t// return\r\n\t\r\n\t// Get Random Name\r\n\tif ( $first_name == '*' )\r\n\t{\r\n\t\tif ( !isset($this->gender) ) $this->set_gender();\r\n\t\t$this->first_name = $this->_get_random_first_name($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->first_name = $first_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->first_name = ucwords($this->first_name);\r\n\t\r\n\t// adjust hyphenates\r\n\tif ( $_pos = strpos($this->first_name, '-') )\r\n\t{\r\n\t\t$this->first_name = substr($this->first_name, 0, $_pos+1) . '-' . ucwords( substr($this->first_name, $_pos+1) );\r\n\t}\r\n\t\r\n\treturn $this->first_name;\r\n}", "public function setFirstnameAttribute($value)\n {\n $this->attributes['firstname'] = title_case(trim($value));\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n }", "public function setFirstNameAttribute(string $value): void\n {\n $this->attributes[self::FIRST_NAME] = \\trim($value);\n }", "public function setFirstName(String $firstName)\n {\n $this->firstName = $firstName;\n }", "public function setFirstName($value)\n {\n return $this->set('FirstName', $value);\n }", "public function setFirstName($u_fname) {\n\n $this->u_fname = $u_fname;\n\n }", "public function setCustomerFirstname($customerFirstname);", "public function setFirstName($value) {\n return $this->setParameter('first_name', $value);\n }", "public function setFirstName( $first_name ){\n \n $this->first_name = $first_name;\n \n return $this;\n \n }", "protected function first_name() {\n $element = new Text('first_name');\n $element->setLabel('First Name');\n $element->setAttribute('class', 'form-control');\n $element->setUserOption('lblRequired', true);\n $element->addValidators(array(\n new PresenceOf(array('message' => 'First Name is required'))\n ));\n $this->add($element);\n }", "public function setFirstName( $first_name ) {\n\t\t$this->container['first_names'] = isset( $first_name ) ? array( $first_name ) : null;\n\n\t\treturn $this;\n\t}", "public function setFirstName($first_name)\n {\n $this->first_name = $first_name;\n return $this;\n }", "public function setFirstName(?string $firstName): self\n {\n $this->initialized['firstName'] = true;\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setFirstName(string $firstName): self\n {\n $this->setParam(self::FIRST_NAME, $firstName);\n return $this;\n }", "public function setCustomerFirstName($firstName = '') {\n $first = array(\n 'x_first_name'=>$this->truncateChars($firstName, 50),\n );\n $this->NVP = array_merge($this->NVP, $first); \n }", "public function setNewFirstName($value)\n {\n return $this->set('NewFirstName', $value);\n }", "public function setGivenName($value)\n {\n $this->setProperty(\"GivenName\", $value, true);\n }", "public function saveFirstName()\n {\n $this->validate(['firstName' => 'sometimes|required']);\n\n $this->updateValue(\n 'first_name',\n $this->firstName,\n 'Customer First name updated successfully.'\n );\n\n $this->firstNameUpdate = false;\n $this->emit('profileUpdate');\n }", "public function setFirstName(string $firstName)\n {\n $this->FirstName = $firstName;\n return $this;\n }", "public function setADFirstName($firstName)\n\t{\n\t\t$this->firstName = $firstName;\n\t}", "public function setFirstName($first_name)\n {\n $this->getEntity()->setFirstName($first_name);\n return $this;\n }", "public function setFirstName($first_name)\n {\n $this->first_name = $first_name;\n\n return $this;\n }", "public function setFirstName($first_name)\n {\n $this->first_name = $first_name;\n\n return $this;\n }", "public function setFirstName($first_name)\n {\n $this->first_name = $first_name;\n\n return $this;\n }", "public function setFirstName($first_name)\n {\n $this->first_name = $first_name;\n\n return $this;\n }", "public function getFirstName(){\n \n return $this->first_name;\n \n }", "public function setFirstName($value)\n {\n $this->setBillingFirstName($value);\n $this->setShippingFirstName($value);\n\n return $this;\n }", "public function setFirstName($v)\n {\n if ($v !== null) {\n $v = (string) trim($v);\n }\n\n return parent::setFirstName($v);\n }", "public function setCustomerFirstName($name)\n\t {\n\t \t $this->json['params'][$this->customer]['name']['given'] = $name;\n\t \t \n\t \t return $this;\n\t }", "public function setFirstName(string $first_name = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_first_name', $first_name);\n \n return $this;\n }", "public function setFirstName(string $firstName): self\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setFirstName(string $firstName):self\n {\n $this->firstName = $firstName;\n return $this;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n return $this;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n return $this;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n return $this;\n }", "public function getFirst_name()\r\n {\r\n return $this->first_name;\r\n }", "public function testSetAndGetFirstName()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the First Name\r\n $testObj->setFirstName('Testy');\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that First Name field was updated\r\n $this->assertEquals('Testy', $testObj->getFirstName());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'FirstName');\r\n }", "function setName( $family='', $first='', $additional='', $prefix='', $suffix='' )\n {\n $this->properties[\"N\"] = \"$family;$first;$additional;$prefix;$suffix\";\n $this->setFormattedName( trim( \"$prefix $first $additional $family $suffix\" ) );\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "function setLastName($newVal)\r\n\t{\r\n\t\t$this->LastName = $newVal;\r\n\t}", "function setStudentFirstName($studentFirstName) {\n\t\treturn $this->setData('studentFirstName', $studentFirstName);\n\t}", "function setLastName($lastName);", "public function convertFirstName()\r\n {\r\n $this->customer->setFirstName($this->firstName);\r\n\r\n return $this->customer->getFirstName();\r\n }", "public function setFirstname(string $newFirstname)\n\t{\n\t if (strlen($newFirstname) <= 3 && strlen($newFirstname) >=20) {\n\t $this->firstname = $newFirstname;\n\t return $this;\n\t }else{\n\t echo \"Choose a name between 3 to 20 Characters\"\n\t throw new Exception();\n\t }\n\t}", "public function getFirstname() {\n return $this->getValue('firstname');\n }", "public function setLastName(string $last_name);", "public function setFirstName($firstName) {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setFirstName(\\horstoeko\\ubl\\entities\\cbc\\FirstName $firstName)\n {\n $this->firstName = $firstName;\n return $this;\n }", "public function setFirstname($firstName)\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function setFirstname($firstname)\n {\n $this->firstname = $firstname;\n\n return $this;\n }", "public function setLastname($value)\n {\n $this->_lastname = $value;\n }", "public function setLastnameAttribute($value)\n {\n $this->attributes['lastname'] = title_case(trim($value));\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n\n return $this;\n }", "public function setuserFirstName($userFirstName)\n {\n $this->userFirstName = $userFirstName;\n\n return $this;\n }", "public function getFirstName()\n {\n return $this->firstname;\n }", "public function getFirstName() { return $this->firstName; }", "public function setFullName() {\n $this->fullname = $this->name . ' ' . $this->surname . ' ' . $this->phone;\n }", "public function setShippingFirstName($firstName = '') {\n $first = array(\n 'x_ship_to_first_name'=>$this->truncateChars($firstName, 50),\n );\n $this->NVP = array_merge($this->NVP, $first); \n }", "function getFirstName() {\n return $this->first_name;\n }", "public function getFirstName()\n\t{\n\t\treturn $this->first_name;\n\t}", "private function setFirstName($param)\n {\n $this->firstName = $param;\n\n return $this;\n }", "public function getFirstName(){\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstName() {\n return $this->firstname;\n }", "public function setForename($forename) {\n $this->_setModelProperty('forename', $forename, 'string');\n }", "public function setFirstLetter($value)\n {\n if (!array_key_exists('first_letter', $this->fieldsModified)) {\n $this->fieldsModified['first_letter'] = $this->data['fields']['first_letter'];\n } elseif ($value === $this->fieldsModified['first_letter']) {\n unset($this->fieldsModified['first_letter']);\n }\n\n $this->data['fields']['first_letter'] = $value;\n }", "public function getFirstName() {\n\t\treturn $this->first_name;\n\t}" ]
[ "0.89283425", "0.863086", "0.83692336", "0.8368907", "0.8281101", "0.82766837", "0.82512975", "0.8150689", "0.8149429", "0.81276816", "0.812409", "0.80474466", "0.8015003", "0.79900116", "0.79744494", "0.79726726", "0.7953195", "0.79440314", "0.79434973", "0.7940281", "0.7903309", "0.788033", "0.7825559", "0.78216", "0.7811155", "0.7811155", "0.7786029", "0.7739788", "0.76474196", "0.7603187", "0.74898654", "0.7481248", "0.739894", "0.7376914", "0.7350789", "0.7271791", "0.7256742", "0.72461724", "0.72422844", "0.72210026", "0.72185814", "0.72185236", "0.72180974", "0.70985055", "0.70922464", "0.705021", "0.705021", "0.705021", "0.705021", "0.7023782", "0.70173484", "0.69877034", "0.6983737", "0.6963358", "0.6927036", "0.69100714", "0.6900285", "0.6900285", "0.6900285", "0.6870939", "0.68658215", "0.6848841", "0.6841929", "0.6837226", "0.68119615", "0.68065596", "0.68003464", "0.6772041", "0.6765765", "0.6763827", "0.6745886", "0.67423165", "0.673863", "0.6731988", "0.6731988", "0.6731988", "0.6731988", "0.6731988", "0.67085683", "0.66990376", "0.66940373", "0.66882575", "0.66882575", "0.66882575", "0.66882575", "0.66882575", "0.66882575", "0.66808873", "0.6669101", "0.66600657", "0.6653478", "0.66517943", "0.6632823", "0.6628744", "0.66255397", "0.6616377", "0.6605365", "0.66032326", "0.6603189", "0.6598999" ]
0.7279278
35
Get the value of surname
public function getSurname() { return $this->surname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSurname() {\r\n return $this->surname;\r\n }", "public function getSurname()\n {\n return $this->surname;\n }", "public function getSurname()\n {\n return $this->surname;\n }", "public function getSurname()\n\t{\n\t\treturn $this->surname;\n\t}", "public function getSurname()\n\t{\n\t\treturn $this->surname;\n\t}", "public function getSurname(): string {\n return $this->surname;\n }", "public function getSurname(){\n return $this->_getModelProperty('surname');\n }", "public function getSurname ();", "public function getSurname() :string\n {\n return $this->surname;\n }", "public function getSurname() {\n return ($this->isInit()) ? $this->surname : null;\n }", "public function requestSurname();", "function nameAndSurname() {\n return $this->NAME . ' ' . $this->SURNAME;\n }", "function getPersonLastName()\n {\n return $this->getValueByFieldName('person_lname');\n }", "public function getLastname() {\n return $this->getValue('lastname');\n }", "public function getHonoreeLastName();", "public function getName()\n {\n $result = null;\n if (isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'] . ' ' . $this->userInfo['last_name'];\n } elseif (isset($this->userInfo['first_name']) && !isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'];\n } elseif (!isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['last_name'];\n }\n return $result;\n }", "private function calculateSurname()\n {\n $surname = $this->cleanString($this->subject->getSurname());\n $consonants = str_replace($this->vowels, '', strtoupper($surname));\n if (strlen($consonants) > 2) {\n $result = substr($consonants, 0, 3);\n } else {\n $result = $this->calculateSmallString($consonants, $surname);\n }\n\n return $result;\n }", "function getStudentLastName() {\n\t\treturn $this->getData('studentLastName');\n\t}", "public function getUserLastName () {\n\t\treturn ($this->userLastName);\n\t}", "public function getUserLastName() :string {\n\t\treturn($this->userFirstName);\n\t}", "public function getuserLastName()\n {\n return $this->userLastName;\n }", "public function getFirstname() {\n return $this->getValue('firstname');\n }", "public function getUserProfileLastName(): string {\n\t\treturn ($this->userProfileLastName);\n\t}", "public function getGivenName ();", "function getValue() {\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n $ext=substr(${$this->name.\"_name\"},-3);\n if ($ext==\"\") $ext=${$this->name.\"_old\"};\n if ($ext==\"\") $ext=$this->value;\n return $ext;\n }", "public function getBillingLastName();", "function getFieldSurame($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_surname');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_surname');\n\t\t$tooltip = setToolTipNotification('surname');\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.\"<span class='red'>*</span>\".$tooltip.\"</label><br><input type='text' name='surname' value='\".$value.\"' class='' id='surname'></br><div id='surname_err_con'></div>\";\t\n\t\t}\n\t\treturn $form_ret;\n\t}", "function get_profile_lname($lname){\r\n\t\r\n}", "public function getName()\n {\n return trim(\"$this->FirstName $this->Surname\");\n }", "public function getLastName()\n {\n return $this->last_name ?? $this->surname ?? $this->lastName;\n\n }", "public function getShipToLastName();", "public function getHonoreeFirstName();", "public function getLastname()\r\n {\r\n return $this->lastname;\r\n }", "public function getLastname()\n {\n return $this->lastname;\n\n }", "public function GetLastName()\n {\n return $this->lastname;\n }", "public function getLastname() {\n return $this->lastname;\n }", "public function getSecondName()\n {\n if (isset($this->response['name']) && isset($this->response['name']['familyName']))\n {\n return $this->response['name']['familyName'];\n }\n\n return null;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname(): string\n {\n return $this->_lastname;\n }", "public function getFirstName();", "public function getUser_lname()\n {\n return $this->user_lname;\n }", "public function getCustomerLastname();", "function getSupervisorLastName() {\n\t\treturn $this->getData('supervisorLastName');\n\t}", "function getRHUL_LastName() {\n return getRHUL_LDAP_FieldValue(\"last_name\");\n}", "public function getTitleLastName() {\r\n $titleLastName = $this->getTitleString() .' '. $this->lastName;\r\n return $titleLastName;\r\n }", "public function name() {\n $a = $this->firstname;\n return $a;\n }", "public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname() {\n\t\treturn $this->lastname;\n\t}", "public function fullName()\n {\n return $this->forename.' '.$this->surname;\n }", "public function getLastName(){\n \n return $this->last_name;\n \n }", "public function getLastname()\r\n\t{\r\n\t\treturn $this->lastname;\r\n\t}", "public function getFirstName() {}", "public function getFirstName() {}", "public function getDisplayName() {\r\n $displayName = $this->fname.' '.$this->lname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }", "public function getLastname(): string;", "public function getForename(){\n return $this->_getModelProperty('forename');\n }", "function getLastname()\n {\n return $this->lastname;\n }", "Public Function getUserName()\n\t{\n\t\treturn $this->firstName . ' ' . $this->lastName;\n\t}", "public function getLastname()\n {\n return $this->lastname;\n }", "function getPersonFirstName()\n {\n return $this->getValueByFieldName('person_fname');\n }", "public function getLastName(){\n\t\t\treturn $this->lastname;\n\t\t}", "public function getLastName() { return $this->lastName; }", "public function getLastName()\n {\n return $this->get('LastName');\n }", "public function getLastName()\n {\n return $this->getValue('nb_icontact_prospect_last_name');\n }", "public function getLastName() {\n\t\treturn $this->getCustomField( 'last_name' );\n\t}", "protected function getStringValue()\n {\n $firstName = $this->getFieldValue(self::FIELD_FIRST_NAME);\n $lastName = $this->getFieldValue(self::FIELD_LAST_NAME);\n $email = $this->getFieldValue(self::FIELD_EMAIL);\n\n return \"{$firstName} {$lastName} ({$email})\";\n }", "protected function _getRealName()\n {\n return $this->first_name . ' ' . $this->last_name;\n }", "public function getLastName():string\n {\n return $this->lastName;\n }", "public function getLastname() {}", "public function getLastName()\n {\n return App_Formatting::emptyToNull($this->lastName->getValue());\n }", "public function getLastName()\n {\n return $this->getXml()->getElementsByTagName('LastName')->item(0)->nodeValue;\n }", "public function getLastName() {\n return $this->lastname;\n }", "public function name() {\r\n $name = $this->first_name . ' ' . $this->last_name;\r\n return $name;\r\n }", "public function getFirstname(): string\n {\n return $this->_firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getSpotifyLastName()\n {\n return $this->spotifyLastName;\n }", "public function getFirstname() {\n return $this->firstname;\n }", "public function getLastName(): string\n {\n return $this->lastName;\n }", "public function getLastName(): string\n {\n return $this->lastName;\n }", "public function getFirstName():string\n {\n return $this->firstName;\n }", "public function getPayerLastName() {\n\t\treturn $this->_getField(self::$PAYER_LAST_NAME);\n\t}", "public function getApplicantLastName()\n {\n return $this->getProperty('applicant_last_name');\n }", "public function getNameLukasBodnariuc(): string{\r\n return $this->nameLukasBodnariuc . \" \" . $this->surnameLukasBodnariuc;\r\n }" ]
[ "0.837224", "0.83340204", "0.83340204", "0.83089703", "0.83089703", "0.8211139", "0.8210201", "0.8184101", "0.8086888", "0.8005936", "0.76731354", "0.73484755", "0.7186475", "0.6993031", "0.69906497", "0.6843099", "0.68353426", "0.6820792", "0.6807988", "0.6790558", "0.6731534", "0.6703454", "0.6691672", "0.66658306", "0.66502756", "0.66208476", "0.65878105", "0.65768796", "0.65622234", "0.6554357", "0.65401083", "0.65373737", "0.65145075", "0.6508841", "0.65003794", "0.64990896", "0.64990854", "0.64846295", "0.64846295", "0.64846295", "0.64846295", "0.64846295", "0.64846295", "0.64846295", "0.64846295", "0.64826196", "0.647554", "0.6456858", "0.6442142", "0.6428301", "0.6428114", "0.6425967", "0.6422347", "0.6417032", "0.64122725", "0.6410775", "0.63996744", "0.6399363", "0.6384925", "0.6379838", "0.6379838", "0.6378601", "0.63762367", "0.6356097", "0.6345457", "0.6345352", "0.6336659", "0.63205373", "0.6313969", "0.629739", "0.629086", "0.6281458", "0.6281203", "0.6258625", "0.62578666", "0.6256941", "0.6253861", "0.62476265", "0.6242369", "0.62350786", "0.6225428", "0.6220598", "0.62136096", "0.62136096", "0.62136096", "0.62136096", "0.62136096", "0.62136096", "0.62136096", "0.62136096", "0.62136096", "0.62071306", "0.6207004", "0.61991507", "0.61991507", "0.61988205", "0.6197396", "0.61880046", "0.61876345" ]
0.83779883
1
Set the value of surname
public function setSurname($surname) { $this->surname = $surname; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSurname($surname);", "public function setSurname($surname) {\n $this->_setModelProperty('surname', $surname, 'string');\n }", "protected function setSurname(string $surname) {\n $this->surname = $surname;\n }", "public function setSurname($surname)\n\t{\n\t\t$this->surname = $surname;\n\t}", "public function setSurname($surname) {\r\n $this->surname = $surname;\r\n }", "public function setSurname(string $surname)\n {\n $this->surname = $surname;\n\n return $this;\n }", "function setLastName($lastName);", "public function setLastName(string $last_name);", "public function setLastname($value)\n {\n $this->_lastname = $value;\n }", "function setLastName( $lname )\n {\n $this->setValueByFieldName( 'person_lname', $lname );\n }", "public function getSurname()\r\n {\r\n return $this->surname;\r\n }", "public function getSurname()\r\n {\r\n return $this->surname;\r\n }", "public function setSurname($surname)\n {\n $this->surname = $surname;\n\n return $this;\n }", "public function setLastName($newLastName) {\n //sanitize the string\n $newLastName = filter_var($newLastName, FILTER_SANITIZE_STRING);\n \n //if the string got here, it's passed all our tests - assign it!\n $this->lastName = $newLastName;\n }", "public function getSurname() :string\n {\n return $this->surname;\n }", "public function requestSurname();", "public function getSurname(): string {\n return $this->surname;\n }", "public function getSurname() {\r\n return $this->surname;\r\n }", "public function getSurname()\n {\n return $this->surname;\n }", "public function getSurname()\n {\n return $this->surname;\n }", "public function getSurname ();", "public function getSurname()\n\t{\n\t\treturn $this->surname;\n\t}", "public function getSurname()\n\t{\n\t\treturn $this->surname;\n\t}", "function setLastName($newVal)\r\n\t{\r\n\t\t$this->LastName = $newVal;\r\n\t}", "public function getSurname(){\n return $this->_getModelProperty('surname');\n }", "public function setLastnameAttribute($value)\n {\n $this->attributes['lastname'] = title_case(trim($value));\n }", "private function setLastName()\n {\n \tif ( empty($_POST['last_name'] ) ) {\n \t\t$this->data['error']['last_name'] = \"Please provide your last name.\";\n $this->error = true;\n return;\n }\n \n $ln = trim( $_POST['last_name'] );\n \n \tif (preg_match('/^[A-Z \\'.-]{1,40}$/i', $ln)) {\n\t\t\t$this->data['last_name'] = $ln;\n\t\t} else {\n\t\t\t$this->data['error']['last_name'] = \"Your last name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }", "function setLastName($name)\n {\n if( !isset($name) || $name == '' )\n $name = 'Not Available';\n $this->addParam('last_name', (string)$name);\n }", "public function setLastName($u_lname) {\n\n $this->u_lname = $u_lname;\n\n }", "public function setLastName($newLastName) {\n //first trim the input of excess whitespace\n $newLastName = trim($newLastName);\n if($newLastName === null) {\n $this->lastName = null;\n return;\n }\n //sanitize for special characters\n $newLastName = filter_var($newLastName, FILTER_SANITIZE_SPECIAL_CHARS);\n \n //validate that value is string\n if(gettype($newLastName) !== \"string\") {\n throw(new UnexpectedValueException(\"The input Last Name format is invalid\"));\n }\n //set value of last name\n $this->lastName = $newLastName;\n }", "public function setLastNameAttribute(string $value): void\n {\n $this->attributes[self::LAST_NAME] = \\trim($value);\n }", "public function setLastname(string $lastname): void\n {\n $this->_lastname = $lastname;\n }", "public function getSurname() {\n return ($this->isInit()) ? $this->surname : null;\n }", "public function setUserProfileLastName(string $newUserProfileLastName): void {\n\t\t$newUserProfileLastName = trim($newUserProfileLastName);\n\t\t$newUserProfileLastName = filter_var($newUserProfileLastName, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\t\tif(empty($newUserProfileLastName) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"input is empty or insecure\"));\n\t\t}\n\t\tif(strlen($newUserProfileLastName) > 32) {\n\t\t\tthrow(new \\RangeException(\"Unfortunately, this is too long to store.\"));\n\t\t}\n\t\t$this->userProfileLastName = $newUserProfileLastName;\n\t}", "public function setFirstName($value){\n $this->first_name = $value;\n }", "public function edit(string $name, string $surname){\n $this->setName($name);\n $this->setSurname($surname);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"UPDATE user SET name = '$this->name', surname = '$this->surname' WHERE id = '$this->id'\");\n $connection = null;\n }", "public function setLastName($last_name) {\n $this->user_last_name = $last_name;\n }", "public function setLastName(string $last_name): void\n {\n $this->_last_name = $last_name;\n }", "public function setLastName($lastname){\n\t\t\t$this->lastname = $lastname;\n\t\t}", "public function setLastName($last_name)\n\t{\n\t\t$this->last_name = $last_name;\n\t}", "protected function setLastname(string $lastname)\r\n\t{\r\n\t\t$this->lastname = $lastname;\r\n\t}", "public function setLastname($lastname) {\n $this->lastname = $lastname;\n }", "public function setLastname($lastname) {\n\t\t$this->lastname = $lastname;\n\t}", "public function setGivenName($value)\n {\n $this->setProperty(\"GivenName\", $value, true);\n }", "public function setFirstname($value)\n {\n $this->_firstname = $value;\n }", "function set_last_name($last_name='*')\r\n{\r\n\t$this->last_name = '';\t\t// return\r\n\t\r\n\t// get random name\r\n\tif ( $last_name == '*' )\r\n\t{\r\n\t\t$this->last_name = $this->_get_random_last_name();\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->last_name = $last_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->last_name = ucwords($this->last_name);\r\n\t\r\n\t// tweaks\r\n\tif ( substr($this->last_name, 0, 2) == 'Mc' ) $this->last_name = 'Mc' . ucwords( substr($this->last_name, 2) );\r\n\t\r\n\treturn $this->last_name;\r\n}", "public function setLastName($value)\n {\n return $this->set('LastName', $value);\n }", "public function setFirstName($newFirstName) {\n //sanitize the string\n $newFirstName = filter_var($newFirstName, FILTER_SANITIZE_STRING);\n \n //if the string got here, it's passed all our tests - assign it!\n $this->firstName = $newFirstName;\n }", "public function setLastName(string $last_name) {\n\n $this->last_name = $last_name;\n\n }", "function nameAndSurname() {\n return $this->NAME . ' ' . $this->SURNAME;\n }", "public function setLastName($value) {\n return $this->setParameter('last_name', $value);\n }", "public function setForename($forename) {\r\n $this->forename = $forename;\r\n }", "public function setForename($forename) {\n $this->_setModelProperty('forename', $forename, 'string');\n }", "public function setFirstName(string $first_name);", "public function setFirstNameAttribute($value)\n {\n $this->attributes['first_name'] = ucfirst($value);\n }", "function setFirstName($firstName);", "public function setNewLastName($value)\n {\n return $this->set('NewLastName', $value);\n }", "private function setNome($nomecompleto){\t\t\n\t\tif($nomecompleto = filter_var($nomecompleto, FILTER_SANITIZE_STRING)){\n\t\t\t$this->nomecompleto = $nomecompleto; \n\t\t} \n\t}", "function set_user_name($user_name='*')\r\n{\r\n\t// Get Default User Name\r\n\tif ( $user_name == '*' )\r\n\t{\r\n\t\tif ( empty($this->first_name) || empty($this->last_name) )\r\n\t\t{\r\n\t\t\ttrigger_error('first name and last name must be set to auto-set user name', E_USER_WARNING);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t$user_name = substr($this->first_name,0,1) . $this->last_name;\r\n\t}\r\n\t// Set User Name\r\n\telse\r\n\t{\r\n\t\t$user_name = $user_name;\r\n\t}\r\n\t\r\n\t// set prop\r\n\t$this->user_name = strtolower($user_name);\r\n\treturn;\r\n}", "public function testRegisterLongSurname() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\tstr_repeat('abcde',20)+'a',\n\t\t\t'another@test.com'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function saveLastName()\n {\n $this->validate(['lastName' => 'sometimes|required']);\n\n $this->updateValue(\n 'last_name',\n $this->lastName,\n 'Customer Last name updated successfully.'\n );\n\n $this->lastNameUpdate = false;\n $this->emit('profileUpdate');\n }", "public function setFirstName($value) { $this->setState('__firstname',$value); }", "public function setUser_lname($user_lname)\n {\n if(strlen($user_lname) <= 50 && strlen($user_lname) > 0 && preg_match('#^[a-zA-Z-]*$#', $user_lname)) {\n $this->user_lname = $user_lname;\n }\n }", "public function setNome($valor){\n\t\t\t$this->nome = $valor;\n\t\t}", "public function setFirstnameAttribute($value)\n {\n $this->attributes['firstname'] = title_case(trim($value));\n }", "public function testRegisterBlankSurname() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\t' ',\n\t\t\t'another@test.com'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function setLastName(String $lastName)\n {\n $this->lastName = $lastName;\n }", "public function setFirstNameAttribute($value)\n\t{\n\t\t$this->attributes['name'] = $value;\n\t}", "public function setLastName($lastName)\n {\n $this->lastName = $lastName;\n }", "public function setLastName($lastName)\n {\n $this->lastName = $lastName;\n }", "public function setLastName($v)\n {\n if ($v !== null) {\n $v = (string) trim($v);\n }\n\n return parent::setLastName($v);\n }", "function setUsername($s)\n\t{\n\t\t$this->Info['Username'] = $s;\n\t\tupdateTableByUser('Developer', 'Username', $s, $this->Username);\n\t}", "public function setFullName() {\n $this->fullname = $this->name . ' ' . $this->surname . ' ' . $this->phone;\n }", "public function setHonoreeFirstName($lastName);", "function setFirstName( $fname )\n {\n $this->setValueByFieldName( 'person_fname', $fname );\n }", "public function __set($name, $value ) {\r\n \r\n // first check whether the given name is valid attribute or not\r\n // for that we are gonna use a switch statement\r\n switch($name) {\r\n \r\n case \"username\" :\r\n $this -> first_name = $value;\r\n break;\r\n default : return \"Invalid\"; // when the passes attribute doesnt exist\r\n }\r\n }", "function setFirstName($newVal)\r\n\t{\r\n\t\t$this->FirstName = $newVal;\r\n\t}", "public function setHonoreeLastName($lastName);", "public function setFirstNameAttribute(string $value): void\n {\n $this->attributes[self::FIRST_NAME] = \\trim($value);\n }", "public function setCustomerLastName($lastName = '') {\n $last = array(\n 'x_last_name'=>$this->truncateChars($lastName, 50),\n );\n $this->NVP = array_merge($this->NVP, $last); \n }", "public function setUserProfileFirstName(string $newUserProfileFirstName): void {\n\t\t$newUserProfileFirstName = trim($newUserProfileFirstName);\n\t\t$newUserProfileFirstName = filter_var($newUserProfileFirstName, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\t\tif(empty($newUserProfileFirstName) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"input is empty or insecure\"));\n\t\t}\n\t\tif(strlen($newUserProfileFirstName) > 32) {\n\t\t\tthrow(new \\RangeException(\"Unfortunately, this is too long to store.\"));\n\t\t}\n\t\t$this->userProfileFirstName = $newUserProfileFirstName;\n\t}", "public function setPayerName($data=null) {\n if(!is_array($data)) {\n $b = $this->getBilling();\n $data = array(\n 'FIRSTNAME' => $b['firstName'],\n 'LASTNAME' => $b['lastName']\n );\n }\n $this->_payerName = $data;\n }", "final protected function setNome(string $Nome){\n $this->Nome = $Nome;\n }", "public function set_firstname($firstname) {\n $this->firstname = $firstname;\n }", "public function setLName($lname)\n{\n$this->lname = $lname;\n}", "function setName( $family='', $first='', $additional='', $prefix='', $suffix='' )\n {\n $this->properties[\"N\"] = \"$family;$first;$additional;$prefix;$suffix\";\n $this->setFormattedName( trim( \"$prefix $first $additional $family $suffix\" ) );\n }", "public function __set($nome, $valor) {\n $this->nome = $valor;\n }", "public function testRegisterInvalidSurname() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\t'abcd efgh 3',\n\t\t\t'another@test.com'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "function setSupervisorLastName($supervisorLastName) {\n\t\treturn $this->setData('supervisorLastName', $supervisorLastName);\n\t}", "public function setUsername( $sName ) {\n\t\t$this->sUsername = $sName;\n\t}", "function set_first_name($first_name='*')\r\n{\r\n\t$this->first_name = '';\t\t// return\r\n\t\r\n\t// Get Random Name\r\n\tif ( $first_name == '*' )\r\n\t{\r\n\t\tif ( !isset($this->gender) ) $this->set_gender();\r\n\t\t$this->first_name = $this->_get_random_first_name($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->first_name = $first_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->first_name = ucwords($this->first_name);\r\n\t\r\n\t// adjust hyphenates\r\n\tif ( $_pos = strpos($this->first_name, '-') )\r\n\t{\r\n\t\t$this->first_name = substr($this->first_name, 0, $_pos+1) . '-' . ucwords( substr($this->first_name, $_pos+1) );\r\n\t}\r\n\t\r\n\treturn $this->first_name;\r\n}", "public static function setUsername($val) \n { \n emailSettings::$username = $val; \n }", "public function setNome(string $nome)\n {\n $this->nome = $nome;\n }", "function setLname($name){\n $this->lname = $name;\n }", "private function setFirstName()\n {\n \tif ( empty($_POST['first_name'] ) ) {\n \t\t$this->data['error']['first_name'] = \"Please provide your first name.\";\n $this->error = true;\n return;\n }\n \n $fn = trim( $_POST['first_name'] );\n \n\t\tif ( preg_match('/^[A-Z \\'.-]{1,40}$/i', $fn ) ) {\n\t\t\t$this->data['first_name'] = $fn;\n\t\t} else {\n\t\t\t$this->data['error']['first_name'] = \"Your first name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }", "public function setFirstName($newFirstName) {\n //first trim the input of excess whitespace\n \n $newFirstName = trim($newFirstName);\n if($newFirstName === null) {\n $this->firstName = null;\n return;\n }\n //sanitize for special characters\n $newFirstName = filter_var($newFirstName, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n \n //validate that value is string\n if(gettype($newFirstName) !== \"string\"){\n throw(new UnexpectedValueException(\"The input First Name format is invalid\"));\n }\n \n //set value of first name\n $this->firstName = $newFirstName;\n }", "public function setShippingLastName($lastName = '') {\n $last = array(\n 'x_ship_to_last_name'=>$this->truncateChars($lastName, 50),\n );\n $this->NVP = array_merge($this->NVP, $last); \n }", "public function setFirstName($u_fname) {\n\n $this->u_fname = $u_fname;\n\n }", "public function setLastName($value)\n {\n $this->setBillingLastName($value);\n $this->setShippingLastName($value);\n\n return $this;\n }" ]
[ "0.84666777", "0.80929875", "0.8043565", "0.7994532", "0.79862314", "0.73291147", "0.71856856", "0.7181686", "0.7136622", "0.70576733", "0.7037739", "0.7037739", "0.70126134", "0.699282", "0.6990544", "0.69860286", "0.69541615", "0.694711", "0.6906256", "0.6906256", "0.68618727", "0.6825801", "0.6825801", "0.67878634", "0.67743737", "0.67602", "0.6749137", "0.67189157", "0.66564167", "0.66543823", "0.663887", "0.6573504", "0.6566802", "0.6543504", "0.6542248", "0.65355283", "0.65286875", "0.65123", "0.65058506", "0.6505235", "0.6469098", "0.6437756", "0.6425518", "0.6391128", "0.63707656", "0.6368399", "0.63606", "0.635661", "0.6352606", "0.6323855", "0.6288581", "0.6275878", "0.62688124", "0.62568575", "0.62519187", "0.62088984", "0.6201214", "0.61837476", "0.6181703", "0.6177413", "0.61537987", "0.61496264", "0.6142651", "0.6127958", "0.6125674", "0.6123991", "0.6105433", "0.6073178", "0.605569", "0.605569", "0.6043838", "0.6014962", "0.6010249", "0.59960467", "0.5986978", "0.5980152", "0.59764755", "0.5936875", "0.59331554", "0.5928321", "0.59207565", "0.59091866", "0.5898862", "0.5898193", "0.58862436", "0.58692724", "0.5857159", "0.5852448", "0.5848912", "0.58454233", "0.5840766", "0.58351153", "0.5813617", "0.57923603", "0.5789269", "0.57885945", "0.5786019", "0.5779094", "0.57765335" ]
0.72005224
7
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create()\n {\n return view('student::students.student.create');\n }" ]
[ "0.7593198", "0.7593198", "0.75881755", "0.75787884", "0.7570936", "0.74992913", "0.7436037", "0.7431172", "0.7386512", "0.7351077", "0.7337819", "0.73100585", "0.7295612", "0.72803086", "0.7272473", "0.72422874", "0.7229479", "0.7224403", "0.7184453", "0.7177193", "0.7173551", "0.71482", "0.71424824", "0.7141885", "0.7135663", "0.7126202", "0.7121413", "0.7113729", "0.7113729", "0.7113729", "0.7110717", "0.7092118", "0.7083616", "0.7080794", "0.7078082", "0.70561296", "0.70561296", "0.7054459", "0.703925", "0.70373696", "0.70346737", "0.70324355", "0.70287114", "0.7025425", "0.7025232", "0.7018496", "0.7016745", "0.7002774", "0.70019513", "0.69991785", "0.69942427", "0.69936013", "0.69929653", "0.6988009", "0.69856364", "0.6965122", "0.6964889", "0.6955187", "0.69511235", "0.69497", "0.6947041", "0.69432163", "0.6940678", "0.6939846", "0.6936846", "0.6936846", "0.6936506", "0.6933589", "0.69309", "0.69273484", "0.6925485", "0.6921386", "0.6917649", "0.6913987", "0.6910826", "0.6909406", "0.69085246", "0.6907409", "0.69021183", "0.6900961", "0.68997645", "0.68991655", "0.6894049", "0.68920606", "0.6892033", "0.6891114", "0.6890811", "0.6890811", "0.6887868", "0.6887327", "0.68854356", "0.688366", "0.68805534", "0.68766564", "0.68753666", "0.6872474", "0.68717086", "0.6869974", "0.6869806", "0.6868809", "0.68685615" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $user = Auth::user(); $purchase = new Purchase(); $purchase->user_id = $user->id; $purchase->app_id = $request->app_id; $purchase->save(); //la aplicacion que ya fue comprada la saco de la lista de deseos Wish::where('app_id', $request->app_id) ->where('user_id', $user->id) ->delete(); return ["Result" => "La compra se ha efectuado correctamente"]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Purchase $purchase) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "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 }", "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}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "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 }", "public function retrieve(Resource $resource);", "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 }", "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 }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "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}", "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 }", "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 }", "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}", "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 }", "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 }", "public function get(Resource $resource);", "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 }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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}", "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 }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "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 }", "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}", "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 }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "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}", "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 }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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}", "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 }", "#[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}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "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 }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "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}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "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 }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Purchase $purchase) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($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}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "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 }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.665213", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Purchase $purchase) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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 }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "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 }", "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 }", "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 }", "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 }", "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}", "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 }", "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 }", "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 }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "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 }", "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 }", "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 }", "public function updateStream($path, $resource, Config $config)\n {\n }", "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}", "public function edit(Resource $resource)\n {\n //\n }", "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 }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "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 }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "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 }", "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 }", "public function store($data, Resource $resource);", "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 }", "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 }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update($request, $id);", "public function update(IEntity $entity);", "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 }", "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}", "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 }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "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 }", "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 }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "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 }", "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 }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "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 }", "public function update($id, $input);", "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 }", "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)); }", "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 }", "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}", "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 }", "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 }", "public function update($id);", "public function update($id);", "public function put($path, $data = null);", "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 }", "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 }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update(Entity $entity);", "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 }", "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 }", "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}", "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 }", "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 }", "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 }", "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 }", "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 }" ]
[ "0.74238616", "0.7062842", "0.7057816", "0.6897868", "0.65820867", "0.64505464", "0.6347915", "0.62114644", "0.6145006", "0.61231726", "0.6115922", "0.6100021", "0.6089019", "0.60542375", "0.60187906", "0.6008231", "0.5974106", "0.5944986", "0.59397626", "0.59393746", "0.58937186", "0.58607864", "0.5853811", "0.5853811", "0.58521867", "0.5815276", "0.58061725", "0.57518756", "0.57518756", "0.5736318", "0.57246256", "0.5715636", "0.5696208", "0.5691033", "0.5687788", "0.56692934", "0.56556624", "0.5652178", "0.56494987", "0.5636202", "0.56355816", "0.5632871", "0.563206", "0.56291884", "0.5621382", "0.56087434", "0.5602465", "0.55928403", "0.55825645", "0.55821884", "0.5581833", "0.5576869", "0.55712104", "0.5568173", "0.55648434", "0.5562885", "0.5560537", "0.5560537", "0.5560537", "0.5560537", "0.5560537", "0.55592597", "0.5556131", "0.5555849", "0.5555397", "0.5553912", "0.55530137", "0.5543831", "0.55430055", "0.5540152", "0.5539437", "0.55359006", "0.5535772", "0.5534487", "0.552458", "0.5518245", "0.5515452", "0.55145514", "0.5509227", "0.55079365", "0.55065364", "0.55039924", "0.5501616", "0.5500345", "0.5499738", "0.54980725", "0.5496017", "0.5496017", "0.5494488", "0.5494334", "0.54936594", "0.54934716", "0.5491019", "0.54835314", "0.54795796", "0.5479442", "0.5478275", "0.54646415", "0.54637444", "0.5461914", "0.54562414" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $purchase = Purchase::findOrFail($id); $purchase->delete(); return ["Result" => "La compra se ha cancelado correctamente"]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "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 }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
When we want to process manually the blockchain order process. Return an processor object
public static function getOrderProcessor():BlockchainOrderProcess { return new BlockchainOrderProcess(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processPayment()\n {\n $cashOnDeliveryMethod = $this\n ->methodFactory\n ->create();\n\n /**\n * At this point, order must be created given a cart, and placed in PaymentBridge.\n *\n * So, $this->paymentBridge->getOrder() must return an object\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderLoad(\n $this->paymentBridge,\n $cashOnDeliveryMethod\n );\n\n /**\n * Order Not found Exception must be thrown just here.\n */\n if (!$this->paymentBridge->getOrder()) {\n throw new PaymentOrderNotFoundException();\n }\n\n /**\n * Order exists right here.\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderCreated(\n $this->paymentBridge,\n $cashOnDeliveryMethod\n );\n\n /**\n * Payment paid done.\n *\n * Paid process has ended ( No matters result )\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderDone(\n $this->paymentBridge,\n $cashOnDeliveryMethod\n );\n\n return $this;\n }", "public function processPayment()\n {\n $paymentMethod = $this\n ->methodFactory\n ->create();\n\n /**\n * At this point, order must be created given a card, and placed in\n * PaymentBridge.\n *\n * So, $this->paymentBridge->getOrder() must return an object\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderLoad(\n $this->paymentBridge,\n $paymentMethod\n );\n\n /**\n * Order exists right here.\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderCreated(\n $this->paymentBridge,\n $paymentMethod\n );\n\n /**\n * Payment paid done.\n *\n * Paid process has ended (No matters result)\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderDone(\n $this->paymentBridge,\n $paymentMethod\n );\n\n /**\n * Payment paid successfully.\n *\n * Paid process has ended successfully\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderSuccess(\n $this->paymentBridge,\n $paymentMethod\n );\n\n return $this;\n }", "public function process()\n {\n // check order configurations for funny PT case\n foreach ($this->order_configurations as $config) {\n $products = $config->getProductArray(true);\n $hasPreceptorTraining = in_array(\"9\", $products);\n\n // we found preceptor training and other products\n //(we need an addtional serial number, therefor an additional config)\n if (count($products) > 1 && $hasPreceptorTraining && !$this->upgrade_purchase) {\n $this->addPreceptorTrainingConfig($config->quantity);\n }\n }\n\n //Mark order as completed\n $this->completed = true;\n $this->order_date = new \\DateTime();\n\n //Either apply upgrades or generate new serial numbers\n if ($this->upgrade_purchase) {\n $this->applyUpgradesAndDowngrades();\n } else {\n $this->generateSerialNumbers();\n }\n\n //Send email to interested parties, unless this is an instant order by Staff\n if ($this->order_type->id != 3) {\n $this->emailSerialNumbers();\n }\n\n //Generate invoice number and email the invoice if appropriate\n if ($this->payment_method->id == 1 && !$this->isFreeOrder()) {\n $this->generateInvoiceNumber();\n $this->emailInvoicePdf();\n }\n \n $session = new \\Zend_Session_Namespace(\"OrdersController\");\n $session->unsetAll();\n }", "public function processes($paymentSystemName);", "public function processPayment();", "function before_process() {\n global $order, $db, $currencies, $messageStack;\n\n\t// if the card number has the blanked out middle number fields, it has been processed, the message that \n\t// the charges were not processed were set in pre_confirmation_check, just return to continue without processing.\n\tif (strpos($_POST['paymentech_field_1'], '*') !== false) {\n\t\treturn false;\n\t}\n\n $order->info['cc_expires'] = $_POST['paymentech_field_2'] . $_POST['paymentech_field_3'];\n $order->info['cc_owner'] = $_POST['paymentech_field_0'];\n\t$this->cc_card_owner = $_POST['paymentech_field_0'];\n $order->info['cc_cvv'] = $_POST['paymentech_field_4'];\n\n // Create a string that contains a listing of products ordered for the description field\n $description = $order->description;\n\n\t// Generate the XML file to be sent to Paymentech\n\tif (MODULE_PAYMENT_PAYMENTECH_TESTMODE == 'Test') {\n\t\t$MerchantID = MODULE_PAYMENT_PAYMENTECH_MERCHANT_ID_TEST;\n\t} else {\n\t\tswitch (DEFAULT_CURRENCY) {\n\t\t\tcase 'USD': $MerchantID = MODULE_PAYMENT_PAYMENTECH_MERCHANT_ID_USD; break;\n\t\t\tcase 'CAD': $MerchantID = MODULE_PAYMENT_PAYMENTECH_MERCHANT_ID_CAD; break;\n\t\t}\n\t}\n\n\t$post_string = \"\n\t\t<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\n\t\t<Request>\n\t\t\t<NewOrder>\n\t\t\t\t<IndustryType>EC</IndustryType>\n\t\t\t\t<MessageType>\" . (MODULE_PAYMENT_PAYMENTECH_AUTHORIZATION_TYPE == 'Authorize' ? 'A' : 'AC') . \"</MessageType>\n\t\t\t\t<BIN>\" . MODULE_PAYMENT_PAYMENTECH_BIN . \"</BIN>\n\t\t\t\t<MerchantID>\" . $MerchantID . \"</MerchantID>\n\t\t\t\t<TerminalID>\" . MODULE_PAYMENT_PAYMENTECH_TERMINAL_ID . \"</TerminalID>\n\t\t\t\t<AccountNum>\" . $_POST['paymentech_field_1'] . \"</AccountNum>\n\t\t\t\t<Exp>\" . $order->info['cc_expires'] . \"</Exp>\n\t\t\t\t<CurrencyCode>\" . (DEFAULT_CURRENCY == 'USD' ? '840' : '124') . \"</CurrencyCode>\n\t\t\t\t<CurrencyExponent>2</CurrencyExponent>\n\t\t\t\t<CardSecValInd>\" . ($this->cc_cvv2 ? 1 : 9 ) . \"</CardSecValInd>\n\t\t\t\t<CardSecVal>\" . ($this->cc_cvv2 ? $this->cc_cvv2 : '') . \"</CardSecVal>\n\t\t\t\t<AVSzip>\" . preg_replace(\"/[^A-Za-z0-9]/\", \"\", $order->bill_postal_code) . \"</AVSzip>\n\t\t\t\t<AVSaddress1>\" . substr($order->bill_address1, 0, 20) . \"</AVSaddress1>\"\n\t\t\t\t. ( $order->bill_address2 ? '\n\t\t\t\t<AVSaddress2>' . $order->bill_address2 . '</AVSaddress2>' : '' ) . \"\n\t\t\t\t<AVScity>\" . $order->bill_city_town . \"</AVScity>\n\t\t\t\t<AVSstate>\" . $order->bill_state_province . \"</AVSstate>\n\t\t\t\t<AVSphoneNum>\" . $order->bill_telephone . \"</AVSphoneNum>\n\t\t\t\t<AVSname>\" . $this->cc_card_owner . \"</AVSname>\n\t\t\t\t<AVScountryCode>\" . gen_get_country_iso_2_from_3($order->bill_country_code) . \"</AVScountryCode>\n\t\t\t\t<AVSDestzip>\" . preg_replace(\"/[^A-Za-z0-9]/\", \"\", $order->ship_postal_code) . \"</AVSDestzip>\n\t\t\t\t<AVSDestaddress1>\" . $order->ship_address1 . \"</AVSDestaddress1>\"\n\t\t\t\t . ( $order->ship_address2 ? '\n\t\t\t\t<AVSDestaddress2>' . $order->ship_address2 . '</AVSDestaddress2>' : '' ) . \"\n\t\t\t\t<AVSDestcity>\" . $order->ship_city_town . \"</AVSDestcity>\n\t\t\t\t<AVSDeststate>\" . $order->ship_state_province . \"</AVSDeststate>\n\t\t\t\t<AVSDestphoneNum>\" . $order->ship_telephone . \"</AVSDestphoneNum>\n\t\t\t\t<AVSDestname>\" . $order->ship_primary_name . \"</AVSDestname>\n\t\t\t\t<AVSDestcountryCode>\" . gen_get_country_iso_2_from_3($order->ship_country_code) . \"</AVSDestcountryCode>\n\t\t\t\t<OrderID>\" . $order->purchase_invoice_id . \"</OrderID>\n\t\t\t\t<Amount>\" . ($order->total_amount * pow(10, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])) . \"</Amount>\n\t\t\t</NewOrder>\n\t\t</Request>\n\t\";\n\n\t$header = \"POST /AUTHORIZE HTTP/1.0\\r\\n\"; //HTTP/1.1 should work fine also\n\t$header .= \"MIME-Version: 1.0\\r\\n\";\n\t$header .= \"Content-type: application/PTI41\\r\\n\";\n\t$header .= \"Content-length: \" . strlen($post_string) . \"\\r\\n\";\n\t$header .= \"Content-transfer-encoding: text\\r\\n\";\n\t$header .= \"Request-number: 1\\r\\n\";\n\t$header .= \"Document-type: Request\\r\\n\";\n\t$header .= \"Merchant-id: \" . $MerchantID . \"\\r\\n\\r\\n\";\n//\t$header .= \"Connection: close \\r\\n\\r\\n\"; //Must have two CR/LF's here\n\t$header .= $post_string;\n\n // SEND DATA BY CURL SECTION\n // Post order info data to Paymentech gateway, make sure you have cURL support installed\n\n if (MODULE_PAYMENT_PAYMENTECH_TESTMODE == 'Test') {\n\t\t$url = MODULE_PAYMENT_PAYMENTECH_TEST_URL_PRIMARY;\n\t} else {\n\t\t$url = MODULE_PAYMENT_PAYMENTECH_PRODUCTION_URL_PRIMARY;\n\t}\n\n//echo 'transmit xml = '; echo htmlspecialchars($header); echo '<br><br>';\n\n\t$GetPost = 'POST';\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 20);\n\tcurl_setopt($ch, CURLOPT_HEADER, false); // You are providing a header manually so turn off auto header generation\n curl_setopt($ch, CURLOPT_VERBOSE, false);\n\n\n//*\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header); // The following two options are necessary to properly set up SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true);\n//*/\n\n/*\n\tcurl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\tif ($GetPost == 'POST') {\n\t curl_setopt($ch, CURLOPT_POST, 1);\n\t curl_setopt($ch, CURLOPT_POSTFIELDS, $header);\n }\n*/\n\n if (CURL_PROXY_REQUIRED == 'True') {\n curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, true);\n curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);\n curl_setopt ($ch, CURLOPT_PROXY, CURL_PROXY_SERVER_DETAILS);\n }\n\n\t$authorize = curl_exec($ch); \n\t// Check for curl errors\n\t$curlerrornum = curl_errno($ch);\n\t$curlerror = curl_error($ch);\n\tcurl_close ($ch);\n\tif ($curlerrornum) { \n\t\t$messageStack->add('XML Read Error (cURL) #' . $curlerrornum . '. Description = ' . $curlerror,'error');\n\t\treturn true;\n\t}\n\n//echo 'response xml = ' . htmlspecialchars($authorize) . '<br><br>';\n\n\t// since the response is only one level deep, we can do a simple parse\n\t$authorize = trim($authorize);\n\t$authorize = substr($authorize, strpos($authorize, '<NewOrderResp>') + 14); // remove up to and including the container tag\n\t$authorize = substr($authorize, 0, strpos($authorize, '</NewOrderResp>')); // remove from end container tag on\n\t$results = array();\n\t$runaway_loop_counter = 0;\n\twhile ($authorize) {\n\t\t$key = substr($authorize, strpos($authorize, '<') + 1, strpos($authorize, '>') - 1);\n\t\t$authorize = substr($authorize, strpos($authorize, '>') + 1); // remove start tag\n\t\t$value = substr($authorize, 0, strpos($authorize, '<')); // until start of end tag\n\t\t$authorize = substr($authorize, strpos($authorize, '>') + 1); // remove end tag\n\t\t$results[$key] = $value;\n\t\tif ($runaway_loop_counter++ > 1000) break;\n\t}\n\n//echo 'RespCode = ' . $results['RespCode'] . '<br>';\n//echo 'AVSRespCode = ' . $results['AVSRespCode'] . '<br>';\n//echo 'CVV2RespCode = ' . $results['CVV2RespCode'] . '<br>';\n//echo 'TxRefNum = ' . $results['TxRefNum'] . '<br><br>';\n\n\tif ($results['ProcStatus'] == 0) { //initial gateway test passed\n\t\tif ($results['ApprovalStatus'] == 1) { //Gateway returned approved\n\t\t\t$this->auth_code = $results['AuthCode'];\n\t\t\t$this->transaction_id = $results['TxRefNum'];\n\t\t $messageStack->add($results['StatusMsg'] . ' - Approval code: ' . $this->auth_code . ' --> CVV2 results: ' . $this->CVV2RespCode[$results['CVV2RespCode']], 'success');\n\t\t $messageStack->add('Address verification results: ' . $this->AVSRespCode[$results['AVSRespCode']], 'success');\n/* DELETE ME */ return true; // force a fail to not post\n\t\t return false;\n\t\t} else {\n\t\t\t\n\t\t\t$messageStack->add(sprintf(MODULE_PAYMENT_PAYMENTECH_TEXT_DECLINED_MESSAGE, $results['StatusMsg']), 'error');\n\t\t\treturn true;\n\t\t}\n\t}\n\t//gateway test failed\n\t$messageStack->add(MODULE_PAYMENT_PAYMENTECH_TEXT_GATEWAY_ERROR, 'error');\n\treturn true;\n }", "private function ProcessOrderPayment()\n\t{\n\t\t// ensure products are in stock\n\t\t$this->CheckStockLevels();\n\n\t\t$order_token = \"\";\n\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t$order_token = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t}\n\n\t\t// If the order token is empty then something has gone wrong.\n\t\tif($order_token == '') {\n\t\t\t@ob_end_clean();\n\t\t\theader(\"Location: \".$GLOBALS['ShopPathSSL'].\"/checkout.php?action=confirm_order\");\n\t\t\tdie();\n\t\t}\n\n\t\t// Load the pending order\n\t\t$orders = LoadPendingOrdersByToken($order_token);\n\n\t\tif(!is_array($orders)) {\n\t\t\t@ob_end_clean();\n\t\t\theader(\"Location: \".$GLOBALS['ShopPathSSL'].\"/checkout.php?action=confirm_order\");\n\t\t\tdie();\n\t\t}\n\n\t\tif ($orders['status'] != ORDER_STATUS_INCOMPLETE) {\n\t\t\t// has this order already been completed? redirect to finish order\n\t\t\t@ob_end_clean();\n\t\t\theader(\"Location: \".$GLOBALS['ShopPathSSL'].\"/finishorder.php\");\n\t\t\tdie();\n\t\t}\n\n\t\t// Get the payment module\n\t\tif(!GetModuleById('checkout', $provider, $orders['paymentmodule'])) {\n\t\t\t@ob_end_clean();\n\t\t\theader(\"Location: \".$GLOBALS['ShopPathSSL'].\"/checkout.php?action=confirm_order\");\n\t\t\tdie();\n\t\t}\n\n\t\t$provider->SetOrderData($orders);\n\n\t\tif(isset($_SESSION['CHECKOUT']['ProviderListHTML']) && method_exists($provider, 'DoExpressCheckoutPayment')) {\n\t\t\t$provider->DoExpressCheckoutPayment();\n\t\t\tdie();\n\t\t}\n\n\t\t// Does this method have it's own processing method?\n\t\tif(method_exists($provider, \"ProcessPaymentForm\")) {\n\t\t\t$result = $provider->ProcessPaymentForm();\n\t\t\tif($result) {\n\t\t\t\t$paymentStatus = $provider->GetPaymentStatus();\n\t\t\t\t$orderStatus = GetOrderStatusFromPaymentStatus($paymentStatus);\n\t\t\t\tif(CompletePendingOrder($order_token, $orderStatus)) {\n\t\t\t\t\t// Everything is fine, send the customer to the thank you page.\n\t\t\t\t\tredirect(getConfig('ShopPathSSL').'/finishorder.php');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Otherwise there was an error\n\t\t\t$this->ShowPaymentForm($provider);\n\t\t}\n\n\t\t// If we're still here then something from the above has gone wrong. Show the confirm page again\n\t\tredirect(getConfig('ShopPathSSL').'/checkout.php?action=confirm_order');\n\t}", "public function process() {\n if ( ! auth()->user()->hasPaymentMethod()) {\n\n $status = 'warning';\n $content = __(\"You must add a payment method before processing the order\");\n return redirect(route(\"billing.credit_card_form\"))->with('process_result',['status' => $status, 'content' => $content]);\n }\n\n $order_id = null;\n\n try {\n DB::beginTransaction();\n\n $cart = new Cart;\n if (!$cart->hasProducts()) {\n $status = 'error';\n $content = __(\"No services to process\");\n return back()->with('process_result',['status' => $status, 'content' => $content]);\n }\n\n $order = new Order;\n $order->user_id = auth()->id();\n $order->total_amount = $cart->totalAmount(false);\n $order->save();\n\n $order_id = $order->id;\n $orderLines = [];\n foreach ($cart->getContent() as $product) {\n $orderLines[] = [\n \"product_id\" => $product->id,\n \"order_id\" => $order->id,\n \"quantity\" => $product->quantity,\n \"price\" => $product->price,\n \"created_at\" => now()\n ];\n }\n\n OrderLine::insert($orderLines);\n $cart->clear();\n DB::commit();\n\n /**\n * Cargo sin factura\n */\n //$paymentMethod = auth()->user()->defaultPaymentMethod();\n //auth()->user()->charge($order->total_amount * 100, $paymentMethod->id);\n\n /**\n * Cargo con factura\n */\n auth()->user()->invoiceFor(__(\"Purchase of Services\"), $order->total_amount * 100, [], [\n 'tax_percent' => env('STRIPE_TAXES'),\n ]);\n\n $status = 'success';\n $content = __(\"The order has been processed correctly\");\n return back()->with('process_result',['status' => $status, 'content' => $content]);\n } catch (IncompletePayment $exception) {\n return redirect()->route(\n 'cashier.payment',\n [$exception->payment->id, 'redirect' => route('orders.detail', [\"id\" => $order_id])]\n );\n } catch (\\Exception $exception) {\n DB::rollBack();\n }\n }", "public function process()\n {\n // Get all orders not yet sent to Flow within the valid time period\n $orders = Order::get()\n ->filter([\n 'Scheduled' => 0,\n 'IsCart' => 0\n ]);\n\n // run through and schedule\n /** @var Order|\\Isobar\\Flow\\Extensions\\OrderExtension $order */\n foreach ($orders as $order) {\n if ($order->UnpaidTotal()->getDecimalValue() <= 0) {\n echo 'Order #' . $order->ID . ' to be scheduled' . \"\\n\";\n\n $order->scheduleOrder();\n }\n }\n }", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "public function getProcessor();", "public function getProcessor();", "public function reprocessOrders()\n {\n if (\n !$this->configuration->getEnableDeclineReprocessing() ||\n CrmPayload::get('meta.isSplitOrder') === true ||\n Request::attributes()->get('action') === 'prospect'\n ) {\n return;\n }\n \n $response = CrmResponse::all();\n \n if(!empty($response['success'])) {\n return;\n }\n \n if(\n \tpreg_match(\"/Prepaid.+Not Accepted/i\", $response['errors']['crmError']) &&\n \t!empty($response['errors']['crmError'])\n \t) {\n \treturn;\n \t}\n\n $cbCampaignId = $this->configuration->getDeclineReprocessingCampaign();\n $campaignInfo = Campaign::find($cbCampaignId);\n $products = array();\n if(!empty($campaignInfo['product_array']))\n { \n foreach ($campaignInfo['product_array'] as $childProduct) {\n unset($campaignInfo['product_array']);\n array_push($products, array_merge($campaignInfo, $childProduct));\n }\n }\n CrmPayload::set('products', $products);\n CrmPayload::set('campaignId', $campaignInfo['campaignId']);\n \n $crmInfo = $this->configuration->getCrm();\n $crmType = $crmInfo['crm_type'];\n $crmClass = sprintf(\n '\\Application\\Model\\%s', $crmType\n );\n\n $crmInstance = new $crmClass($this->configuration->getCrmId());\n call_user_func_array(array($crmInstance, CrmPayload::get('meta.crmMethod')), array());\n \n }", "abstract protected function _process();", "abstract protected function _process();", "public function setupPayment($order){\r\n $response = array(\r\n 'success'=> false,\r\n 'msg'=> __('Payment failed!', ET_DOMAIN)\r\n );\r\n // write session\r\n et_write_session('order_id', $order->ID);\r\n et_write_session('processType', 'buy');\r\n $arg = apply_filters('ae_payment_links', array(\r\n 'return' => et_get_page_link('process-payment') ,\r\n 'cancel' => et_get_page_link('process-payment')\r\n ));\r\n /**\r\n * process payment\r\n */\r\n $paymentType_raw = $order->payment_type;\r\n $paymentType = strtoupper($order->payment_type);\r\n /**\r\n * factory create payment visitor\r\n */\r\n $order_data = array(\r\n 'payer' => $order->post_author,\r\n 'total' => '',\r\n 'status' => 'draft',\r\n 'payment' => $paymentType,\r\n 'paid_date' => '',\r\n 'post_parent' => $order->post_parent,\r\n 'ID'=> $order->ID,\r\n 'amount'=> $order->amount\r\n );\r\n $order_temp = new mJobOrder($order_data);\r\n $order_temp->add_product($order);\r\n $order = $order_temp;\r\n $visitor = AE_Payment_Factory::createPaymentVisitor($paymentType, $order, $paymentType_raw);\r\n // setup visitor setting\r\n $visitor->set_settings($arg);\r\n // accept visitor process payment\r\n $nvp = $order->accept($visitor);\r\n if ($nvp['ACK']) {\r\n $response = array(\r\n 'success' => $nvp['ACK'],\r\n 'data' => $nvp,\r\n 'paymentType' => $paymentType\r\n );\r\n } else {\r\n $response = array(\r\n 'success' => false,\r\n 'paymentType' => $paymentType,\r\n 'msg' => __(\"Invalid payment gateway!\", ET_DOMAIN)\r\n );\r\n }\r\n /**\r\n * filter $response send to client after process payment\r\n *\r\n * @param Array $response\r\n * @param String $paymentType The payment gateway user select\r\n * @param Array $order The order data\r\n *\r\n * @package AE Payment\r\n * @category payment\r\n *\r\n * @since 1.0\r\n * @author Dakachi\r\n */\r\n $response = apply_filters('mjob_setup_payment', $response, $paymentType, $order);\r\n return $response;\r\n }", "function process()\n\t\t{\n\t\t\tif (is_object($this->Gateway)) {\n\t\t\t\treturn $this->Gateway->process($this);\n\t\t\t}\n\t\t}", "function before_process() {\r\n global $response, $db, $order, $messageStack;\r\n\r\n $order->info['cc_owner'] = zen_db_prepare_input($_POST['bank_acct_name']);\r\n $order->info['cc_type'] = 'eCheck';\r\n $order->info['cc_number'] = zen_db_prepare_input($_POST['bank_aba_code'] . '-' . str_pad(substr($_POST['bank_acct_num'], -4), strlen($_POST['bank_acct_num']), \"X\", STR_PAD_LEFT));\r\n $sessID = zen_session_id();\r\n\r\n // DATA PREPARATION SECTION\r\n unset($submit_data); // Cleans out any previous data stored in the variable\r\n\r\n // Create a string that contains a listing of products ordered for the description field\r\n $description = '';\r\n for ($i=0; $i<sizeof($order->products); $i++) {\r\n $description .= $order->products[$i]['name'] . ' (qty: ' . $order->products[$i]['qty'] . ') + ';\r\n }\r\n // Remove the last \"\\n\" from the string\r\n $description = substr($description, 0, -2);\r\n\r\n // Create a variable that holds the order time\r\n $order_time = date(\"F j, Y, g:i a\");\r\n\r\n // Calculate the next expected order id\r\n $last_order_id = $db->Execute(\"select * from \" . TABLE_ORDERS . \" order by orders_id desc limit 1\");\r\n $new_order_id = $last_order_id->fields['orders_id'];\r\n $new_order_id = ($new_order_id + 1);\r\n $new_order_id = (string)$new_order_id . '-' . zen_create_random_value(6);\r\n\r\n // Populate an array that contains all of the data to be sent to Authorize.net\r\n $submit_data = array(\r\n 'x_login' => trim(MODULE_PAYMENT_AUTHORIZENET_ECHECK_LOGIN),\r\n 'x_tran_key' => trim(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TXNKEY), \r\n 'x_relay_response' => 'FALSE', // AIM uses direct response, not relay response\r\n 'x_delim_data' => 'TRUE',\r\n 'x_delim_char' => $this->delimiter, // The default delimiter is a comma\r\n 'x_encap_char' => $this->encapChar, // The divider to encapsulate response fields\r\n 'x_version' => '3.1', // 3.1 is required to use CVV codes\r\n 'x_type' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_AUTHORIZATION_TYPE == 'Authorize' ? 'AUTH_ONLY': 'AUTH_CAPTURE',\r\n 'x_amount' => number_format($order->info['total'], 2),\r\n 'x_currency_code' => $order->info['currency'],\r\n 'x_method' => 'ECHECK',\r\n 'x_bank_aba_code' => $_POST['bank_aba_code'],\r\n 'x_bank_acct_num' => $_POST['bank_acct_num'],\r\n 'x_bank_acct_type' => $_POST['bank_acct_type'],\r\n 'x_bank_name' => $_POST['bank_name'],\r\n 'x_bank_acct_name' => $_POST['bank_acct_name'],\r\n 'x_echeck_type' => 'WEB',\r\n 'x_recurring_billing' => 'NO',\r\n 'x_email_customer' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_EMAIL_CUSTOMER == 'True' ? 'TRUE': 'FALSE',\r\n 'x_email_merchant' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_EMAIL_MERCHANT == 'True' ? 'TRUE': 'FALSE',\r\n 'x_cust_id' => $_SESSION['customer_id'],\r\n 'x_invoice_num' => (MODULE_PAYMENT_AUTHORIZENET_ECHECK_TESTMODE == 'Test' ? 'TEST-' : '') . $new_order_id,\r\n 'x_first_name' => $order->billing['firstname'],\r\n 'x_last_name' => $order->billing['lastname'],\r\n 'x_company' => $order->billing['company'],\r\n 'x_address' => $order->billing['street_address'],\r\n 'x_city' => $order->billing['city'],\r\n 'x_state' => $order->billing['state'],\r\n 'x_zip' => $order->billing['postcode'],\r\n 'x_country' => $order->billing['country']['title'],\r\n 'x_phone' => $order->customer['telephone'],\r\n 'x_email' => $order->customer['email_address'],\r\n 'x_ship_to_first_name' => $order->delivery['firstname'],\r\n 'x_ship_to_last_name' => $order->delivery['lastname'],\r\n 'x_ship_to_address' => $order->delivery['street_address'],\r\n 'x_ship_to_city' => $order->delivery['city'],\r\n 'x_ship_to_state' => $order->delivery['state'],\r\n 'x_ship_to_zip' => $order->delivery['postcode'],\r\n 'x_ship_to_country' => $order->delivery['country']['title'],\r\n 'x_description' => $description,\r\n 'x_customer_ip' => zen_get_ip_address(),\r\n 'x_po_num' => date('M-d-Y h:i:s'), //$order->info['po_number'],\r\n 'x_freight' => number_format((float)$order->info['shipping_cost'],2),\r\n 'x_tax_exempt' => 'FALSE', /* 'TRUE' or 'FALSE' */\r\n 'x_tax' => number_format((float)$order->info['tax'],2),\r\n 'x_duty' => '0',\r\n\r\n // Additional Merchant-defined variables go here\r\n 'Date' => $order_time,\r\n 'IP' => zen_get_ip_address(),\r\n 'Session' => $sessID );\r\n // process Wells-Fargo-SecureSource-specific parameters\r\n if (MODULE_PAYMENT_AUTHORIZENET_ECHECK_WFSS_ENABLED == 'True') {\r\n $submit_data['x_customer_organization_type'] = zen_db_prepare_input($_POST['echeck_customer_type']);\r\n if (zen_db_prepare_input($_POST['echeck_customer_tax_id']) != '') {\r\n $submit_data['x_customer_tax_id'] = zen_db_prepare_input($_POST['echeck_customer_tax_id']);\r\n } else {\r\n $submit_data = array_merge($submit_data, \r\n array('x_drivers_license_num' => zen_db_prepare_input($_POST['echeck_dl_num']),\r\n 'x_drivers_license_state' => zen_db_prepare_input($_POST['echeck_dl_state']),\r\n 'x_drivers_license_dob' => zen_db_prepare_input($_POST['echeck_dl_dob']) ));\r\n }\r\n }\r\n unset($response);\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $this->auth_code = $response[4];\r\n $this->transaction_id = $response[6];\r\n $response_msg_to_customer = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n\r\n $response['Expected-MD5-Hash'] = $this->calc_md5_response($response[6], $response[9]);\r\n $response['HashMatchStatus'] = ($response[37] == $response['Expected-MD5-Hash']) ? 'PASS' : 'FAIL';\r\n\r\n $this->_debugActions($response, $order_time, $sessID);\r\n\r\n // If the MD5 hash doesn't match, then this transaction's authenticity cannot be verified.\r\n // Thus, order will be placed in Pending status\r\n if ($response['HashMatchStatus'] != 'PASS') {\r\n $this->order_status = 1;\r\n $messageStack->add_session('header', MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_AUTHENTICITY_WARNING, 'caution');\r\n }\r\n\r\n // If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message\r\n if ($response_code != '1') {\r\n $messageStack->add_session('checkout_payment', $response_msg_to_customer . ' - ' . MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_DECLINED_MESSAGE, 'error');\r\n zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));\r\n }\r\n }", "protected abstract function process();", "public function postOrderMake() {\n\n /*\n Array\n (\n [12_97d170e1550eee4afc0af065b78cda302a97674c] => 5\n [metrics] => Порода:\n Пол:\n Обхват шеи:\n Обхват груди:\n Длина спины:\n Обхват передней лапы:\n От шеи до передней лапы:\n Между передними лапами:\n\n [name] => фывчфы\n [email] => sdfsdf@masd.sd\n [address] => фывфы\n [tel] => фывфы\n [pay_type] => 1\n )\n */\n\n #Helper::ta(Input::all());\n\n /**\n * Получаем корзину\n */\n CatalogCart::getInstance();\n $goods = CatalogCart::get_full();\n #Helper::ta($goods);\n\n /**\n * Формируем массив с продуктами\n */\n $products = [];\n if (count($goods)) {\n foreach ($goods as $good_hash => $good) {\n $products[$good_hash] = [\n 'id' => $good->id,\n 'count' => $good->_amount,\n 'price' => $good->price,\n 'attributes' => (array)$good->_attributes,\n ];\n }\n }\n #Helper::ta($products);\n\n $pay_type = @$this->pay_types[Input::get('pay_type')] ?: NULL;\n\n /**\n * Формируем окончательный массив для создания заказа\n */\n $order_array = [\n 'client_name' => Input::get('name'),\n 'delivery_info' => Input::get('address') . ' ' . Input::get('email') . ' ' . Input::get('tel'),\n 'comment' => $pay_type . \"\\n\\n\" . Input::get('metrics'),\n 'status' => 1, ## Статус заказа, нужно подставлять ID статуса наподобие \"Новый заказ\"\n 'products' => $products,\n ];\n #Helper::tad($order_array);\n\n $order = Catalog::create_order($order_array);\n\n /*\n $json_request = [];\n $json_request['responseText'] = '';\n $json_request['status'] = FALSE;\n\n if (is_object($order) && $order->id)\n $json_request['status'] = TRUE;\n\n\n return Response::json($json_request, 200);\n */\n\n if (is_object($order) && $order->id) {\n\n CatalogCart::clear();\n return Redirect::route('mainpage');\n #return Redirect::route('catalog-order-success');\n\n } else {\n\n return URL::previous();\n }\n }", "public function processOrder($quote, $order)\n {\n $params = $this->prepareParamsForProcessOrder($quote, $order);\n $result = Mage::getModel('billsafe/client')->processOrder($params, $quote);\n return $result;\n }", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "function process(&$order)\n\t\t{\t\n\t\t\t$order->payment_type = \"PayPal Express\";\n\t\t\t$order->cardtype = \"\";\n\t\t\t$order->ProfileStartDate = date_i18n(\"Y-m-d\", strtotime(\"+ \" . $order->BillingFrequency . \" \" . $order->BillingPeriod)) . \"T0:0:0\";\n\t\t\t$order->ProfileStartDate = apply_filters(\"pmpro_profile_start_date\", $order->ProfileStartDate, $order);\n\n\t\t\treturn $this->setExpressCheckout($order);\n\t\t}", "public function process_payment() {\n\n // Saves a suggestions group\n (new MidrubBasePaymentsCollectionBraintreeHelpers\\Process)->prepare();\n\n }", "function _processSale() {\n\t\t$this->autoload();\t\t\n\t\tJbPaymentxxsourcexxLib::write_log('xxsourcexx.txt', 'IPN: '.json_encode($_REQUEST));\n\t\t\n\t\t$input = jfactory::getApplication()->input;\t\t\n\t\t$status = $input->getString('xxsourcexx_transactionStatus');\n\t\t\n\t\t$success_status = array('CO','PA');\n\t\t\n\t\tif(in_array($status, $success_status)){\n\t\t\t$order_number = $input->getString('_itemId');\n\t\t\t$order_jb = JbPaymentxxsourcexxLib::getOrder($order_number);\n\t\t\t$order_jb->pay_status = 'SUCCESS';\n\t\t\t$order_jb->order_status = 'CONFIRMED';\n\t\t\t$order_jb->tx_id = $tnxref;\n\t\t\t$order_jb->store ();\n\t\t\treturn $order_jb;\t\n\t\t}else{\n\t\t\texit;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function execute()\n {\n $processId = uniqid();\n $processString = self::class;\n\n $this->_getSession()->setPayUProcessId($processId);\n $this->_getSession()->setPayUProcessString($processString);\n\n $this->logger->debug(['info' => \"($processId) START $processString\"]);\n\n $postData = file_get_contents(\"php://input\");\n $sxe = simplexml_load_string($postData);\n\n $resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON)->setJsonData('{}');\n\n if (empty($sxe)) {\n $this->respond('500', 'Instant Payment Notification data is empty');\n\n return $resultJson;\n }\n\n $ipnData = XMLHelper::parseXMLToArray($sxe);\n\n if (!$ipnData) {\n $this->respond('500', 'Failed to decode Instant Payment Notification data.');\n\n return $resultJson;\n }\n\n $incrementId = $ipnData['MerchantReference'];\n /** @var Order $order */\n $order = $incrementId ? $this->_orderFactory->create()->loadByIncrementId($incrementId) : false;\n\n if (!$order || ((int)$order->getId() <= 0)) {\n $this->respond('500', 'Failed to load order.');\n\n return $resultJson;\n }\n\n $this->respond();\n $this->response->processNotify($ipnData, $order);\n\n return $resultJson;\n }", "public function orderCommitEtProcess($order_data, $bid)\r\n {\r\n $sysUtil = new SysUtility();\r\n $orderSet = new Order1InfoSet($bid);\r\n $result = array();\r\n\r\n $orderSet->setBusinessId($bid);\r\n $orderSet->setProductName($order_data->product_name_id);\r\n $orderSet->setMonthTerm($order_data->service_term_id);\r\n $orderSet->setStoreQuantity($order_data->store_quantity_id);\r\n $orderSet->setTotalAmount($order_data->amount_id);\r\n $orderSet->setTaxRate(CommonDefinition::TAX_RATE_CANADA);\r\n $orderSet->setAmountPaid(CommonDefinition::ZERO_NUM); // Assume no payment received yet\r\n $orderSet->setPaymentMethod(CommonDefinition::PAY_METHOD_EMAIL); // paid by email\r\n // transfer\r\n $orderSet->setOrderStatus(NeoDefinition::ORDER_STATUS_EMAIL_COMMIT); // set order status\r\n\r\n $temp = $sysUtil->generateDb1OrderId($bid);\r\n\r\n // Set the order ID\r\n $orderSet->setOrderId($temp);\r\n $orderSet->setOrderNote(NeoDefinition::ET_ORDER_NOTE_1);\r\n $orderSet->setPaymentInfo(NeoDefinition::ET_ORDER_PAYMENT_INFO_1);\r\n\r\n $tblName = $sysUtil->getNeoDb1OrderTblName();\r\n\r\n $neoModel = new NeoModel(SysDefinition::USER_DB_CONFIG);\r\n // Connect to Database\r\n $db_neo_conn = $neoModel->connect();\r\n\r\n if (! $db_neo_conn) {\r\n return (false); // Connect to DB failed return without further handling\r\n }\r\n\r\n // set the db table name\r\n $neoModel->setTableName($tblName);\r\n $queryResult = $neoModel->addDashboard1OrderById($orderSet);\r\n\r\n if ($queryResult) {\r\n $result[\"status\"] = CommonDefinition::SUCCESS;\r\n $result[\"info\"] = NeoDefinition::ET_ORDER_ADD_SUCCESS . NeoDefinition::EMAIL_INTERAC_LINK;\r\n\r\n // get the total order number after this submit if add order success\r\n\r\n $queryResult = $neoModel->getDashboard1OrderNumberByBid($bid);\r\n if (! is_bool($queryResult)) {\r\n session_start();\r\n $_SESSION[\"total_order\"] = $queryResult;\r\n }\r\n } else {\r\n $result[\"status\"] = CommonDefinition::ERROR;\r\n $result[\"info\"] = NeoDefinition::ET_ORDER_ADD_FAIL;\r\n }\r\n\r\n $neoModel->close();\r\n return ($result);\r\n }", "function _processSale() {\n// \t\tAndroidHelper::write_log('braintree.txt', 'Payment_method_nonce: '.$_POST['payment_method_nonce']);\t\n\t\t$this->autoload();\n\t\t$input = JFactory::getApplication()->input;\n\t\t$order_id = $input->getString('order_number');\n\t\t\n\t\t$orderComplex = AndroidHelper::getOrderDetail($order_id);\n\t\tAImporter::classes('order');\n\t\t$order = new BookproOrder();\n\t\t\n\t\t$this->setConfig();\n\t\tif($this->sale($orderComplex)){\n\t\t\t$result = array(\n\t\t\t\t\t'status'=>1,\n\t\t\t\t\t'tx_id'=>$paymentId,\n\t\t\t\t\t'desc'=>$transaction[0]->description,\n\t\t\t\t\t'total'=>$transaction[0]->getAmount()->getTotal(),\n\t\t\t\t\t'currency'=>$transaction[0]->getAmount()->getCurrency(),\n\t\t\t\t\t'created'=>$payment->getCreateTime(),\n\t\t\t\t\t'method'=>$payment->getPayer()->getPaymentMethod()\n\t\t\t);\n\t\t\t$cardinfo = $payment->getPayer()->getFundingInstruments();\n\t\t\tif($cardinfo[0]){\n\t\t\t\t$result['card_info']['type'] = $cardinfo[0]->getCreditCardToken()->getType();\n\t\t\t\t$result['card_info']['last4'] = $cardinfo[0]->getCreditCardToken()->getLast4();\n\t\t\t}\n\t\t\treturn $result;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function process() {\n if (defined('MAGNA_CALLBACK_MODE')) {\n // giving continous output if callback\n $this->out(\"Start[\" . get_class() . \"]: \" . $this->marketplace . \" (\" . $this->mpID . \")\\n\");\n }\n #echo print_m($this->config, '$this->config');\n $this->storeLogging('Config', $this->config);\n\n if ($this->config['OrderStatusSync'] != 'auto') {\n return false;\n }\n $this->aOrders = $this->getOrdersToSync();\n $this->log(print_m($this->aOrders, \"\\n\" . '$this->aOrders'));\n\n if (empty($this->aOrders)) {\n if (defined('MAGNA_CALLBACK_MODE')) {\n // giving continous output if callback\n $this->out(\"End[\" . get_class() . \"]: \" . $this->marketplace . \" (\" . $this->mpID . \")\\n\");\n }\n\n return true;\n }\n\n #return true;\n $this->confirmations = array();\n $this->unprocessed = array();\n\n foreach ($this->aOrders as $key => &$oOrder) {\n $this->oOrder = &$oOrder;\n $this->iOrderIndex = $key;\n\n if (!$this->isProcessable()) {\n $this->unprocessed[] = $oOrder['orders_id'];\n unset($this->aOrders[$key]);\n continue;\n }\n\n if (defined('MAGNA_CALLBACK_MODE')) {\n // giving continous output if callback\n $this->out($oOrder['orders_id'] . \"\\n\");\n }\n $this->decodeData();\n // add order to lookup table\n $this->addToLookupTable();\n $this->prepareSingleOrder($this->getStatusChangeTimestamp());\n\n $requestSend = false;\n if (count($this->confirmations) >= $this->sizeOfBatch) {\n $this->submitStatusUpdate('ConfirmShipment', $this->confirmations);\n $this->confirmations = array();\n $requestSend = true;\n }\n\n if ($requestSend) {\n $this->saveDirtyOrders();\n }\n }\n //*\n $this->submitStatusUpdate('ConfirmShipment', $this->confirmations);\n\n $this->saveDirtyOrders();\n\n $this->storeLogging('Unprocessed', $this->unprocessed);\n $this->updateUnprocessed();\n if (defined('MAGNA_CALLBACK_MODE')) {\n // giving continous output if callback\n $this->out(\"End[\" . get_class() . \"]: \" . $this->marketplace . \" (\" . $this->mpID . \")\\n\");\n }\n\n //*/\n return true;\n }", "public abstract function process();", "function before_process() {\r\n global $order_total_modules;\r\n if (isset($_GET['referer']) && $_GET['referer'] == 'nochex_apc') {\r\n $this->notify('NOTIFY_PAYMENT_NOCHEX_RETURN_TO_STORE');\r\n if (MODULE_PAYMENT_NOCHEX_TESTING == 'Harness') {\r\n // simulate call to ipn_handler.php here\r\n nochex_simulate_apc_handler((int)$_GET['count']);\r\n }\r\n $_SESSION['cart']->reset(true);\r\n unset($_SESSION['sendto']);\r\n unset($_SESSION['billto']);\r\n unset($_SESSION['shipping']);\r\n unset($_SESSION['payment']);\r\n unset($_SESSION['comments']);\r\n unset($_SESSION['cot_gv']);\r\n $order_total_modules->clear_posts();//ICW ADDED FOR CREDIT CLASS SYSTEM\r\n zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));\r\n } else {\r\n $this->notify('NOTIFY_PAYMENT_NOCHEX_CANCELLED_DURING_CHECKOUT');\r\n zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));\r\n }\r\n }", "public function transaction_process()\n {\n $this->_post_vars = array_merge($_GET, $_POST);\n\n if (!isset($this->_post_vars['cart_order_id'])) {\n //process as an INS signal\n return $this->_processINS();\n }\n //Need to add <base ...> tag so it displays correctly\n geoView::getInstance()->addBaseTag = true;\n\n //VARIABLES PASSED-BACK\n //order_number - 2Checkout order number\n //card_holder_name\n //street_address\n //city\n //state\n //zip\n //country\n //email\n //phone\n //cart_order_id\n //credit_card_processed\n //total\n //ship_name\n //ship_street_address\n //ship_city\n //ship_state\n //ship_country\n //ship_zip\n trigger_error('DEBUG TRANSACTION: Top of transaction_process.');\n\n if (!$this->get('testing_mode')) {\n //check the hash\n $hash = $this->_genHash(false);\n if (!$hash || ($this->_post_vars['key'] !== $hash)) {\n //NOTE: if testing mode turned on, it will skip the normal demo mode checks.\n trigger_error('DEBUG TRANSACTION: Payment failure, secret word/MD5 hash checks failed.');\n self::_failure($transaction, 2, \"No response from server, check vendor settings\");\n return;\n }\n //gets this far, the md5 hash check passed, so safe to proceed.\n }\n\n //true if $_SERVER['HTTP_REFERER'] is blank or contains a value from $referer_array\n trigger_error('DEBUG TRANSACTION: MD5 hash check was successful.');\n\n trigger_error('DEBUG TRANSACTION: 2checkout vars: ' . print_r($this->_post_vars, 1));\n //get objects\n $transaction = geoTransaction::getTransaction($this->_post_vars['cart_order_id']);\n if (!$transaction || $transaction->getID() == 0) {\n //failed to reacquire the transaction, or transaction does not exist\n trigger_error('DEBUG TRANSACTION: Could not find transaction using: ' . $this->_post_vars['cart_order_id']);\n self::_failure($transaction, 2, \"No response from server\");\n return;\n }\n $invoice = $transaction->getInvoice();\n $order = $invoice->getOrder();\n\n //store transaction data\n $transaction->set('twocheckout_response', $this->_post_vars);\n //transaction will be saved when order is saved.\n\n if (($this->_post_vars[\"order_number\"]) && ($this->_post_vars[\"cart_order_id\"])) {\n //if ($this->_post_vars[\"credit_card_processed\"] == \"Y\")\n if (strcmp($this->_post_vars[\"credit_card_processed\"], \"Y\") == 0) {\n //CC processed ok, now do stuff on our end\n //Might want to add further checks, like to check MD5 hash (if possible),\n //or check that the total is correct.\n trigger_error('DEBUG TRANSACTION: Payment success!');\n //let the objects do their thing to make this active\n self::_success($order, $transaction, $this);\n } else {\n //error in transaction, possibly declined\n trigger_error('DEBUG TRANSACTION: Payment failure, credit card not processed.');\n self::_failure($transaction, $this->_post_vars[\"credit_card_processed\"], \"2Checkout: Card not approved\");\n }\n } else {\n trigger_error('DEBUG TRANSACTION: Payment failure, no order number or cart order ID.');\n self::_failure($transaction, 2, \"No response from server\");\n }\n }", "protected function process()\n {}", "public function execute()\n {\n $orderData = null;\n $request = $this->getRequest();\n $storeId = $request->getParam('store');\n $response = $this->orderHelper->validateRequestData($request);\n try {\n if (empty($response['errors'])) {\n try {\n $data = file_get_contents('php://input');\n $orderData = $this->orderHelper->validateJsonData($data, $request);\n if (!empty($orderData['errors'])) {\n $response = $orderData;\n }\n } catch (\\Exception $e) {\n $response = $this->orderHelper->jsonResponse($e->getMessage());\n }\n }\n if (empty($response['errors'])) {\n $lvb = ($orderData['order_status'] == 'shipped') ? true : false;\n $store = $this->storeManager->getStore($storeId);\n $this->validateItems->execute($orderData['products'], $store->getWebsiteId(), $lvb);\n $response = $this->orderModel->importOrder($orderData, $storeId);\n }\n } catch (\\Exception $e) {\n $response = $this->orderHelper->jsonResponse($e->getMessage());\n }\n\n $result = $this->resultJsonFactory->create();\n return $result->setData($response);\n }", "function run_wcfm_order_splitter() {\n\t// This file holds all the custom reusable functions.\n\trequire_once 'includes/wcfmos-functions.php';\n\n\t// The core plugin class that is used to define internationalization and admin-specific hooks.\n\trequire_once 'includes/class-wcfmos-order-splitter-admin.php';\n\tnew WCFMOS_Order_Splitter_Admin();\n\n\t// The core plugin class that is used to define internationalization and public-specific hooks.\n\trequire_once 'includes/class-wcfmos-order-splitter-public.php';\n\tnew WCFMOS_Order_Splitter_Public();\n}", "public function place()\n {\n $this->_eventManager->dispatch('sales_order_payment_place_start', ['payment' => $this]);\n $order = $this->getOrder();\n\n $this->setAmountOrdered($order->getTotalDue());\n $this->setBaseAmountOrdered($order->getBaseTotalDue());\n $this->setShippingAmount($order->getShippingAmount());\n $this->setBaseShippingAmount($order->getBaseShippingAmount());\n\n $methodInstance = $this->getMethodInstance();\n $methodInstance->setStore($order->getStoreId());\n\n $orderState = Order::STATE_NEW;\n $orderStatus = $methodInstance->getConfigData('order_status');\n $isCustomerNotified = $order->getCustomerNoteNotify();\n\n // Do order payment validation on payment method level\n $methodInstance->validate();\n $action = $methodInstance->getConfigPaymentAction();\n $payment = $order->getPayment();\n $paymentMethodCode = $payment->getMethodInstance()->getCode();\n \n if ($action) {\n if ($methodInstance->isInitializeNeeded()) {\n $stateObject = new DataObject();\n // For method initialization we have to use original config value for payment action\n $methodInstance->initialize($methodInstance->getConfigData('payment_action'), $stateObject);\n\n if ($paymentMethodCode !== Bitcoin::CODE) {\n $orderState = $stateObject->getData('state') ?: $orderState;\n $orderStatus = $stateObject->getData('status') ?: $orderStatus;\n }\n\n $isCustomerNotified = $stateObject->hasData('is_notified')\n ? $stateObject->getData('is_notified')\n : $isCustomerNotified;\n }\n else {\n $this->processAction($action, $order);\n\n if ($paymentMethodCode !== Bitcoin::CODE){\n $orderState = Order::STATE_PROCESSING;\n $orderState = $order->getState() ? $order->getState() : $orderState;\n $orderStatus = $order->getStatus() ? $order->getStatus() : $orderStatus;\n }\n \n }\n } else {\n $order->setState($orderState)->setStatus($orderStatus);\n }\n\n $isCustomerNotified = $isCustomerNotified ?: $order->getCustomerNoteNotify();\n\n if (!array_key_exists($orderStatus, $order->getConfig()->getStateStatuses($orderState))) {\n $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState);\n }\n\n $this->updateOrder($order, $orderState, $orderStatus, $isCustomerNotified);\n\n $this->_eventManager->dispatch('sales_order_payment_place_end', ['payment' => $this]);\n\n return $this;\n }", "protected function processOrder ($mProductId, $iKlarnaReference, $iTelNo) {\n // Here you should implement the functionality of how the product is managed.\n }", "abstract public function process();", "abstract public function process();", "abstract public function process();", "public function getProcessor($processor);", "public function orderCommitCcProcess($order_data, $bid)\r\n {\r\n $sysUtil = new SysUtility();\r\n $orderSet = new Order1InfoSet($bid);\r\n $result = array();\r\n\r\n $orderSet->setBusinessId($bid);\r\n $orderSet->setProductName($order_data->product_name_id);\r\n $orderSet->setMonthTerm($order_data->service_term_id);\r\n $orderSet->setStoreQuantity($order_data->store_quantity_id);\r\n $orderSet->setTotalAmount($order_data->amount_id);\r\n $orderSet->setTaxRate(CommonDefinition::TAX_RATE_CANADA);\r\n $orderSet->setAmountPaid(CommonDefinition::ZERO_NUM); // Assume no payment received yet\r\n $orderSet->setPaymentMethod(CommonDefinition::PAY_METHOD_CREDIT_CARD); // paid by\r\n // credit\r\n // card\r\n $orderSet->setOrderStatus(NeoDefinition::ORDER_STATUS_CREDIT_CARD_COMMIT); // set order status\r\n\r\n $temp = $sysUtil->generateDb1OrderId($bid);\r\n\r\n // Set the order ID\r\n $orderSet->setOrderId($temp);\r\n $orderSet->setOrderNote(NeoDefinition::ET_ORDER_NOTE_1);\r\n $orderSet->setPaymentInfo(NeoDefinition::ET_ORDER_PAYMENT_INFO_1);\r\n\r\n $tblName = $sysUtil->getNeoDb1OrderTblName();\r\n\r\n $neoModel = new NeoModel(SysDefinition::USER_DB_CONFIG);\r\n // Connect to Database\r\n $db_neo_conn = $neoModel->connect();\r\n\r\n if (! $db_neo_conn) {\r\n return (false); // Connect to DB failed return without further handling\r\n }\r\n\r\n // set the db table name\r\n $neoModel->setTableName($tblName);\r\n $queryResult = $neoModel->addDashboard1OrderById($orderSet);\r\n\r\n if ($queryResult) {\r\n $result[\"status\"] = CommonDefinition::SUCCESS;\r\n $result[\"info\"] = NeoDefinition::CC_ORDER_ADD_SUCCESS;\r\n\r\n // get the total order number after this submit if add order success\r\n $queryResult = $neoModel->getDashboard1OrderNumberByBid($bid);\r\n if (! is_bool($queryResult)) {\r\n session_start();\r\n $_SESSION[\"total_order\"] = $queryResult;\r\n }\r\n } else {\r\n $result[\"status\"] = CommonDefinition::ERROR;\r\n $result[\"info\"] = NeoDefinition::CC_ORDER_ADD_FAIL;\r\n }\r\n\r\n $neoModel->close();\r\n return ($result);\r\n }", "abstract public function get__do_process ( $data );", "public function test_it_marks_order_as_processing()\n {\n $event = new OrderPaid(\n $order = factory(Order::class)->create([\n 'user_id' => factory(User::class)->create()\n ])\n );\n\n $listener = new MarkOrderProcessing();\n\n $listener->handle($event);\n\n $this->assertEquals(Order::PROCESSING, $order->fresh()->status);\n }", "public function orderUpdate()\n {\n $this->helper->logOrder('Beginning Order Update.');\n $stores = $this->storeManager->getStores();\n\n $enabledStores = [];\n\n foreach ($stores as $store) {\n if ($store->isActive() && $this->helper->isEnabled($store->getId())) {\n $enabledStores[] = $store->getId();\n }\n }\n\n if ($enabledStores) {\n $ordersToProcess = null;\n\n $ordersToProcess = $this->orderCollectionFactory\n ->create()\n ->addFieldToSelect('*')\n ->addFieldToFilter(\n 'store_id',\n [\n 'in' => [$enabledStores],\n ]\n )\n ->addFieldToFilter(\n 'state',\n [\n 'in' => [\n \\Magento\\Sales\\Model\\Order::STATE_NEW,\n \\Magento\\Sales\\Model\\Order::STATE_PROCESSING,\n ],\n ]\n )\n ->addFieldToFilter('fulfilled_by_amazon', true)\n ->addFieldToFilter(\n 'amazon_order_status',\n [\n 'in' => [\n $this->helper::ORDER_STATUS_RECEIVED,\n $this->helper::ORDER_STATUS_PLANNING,\n $this->helper::ORDER_STATUS_PROCESSING,\n ],\n ]\n );\n\n if (!empty($ordersToProcess) && $ordersToProcess->count()) {\n $this->helper->logOrder('Beginning Order Update for ' . $ordersToProcess->count() . ' orders.');\n\n foreach ($ordersToProcess as $order) {\n $this->helper->logOrder('Updating order #' . $order->getIncrementId());\n\n $result = $this->outbound->getFulfillmentOrder($order);\n if ($result) {\n $fulfillmentOrderResult = $result->getGetFulfillmentOrderResult();\n\n // Amazon Statuses: RECEIVED / INVALID / PLANNING / PROCESSING / CANCELLED / COMPLETE\n // / COMPLETE_PARTIALLED / UNFULFILLABLE\n $amazonStatus = $fulfillmentOrderResult->getFulfillmentOrder()\n ->getFulfillmentOrderStatus();\n\n $amazonOrderId = $fulfillmentOrderResult->getFulfillmentOrder()\n ->getDisplayableOrderId();\n\n $id = $order->getIncrementId();\n if ($order->getIncrementId() == $amazonOrderId) {\n $this->helper->logOrder(\n 'Status of order #' . $order->getIncrementId() . ': ' . $amazonStatus\n );\n\n if ($amazonStatus) {\n switch ($amazonStatus) {\n case 'COMPLETE':\n case 'COMPLETE_PARTIALLED':\n $this->magentoOrderUpdate($order, $fulfillmentOrderResult);\n break;\n case 'INVALID':\n case 'CANCELLED':\n case 'UNFULFILLABLE':\n $this->cancelFBAShipment($order, $fulfillmentOrderResult);\n break;\n }\n }\n }\n }\n }\n\n $this->helper->logOrder(__('Get Order status called. Orders to process: ') . $ordersToProcess->count());\n } else {\n $this->helper->logOrder(__('Get Order status called. No orders to process'));\n }\n }\n }", "public function process() {}", "public function process() {}", "public function process() {}", "public function process() {}", "public function execute() {\n $request = $this->getRequest()->getParams();\n \n $order_id = strip_tags($request[\"orderId\"]);\n $order = $this->objectManagement->create('Magento\\Sales\\Model\\Order')->loadByIncrementId($order_id);\n $validateOrder = $this->validateWebhook($request, $order);\n\n $transactionId = $request['referenceId'];\n\n $mageOrderStatus = $order->getStatus();\n\n if($mageOrderStatus === 'pending') {\n\n if(!empty($validateOrder['status']) && $validateOrder['status'] === true) {\n if($request['txStatus'] == 'SUCCESS') {\n $request['additional_data']['cf_transaction_id'] = $transactionId;\n $this->logger->info(\"Cashfree Notify processing started for cashfree transaction_id(:$transactionId)\");\n $this->processPayment($transactionId, $order);\n $this->logger->info(\"Cashfree Notify processing complete for cashfree transaction_id(:$transactionId)\");\n return;\n } elseif($request['txStatus'] == 'FAILED' || $request['txStatus'] == 'CANCELLED') {\n $orderStatus = self::STATE_CANCELED;\n $this->processWebhookStatus($orderStatus, $order);\n $this->logger->info(\"Cashfree Notify change magento order status to (:$orderStatus) cashfree transaction_id(:$transactionId)\");\n return;\n } elseif($request['txStatus'] == 'USER_DROPPED') {\n $orderStatus = self::STATE_CLOSED;\n $this->processWebhookStatus($orderStatus, $order);\n $this->logger->info(\"Cashfree Notify change magento order status to (:$orderStatus) cashfree transaction_id(:$transactionId)\");\n return;\n } else {\n $orderStatus = self::STATE_PENDING_PAYMENT;\n $this->processWebhookStatus($orderStatus, $order);\n $this->logger->info(\"Cashfree Notify change magento order status to (:$orderStatus) cashfree transaction_id(:$transactionId)\");\n return;\n }\n } else {\n $errorMsg = $validateOrder['errorMsg'];\n $this->logger->info(\"Cashfree Notify processing payment for cashfree transaction_id(:$transactionId) is failed due to ERROR(: $errorMsg)\");\n return;\n }\n } else {\n $this->logger->info(\"Order has been already in processing state for cashfree transaction_id(:$transactionId)\");\n return;\n }\n }", "public function processPayment()\n {\n $redsysMethod = $this\n ->redsysMethodFactory\n ->createEmpty();\n\n /*\n * At this point, order must be created given a cart, and placed in PaymentBridge.\n *\n * So, $this->paymentBridge->getOrder() must return an object\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderLoad(\n $this->paymentBridge,\n $redsysMethod\n );\n\n /*\n * Order Not found Exception must be thrown just here.\n */\n if (!$this->paymentBridge->getOrder()) {\n throw new PaymentOrderNotFoundException();\n }\n\n /*\n * Order exists right here.\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderCreated(\n $this->paymentBridge,\n $redsysMethod\n );\n\n return $this\n ->redsysFormTypeBuilder\n ->buildForm();\n }", "public function process(object $event)\n {\n if (!($event->order instanceof Order)) {\n return;\n }\n $order = $event->order;\n $logger = $this->container->get(LoggerFactory::class)->get('log', 'robot');\n\n // 清理订单缓存\n $this->container->get(EventDispatcherInterface::class)->dispatch(new DeleteListenerEvent('OrderUpdate', [$order->order_no]));\n\n switch ($order->status) {\n case 1: // 出发\n $logger->info($order->order_no . ': 已出发');\n // 通知用户机器人已触发...\n break;\n\n case 2: // 到达\n $logger->info($order->order_no . ': 已到达');\n // 通知用户机器人已到达\n // 发送上门服务提醒\n $this->container->get(SubscribeMessageService::class)->sendServiceReminder($order);\n break;\n\n case 3: // 完成\n $logger->info($order->order_no . ': 订单完成');\n break;\n\n case 4: // 异常\n // 通知用户机器人异常...\n // 执行退款逻辑\n $logger->info($order->order_no . ': 机器人异常');\n break;\n\n case 5: // 订单取消\n break;\n default:\n }\n }", "protected function SetupProcessor($CreditCard)\n\t{\n\t\t$returnValue = new $this->_processorClassName ($this->Parameters);\n\n\t\t$success = $CreditCard->SetupMerchantProcessor($returnValue);\n\n\t\tif ($success = false)\n\t\t{\n\t\t\t$returnValue = null;\n\t\t}\n\n\t\treturn $returnValue;\n\t}", "public static function geoCart_payment_choicesProcess()\n {\n //get the cart\n $cart = geoCart::getInstance();\n\n //get the gateway since this is a static function\n $gateway = geoPaymentGateway::getPaymentGateway(self::gateway_name);\n\n //get invoice on the order\n $invoice = $cart->order->getInvoice();\n $invoice_total = $invoice->getInvoiceTotal();\n\n if ($invoice_total >= 0) {\n //DO NOT PROCESS! Nothing to process, no charge (or returning money?)\n return ;\n }\n //BUILD DATA TO SEND TO GATEWAY TO COMPLETE THE TRANSACTION\n $info = parent::_getInfo();\n\n //create initial transaction\n try {\n //let parent create a new transaction, since it does all that common stuff for us.\n //(including encrypting CC data)\n $transaction = self::_createNewTransaction($cart->order, $gateway, $info, false, true);\n\n //Add the transaction to the invoice\n $transaction->setInvoice($invoice);\n $invoice->addTransaction($transaction);\n\n //save it so there is an id\n $transaction->save();\n } catch (Exception $e) {\n //catch any error thrown by _createNewTransaction\n trigger_error('ERROR TRANSACTION CART PAYFLOW_PRO: Exception thrown when attempting to create new transaction.');\n return;\n }\n\n\n $cart->order->processStatusChange('pending_admin');\n }", "public function getProcessOrder($aGet, $aPost, &$aRes, $aAdditionalParams){\n return parent::getProcessOrder($aGet, $aPost, $aRes, $aAdditionalParams);\n }", "function process_orders($orders)\n{\n $display = '';\n\n $order_instance = new Order();\n $item_instance = new Item();\n $fulfillment_instance = new Fulfillment();\n\n\n $order_count = 0;\n\n foreach ($orders as $o) {\n $order_count++;\n /** ------------\n * PARSE ORDERS\n * ------------ */\n $order_shopify_id = $o['id'];\n log_error('order_shopify_id: ' . $order_shopify_id);\n\n $customer_email = trim($o['email']);\n $customer_phone = (!empty($o['shipping_address']['phone'])) ? trim(strval($o['shipping_address']['phone'])) : trim(strval($o['billing_address']['phone']));\n $order_tcreate = date(\"Y-m-d H:i:s\", strtotime($o['created_at']));\n $order_tmodified = !empty($o['updated_at'])?date(\"Y-m-d H:i:s\", strtotime($o['updated_at'])):null;\n $order_tclose = !empty($o['closed_at'])?date(\"Y-m-d H:i:s\", strtotime($o['closed_at'])):null;\n $order_is_closed = empty($o['closed_at']) ? true : false;\n $order_total_cost = $o['total_price'];\n $order_receipt_id = $o['name'];\n $order_currency = $o['currency'];\n $order_vendor = '';\n $order_alert_status = NOTIFICATION_STATUS_NONE;\n\n\n\n\n\n\n if (!empty($o['gateway'])) {\n if (stripos($o['gateway'], 'stripe') > -1) $order_gateway = GATEWAY_PROVIDER_STRIPE;\n elseif (stripos($o['gateway'], 'paypal') > -1 ) $order_gateway = GATEWAY_PROVIDER_PAYPAL;\n elseif (stripos($o['gateway'], 'shopify_payments') > -1 ) $order_gateway = GATEWAY_PROVIDER_PAYPAL;\n else $order_gateway = GATEWAY_PROVIDER_UNKNOWN;\n }\n\n $order_fulfillment_status = $o['fulfillment_status'];\n $order_is_dropified = (!empty($o['note']) && stripos($o['note'], 'dropified') > -1 );\n \n /**\n * Check if note has 'Aliexpress' or 'Dropified'.\n * \n * If has then: \n * - get events related to order\n * - check if Dropified created fulfillments\n * - return array of ids of fulfillments created by Dropified\n * \n * If not then:\n * - return empty array\n * \n * Added by Rafal - 2018-03-13\n */\n \n $dropified_fulfillmets_ids = (stripos($o['note'], 'dropified') > -1 || stripos($o['note'], 'aliexpress') > -1)?getDropifiedEvents(getOrderEvents($order_shopify_id)):array();\n \n /** --------------\n * PARSE CUSTOMER\n * -------------- */\n $order_customer_fn = $o['shipping_address']['first_name'];\n $order_customer_ln = $o['shipping_address']['last_name'];\n $order_customer_address1 = $o['shipping_address']['address1'];\n $order_customer_address2 = $o['shipping_address']['address2'];\n $order_customer_city = $o['shipping_address']['city'];\n $order_customer_zip = $o['shipping_address']['zip'];\n $order_customer_province = $o['shipping_address']['province'];\n $order_customer_country_code = $o['shipping_address']['country_code'];\n $order_customer_province_code = $o['shipping_address']['province_code'];\n $order_customer_phone = $o['shipping_address']['phone'];\n $order_tags = strtolower($o['tags']);\n\n /** -----------------------------------\n * CUSTOMER BILLING - ADDED 02-06-2018\n * ----------------------------------- */\n $order_customer_billing_fn = $o['billing_address']['first_name'];\n $order_customer_billing_ln = $o['billing_address']['last_name'];\n $order_customer_billing_address1 = $o['billing_address']['address1'];\n $order_customer_billing_address2 = $o['billing_address']['address2'];\n $order_customer_billing_city = $o['billing_address']['city'];\n $order_customer_billing_zip = $o['billing_address']['zip'];\n $order_customer_billing_province = $o['billing_address']['province'];\n $order_customer_billing_country_code = $o['billing_address']['country_code'];\n $order_customer_billing_province_code = $o['billing_address']['province_code'];\n $order_customer_billing_phone = $o['billing_address']['phone'];\n\n \n /** -------------------------------------\n * CANCELLED - ADDED BY RAFAL 2018-03-20\n * ------------------------------------- */\n $order_tcancel = !empty($o['cancelled_at'])?date(\"Y-m-d H:i:s\", strtotime($o['cancelled_at'])):'0000-00-00 00:00:00';\n\n\n $order_is_ocu = (stripos($order_tags,'ocu') > -1)?1:0;\n\n $_refund_status = trim($o['financial_status']);\n\n //print 'REFUND STATUS: ' . $_refund_status . PHP_EOL;\n\n switch(strtolower($_refund_status))\n {\n case 'partially_refunded':\n $order_refund_status = 2;\n //print 'REFUND!!: ' . $order_refund_status;\n break;\n case 'refunded':\n $order_refund_status = 1;\n //print 'REFUND!!: ' . $order_refund_status;\n break;\n default: case 'paid':\n $order_refund_status = 0;\n //print 'REFUND!!: ' . $order_refund_status;\n break;\n }\n \n /** --------------------------------------------\n * FINANCIAL STATUS - ADDED BY RAFAL 2018-03-20\n * -------------------------------------------- */\n \n $_financial_status = trim($o['financial_status']);\n \n switch(strtolower($_financial_status))\n {\n case 'pending':\n $order_financial_status = 1;\n break;\n case 'authorized':\n $order_financial_status = 2;\n break;\n case 'partially_paid':\n $order_financial_status = 3;\n break;\n case 'paid':\n $order_financial_status = 4;\n break;\n case 'partially_refunded':\n $order_financial_status = 5;\n break;\n case 'refunded':\n $order_financial_status = 6;\n break;\n case 'voided':\n $order_financial_status = 7;\n break;\n default: case '':\n $order_financial_status = 0;\n break;\n }\n \n $order_is_fulfilled = false; //has the fulfillment process started or not\n $order_is_delivered = false; //has the order been completed and delivered\n $order_is_tracking = false; //whether we should track the order\n\n $order_array = Array(\n 'order_customer_email' => $customer_email,\n 'order_customer_fn' => $order_customer_fn,\n 'order_customer_ln' => $order_customer_ln,\n 'order_customer_address1' => $order_customer_address1,\n 'order_customer_address2' => $order_customer_address2,\n 'order_customer_city' => $order_customer_city,\n 'order_customer_country' => $order_customer_country_code,\n 'order_customer_province' => $order_customer_province,\n\n /** -----------------------------------\n * CUSTOMER BILLING - ADDED 02-06-2018\n * ----------------------------------- */\n 'order_customer_billing_fn'=> $order_customer_billing_fn,\n 'order_customer_billing_ln'=> $order_customer_billing_ln,\n 'order_customer_billing_address1'=> $order_customer_billing_address1,\n 'order_customer_billing_address2'=> $order_customer_billing_address2,\n 'order_customer_billing_city'=> $order_customer_billing_city,\n 'order_customer_billing_zip'=> $order_customer_billing_zip,\n 'order_customer_billing_province'=> $order_customer_billing_province,\n 'order_customer_billing_country'=> $order_customer_billing_country_code,\n 'order_customer_billing_phone'=> $order_customer_billing_phone,\n\n 'order_currency' => $order_currency,\n 'order_tags' => $order_tags,\n 'order_is_ocu'=>$order_is_ocu,\n 'order_customer_zip' => $order_customer_zip,\n 'order_customer_phone' => $customer_phone,//$order_customer_phone,\n 'order_fulfillment_status' => $order_fulfillment_status,\n 'order_is_refunded' => $order_refund_status,\n 'order_shopify_id' => $order_shopify_id,\n 'order_gateway' => $order_gateway,\n 'order_receipt_id'=>$order_receipt_id,\n 'order_total_cost' => $order_total_cost,\n 'order_topen' => $order_tcreate,\n 'order_tclose' => $order_tclose,\n\n \n /** --------------------------------------------\n * FINANCIAL STATUS - ADDED BY RAFAL 2018-03-20\n * -------------------------------------------- */\n 'order_financial_status' => $order_financial_status,\n \n /** -------------------------------------\n * CANCELLED - ADDED BY RAFAL 2018-03-20\n * ------------------------------------- */\n 'order_tcancel' => $order_tcancel,\n\n );\n \n /** ----------------------------------------\n * _ORDER_ARRAY - ADDED BY RAFAL 2018-03-20\n * \n * This is added to update only order if \n * is cancel order status\n * --------------------------------------- */\n \n\n /** -----------------------------------\n * LOOKUP ORDERS BY SHOPIFY'S ORDER ID\n * ----------------------------------- */\n if (isset($order_object)) unset($order_object);\n $order_object = $order_instance->fetch_order_by_order_shopify_id($order_shopify_id);\n \n /** ------------------------------\n * IF IT DOESN'T EXIST, CREATE IT\n * ------------------------------ */\n if (!$order_object) {\n $order_object = new Order($order_array);\n $order_id = $order_object->save();\n } else {\n $order_id = $order_object->id;\n }\n\n\n /** --------------------------\n * PARSE REFUNDED LINE ITEMS\n * ------------------------- */\n\n\n\n if(!empty($o['refunds']))\n {\n $refund_list = Array();\n $refund_check = Array();\n foreach($o['refunds'] as $refund)\n {\n $refund_date =date(\"Y-m-d H:i:s\", strtotime($refund['created_at']));\n foreach($refund['refund_line_items'] as $item)\n {\n $refund_list[$item['line_item_id']]=$refund_date;\n $refund_check[] = $item['line_item_id'];\n }\n }\n //print 'refund! ' . print_r($refund_list,true);\n //print 'refund! ' . print_r($refund_check,true);\n }\n\n\n\n\n /** ----------------\n * PARSE LINE ITEMS\n * ---------------- */\n\n foreach ($o['line_items'] as $p) {\n $_fulfillment_status = $p['fulfillment_status'];\n switch(strtolower($_fulfillment_status))\n {\n case 'fulfilled': $item_fulfillment_status = 1;break;\n case 'partial': $item_fulfillment_status = 2; break;\n default: case null: $item_fulfillment_status = 0;break;\n }\n $item_shopify_id = $p['id'];\n $item_shopify_product_id = $p['product_id'];\n $item_shopify_variant_id = $p['variant_id'];\n $item_name = $p['name'];\n $item_quantity = $p['quantity'];\n $item_sku = $p['sku'];\n $item_price = $p['price'];\n $item_is_refunded = 0;\n //$item_refund_tcreate = null;\n if(!empty($o['refunds'])) {\n if (in_array(trim($item_shopify_id), $refund_check)) {\n $item_is_refunded = 1;\n $item_refund_tcreate = $refund_list[$item_shopify_id];\n //print 'FOUND REFUND!';\n }\n }\n\n $item_array = Array(\n 'order_id' => $order_id,\n 'order_shopify_id' => $order_shopify_id,\n 'item_shopify_id' => $item_shopify_id,\n 'item_quantity' => $item_quantity,\n 'item_sku' => $item_sku,\n 'item_price'=>floatval($item_price),\n 'item_shopify_product_id' => $item_shopify_product_id,\n 'item_shopify_variant_id' => $item_shopify_variant_id,\n 'item_name' => $item_name,\n 'item_is_refunded' => $item_is_refunded,\n 'item_is_fulfilled'=>$item_fulfillment_status\n );\n\n if(isset($item_refund_tcreate)) $item_array['item_refund_tcreate']=$item_refund_tcreate;\n\n /** -------------------------\n * STORE / UPDATE LINE ITEMS\n * ------------------------- */\n if (isset($item_object)) unset($item_object);\n\n $item_object = $item_instance->fetch_item_by_shopify_item_id($item_shopify_id);\n if (!$item_object) {\n $item_object = new Item($item_array);\n $item_id = $item_object->save();\n } else {\n $item_id = $item_object->id;\n $item_object->save($item_array);\n }\n $order_object->order_items[] = $item_object;\n\n }\n\n\n /** ------------\n * FULFILLMENTS\n * ------------ */\n if (!empty($o['fulfillments'])) {\n foreach ($o['fulfillments'] as $fulfillment) {\n \n \n /**\n * Added by Rafal 2018-04-12\n * \n * Prevent added cancelled, error or failure\n * fulfillments\n */\n if($fulfillment['status'] == 'cancelled' || $fulfillment['status'] == 'error' || $fulfillment['status'] == 'failure'){\n continue;\n }\n \n \n $fulfillment_shopify_id = $fulfillment['id'];\n $fulfillment_shipment_status = strtolower(trim($fulfillment['shipment_status']));\n $fulfillment_topen = date(\"Y-m-d H:i:s\", strtotime($fulfillment['created_at']));\n //$fulfillment_tmodified = date(\"Y-m-d H:i:s\", strtotime($fulfillment['updated_at']));\n \n $fulfillment_tracking_company = strtolower($fulfillment['tracking_company']);\n \n $fulfillment_tracking_number = $fulfillment['tracking_number'];\n $fulfillment_tracking_url = $fulfillment['tracking_url'];\n\n $order_is_fulfilled = true;\n\n\n $fulfillment_array = Array(\n 'order_id' => $order_id,\n 'order_shopify_id' => $order_shopify_id,\n 'fulfillment_shipment_status' => trim(strtolower($fulfillment_shipment_status)),\n 'fulfillment_topen'=>$fulfillment_topen,\n 'fulfillment_shopify_id' => $fulfillment_shopify_id,\n 'fulfillment_tracking_number' => $fulfillment_tracking_number,\n 'fulfillment_tracking_company' => $fulfillment_tracking_company,\n 'fulfillment_tracking_url' => $fulfillment_tracking_url,\n 'order_is_fulfilled' => $order_is_fulfilled,\n );\n \n if ($fulfillment_tracking_company !== 'usps') $is_tracking = true;\n else $is_tracking = false;\n\n $order_delivery_status = false;\n\n //Normally USPS is the only courier that updates this appropriately. If its delivered set status\n switch ($fulfillment_shipment_status) {\n case 'delivered':\n $order_delivery_status = DELIVERY_STATUS_DELIVERED;\n $order_is_delivered = true;\n $fulfillment_array['fulfillment_delivery_status'] = $order_delivery_status;\n $order_array['order_delivery_status'] = $order_delivery_status;\n $fulfillment_array['fulfillment_status_delivered_tcreate'] = current_timestamp();\n if($is_tracking) $fulfillment_array['fulfillment_is_tracking'] = 0;\n break;\n\n case 'confirmed':\n $order_delivery_status = DELIVERY_STATUS_CONFIRMED;\n $fulfillment_array['fulfillment_delivery_status'] = $order_delivery_status;\n $order_array['order_delivery_status'] = $order_delivery_status;\n $fulfillment_array['fulfillment_status_confirmed_tcreate'] = current_timestamp();\n if($is_tracking) $fulfillment_array['fulfillment_is_tracking'] = 1;\n break;\n\n case 'in_transit':\n $order_delivery_status = DELIVERY_STATUS_IN_TRANSIT;\n $fulfillment_array['fulfillment_delivery_status'] = $order_delivery_status;\n $order_array['order_delivery_status'] = $order_delivery_status;\n $fulfillment_array['fulfillment_status_in_transit_tcreate'] = current_timestamp();\n if($is_tracking) $fulfillment_array['fulfillment_is_tracking'] = 1;\n break;\n\n case 'out_for_delivery':\n $order_delivery_status = DELIVERY_STATUS_OUT_FOR_DELIVERY;\n $fulfillment_array['fulfillment_delivery_status'] = $order_delivery_status;\n $order_array['order_delivery_status'] = $order_delivery_status;\n $fulfillment_array['fulfillment_status_out_for_delivery_tcreate'] = current_timestamp();\n if($is_tracking) $fulfillment_array['fulfillment_is_tracking'] = 1;\n break;\n\n case 'failure':\n $order_delivery_status = DELIVERY_STATUS_FAILURE;\n $fulfillment_array['fulfillment_delivery_status'] = $order_delivery_status;\n $order_array['order_delivery_status'] = $order_delivery_status;\n $fulfillment_array['fulfillment_status_failure_tcreate'] = current_timestamp();\n if($is_tracking) $fulfillment_array['fulfillment_is_tracking'] = 0;\n $order_array['order_alert_status'] = DELIVERY_STATUS_FAILURE;\n $fulfillment_array['fulfillment_alert_status'] = DELIVERY_STATUS_FAILURE;\n break;\n\n default:\n $order_delivery_status = DELIVERY_STATUS_UNKNOWN;\n $fulfillment_array['fulfillment_delivery_status'] = $order_delivery_status;\n if($is_tracking) $fulfillment_array['fulfillment_is_tracking'] = 1;\n\n break;\n }\n/*\n if ($order_delivery_status)\n $order_array['delivery_status'] = $order_delivery_status;*/\n \n \n /**\n * 'status_delivered_tcreate'=>'',\n * 'status_confirmed_tcreate'=>'',\n * 'status_in_transit_tcreate'=>'',\n * 'status_out_for_delivery_tcreate'=>'',\n * 'status_failure_tcreate'=>'',\n * 'status_not_found_tcreate'=>'',\n * 'status_customer_pickup_tcreate'=>'',\n * 'status_alert_tcreate'=>'',\n * 'status_expired_tcreate'=>'',\n */\n /** -----------------------------------\n * CREATE AND STORE FULFILLMENT OBJECT\n * ----------------------------------- */\n \n //Lets see if the order exists\n if (isset($fulfillment_object)) unset($fulfillment_object);\n\n $fulfillment_object = $fulfillment_instance->fetch_fulfillment_by_shopify_fulfillment_id($fulfillment_shopify_id);\n\n\n if (!$fulfillment_object) {\n $fulfillment_array['fulfillment_tracking_number_tcreate'] = current_timestamp();\n $fulfillment_object = new Fulfillment($fulfillment_array);\n $fulfillment_object->save();\n\n } else {\n\n if($fulfillment_object->tracking_number == \"\" || $fulfillment_object->tracking_number == null)\n $fulfillment_array['fulfillment_tracking_number_tcreate'] = current_timestamp();\n\n $fulfillment_object->save($fulfillment_array);\n }\n \n $order_object->order_fulfillments[] = $fulfillment_object;\n \n \n /** Added by Rafal - 2018-03-13 */\n if(sizeof($dropified_fulfillmets_ids) > 0 && in_array($fulfillment_shopify_id,$dropified_fulfillmets_ids) === true){\n $dropified_array = Array(\n 'tracking_number' => $fulfillment_tracking_number,\n 'fulfillment_shopify_id' => $fulfillment_shopify_id,\n 'order_id' => $order_id,\n 'vendor_id' => VENDOR_DROPIFIED,\n 'order_receipt_id'=>$order_receipt_id,\n 'tracking_tcreate' => current_timestamp(),\n 'tracking_tmodified'=>current_timestamp()\n );\n set_dropified_tracking($dropified_array);\n }\n }\n\n /** -----------------------\n * UPDATE THE ORDER OBJECT\n * ----------------------- */\n $order_object->save($order_array);\n } else {\n /** -------------------------------------\n * ADDED BY RAFAL 2018-03-20\n * \n * This allow to update cancell date and\n * financial status if it is different\n * than in table\n * ------------------------------------- */\n $cancel_array = Array();\n \n if(isset($order_object -> financial_status) && $order_object -> financial_status != $order_financial_status){\n $cancel_array['order_financial_status'] = $order_financial_status;\n }\n \n if(isset($order_object -> tcancel) && $order_object -> tcancel != $order_financial_status){\n $cancel_array['order_tcancel'] = $order_tcancel;\n }\n \n if (sizeof($cancel_array) > 0) {\n \n $db_conditions = Array('order_id' => $order_id);\n \n if (isset($db_instance)) unset($db_instance); \n $db_instance = new Database;\n $db_instance -> db_update('orders',$cancel_array,$db_conditions,$isOr=false);\n }\n }\n\n if ($order_count >= ORDER_COUNT_LIMIT_MANUAL && ORDER_COUNT_LIMIT_MANUAL != 0) exit('ORIGINAL DATA: ' . PHP_EOL . print_r($order_count, true));\n\n }\n log_error('total orders: ' . $order_count);\n\n\n}", "public static function process() {}", "public function processOrder($fields) {\n $ll_fields = array(\n 'username' => $this->ll_username,\n 'password' => $this->ll_password,\n 'method' => $this->ll_method,\n 'ipAddress' => $_SERVER['REMOTE_ADDR'],\n 'tranType' => $this->ll_tranType,\n 'shippingId' => $this->ll_shippingID,\n 'campaignId' => $this->ll_CID,\n 'AFID' => $this->ll_AFID,\n );\n $fields = array_merge($ll_fields, $fields);\n $cart_items = $this->getNormalizedCartItems();\n $fields = array_merge($cart_items, $fields);\n\n return $this->fireUpToLimeLight($fields);\n }", "public function processPayment($order)\n {\n $shipping = sprintf('%0.2f', 0);\n // Add any tax amount if you want to apply any tax rule\n $tax = sprintf('%0.2f', 0);\n\n // Create a new instance of Payer class\n $payer = new Payer();\n $payer->setPaymentMethod(\"paypal\");\n\n // Adding items to the list\n $items = array();\n foreach ($order->items as $item) {\n $orderItems[$item->order_item_id] = new Item();\n $orderItems[$item->order_item_id]->setName($item->film->film_name)\n ->setCurrency(config('settings.currency_code'))\n ->setQuantity($item->order_item_quantity)\n ->setPrice(sprintf('%0.2f', $item->order_item_price));\n\n array_push($items, $orderItems[$item->order_item_id]);\n }\n\n $itemList = new ItemList();\n $itemList->setItems($items);\n\n // Setting Shipping Details\n $details = new Details();\n $details->setShipping($shipping)\n ->setTax($tax)\n ->setSubtotal(sprintf('%0.2f', $order->order_grand_total));\n\n // Setup currency payment\n // Create chargeable amout\n $amount = new Amount();\n $amount->setCurrency(config('settings.currency_code'))\n ->setTotal(sprintf('%0.2f', $order->order_grand_total))\n ->setDetails($details);\n\n\n // Creating a transaction\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($itemList)\n ->setDescription($order->user->full_name)\n ->setInvoiceNumber($order->order_number);\n\n // This class takes two values, return URL (after successful completion where PayPal will redirect the user) and the cancel URL (if the user cancels the payment where he should be redirected).\n // Setting up redirection urls\n $redirectUrls = new RedirectUrls();\n $redirectUrls->setReturnUrl(route('checkout.payment.complete'))\n ->setCancelUrl(route('booking.book_tickets_post'));\n\n // Creating payment instance\n $payment = new Payment();\n $payment->setIntent(\"sale\")\n ->setPayer($payer)\n ->setRedirectUrls($redirectUrls)\n ->setTransactions(array($transaction));\n\n try {\n\n $payment->create($this->payPal);\n } catch (PayPalConnectionException $exception) {\n echo $exception->getCode(); // Prints the Error Code\n echo $exception->getData(); // Prints the detailed error message\n exit(1);\n } catch (Exception $e) {\n echo $e->getMessage();\n exit(1);\n }\n\n $approvalUrl = $payment->getApprovalLink();\n\n header(\"Location: {$approvalUrl}\");\n exit;\n }", "abstract protected function handlePayment();", "public function process() {\n }", "public function process() {\n }", "public function process() {\n }", "public function getProcessor()\n {\n return $this->processor;\n }", "public function processOrder($order)\r\n {\r\n // loop for every ordered product\r\n foreach ($order as $productId => $orderedQty) {\r\n // update inventory data\r\n $this->Inventory->deductStock($productId, $orderedQty);\r\n\r\n // update product sold data\r\n $this->ProductsSold->addProductSold($productId, $orderedQty);\r\n }\r\n }", "function action_woocommerce_send_sms_order_processing($order_id) {\n # code...\n}", "static function process($input, $params = array()) {\n\t\t$return = self::_preProcess($input);\n\t\t// ... Stub\n\t\tself::log('Import finished');\n\t\treturn $return;\n\t}", "abstract protected function _preProcess();", "function process($handler)\n {\n $c = &$this->c;\n // Instantiate models\n $PaidTxnLog = ClassRegistry::getClass('PaidTxnLogModel');\n $PaidOrder = ClassRegistry::getClass('PaidOrderModel');\n\n $posts = '';\n $res = '';\n $this->handler = $handler;\n $post_vars = Sanitize::getVar($c->params,'form',array());\n\n if(empty($post_vars)) return;\n\n isset($post_vars['merchant_return_link']) and Configure::write('PaidListings.email',true); // Don't send email on return to site because it's already triggered via IPN post - This is a Paypal thing\n\n // Verify if this is really a Paypal post\n $req = 'cmd=_notify-validate';\n\n foreach($post_vars AS $key => $value)\n {\n if(!in_array($key,array('CONTEXT','myAllTextSubmitID','cmd','form_charset')))\n {\n if (@get_magic_quotes_gpc()) {\n $value = stripslashes($value);\n }\n $req .= \"&$key=\".urlencode($value);\n $posts .= \"$key => $value\\r\\n\"; // Used in file log\n }\n }\n\n // post back to PayPal system to validate\n if ($post_vars['test_ipn'] == 1) {\n $url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n } else {\n $url = 'https://www.paypal.com/cgi-bin/webscr';\n }\n\n $ch = curl_init(); // Starts the curl handler\n curl_setopt($ch, CURLOPT_URL,$url); // Sets the paypal address for curl\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1); // Set curl to send data using post\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // Returns result to a variable instead of echoing\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req); // Add the request parameters to the post\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 5); // Sets a time limit for curl in seconds (do not set too low)\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // Enabling certificate verification makes the curl call fail on some servers\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\n $res = curl_exec($ch); // run the curl process (and return the result to $result\n curl_close($ch);\n\n // Extract custom fields\n $custom = json_decode($post_vars['custom'],true);\n $order_id = $custom['order_id']; // Local transaction id\n $order = $PaidOrder->findRow(array(\n 'conditions'=>array('PaidOrder.order_id = ' . $order_id)\n ));\n\n if (!preg_match(\"/VERIFIED/\", $res)) {\n // if (strcmp (trim($res), \"VERIFIED\") == 0) {\n\n $PaidTxnLog->addNote(\"Payment status: INVALID return.\");\n\n $PaidOrder->updateOrder($order,array('order_status'=>'Failed'));\n\n $PaidTxnLog->save($order,$post_vars,Sanitize::getString($post_vars,'txn_id'));\n\n die();\n }\n\n $order['txn_id'] = Sanitize::getString($post_vars,'txn_id'); // Make txn_id available in other methods where only the order is passed as a parameter\n\n switch(Sanitize::getString($post_vars,'txn_type'))\n {\n case 'web_accept':\n\n $success = $this->processOneTimePlan($order,$post_vars);\n\n break;\n\n case 'subscr_signup':\n case 'subscr_payment':\n case 'subscr_cancel':\n case 'subscr_failed':\n case 'recurring_payment_suspended_due_to_max_failed_payment':\n\n $success = $this->processSubscriptionPlan($order,$post_vars);\n\n break;\n default:\n\n $success = false;\n\n break;\n }\n\n if(!isset($post_vars['txn_type']))\n {\n switch($post_vars['reason_code'])\n {\n case 'chargeback':\n $PaidOrder->updateOrder($order,array('order_status'=>'Fraud'));\n $c->Paidlistings->processFailedOrder($order);\n break;\n }\n $PaidTxnLog->addNote(\"Reason code: {$post_vars['reason_code']}.\");\n }\n\n $PaidTxnLog->save($order, $post_vars, Sanitize::getString($post_vars,'txn_id'), $success);\n\n return $order;\n }", "public function _process()\n{\n\t/*\n\t * perform initial checks\n\t */\n\tif (!JRequest::checkToken())\n\t{\n\t\treturn $this->_renderHtml(JText::_('COM_TIENDA_INVALID_TOKEN'));\n\t}\n\n\t$data = JRequest::get('post');\n\n\t// Get order information\n\tJTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/tables');\n\t$order = JTable::getInstance('Orders', 'TiendaTable');\n\t$order->load($data['order_id']);\n\n\tif (empty($order->order_id))\n\t{\n\t\treturn JText::_('COM_TIENDA_AUTHORIZEDOTNET_MESSAGE_INVALID_ORDER');\n\t}\n\n\t// Prepare the form for submission to auth.net\n\t$process_vars = $this->_getProcessVars($data);\n\n\treturn $this->_processSimplePayment($process_vars);\n}", "public function setOrderData($orderData): Order\n {\n $this->id = $orderData->getIncrementId();\n $this->email = $orderData->getCustomerEmail();\n $this->quoteId = $orderData->getQuoteId();\n $this->storeName = $orderData->getStore()->getName();\n $this->purchaseDate = $orderData->getCreatedAt();\n $this->deliveryMethod = $orderData->getShippingDescription();\n $this->deliveryTotal = (float) number_format(\n (float) $orderData->getShippingAmount(),\n 2,\n '.',\n ''\n );\n $this->currency = $orderData->getOrderCurrencyCode();\n\n /** @var OrderPaymentInterface|InfoInterface $payment */\n $payment = $orderData->getPayment();\n if ($payment) {\n if ($payment->getMethod()) {\n $methodInstance = $payment->getMethodInstance();\n if ($methodInstance) {\n $this->payment = $methodInstance->getTitle();\n }\n }\n }\n\n $this->couponCode = (string) $orderData->getCouponCode();\n\n /*\n * custom order attributes\n */\n $customAttributes = $this->getConfigSelectedCustomOrderAttributes(\n $orderData->getStore()->getWebsite()->getId()\n );\n\n if ($customAttributes) {\n $fields = $this->helper->getOrderTableDescription();\n $this->custom = [];\n foreach ($customAttributes as $customAttribute) {\n if (isset($fields[$customAttribute])) {\n $field = $fields[$customAttribute];\n $value = $this->_getCustomAttributeValue(\n $field,\n $orderData\n );\n if ($value) {\n $this->_assignCustom($field, $value);\n }\n }\n }\n }\n\n /*\n * Billing address.\n */\n $this->processBillingAddress($orderData);\n\n /*\n * Shipping address.\n */\n $this->processShippingAddress($orderData);\n\n $websiteId = $orderData->getStore()->getWebsiteId();\n\n $includeCustomOptions = $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_SYNC_ORDER_PRODUCT_CUSTOM_OPTIONS,\n $websiteId\n );\n\n $orderItemProcessor = $this->orderItemProcessorFactory\n ->create(['data' => [\n 'websiteId' => $websiteId,\n 'includeCustomOptions' => $includeCustomOptions\n ]]);\n\n /*\n * Order items.\n */\n try {\n foreach ($orderData->getAllItems() as $productItem) {\n $productData = $orderItemProcessor->process($productItem);\n $this->mergeProductData($productData);\n }\n } catch (\\InvalidArgumentException $e) {\n $this->logger->debug(\n 'Error processing items for order ID: ' . $orderData->getId(),\n [(string) $e]\n );\n $this->products = [];\n }\n\n $this->orderSubtotal = (float) number_format(\n (float) $orderData->getData('subtotal'),\n 2,\n '.',\n ''\n );\n $this->discountAmount = (float) number_format(\n (float) $orderData->getData('discount_amount'),\n 2,\n '.',\n ''\n );\n $orderTotal = abs(\n $orderData->getData('grand_total') - $orderData->getTotalRefunded()\n );\n $this->orderTotal = (float) number_format($orderTotal, 2, '.', '');\n $this->orderStatus = $orderData->getStatus();\n\n if (!$this->schemaValidator->isValid($this->toArray())) {\n throw new SchemaValidationException(\n $this->schemaValidator,\n __(\"Validation error\")\n );\n }\n\n return $this;\n }", "public function process()\n {\n\n }", "public function execute(){\n return $this->payment(); \n }", "public function transform(){\r\n\t\tswitch($this->processor){\r\n\t\t\tcase 'saxon':\r\n\t\t\t\t$this->runSaxon();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'salbotron':\r\n\t\t\tdefault:\r\n\t\t\t\t$this->runSalbatron();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function make()\n {\n $orderState = new OrderState();\n $orderState->setProcessed(true);\n $orderState->setShipped(false);\n\n $orderItem1 = new LineItem();\n $orderItem1->setName('someItemName1');\n $orderItem1->setDescription('item description');\n $orderItem1->setQuantity(1);\n $orderItem1->setSku('AS1210000');\n $orderItem1->setSalePrice('90.00');\n $orderItem1->setTotalPrice('100.00');\n\n $orderItem2 = new LineItem();\n $orderItem2->setName('someItemName2');\n $orderItem2->setDescription('item description');\n $orderItem2->setQuantity(1);\n $orderItem2->setSku('AS3420000');\n $orderItem2->setSalePrice('40.00');\n $orderItem2->setTotalPrice('50.00');\n\n $order = new Order();\n $order->setGrandTotal('160.00');\n $order->setOrderDate(Carbon::parse('2017-05-12T00:00:00.000Z'));\n $order->setTaxAmount('15.00');\n $order->setCurrency('AUD');\n $order->setCustomerOrderId('ORDER-123456789');\n\n $order->setLineItems(collect([$orderItem1,$orderItem2]));\n $order->setStates($orderState);\n\n return $order;\n }", "protected function computeIncompleteHandlingOrders(){\r\n\t \t$incompleteOrders = $this->_orderInstance->getIncompleteHandlingOrders();\r\n\t \t//divide incomplete orders into 4 divisions and amazon orders.\r\n\t \t\r\n\t \t$amazonOrders = array();\r\n\t \t$ommitedOrders = array();\r\n\t \t$arrangedOrders = array();\r\n\t \t//$stockLockedOrders = array();\r\n\t \t$needComputingOrders = array();\r\n\t \t$readyOrders = array();\r\n\t \t$stockLockedItems = array();\r\n\t\r\n\t \tforeach ($incompleteOrders as $k=>$v){\r\n\t \t\t$v->lack_qty = 0;\r\n\t \t\tif($v->status_handling == '3'){\r\n\t \t\t\t//amazon stock.\r\n\t \t\t\t$amazonOrders[$k] = $v;\r\n\t \t\t\t$orderItems = $this->_orderInstance->getOrderItemsDetailByOid($v->oid);\r\n\t \t\t\tif($orderItems == false) $orderItems = array();\r\n\t \t\t\t$v->items = $orderItems;\r\n\t \t\t}else if($v->status_handling == '-1'){\r\n\t \t\t\t//回收站\r\n\t \t\t\t$ommitedOrders[$k] = $v;\r\n\t \t\t\t$orderItems = $this->_orderInstance->getOrderItemsWithStockInfo($v->oid);\r\n\t \t\t\tif($orderItems == false) $orderItems = array();\r\n\t \t\t\t$v->items = $orderItems;\r\n\t \t\t}else if($v->status_handling == '2'){\r\n\t \t\t\t//缺货\r\n\t \t\t\tif($v->status_locking == '1'){\r\n\t \t\t\t\t//已锁定(已安排)\r\n\t\t \t\t\t//this order was locked. Need except from stock.\r\n\t\t \t\t\t//get order items.\r\n \t \t\t\t$orderItems = $this->_orderInstance->getOrderItemsWithStockInfo($v->oid);\r\n \t\t \t\t$v->items = $orderItems;\r\n \t\t \t\tforeach($orderItems as $k2=>$v2){\r\n \t\t \t\t\tif(key_exists($v2->p_sn, $stockLockedItems)){\r\n \t\t \t\t\t\tif(key_exists($v2->avid, $stockLockedItems[$v2->p_sn])){\r\n \t\t \t\t\t\t\t$curStockItemQty = $stockLockedItems[$v2->p_sn][$v2->avid];\r\n \t\t \t\t\t\t\tif($v2->stock_qty < $curStockItemQty){\r\n \t\t \t\t\t\t\t\t//recount the stock qty.\r\n \t\t \t\t\t\t\t\t$v2->current_qty = 0;\r\n \t\t \t\t\t\t\t\t//$make the stock locked items as the stock qty.\r\n \t\t \t\t\t\t\t\t$stockLockedItems[$v2->p_sn][$v2->avid] = $v2->stock_qty;\r\n \t\t \t\t\t\t\t}else if($v2->stock_qty < $curStockItemQty + $v2->current_qty){\r\n \t\t \t\t\t\t\t\t$v2->current_qty = $v2->stock_qty - $curStockItemQty;\r\n \t\t \t\t\t\t\t\t$stockLockedItems[$v2->p_sn][$v2->avid] = $v2->stock_qty;\r\n \t\t \t\t\t\t\t}else{\r\n \t\t \t\t\t\t\t\t//库存充足\r\n \t\t \t\t\t\t\t\t$stockLockedItems[$v2->p_sn][$v2->avid] += intval($v2->current_qty);\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\tif($v2->stock_qty < $v2->current_qty){\r\n \t\t \t\t\t\t\t\t$v2->current_qty = $v2->stock_qty;\r\n \t\t \t\t\t\t\t}\r\n \t\t \t\t\t\t\t$stockLockedItems[$v2->p_sn][$v2->avid] = intval($v2->current_qty);\r\n \t\t \t\t\t\t}\r\n \t\t \t\t\t}else{\r\n \t\t \t\t\t\tif($v2->stock_qty < $v2->current_qty){\r\n \t\t \t\t\t\t\t\t$v2->current_qty = $v2->stock_qty;\r\n \t\t \t\t\t\t}\r\n \t\t \t\t\t\t$stockLockedItems[$v2->p_sn] = array($v2->avid=>intval($v2->current_qty));\r\n \t\t \t\t\t}\r\n \t\t \t\t\t$v->lack_qty += intval($v2->qty - $v2->current_qty);\r\n \t\t \t\t}\r\n\t \t\t\t \tif($v->export_decision == '0'){\r\n\t\t \t\t\t\t$arrangedOrders[$k] = $v;\r\n\t \t\t\t\t}else{\r\n\t \t\t\t\t\t$readyOrders[$k] = $v;\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$needComputingOrders[$k] = $v;\r\n\t \t\t\t}\r\n\t \t\t}else if($v->status_handling == '1'){\r\n\t \t\t\t//不缺货\r\n\t \t\t\t//if($v->status_locking == '1'){\r\n\t \t\t\t\t//this item was locked. Need except from stock.\r\n\t\t \t\t\t$orderItems = $this->_orderInstance->getOrderItemsWithStockInfo($v->oid);\r\n\t\t \t\t\tif($orderItems == false) $orderItems = array();\r\n\t\t \t\t\t$v->items = $orderItems;\r\n\t\t \t\t\tforeach($orderItems as $k2=>$v2){\r\n\t\t \t\t\t\tif(key_exists($v2->p_sn, $stockLockedItems)){\r\n\r\n\t\t \t\t\t\t\tif(key_exists($v2->avid, $stockLockedItems[$v2->p_sn])){\r\n\t\t \t\t\t\t\t\t$curStockItemQty = $stockLockedItems[$v2->p_sn][$v2->avid];\r\n\t\t \t\t\t\t\t\tif($v2->stock_qty < $curStockItemQty){\r\n\t\t \t\t\t\t\t\t\t//recount the stock qty.\r\n\t\t \t\t\t\t\t\t\t$v2->current_qty = 0;\r\n\t\t \t\t\t\t\t\t\t//$make the stock locked items as the stock qty.\r\n\t\t \t\t\t\t\t\t\t$stockLockedItems[$v2->p_sn][$v2->avid] = $v2->stock_qty;\r\n\t\t \t\t\t\t\t\t}else if($v2->stock_qty < $curStockItemQty + $v2->current_qty){\r\n\t\t \t\t\t\t\t\t\t$v2->current_qty = $v2->stock_qty - $curStockItemQty;\r\n\t\t \t\t\t\t\t\t\t$stockLockedItems[$v2->p_sn][$v2->avid] = $v2->stock_qty;\r\n\t\t \t\t\t\t\t\t}else{\r\n\t\t \t\t\t\t\t\t\t//库存充足\r\n\t\t \t\t\t\t\t\t\t$stockLockedItems[$v2->p_sn][$v2->avid] += intval($v2->current_qty);\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t}else{\r\n\t\t \t\t\t\t\t\tif($v2->stock_qty < $v2->current_qty){\r\n\t\t \t\t\t\t\t\t\t$v2->current_qty = $v2->stock_qty;\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t$stockLockedItems[$v2->p_sn][$v2->avid] = intval($v2->current_qty);\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\tif($v2->stock_qty < $v2->current_qty){\r\n\t\t \t\t\t\t\t\t\t$v2->current_qty = $v2->stock_qty;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\t$stockLockedItems[$v2->p_sn] = array($v2->avid=>intval($v2->current_qty));\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t$v->lack_qty += intval($v2->qty - $v2->current_qty);\r\n\t\t \t\t\t}\r\n\t\t \t\t\t$readyOrders[$k] = $v;\r\n\t \t\t//}else{\r\n\t \t\t\t\t//$needComputingOrders[$k] = $v;\r\n\t \t\t\t//}\r\n\t \t\t}else{\r\n\t \t\t\t$needComputingOrders [$k] = $v;\r\n\t \t\t}\r\n\t \t\t//now we already get the 3 arrays\r\n\t \t}\r\n\t \t\r\n\t \t$this->_orderInstance->updateArrangedOrderItemsLackState($arrangedOrders, $readyOrders, $stockLockedItems);\r\n\t \t\r\n\t \t//now we need compute amazon store.\r\n\t \t//$this->computeAmazonOrders($amazonOrders, $needComputingOrders);\r\n\t \t\r\n\t \t//$this->view->assign('amazonOrders', $amazonOrders);\r\n\t \t\r\n\t \t$orders_pools = $this->_orderInstance->calculateOrderItemsLackState($needComputingOrders, $stockLockedItems);\r\n\t \t$this->sortArrangedOrders($arrangedOrders);\r\n\t \t$orders_pools['arrangedOrders'] = $arrangedOrders;\r\n\t \t$orders_pools['ommitedOrders'] = $ommitedOrders;\r\n\t \t\r\n\t \tforeach ($readyOrders as $oid=>$order){\r\n\t \t\t$orders_pools['readyExportOrders'][$oid] = $order;\r\n\t \t}\r\n\t \t\r\n\t \treturn array($orders_pools, $stockLockedItems);\r\n }", "public function process($response)\n\t{\n\t\t\tlist($orderStatus, $decryptResponse)\t= $this->validateData($response);\n\t\t\t\n\t\t\treturn $this->_processPayment($orderStatus, $decryptResponse);\n\t}", "protected function preProcess() {}", "public function execute()\n {\n $request = $this->getRequest()->getParams();\n $responseContent = [\n 'success' => false,\n 'redirect_url' => 'checkout/#payment',\n 'parameters' => []\n ];\n\n if(empty($request['cf_id']) === false) {\n $resultRedirect = $this->resultRedirectFactory->create();\n $orderIncrementId = $request['cf_id'];\n $order = $this->orderFactory->create()->loadByIncrementId($orderIncrementId);\n $validateOrder = $this->checkRedirectOrderStatus($orderIncrementId, $order);\n if ($validateOrder['status'] == \"SUCCESS\") {\n $mageOrderStatus = $order->getStatus();\n if($mageOrderStatus === 'pending') {\n $this->processPayment($validateOrder['transaction_id'], $order);\n }\n $this->messageManager->addSuccess(__('Your payment was successful'));\n $resultRedirect->setPath('checkout/onepage/success');\n return $resultRedirect;\n\n } else if ($validateOrder['status'] == \"CANCELLED\") {\n $this->messageManager->addWarning(__('Your payment was cancel'));\n $this->checkoutSession->restoreQuote();\n $resultRedirect->setPath('checkout/cart');\n return $resultRedirect;\n } else if ($validateOrder['status'] == \"FAILED\") {\n $this->messageManager->addErrorMessage(__('Your payment was failed'));\n $order->cancel()->save();\n $resultRedirect->setPath('checkout/onepage/failure');\n return $resultRedirect;\n } else if($validateOrder['status'] == \"PENDING\"){\n $this->checkoutSession->restoreQuote();\n $this->messageManager->addWarning(__('Your payment is pending'));\n $resultRedirect->setPath('checkout/cart');\n return $resultRedirect;\n } else{\n $this->checkoutSession->restoreQuote();\n $this->messageManager->addErrorMessage(__('There is an error. Payment status is pending'));\n $resultRedirect->setPath('checkout/cart');\n return $resultRedirect;\n }\n } else {\n $order = $this->checkoutSession->getLastRealOrder();\n $code = 400;\n \n $transactionId = $request['additional_data']['cf_transaction_id'];\n \n if(empty($transactionId) === false && $request['additional_data']['cf_order_status'] === 'PAID')\n {\n $orderId = $order->getIncrementId();\n $validateOrder = $this->validateSignature($request, $order);\n if(!empty($validateOrder['status']) && $validateOrder['status'] === true) {\n $mageOrderStatus = $order->getStatus();\n if($mageOrderStatus === 'pending') {\n $this->processPayment($transactionId, $order);\n }\n\n $responseContent = [\n 'success' => true,\n 'redirect_url' => 'checkout/onepage/success/',\n 'order_id' => $orderId,\n ];\n\n $code = 200;\n } else {\n $responseContent['message'] = $validateOrder['errorMsg'];\n }\n\n $response = $this->resultFactory->create(ResultFactory::TYPE_JSON);\n $response->setData($responseContent);\n $response->setHttpResponseCode($code);\n return $response;\n } else {\n $responseContent['message'] = \"Cashfree Payment details missing.\";\n }\n }\n\n //update/disable the quote\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $quote = $objectManager->get('Magento\\Quote\\Model\\Quote')->load($order->getQuoteId());\n $quote->setIsActive(true)->save();\n $this->checkoutSession->setFirstTimeChk('0');\n \n $response = $this->resultFactory->create(ResultFactory::TYPE_JSON);\n $response->setData($responseContent);\n $response->setHttpResponseCode($code);\n return $response;\n }", "public function process() {\n\t\t$action = $this->get_action();\n\n\t\t$result = $this->$action();\n\n\t\t$this->set_processed_item( $result );\n\n\t\treturn $result;\n\t}", "public function process();", "public function process();", "public function process();", "public function process();", "public function processOrderItem(OrderItem $item)\n {\n // since we are create a subscription, we delegate the subscription creation to that model\n Subscription::createFromOrderItem($item);\n\n return $item;\n }", "public function createOrders()\n {\n $orderIds = array();\n $this->_validate();\n\n $shippingAddresses = $this->getQuote()->getAllShippingAddresses();\n $orders = array();\n\n if ($this->getQuote()->hasVirtualItems()) {\n $shippingAddresses[] = $this->getQuote()->getBillingAddress();\n }\n\n try {\n $quote = $this->getQuote();\n $quote->unsReservedOrderId();\n $quote->reserveOrderId();\n $incrementid = $quote->getReservedOrderId();\n $index = 1;\n\n // Step 1: Create Bundle Order\n $bundleorder = $this->_createBundleOrder();\n\n foreach ($shippingAddresses as $address) {\n $order = $this->_prepareOrderCustomIncrementId($incrementid.'-'.$index, $address);\n $orders[] = $order;\n Mage::dispatchEvent(\n 'checkout_type_multishipping_create_orders_single',\n array('order'=>$order, 'address'=>$address)\n );\n\n $index++;\n }\n\n // Step 2: Reference Address Order to Bundle Order\n\n // return $this;\n\n foreach ($orders as $order) {\n $order->place();\n $order->save();\n if ($order->getCanSendNewEmailFlag()){\n $order->queueNewOrderEmail();\n }\n $orderIds[$order->getId()] = $order->getIncrementId();\n }\n\n // Step 3: set last order id\n Mage::getSingleton('core/session')->setOrderIds($orderIds);\n // Mage::getSingleton('checkout/session')->setLastQuoteId($this->getQuote()->getId());\n\n // $this->getQuote()\n // ->setIsActive(false)\n // ->save();\n //\n // Mage::dispatchEvent('checkout_submit_all_after', array('orders' => $orders, 'quote' => $this->getQuote()));\n\n return $this;\n } catch (Exception $e) {\n Mage::dispatchEvent('checkout_multishipping_refund_all', array('orders' => $orders));\n throw $e;\n }\n }", "public function placeOrder( Request $request )\n {\n if(!config(\"constant.getDataFromApis\")){\n return $this->starrtecUnifiedPosHandler->payment_process( $request );\n }else{\n return $this->starrtecPosApiHandler->payment_process( $request );\n }//..... end if-else() .....//\n }", "public function processOrder(Request $request) {\n $id = $request->id;\n\n ItemOrder::where('id', $id)->update(['status' => config('constants.order_status.completed')]);\n\n session()->flash('success', 'Order processed successfully.'); \n\n return interpretJsonResponse(true, 200, null, null);\n }", "abstract public function put__do_process ();", "public function parse()\n {\n $raw = $this->getRaw();\n $count = count($raw);\n for ($i = 7; $i < $count; $i++) {\n $line = $raw[$i];\n\n $process = new Process(\n $line[11],\n $line[0],\n floatval($line[8]),\n floatval($line[9])\n );\n\n $this->processes[] = $process;\n }\n }", "function process() {\r\n }", "protected function beforeProcess() {\n }", "public function postProcess() {\n \n $this->_verifyPaymentOptionAvailability();\n $this->_validateCart();\n $this->_generatePagSeguroRequestData();\n $additional_infos = $this->_validateOrder();\n $this->_setAdditionalRequestData($additional_infos);\n $this->_setNotificationUrl();\n $this->_performPagSeguroRequest();\n \n }", "public function __invoke()\n {\n $discount = null;\n switch ($this->processor->getProcessorName()) {\n case \"square\":\n $discount = new OrderRequestDiscount();\n $discount->setAmountMoney(new \\kdaviesnz\\square\\Money($this->amount, $this->currency));\n $discount->setPercentage($this->perc);\n break;\n default:\n $discount = $this;\n }\n return $discount;\n }" ]
[ "0.62660533", "0.6184419", "0.61192113", "0.59818566", "0.5946555", "0.58039546", "0.5799331", "0.57596946", "0.575078", "0.574828", "0.574828", "0.574828", "0.574828", "0.56705457", "0.56705457", "0.5657101", "0.56397384", "0.56397384", "0.56144214", "0.5592535", "0.55487454", "0.5539442", "0.5520258", "0.5518651", "0.55128837", "0.55128837", "0.55128837", "0.55128837", "0.5509215", "0.5503509", "0.5490141", "0.5457879", "0.54391676", "0.5438736", "0.5434725", "0.5426703", "0.5406212", "0.5402982", "0.5398235", "0.5397576", "0.53831625", "0.53760046", "0.5368753", "0.5363015", "0.5363015", "0.5363015", "0.5361508", "0.5354889", "0.5322565", "0.5314751", "0.53137624", "0.5298625", "0.5298365", "0.5298365", "0.5298365", "0.52844524", "0.5281748", "0.52790886", "0.5264055", "0.52406704", "0.5239419", "0.52380246", "0.52250206", "0.52182376", "0.5208745", "0.5207484", "0.5205773", "0.5205773", "0.5205773", "0.519991", "0.5196388", "0.5172338", "0.5165111", "0.5163735", "0.5154551", "0.51473844", "0.514125", "0.513695", "0.5134402", "0.51275134", "0.5123874", "0.51234853", "0.5120157", "0.5099034", "0.509675", "0.508935", "0.5072776", "0.5072776", "0.5072776", "0.5072776", "0.50705194", "0.50698763", "0.5067537", "0.50584894", "0.5051", "0.5047602", "0.5046413", "0.5040391", "0.50378627", "0.5034011" ]
0.82179606
0
Create a new controller instance.
public function __construct() { $this->middleware('guest')->except('logout');; $this->Purchase_Service = new PurchaseService(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth:api'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Display a listing of the resource.
public function getCommunityProductListing($id) { return PartnerCommunityProducts::where('partner_id', Auth::id()) ->where('community_id', $id) ->where('partner_community_products.status', 'Y') ->leftJoin('products', 'products.id', '=', 'partner_community_products.product_id') //->select(DB::raw("partner_community_products.price AS dprice")) ->select(DB::raw("partner_community_products.price AS dprice"), 'partner_community_products.id', 'partner_community_products.old_price', 'partner_community_products.price', 'partner_community_products.price', 'products.sku', 'products.name', 'products.variety') ->orderBy('products.name', 'ASC') ->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}" ]
[ "0.7594622", "0.7594622", "0.7588457", "0.7580005", "0.75723624", "0.7499764", "0.7436887", "0.74322647", "0.7387517", "0.735172", "0.73381543", "0.73117113", "0.72958225", "0.7280436", "0.7273787", "0.72433424", "0.7230227", "0.7225085", "0.71851814", "0.71781176", "0.7174025", "0.7149406", "0.71431303", "0.7142905", "0.7136737", "0.712733", "0.7122102", "0.71148264", "0.71148264", "0.71148264", "0.7111841", "0.7092733", "0.70843536", "0.70822084", "0.7079442", "0.70571405", "0.70571405", "0.7055195", "0.70391846", "0.7039114", "0.7035626", "0.7033991", "0.70300245", "0.7026507", "0.7026417", "0.7019451", "0.7017105", "0.7004775", "0.70031846", "0.6999904", "0.6995238", "0.6994825", "0.699354", "0.6988824", "0.6986871", "0.6965804", "0.6965542", "0.69560695", "0.69515944", "0.6950682", "0.6947703", "0.69433117", "0.6941539", "0.6939613", "0.69377476", "0.69377476", "0.693678", "0.69344354", "0.69314486", "0.6927608", "0.69264024", "0.6922966", "0.69181216", "0.69150716", "0.6911192", "0.69095594", "0.69092506", "0.6907887", "0.69018227", "0.69008595", "0.69006085", "0.6900209", "0.68949944", "0.6892768", "0.6891944", "0.6891552", "0.6891552", "0.6891443", "0.68886423", "0.6888326", "0.68856037", "0.68835604", "0.68813664", "0.6878345", "0.6876079", "0.6873206", "0.6873183", "0.687048", "0.687014", "0.686966", "0.68695843" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7285922", "0.714503", "0.71324795", "0.6639801", "0.6620405", "0.6568167", "0.65257645", "0.650948", "0.64484984", "0.6375281", "0.6373189", "0.63650924", "0.63650924", "0.63650924", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "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 }", "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}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "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 }", "public function retrieve(Resource $resource);", "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 }", "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 }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "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}", "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 }", "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 }", "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 }", "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}", "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 }", "public function get(Resource $resource);", "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 }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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 }", "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}", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\n }", "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}", "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 }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "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 }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "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}", "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 }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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}", "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 }", "public function display() {\n echo $this->render();\n }", "#[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}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "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 }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "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}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public abstract function display();", "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 }", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "abstract public function resource($resource);", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($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}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "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 }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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 }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "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 }", "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 }", "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 }", "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 }", "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}", "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 }", "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 }", "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 }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "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 }", "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 }", "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 }", "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}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "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 }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "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 }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "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 }", "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 }", "public function store($data, Resource $resource);", "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 }", "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 }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "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 }", "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}", "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 }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "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 }", "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 }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "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 }", "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 }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "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 }", "public function update($id, $input);", "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 }", "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)); }", "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}", "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 }", "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 }", "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 }", "public function update($id);", "public function update($id);", "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 }", "public function put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "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 }", "public function update(Entity $entity);", "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 }", "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 }", "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}", "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 }", "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 }", "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 }", "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 }", "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 }" ]
[ "0.7424578", "0.7062392", "0.7056844", "0.6897447", "0.65815884", "0.6451359", "0.634689", "0.62107086", "0.6145251", "0.6121901", "0.6115076", "0.61009926", "0.60885817", "0.6053816", "0.6018965", "0.6007763", "0.5973282", "0.59455335", "0.593951", "0.59388787", "0.5892445", "0.58630455", "0.58540666", "0.58540666", "0.5851948", "0.5816257", "0.58070177", "0.5752376", "0.5752376", "0.57359827", "0.5723941", "0.57152426", "0.56958807", "0.5691061", "0.56881654", "0.5669518", "0.5655434", "0.5651897", "0.56480426", "0.5636727", "0.56354004", "0.5633156", "0.5632135", "0.5629063", "0.5621358", "0.56089175", "0.5602031", "0.55927175", "0.5582773", "0.558176", "0.5581365", "0.5575607", "0.5571989", "0.55672973", "0.5562929", "0.55623275", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55598706", "0.55560726", "0.55558753", "0.5554241", "0.55534166", "0.5552986", "0.55440396", "0.55438566", "0.5540619", "0.55394524", "0.5536144", "0.5535339", "0.5534803", "0.5524157", "0.55188423", "0.55163455", "0.55135876", "0.5509835", "0.5507501", "0.55068344", "0.55034274", "0.5501476", "0.55010915", "0.5499286", "0.5497852", "0.54958415", "0.54958415", "0.5494513", "0.5494261", "0.54935366", "0.54931587", "0.54917634", "0.54836094", "0.5479455", "0.5478885", "0.5478268", "0.54654354", "0.54645413", "0.5461025", "0.54568535" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "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 }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
cria um elemento no banco
public function create($array) { if($this->ioCreate($array)) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function crear() {\n /**\n * guardamos la consulta en $sql\n * ejecutamos la consulta en php \n * asignamos el id del objeto = al ultimo id que añadimos a la bd, asi coincidiran el id objeto con tupla\n * lista de atributos a introducir valores de atributos a introducir\n * formato insertar datos INSERT INTO NombreTabla (NombreAtributo1, NombreAtributo2) VALUES (ValorAtributo1, ValorAtributo2)\n */\n // para acceder a una cosntante de la clase NombreClase::NOMBRECONSTANTE\n \n try {\n $sql=\"INSERT INTO \".Bebidas::TABLA[0].\" (nombre, descripcion, tipo, estado, foto) VALUES ('$this->nombre', '$this->descripcion', '$this->tipo', '$this->estado', '$this->foto')\";\n $this->conexion->query($sql);\n $this->__set(\"id_bebida\", $this->conexion->insert_id);\n } catch (Exception $ex) {\n echo 'error '.$ex;\n }\n \n }", "public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "public function create()\n {\n //este deriva a un formulario, el cual debe tomar todos\n //los parametros del bache (nombre, fecha_y_hora, ubicacion, object_state_id (recuperarlo y pasarlo), estado(mostrar opciones y tomar el elegido)) y luego de todo esto llama a store para ser almacenado en la base de datos\n\n }", "public function create() //添加\n {\n\t\t//\n }", "public function crear()\n {\n //\n }", "function __construct(){\n\t\t\t$this->setId(0);\n\t\t\t$this->setFecha('');\t\n\t\t\t$this->setMotivo('');\n\t\t\t$this->setEstado(true);\n\t\t}", "function __construct(){\n\t\t$this -> modelo = new usuarioBss();\n\t}", "public function creating(Materia $model)\n {\n $model->ativo = $model->ativo ?? 0;\n }", "function evt__Agregar()\n\t{\n\t\t$this->tabla()->resetear();\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "function __construct(){\n\t\t\t$this->setId(0);\n\t\t\t$this->setIdUsuario(0);\n\t\t\t$this->setFecha('');\n\t\t\t// $this->setHora('');\t\t\n\t\t\t$this->setObservacion('');\t\t\n\t\t\t$this->setEstado(true);\n\t\t\t$this->setIngreso(true);\n\t\t\t\n\t\t}", "function __construct($id=\"\") {\n //echo \"ciao\";\n \n $this->setNometabella(\"localita\");\n $this->tabella= array(\"nome\"=>\"\",\"provincia\"=>\"\",\"cap\"=>\"\",\"codice\"=>\"\",\"solodestinazione\"=>\"\");\n parent::__construct($id);\n}", "function criarMovimentacao() {\n $movimentacao = new Movimentacoes();\n $movimentacao->valor = $this->valor;\n $movimentacao->tipo = 'E';\n $movimentacao->faturas_id = $this->id;\n $movimentacao->contas_bancarias_id = $this->contas_bancarias_id;\n $movimentacao->save();\n }", "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arr as $entity) {\n $optionsClient .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->save($abonnement);\n $this->handleStatus('Abonnement ajouté avec succès.');\n }\n }", "public function createNoUser(){\r\n $this -> setInscrit(0);\r\n $this -> insertDb();//Insertion en Bd d'un tuple user\r\n \r\n }", "private function crear_get()\n {\n $item = $this->ObtenNewModel();\n\t\t$lModel = new CicloModel(); \n \n //Pasamos a la vista toda la información que se desea representar\n\t\t$data['TituloPagina'] = \"Añadir un grupo\";\n\t\t$data[\"Model\"] = $item;\n\t\t$data[\"ComboCiclos\"] = $lModel->ObtenerTodos();\n\n //Finalmente presentamos nuestra plantilla\n\t\theader (\"content-type: application/json; charset=utf-8\");\n $this->view->show($this->_Nombre.\"/crear.php\", $data);\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function GruporModelo()\n\t\t{\n\t\t\t$id = \"\";\n\t\t\t$numero = \"\";\n\t\t\t$franja = \"\";\n\t\t}", "private function __construct() {\n if (file_exists(dirname(__FILE__).'/../XML/ouvres.xml')) {\n $ouvres = simplexml_load_file(dirname(__FILE__).'/../XML/ouvres.xml');\n foreach($ouvres->children() as $xmlOuvre)\n {\n $ouvre = new OuvreVO;\n // PRIMARYKEY\n $ouvre->setId((int) $xmlOuvre->idOuvre);\n // FOREIGNKEYS\n $ouvre->setIdLock((int) $xmlOuvre->idLock);\n $ouvre->setIdKey((int) $xmlOuvre->idKey);\n array_push($this->_ouvres, $ouvre);\n }\n } else {\n echo '<pre>';\n throw new RuntimeException('Echec lors de l\\'ouverture du fichier ouvres.xml.');\n echo '</pre>';\n exit();\n }\n }", "function criaModeloDeCliente()\n{\n $cliente = array(\n 'nome' => '',\n 'nome_usuario' => '',\n 'cnpj' => '',\n 'conta_contrato' => '',\n 'razao_social' => '',\n 'produto' => '',\n 'modulo' => '',\n 'duvida' => '',\n 'departamento' => '0',\n 'telefone' => ''\n );\n\n return $cliente;\n}", "public function create($id) //pasamos el id del cliente\n {\n \n }", "public function contrato()\r\n\t{\r\n\t}", "public function crear()\n {\n\n try{\n $model = new \\App\\Models\\Pasientes();\n\n foreach ($_POST as $campo => $val){\n $model->$campo = $val;\n }\n\n $model::insert($model);\n $this->historico();\n\n }catch(\\Exception $e){\n\n $this->formularioCreacion(['_error' => $e]);\n\n }\n\n }", "public function create(){\n $alter = '';\n $crear = '';\n $creartablas = '';\n\n $a = '';\n if(!empty($_POST)){\n if( isset($_POST['creartabla']) )\n $a = $_POST['creartabla'];\n }\n if($a!=''):\n $array = explode(',', $a);\n $crear = '';\n $tablas = array();\n foreach ($array as $v): \n $v = trim($v);\n $inic = $crear;\n if( stristr($v, 'id_') ){ \n $tabla = str_replace('id_', '', $v);\n $crear.= 'CREATE TABLE IF NOT EXISTS '.$tabla.' ( ';\n $crear.= ' id_'.$tabla.' INTEGER(10) PRIMARY KEY AUTO_INCREMENT ';\n }\n if( stristr( $v, '_id') ){\n $tablas[] = str_replace('_id', '', $v);\n $crear.= ','.$v.' INTEGER(10)'; \n } \n\n if( stristr($v, 'fecha' )or stristr($v, 'fecha') ) $crear.= ','.$v.' DATE NOT NULL '; \n if( stristr($v, '_nro' ) or stristr($v, 'nro_' ) ) $crear.= ','.$v.' INTEGER(10) NOT NULL '; \n if( stristr($v, 'text' ) or stristr($v, 'texto' ) ) $crear.= ','.$v.' TEXT NOT NULL COMMENT \\'col:12\\' '; \n if( stristr($v, 'timestamp' ) ) $crear.= ','.$v.' TIMESTAMP DEFAULT CURRENT_TIMESTAMP '; \n if($inic==$crear) $crear.= ','.$v.' VARCHAR(255) NOT NULL '; \n \n \n endforeach;\n\n $fk = '';\n $creartablas ='';\n foreach ($tablas as $value):\n $fk.=', FOREIGN KEY('.$value.'_id) REFERENCES '.$value.'(id_'.$value.') '; \n $creartablas.= 'CREATE TABLE IF NOT EXISTS '.$value.' ( ';\n $creartablas.= ' id_'.$value.' INTEGER(10) PRIMARY KEY AUTO_INCREMENT ';\n $creartablas.= ', name_'.$value.' VARCHAR(99) NOT NULL';\n $creartablas.= ', detail_'.$value.' VARCHAR(99) NOT NULL ';\n $creartablas.= ') ENGINE = InnoDB; ';\n endforeach;\n $crear .= $fk.') ENGINE = InnoDB;';\n\n $a = $creartablas.$crear;\n $b = explode(';', $a);\n $re = 'INICIO DE PETICION<BR>#####################';\n $this->db->trans_start();\n foreach ($b as $value) {\n if($value!='')\n $this->db->query($value);\n $re.= \"<BR>Peticion: \".$value.'';\n }\n $this->db->trans_complete();\n $re.= '#####################<br>Fin de las peticiones';\n $tables = $this -> Tables_model -> table_name();\n $this->session->set_userdata('tables', $tables);\n return $re;\n endif;\n }", "public function create(){\n //\n }", "public function create(){\n //\n }", "public function create(){\n\t}", "public function Nuevo(){\n $pvd = new alumno();\n\n //Llamado de las vistas.\n require_once '../Vista/Alumno/agregar-alumnos.php';\n\n }", "public function __construct() {\n $this->noticia_modelo = $this->modelo('NoticiaModelo');\n }", "public function create(){\n\n //\n }", "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->nombre = \"\";\n\t}", "static function createObject () {\n $query = 'insert into '.Config::getTablePrifix().self::getTableName().' (';\n $feilds = self::getFeildNames();\n $query .= implode(',',$feilds);\n $query .= ') values(';\n foreach ($feilds as $feild) {\n if ($feild != current($feilds)) {\n $query .= ',';\n }\n $query .= '\\''.Database::escape(self::getFeildValue($feild)).'\\'';\n }\n $query .= ')';\n Database::query($query);\n // update the id feild value\n $lastInsertId = Database::queryAsObject('select max(id) as lastid from '.Config::getTablePrifix().self::getTableName());\n self::setFeildValue(self::getIdFeild(),$lastInsertId->lastid);\n return $this;\n }", "public function create()\n {\n //\n\t\t\n }", "protected function addElements() \n {\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'nombre',\n 'options' => [\n 'label' => 'Usuario Adicional',\n ],\n ]);\n \n \n // Add \"telefono\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telefono',\n 'options' => [\n 'label' => 'Teléfono',\n ],\n ]);\n \n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email',\n 'options' => [\n 'label' => 'Mail',\n ],\n ]);\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'skype',\n 'options' => [\n 'label' => 'Skype',\n ],\n ]);\n \n // Add \"id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'id',\n 'options' => [\n 'label' => 'id',\n ],\n ]);\n \n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [\n 'value' => 'Create'\n ],\n ]);\n\n }", "function createObject()\n {\n $stmt = $this->mysqli->prepare(\"INSERT INTO object(`name`, `description`, `price`, `typeCoin`, `weight`, `volume`, `limitationStrength`,\n `limitationDex`, `limitationCons`, `limitationInt`, `limitationWis`,`typeObject`, `primal`)\n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\");\n $stmt->bind_param(\n \"ssisiiiiiiisi\",\n $this->name,\n $this->description,\n $this->price,\n $this->typeCoin,\n $this->weight,\n $this->volume,\n $this->limitationStrength,\n $this->limitationDex,\n $this->limitationCons,\n $this->limitationInt,\n $this->limitationWis,\n $this->typeObject,\n $this->primal\n );\n $stmt->execute();\n $this->id = $this->mysqli->insert_id;\n $stmt->close();\n }", "public function create()\n {\n //s\n }", "public function create(){ \n //\n }", "function abrir_elemento($nombre)\n\t{\n\t\t$this->xml->startElement($nombre);\n\t}", "public function actionCrear() {\n $model = new Factura();\n $atributos_viejos = $model->attributes;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n StaticMembers::RegistrarTraza($model, $atributos_viejos, 'crear', $model->numero);\n Yii::$app->session->setFlash('success', 'Elemento creado correctamente', false);\n return $this->redirect(['inicio', 'id' => $model->id, 'id_devolucion' => $model->id_devolucion]);\n } else {\n return $this->render('crear', ['model' => $model,]);\n }\n }", "public function creer(){ /*** Cree un utilisateur par insertion d'un tuple dans la table UserTab ***/\r\n \r\n \r\n // $this -> setInscrit(1);\r\n $this -> insertDb();//Insertion en Bd d'un tuple user\r\n\t\t\t\r\n }", "public function inserir()\n {\n }", "public function Instancia()\r\n {\r\n $this->instance = null;\r\n $this->instance = new NomCampoestruc();\r\n }", "public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('tbaluno');\n\t\t$this->setPhpName('Tbaluno');\n\t\t$this->setClassname('Tbaluno');\n\t\t$this->setPackage('lib.model');\n\t\t$this->setUseIdGenerator(true);\n\t\t$this->setPrimaryKeyMethodInfo('tbpessoa_id_pessoa_seq');\n\t\t// columns\n\t\t$this->addColumn('ID_PESSOA', 'IdPessoa', 'INTEGER', true, null, null);\n\t\t$this->addPrimaryKey('MATRICULA', 'Matricula', 'BIGINT', true, null, null);\n\t\t$this->addColumn('NOME', 'Nome', 'VARCHAR', true, 100, null);\n\t\t$this->addColumn('CELULAR', 'Celular', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('EMAIL', 'Email', 'VARCHAR', false, 100, null);\n\t\t$this->addColumn('FONE_RESIDENCIAL', 'FoneResidencial', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('FOTO', 'Foto', 'BLOB', false, null, null);\n\t\t$this->addForeignKey('ID_NECES_ESPECIAL', 'IdNecesEspecial', 'VARCHAR', 'tbnecesespecial', 'ID_NECES_ESPECIAL', true, 255, null);\n\t\t$this->addColumn('DT_NASCIMENTO', 'DtNascimento', 'DATE', true, null, null);\n\t\t$this->addForeignKey('NATURALIDADE', 'Naturalidade', 'INTEGER', 'tbcidade', 'ID_CIDADE', true, null, null);\n\t\t$this->addColumn('UF_NASCIMENTO', 'UfNascimento', 'CHAR', false, 2, null);\n\t\t$this->addForeignKey('NACIONALIDADE', 'Nacionalidade', 'INTEGER', 'tbpais', 'ID_PAIS', true, null, null);\n\t\t$this->addColumn('SEXO', 'Sexo', 'CHAR', true, 1, null);\n\t\t$this->addColumn('ESTADO_CIVIL', 'EstadoCivil', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('TITULO', 'Titulo', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('TITULO_ZONA', 'TituloZona', 'INTEGER', false, null, null);\n\t\t$this->addColumn('TITULO_SECAO', 'TituloSecao', 'INTEGER', false, null, null);\n\t\t$this->addColumn('RG', 'Rg', 'VARCHAR', true, 20, null);\n\t\t$this->addColumn('RG_DT_EXPED', 'RgDtExped', 'DATE', false, null, null);\n\t\t$this->addColumn('RG_ORG_EXPED', 'RgOrgExped', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('CPF', 'Cpf', 'VARCHAR', true, 11, null);\n\t\t$this->addColumn('RESERVISTA', 'Reservista', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('PAI', 'Pai', 'VARCHAR', false, 50, null);\n\t\t$this->addColumn('MAE', 'Mae', 'VARCHAR', false, 50, null);\n\t\t$this->addForeignKey('CEP', 'Cep', 'VARCHAR', 'tblogradouro', 'CEP', true, 9, null);\n\t\t$this->addColumn('NUMERO', 'Numero', 'VARCHAR', true, 8, null);\n\t\t$this->addColumn('COMPLEMENTO', 'Complemento', 'VARCHAR', false, 50, null);\n\t\t$this->addForeignKey('ID_VERSAO_CURSO', 'IdVersaoCurso', 'INTEGER', 'tbcursoversao', 'ID_VERSAO_CURSO', true, null, null);\n\t\t$this->addForeignKey('ID_TIPO_INGRESSO', 'IdTipoIngresso', 'INTEGER', 'tbtipoingresso', 'ID_TIPO_INGRESSO', true, null, null);\n\t\t$this->addColumn('DT_INGRESSO', 'DtIngresso', 'DATE', true, null, null);\n\t\t$this->addForeignKey('ID_SITUACAO', 'IdSituacao', 'INTEGER', 'tbalunosituacao', 'ID_SITUACAO', true, null, null);\n\t\t$this->addColumn('DT_SITUACAO', 'DtSituacao', 'DATE', false, null, null);\n\t\t$this->addForeignKey('ID_DESTINO', 'IdDestino', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addForeignKey('ID_2GRAU', 'Id2grau', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addColumn('ANO_CONCL_2GRAU', 'AnoConcl2grau', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_3GRAU', 'Id3grau', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addColumn('ANO_CONCL_3GRAU', 'AnoConcl3grau', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_TRABALHO', 'IdTrabalho', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addForeignKey('CEP_TRABALHO', 'CepTrabalho', 'VARCHAR', 'tblogradouro', 'CEP', false, 8, null);\n\t\t$this->addColumn('FONE_TRABALHO', 'FoneTrabalho', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('RAMAL_TRABALHO', 'RamalTrabalho', 'VARCHAR', false, 5, null);\n\t\t$this->addColumn('MEDIA_GERAL', 'MediaGeral', 'NUMERIC', false, 10, null);\n\t\t$this->addColumn('CH_ELETIVA_CURSADA', 'ChEletivaCursada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_ELETIVA_SOLICITADA', 'ChEletivaSolicitada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_OBRIG_CURSADA', 'ChObrigCursada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_OBRIG_SOLICITADA', 'ChObrigSolicitada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_TOTAL', 'ChTotal', 'INTEGER', false, null, null);\n\t\t$this->addColumn('OP_INGRESSO', 'OpIngresso', 'INTEGER', false, null, 0);\n\t\t$this->addForeignKey('ID_POLO', 'IdPolo', 'INTEGER', 'tbpolos', 'ID_POLO', true, null, 0);\n\t\t$this->addColumn('CREATED_AT', 'CreatedAt', 'DATE', false, null, null);\n\t\t$this->addColumn('UPDATED_AT', 'UpdatedAt', 'DATE', false, null, null);\n\t\t$this->addColumn('CREATED_BY', 'CreatedBy', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('UPDATED_BY', 'UpdatedBy', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('ID_ANTIGO', 'IdAntigo', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_RACA', 'IdRaca', 'INTEGER', 'tbaluno_racacor', 'ID_RACA', true, null, null);\n\t\t$this->addColumn('ENADE', 'Enade', 'BOOLEAN', false, null, false);\n\t\t// validators\n\t}", "public function __construct() \r\n {\r\n \t$this->id = 0;\r\n\t\t$this->nombre = \"\";\r\n\t\t$this->clave = \"\";\r\n\t\t$this->privilegio = \"\";\r\n \t$this->con = new cConexion();\r\n\t\t$this->tabla = \"usuario\";\r\n\t\t//$this->con->Conectar();\r\n }", "public function insertar($objeto){\r\n\t}", "function __construct(){\n \t$this->comentario = new Comentarios();\n\n }", "public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }", "private function criarBarraDeBuscaAction(){\n $cidades = $this->Localidades()->getCidades(\"RJ\");\n $busca = new form_busca();//1- primeiro eu instancio o formularioarray('selecione'=>'selecione','nome' => 'nome','cidade' => 'cidade')\n $busca->get('cidade')->setAttribute('options',$cidades);\n $busca->get('bairro')->setAttribute('options', array(0=>'Selecione uma Cidade'));\n //\n $categoriaDao = \\Base\\Model\\daoFactory::factory('SubCategoriaImovel');\n $dadosCategoria = $categoriaDao->recuperarTodos();\n $categorias = $this->SelectHelper()->getArrayData(\"selecione\",$dadosCategoria);\n $busca->get('tipo')->setAttribute('options', $categorias);\n //\n $transacaoDao = \\Base\\Model\\daoFactory::factory('TipoTransacao');\n $dadosTransacoes = $transacaoDao->recuperarTodos();\n $transacoes = $this->SelectHelper()->getArrayData(\"selecione\",$dadosTransacoes);\n $busca->get('transacao')->setAttribute('options', $transacoes);\n //\n $arrayPreco = array(array(\"value\"=>0, \"label\"=>\"selecione\", \"disabled\" => \"disabled\", \"selected\" => \"selected\"),array(\"value\" => 1, \"label\" => \"R$ 100.000 a R$ 200.000\"),array(\"value\" => 2, \"label\" => \"R$ 200.000 a R$ 300.000\"),array(\"value\" => 3, \"label\" => \"R$ 300.000 a R$ 400.000\"),array(\"value\" => 4, \"label\" => \"R$ 400.000 a R$ 500.000\"),array(\"value\" => 5, \"label\" => \"acima de R$ 500.000\"));\n $busca->get('valor')->setAttribute('options', $arrayPreco);\n return $busca;\n }", "function __construct(){\n $this->valorBruto = 0;\n $this->valorImpostos = 0;\n\n $this->itens = array(); // gera um array pra guardar os itens\n $this->acoesAoGerar = array();\n }", "public function create()\n {\n $trabajoController = new TrabajoController();\n $arregloBuscarTrabajos = ['eliminado'=>0];\n $arregloBuscarTrabajos = new Request ($arregloBuscarTrabajos);\n $listaTrabajos=$trabajoController->buscar($arregloBuscarTrabajos);\n $listaTrabajos = json_decode($listaTrabajos);\n return view('pagorecibido.create',['listaTrabajos'=>$listaTrabajos]); //Vista para crear el elemento nuevo\n }", "public function __construct($name = null)\n {\n parent::__construct('ponto');\n \n $this->setAttribute('method', 'post');\n $this->add(array(\n 'name' => 'id',\n 'attributes' => array(\n 'type' => 'hidden',\n ),\n ));\n\n $this->add(array(\n 'name' => 'manha_ini',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Manha - Entrada',\n ),\n ));\n\n $this->add(array(\n 'name' => 'manha_fim',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => utf8_encode('Manha - Saida'),\n ),\n ));\n\n $this->add(array(\n 'name' => 'tarde_ini',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Tarde - Entrada',\n ),\n ));\n\n $this->add(array(\n 'name' => 'tarde_fim',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => utf8_encode('Tarde - Saida'),\n ),\n ));\n\n $this->add(array(\n 'name' => 'data',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Dia',\n ),\n ));\n\n $this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'type' => 'submit',\n 'value' => 'Go',\n 'id' => 'submitbutton',\n ),\n ));\n\n }", "public function examen(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idExamen=\"\";\t\t\r\n\t\t$this->tipoExamen=\"\";\t\r\n\t\t$this->descripcion=\"\";\r\n\t}", "private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "public function create()\r\r\n {\r\r\n //\r\r\n }", "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->actividad = \"\";\n\t\t$this->nota = \"\";\n\t\t$this->alumno = \"\";\n\t\t$this->materia = \"\";\n\n\t}", "public function criarAction() {\n if($this->usuario['tp_id']==5){\n $this->_redirect('index');\n }\n $this->modelColonia->insert($this->_getAllParams());\n\n $this->_redirect('colonia/index');\n }", "public function __construct($nome,$cognome)\n {\n // $a++\n // $this->contatore // errato perchè riferito all'istanza\n $this->id = self::$contatore++;\n //$this->nome = $nome;\n $this->setNome($nome);\n $this->setCognome($cognome);\n }", "public function setId_Entree($Id_Entree)\n{\n$this->Id_Entree = $Id_Entree;\n\nreturn $this;\n}", "public function cadastrar(){\r\n //DEFINIR A DATA DE CADASTRO\r\n $this->cadastro = date('Y-m-d H:i:s');\r\n\r\n $db = new Database('cartao');\r\n $this->id = $db->insert([\r\n 'bandeira' => $this->bandeira,\r\n 'numero' => $this->numero,\r\n 'doador' => $this->doador,\r\n ]);\r\n\r\n }", "public function createAction(Request $request)\n\t{\n\n\t\t$Element = $this->get('Element');\n\t\t$FormService = $this->get('cmf.forms');\n\n\t\t$entity = new Element();\n\t\t$form = $this->createCreateForm($entity);\n\t\t$form->handleRequest($request);\n\n\n\t\tif ($form->isValid()) {\n\n\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$request = $this->container->get('request_stack')->getCurrentRequest();\n\t\t\t$params = $request->get('_route_params');\n\t\t\t$block = $em->getRepository('NovuscomCMFBundle:Block')->find($params['id']);\n\t\t\t$section = $em->getRepository('NovuscomCMFBundle:Section')->find($params['section_id']);\n\t\t\tif ($section) {\n\t\t\t\t//$entity->setSection($section);\n\t\t\t}\n\t\t\t$entity->setBlock($block);\n\n\n\t\t\t/**\n\t\t\t * Свойства\n\t\t\t */\n\t\t\tif ($form->has('properties')) {\n\n\t\t\t\tforeach ($form->get('properties') as $p) {\n\t\t\t\t\t//echo '<pre>' . print_r($p->getName(), true) . '</pre>';\n\t\t\t\t\t//echo '<pre>' . print_r($p->getData(), true) . '</pre><hr/>';\n\t\t\t\t\t$property = $em->getRepository('NovuscomCMFBundle:Property')->find($p->getName());\n\t\t\t\t\tif (is_object($p->getData())) {\n\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\t\tif (is_a($p->getData(), 'DateTime')) {\n\t\t\t\t\t\t\t//echo '<pre>' . print_r('это дата/время', true) . '</pre>';\n\t\t\t\t\t\t\t$ElementProperty = new ElementPropertyDT();\n\t\t\t\t\t\t\t$ElementProperty->setElement($entity);\n\t\t\t\t\t\t\t$ElementProperty->setProperty($property);\n\t\t\t\t\t\t\t$ElementProperty->setValue($p->getData());\n\t\t\t\t\t\t\t$em->persist($ElementProperty);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//echo '<pre>';\n\t\t\t\t\t\t\t//print_r($p->getData());\n\t\t\t\t\t\t\t//echo '</pre>';\n\t\t\t\t\t\t\t//exit;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (is_array($p->getData())) {\n\t\t\t\t\t\t\t$property_value = $p->getData();\n\t\t\t\t\t\t\t//$this->CreateUpdateFiles($p->getData(), $entity, $em);\n\n\n\t\t\t\t\t\t\tforeach ($property_value as $pv) {\n\t\t\t\t\t\t\t\t//echo '<pre>' . print_r($pv, true) . '</pre>';\n\t\t\t\t\t\t\t\t//exit;\n\t\t\t\t\t\t\t\t$file = new \\Novuscom\\CMFBundle\\Entity\\FormPropertyFile();\n\n\t\t\t\t\t\t\t\tif ($pv instanceof $file) {\n\n\t\t\t\t\t\t\t\t\t//exit;\n\t\t\t\t\t\t\t\t\t//echo '<pre>' . print_r($pv->getName(), true) . '</pre>';\n\t\t\t\t\t\t\t\t\t//$this->createPreviewPicture()\n\t\t\t\t\t\t\t\t\t//$mediaController = new \\CMF\\MediaBundle\\Controller\\DefaultController();\n\t\t\t\t\t\t\t\t\t$newFile = $this->createFile($pv->getFile());\n\n\n\t\t\t\t\t\t\t\t\t//$em->flush();\n\t\t\t\t\t\t\t\t\t//$em->clear();\n\n\t\t\t\t\t\t\t\t\tif ($pv->getReplaceFileId()) {\n\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\t */\n\n\t\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\t\tforeach ($ElementProperty as $key => $ep) {\n\t\t\t\t\t\t\t\t\t\t\techo '<pre>' . print_r('value: ' . $ep->getValue() . ', property:' . $ep->getProperty()->getId(), true) . '</pre>';\n\t\t\t\t\t\t\t\t\t\t\tif ($ep->getValue() == $pv->getReplaceFileId()) {\n\t\t\t\t\t\t\t\t\t\t\t\t$ep->setValue($newFile->getId());\n\t\t\t\t\t\t\t\t\t\t\t\t$em->persist($ep);\n\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\t$oldFile = $em->getRepository('CMFMediaBundle:File')->find($pv->getReplaceFileId());\n\t\t\t\t\t\t\t\t\t\t\t$em->remove($oldFile);\n\t\t\t\t\t\t\t\t\t\t\t// удаляем зменяемый файл из файловой системы\n\t\t\t\t\t\t\t\t\t\t\t$fileName = $_SERVER['DOCUMENT_ROOT'] . '/upload/images/' . $oldFile->getName();\n\t\t\t\t\t\t\t\t\t\t\tunlink($fileName);\n\t\t\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\t} else {\n\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\t */\n\t\t\t\t\t\t\t\t\t\t$ElementPropertyF = new ElementPropertyF();\n\t\t\t\t\t\t\t\t\t\t$ElementPropertyF->setElement($entity);\n\t\t\t\t\t\t\t\t\t\t$ElementPropertyF->setDescription($pv->getDescription());\n\t\t\t\t\t\t\t\t\t\t$ElementPropertyF->setFile($newFile);\n\t\t\t\t\t\t\t\t\t\t$ElementPropertyF->setProperty($property);\n\t\t\t\t\t\t\t\t\t\t$newFile->addProperty($ElementPropertyF);\n\t\t\t\t\t\t\t\t\t\t$em->persist($newFile);\n\t\t\t\t\t\t\t\t\t\t$em->persist($ElementPropertyF);\n\t\t\t\t\t\t\t\t\t\t/*$ElementProperty = new ElementProperty();\n\t\t\t\t\t\t\t\t\t\t$ElementProperty->setValue($newFile->getId());\n\t\t\t\t\t\t\t\t\t\t$ElementProperty->setElement($entity);\n\t\t\t\t\t\t\t\t\t\t$ElementProperty->setProperty($property);\n\t\t\t\t\t\t\t\t\t\t//$ElementProperty->setDescription($pv->getDescription());\n\t\t\t\t\t\t\t\t\t\t$em->persist($ElementProperty);*/\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//exit;\n\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//echo '<pre>стоп. ' . print_r($p->getData(), true) . '</pre>';\n\t\t\t\t\t\t\t//exit;\n\t\t\t\t\t\t\t$ElementProperty = new ElementProperty();\n\t\t\t\t\t\t\t$ElementProperty->setElement($entity);\n\t\t\t\t\t\t\t$ElementProperty->setProperty($property);\n\t\t\t\t\t\t\t$ElementProperty->setValue($p->getData());\n\t\t\t\t\t\t\t$em->persist($ElementProperty);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//exit;\n\t\t\t}\n\n\n\t\t\t/**\n\t\t\t * Разделы\n\t\t\t */\n\t\t\t$sectionsCount = count($form->get('section')->getData());\n\t\t\tif ($sectionsCount > 0) {\n\t\t\t\tforeach ($form->get('section')->getData() as $section) {\n\t\t\t\t\t$ElementSection = new ElementSection();\n\t\t\t\t\t$ElementSection->setElement($entity);\n\t\t\t\t\t$ElementSection->setSection($section);\n\t\t\t\t\t$em->persist($ElementSection);\n\t\t\t\t\t//echo '<pre>[' . print_r($section->getId(), true) . ']</pre>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/*\n\t\t\t\t * для элемента не указаны разделы, добавляем пустой\n\t\t\t\t */\n\t\t\t\t$ElementSection = new ElementSection();\n\t\t\t\t$ElementSection->setElement($entity);\n\t\t\t\t$ElementSection->setSection(null);\n\t\t\t\t$em->persist($ElementSection);\n\t\t\t}\n\n\n\t\t\t//exit;\n\n\n\t\t\t/**\n\t\t\t * Превью пикча\n\t\t\t */\n\t\t\t$this->createPreviewPicture($entity, $form['preview_picture']->getData(), $form['preview_picture_alt']->getData());\n\n\t\t\t/**\n\t\t\t * Детейл пикча\n\t\t\t */\n\t\t\t$this->createDetailPicture($entity, $form['detail_picture']->getData(), $form['detail_picture_alt']->getData());\n\n\n\t\t\t/**\n\t\t\t * Последнее изменение\n\t\t\t */\n\n\t\t\t$entity->setLastModified(new \\DateTime('now'));\n\n\n\t\t\t$em->persist($entity);\n\n\n\t\t\t/**\n\t\t\t * Сохраниение информации в базу\n\t\t\t */\n\t\t\t$em->flush();\n\t\t\t$props = $FormService->getElementProperties($form->get('properties'));\n\t\t\t$Element->SetPropertyValues($entity, $props);\n\n\t\t\t/**\n\t\t\t * Редирект\n\t\t\t */\n\t\t\t$redirect_url = $this->generateUrl('admin_block_show', array('id' => $params['id']));\n\t\t\tif (array_key_exists('section_id', $params) && is_numeric($params['section_id'])) {\n\t\t\t\t$redirect_url = $this->generateUrl('admin_block_show_section', array('id' => $block->getId(), 'section_id' => $params['section_id']));\n\t\t\t}\n\t\t\treturn $this->redirect($redirect_url);\n\t\t}\n\n\n\t\treturn $this->render('NovuscomCMFBundle:Element:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function criarBloco_1_Vazio()\n {\n $this->Sped->criarLinha('1', '1001', \"|1001|0|\");\n $this->Sped->criarLinha('1', '1010', \"|1010|N|N|N|N|N|N|N|N|N|N|N|N|N|\");\n $this->Sped->criarEncerramentoBloco('1', '1990', \"1990\");\n }", "public function create(){}", "public function __construct(){\n $this->codigo = null;\n $this->entidad = array('usuario' => '',\n 'password' => '');\n }", "public function crear() {\n\t\t$this->load->model('pais_model');\n\t\t$datos['body']['paises'] = $this->pais_model-> getAll($filtro=\"\");\n\t\t\n\t\tenmarcar($this, 'autor/crear', $datos);\n\t}", "public function create()\n {\n // \n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function inserir_anuncio(){\n if(!isset($_SESSION))session_start();\n\n $cliente = unserialize($_SESSION['cliente']);\n\n $id_veiculo = $_POST['cb_veiculos'];\n $data_inicial = $_POST['data_inicial'];\n $data_final = $_POST['data_final'];\n $hora_inicial = $_POST['hora_inicial'];\n $hora_final = $_POST['hora_final'];\n $descricao = $_POST['descricao'];\n $valor_hora = $_POST['valor_hora'];\n $id_cliente = $cliente->getId();\n\n $anuncio = new Anuncio();\n $anuncio->setDescricao($descricao)\n ->setIdClienteLocador($id_cliente)\n ->setIdVeiculo($id_veiculo)\n ->setHorarioInicio($hora_inicial)\n ->setHorarioTermino($hora_final)\n ->setDataInicial($data_inicial)\n ->setDataFinal($data_final)\n ->setValor($valor_hora);\n\n\n $this->anunciosDAO->insert($anuncio);\n\n }", "public function creaCliente()\n {\n $id=null; // id del cliente, esto es lo que se debe guardar en la DB\n $this->cliente = $this->pasarela->customer()->create([\n 'firstName' => 'Mike',\n 'lastName' => 'Jones', \n 'company' => 'Jones Co.',\n 'email' => 'mike.jones@example.com',\n 'phone' => '281.330.8004',\n 'fax' => '419.555.1235',\n 'website' => 'http://example.com'\n ]);\n $this->cliente=$this->cliente->customer->id; // asi es como se obtiene el id del cliente\n // se guarda en la DB\n $c=new Cliente();\n $c->token=$this->cliente;\n $c->save();\n }", "public function createAction() {\n $model = new Application_Model_Compromisso();\n //persisto os dados no banco\n $model->insert($this->_getAllParams());\n //redireciono para o index\n $this->_redirect('compromisso/index');\n }", "function setInstancia($tabla){\r\n\t\t//DB_DataObject::debugLevel(1);\r\n\t\t//Crea una nueva instancia de $tabla a partir de DataObject\r\n\t\t$objDBO = DB_DataObject::Factory($tabla);\r\n\t\t\r\n\t\t$campos = $objDBO->table();\r\n\t\tunset($campos[\"id\"]);\r\n\t\tunset($campos[\"fecha\"]);\r\n\t\t\r\n\t\t//Asigna los valores\r\n\t\tforeach($campos as $key => $value){\r\n\t\t\t$objDBO->$key = utf8_decode($this->$key);\r\n\t\t}\r\n\t\t$objDBO->fecha = date(\"Y-m-d H:i:s\");\r\n\t\t$objDBO->find();\r\n\t\tif($objDBO->fetch()){\r\n\t\t\t$ret = $objDBO->id;\r\n\t\t}else{\r\n\t\t\t$ret = $objDBO->insert();\r\n\t\t}\r\n\t\t\r\n\t\t//Libera el objeto DBO\r\n\t\t$objDBO->free();\r\n\t\t\r\n\r\n\t\treturn ($ret);\r\n\t}", "public function create()\n {\n //\n }", "public function create()\n {\n //remove this\n }", "public function actionCreate() {\n $model = new Recetastbl();\n $items = ArrayHelper::map(\\app\\models\\Usuariostbl::find()->all(), 'id', 'username');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //Importante, verificar primero si la receta tienen ingredientes o no.\n if (Yii::$app->request->post('cantidad') && Yii::$app->request->post('unidad') ) \n {\n //la receta recibida, tiene ingredientes.\n \n //Se reciben los 3 arreglos enviados atraves de post\n $ingredientes = Yii::$app->request->post('ingrediente');\n $cantidades = Yii::$app->request->post('cantidad');\n $unidades = Yii::$app->request->post('unidad');\n\n //Al momento de hacer $model->save, el model contendra la ID AutoIncrementable asignada por la BD\n $index = 0; //contador usado para recorrer ciertos elementos de los arreglos\n //se corren todos los elementos correspondientes a los ingredientes\n foreach ($cantidades as $cantidad) {\n //para la lista de ingredientes inicia en 1 y no 0\n //se crea una nueva variable que guardara el nuevo ingrediente\n $ingredienteModel = new \\app\\models\\Recetasproducto();\n //se asocia a la receta usando la id\n $ingredienteModel->recetastbl_id = $model->id;\n //se asocia el producto (ingrediente) usando su id\n $ingredienteModel->productostbl_id = $ingredientes[$index + 1];\n //se agrega la cantidad\n $ingredienteModel->cantidad = $cantidad;\n //se agrega la unidad de medida\n $ingredienteModel->unidad = $unidades[$index];\n\n //se guarda el ingrediente en la BD\n $ingredienteModel->save();\n $index++;\n }\n }\n //Mensaje de exito, que se recupera en el index de Recetastbl o el view\n Yii::$app->getSession()->setFlash('success', 'Receta creada con exito.');\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'items' => $items\n ]);\n }\n }", "public function crear_banco(){\n $data = array(\n 'nombre_cuenta' => $this->input->post('nombre_cuenta'),\n 'numero_cuenta' => $this->input->post('numero_cuenta'),\n 'descripcion' => $this->input->post('descripcion'),\n 'saldo_inicial' => $this->input->post('saldo_inicial'),\n 'fecha_creacion' => date('Y-m-d'),\n 'fecha_actualizacion' => date('Y-m-d'),\n 'id_almacen' => $this->input->post('almacen'),\n 'id_usuario' => $this->session->userdata('user_id')\n );\n\n $this->connection->insert(\"bancos\",$data);\n }", "public function create()\n {\n\t\t\n }", "function newEpreuve(){\n $epreuve = $this->newEnregistrement();\n return $epreuve;\n }", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }" ]
[ "0.67760235", "0.61120224", "0.60289013", "0.6004873", "0.59366465", "0.59317005", "0.59030885", "0.58979", "0.5875974", "0.58625627", "0.58566135", "0.5826147", "0.57998955", "0.5746612", "0.57272404", "0.5716275", "0.5716275", "0.5716275", "0.5716275", "0.57014287", "0.56994885", "0.5684413", "0.5683829", "0.5662636", "0.5658442", "0.5619555", "0.56076455", "0.56076455", "0.5595173", "0.5586075", "0.5576831", "0.5574577", "0.5573791", "0.5561281", "0.5560448", "0.5559772", "0.5557365", "0.5542261", "0.5541068", "0.55402225", "0.5538386", "0.55378366", "0.5534538", "0.5532761", "0.5529627", "0.5513434", "0.55101776", "0.55070615", "0.54984033", "0.54979295", "0.5495762", "0.5494402", "0.5492271", "0.54868776", "0.5486371", "0.5486332", "0.54832405", "0.5478471", "0.54784614", "0.5477614", "0.54756844", "0.54720104", "0.5472004", "0.54658854", "0.5462422", "0.54568696", "0.5450884", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.54431844", "0.5441272", "0.5435981", "0.5434755", "0.54340243", "0.5429819", "0.5428148", "0.542783", "0.5425374", "0.54248786", "0.5424098", "0.5419405" ]
0.0
-1
donne le nom du driver
protected function getDriver(): string { return $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getDriverName()\n {\n }", "public function getDriverName(): string;", "function getDriver($name = null);", "final public function getDriverName(): string\n {\n return $this->driver;\n }", "public function driver($name = null);", "protected function getDriver() {}", "abstract protected function getDriver();", "public function getDriverName()\n {\n return $this->driverName;\n }", "public function getDriverName()\n {\n return $this->getConfig('driver');\n }", "public function getDriverName() {\n return $this->driverName;\n }", "public function getDriverName()\n {\n return isset($this->driverName) ? $this->driverName : null;\n }", "abstract public function getDefaultDriver();", "public function getDriverName()\n\t{\n\t\treturn $this->neoeloquent->getDriverName();\n\t}", "public function getDefaultDriver()\n {\n \treturn 'default';\n }", "public function driver()\n {\n return strtolower($this->driver);\n }", "public function getDriverName()\r\n {\r\n $reflect = new \\ReflectionClass($this);\r\n $namespace = $reflect->getNamespaceName();\r\n\r\n return substr(strrchr($namespace, \"\\\\\"), 1);\r\n }", "public static function driver($name = null)\n {\n }", "Public Function getDriver() { Return $this->driver; }", "public function getDriverIdentifier()\n {\n return $this->driver;\n }", "public static function getDriverClass(): string\n {\n return static::$sDriverClass;\n }", "public function driver();", "public function getDriverName() {\n return $this->pdoObj->getAttribute( \\PDO::ATTR_DRIVER_NAME );\n }", "public function getDriver() {\n return $this->_driver;\n }", "public function getDriver() {\n return $this->_driver;\n }", "public function getDriverName()\n {\n return $this->pdo->getAttribute ( \\PDO::ATTR_DRIVER_NAME );\n }", "public function getDriver()\n\t{\n\t\treturn $this->driver;\n\t}", "function get_driver_class_name()\n {\n return get_called_class();\n }", "public function getdriver()\n {\n return $this->driver;\n }", "public function getDefaultDriver()\n {\n return 'default';\n }", "public function getDriverType() {}", "public function getDriver()\n {\n return $this->driver;\n }", "public static function getDefaultDriver()\n {\n }", "public function get_driver()\n\t{\n\t\treturn $this->driver;\n\t}", "public function getDriver()\n {\n return $this->_driver;\n }", "public function getDriver()\n {\n return $this->_driver;\n }", "public function getDriverName()\n {\n return $this->db->get_dbfamily();\n }", "public function driver($driver = null);", "public function driver($driver = null);", "public function driver($driver = null);", "private function getNewDriver()\n {\n return 'file';\n }", "public function driver()\n {\n return $this->driver;\n }", "function sql_driver() {\n\t$sql = sql_connect();\n\treturn $sql->getAttribute(PDO::ATTR_DRIVER_NAME);\n}", "private static function _dbDriver(): string\n {\n $db = Craft::$app->getDb();\n\n if ($db->getIsMysql()) {\n $driverName = 'MySQL';\n } else {\n $driverName = 'PostgreSQL';\n }\n\n return $driverName . ' ' . App::normalizeVersion($db->getSchema()->getServerVersion());\n }", "public function getDriver()\n {\n return $this->_list->getDriver();\n }", "public function getDriver()\n {\n return $this->config['driver'];\n }", "public static function setDefaultDriver($name)\n {\n }", "public function getDefaultDriver(): string\n {\n return $this->app['config'][$this->driverKey()];\n }", "public function getDriver($name = '')\n {\n return $this->getWordpress()->getDriver($name);\n }", "private static function _imageDriver(): string\n {\n $imagesService = Craft::$app->getImages();\n\n if ($imagesService->getIsGd()) {\n $driverName = 'GD';\n } else {\n $driverName = 'Imagick';\n }\n\n return $driverName . ' ' . $imagesService->getVersion();\n }", "function getAdapterName();", "public function getTranslationDriver()\n {\n return \\XLite\\Core\\Translation::getInstance()->getDriver()->getName();\n }", "public function makeDriver() : AbstractDriver;", "function strGetDriverType() {\n return $this->strDriverType;\n }", "public function getDriver(?string $name = null): DriverInterface;", "public function getDefaultDriver()\n {\n return null;\n }", "public function driver(): ?string\n {\n return $this->driver;\n }", "public function getDriverNames(): array;", "public function getDefaultDriver(): string\n {\n return $this->config('version');\n }", "public function getDefaultDriver()\n {\n return static::$oDefaultDriver;\n }", "function setDriver($name) {\n\t\t$driver = $this->driversPath.$name.\".php\";\n\t\ttry {\n\t\t\tif( ! file_exists($driver) ) throw new Exception(\"Selected file is not a driver!\");\n\t\t\tinclude($driver);\n\t\t\t$drv = new $name();\n\t\t\tif( ! is_a($drv, 'Driver') ) throw new InvalidArgumentException(\"Drivers should extend Driver class\");\n\t\t} catch (Exception $e) {\n\t\t\t$this->toast = $e->getMessage();\n\t\t\treturn false;\n\t\t}\n $this->driver = $drv;\n\t\t$this->driver->cr = $this;\n\t\treturn true;\n\t}", "public function getDefaultDriver()\n {\n return $this->app['config']['instruments.driver'];\n }", "final public function getDriver() {\n return $this->driver;\n }", "function model()\n {\n return Driver::class;\n }", "protected function getSelectedDbalDriver() {}", "public function driver()\n {\n return $this->makeDriversFactory($this->makeConfig())->make();\n }", "public function getDriver(): ?string\n {\n \\Logger::getLogger(\\get_class($this))\n ->info(\\sprintf(\n __METHOD__ . \" get '%s'\",\n $this->driver === null\n ? \"null\"\n : $this->driver\n ));\n return $this->driver;\n }", "public static function availableDrivers()\n {\n }", "public function getDefaultDriver()\n {\n $driver = $this->config[self::$packageName.'::driver'];\n return $driver;\n }", "public function getDriverName()\n {\n return 'couchbase';\n }", "protected function getBestDriver()\n\t{\n\t\treturn $this->getChild('LazyDataMapper\\Tests\\Driver', 5);\n\t}", "public function get_driver($driver_name) {\n\n\n\n\t\tif (isset($this->drivers[$driver_name])) {\n\n\t\t\t// var_dump($this->drivers[$driver_name]['path'], file_exists($this->drivers[$driver_name]['path']));\n\t\t\t// die();\n\n\t\t\trequire_once $this->drivers[$driver_name]['path'];\n\n\n\n\t\t\t$driver = new $this->drivers[$driver_name]['class'];\n\t\t\t$driver->name = $driver_name;\n\n\t\t\treturn $driver;\n\n\t\t}\n\n\t}", "function dbName()\n{\n\treturn $this->drv->dbName();\n}", "public function getDriver()\r\n\t{\r\n\t\treturn $this->dbDriver;\r\n\t}", "public static function supportedDrivers()\n {\n }", "function driverlist_show($type, $iam){\n echo(\"<h4><img src='images/asterisk_orange.png' alt=''/> <strong>ODBC Drivers Configuration:</strong></h4>\");\n echo (\"<h5><i>This feature allows you to add/enable a database driver which you can use with the ODBC API. You must make sure that this driver lib (.so file) is already installed on your server and can be used to communicate with UnixODBC.</i></h5>\");\n echo(\"<img src='images/add.png' alt=''/>\");\n echo \"<i><a id='\".($sel==''?'current':'std').\"' \";\n echo \"href='config.php?type={$type}&amp;display={$iam}&amp;action=driveradd'>\"._(\" Add Your New Custom Driver\").\"</a></i>\";\n //echo (\"</br>\");\n echo\"</br>\n <table border = 1>\n <tr>\n <th align='center'>Name</th>\n <th>Driver</th>\n <th align='center'>Enabled</th>\n <th align='center'>Notice</th>\n </tr>\";\n\n //get the list of paging groups\n $driverlist = odbcdriver_list();\n if ($driverlist) {\n foreach ($driverlist as $driver) {\n $display = true;\n if ($driver[1] == 'PostgreSQL' || $driver[1] == 'MySQL' || $driver[1] == 'MSSQL'){\n $display = find_odbcdriver($driver[1]);\n }\n\n if ($display) {\n $note = \"\";\n if (file_exists(\"\".\"${driver[2]}\") == false) {\n $note = 'Driver file does not exist!';}\n echo \"<tr><td align='left'><a id=\\\"\".($sel==$driver[0] ? 'current':'std');\n echo \"\\\" href=\\\"config.php?type=${type}&amp;display=\";\n echo \"${iam}&amp;ext=${driver[0]}&amp;action=driveredit\\\"><strong><u><i>\";\n echo \"${driver[1]}\";\n echo\"</i></u></strong></a></td>\";\n echo\"<td>${driver[2]}</td>\";\n echo\"<td align='center'>${driver[3]}</td>\";\n echo\"<td>$note</td>\";\n }\n }\n }\n echo\"</table>\";\n //echo \"<h5>Notices:</h5>\";\n echo \"<ul><li>You can click on a driver's name to edit its options.</li><li>Make sure the driver is enabled (enabled = yes) so it can be use for a DSN.</li></ul>\";\n}", "function getdriverdetails()\n{\n\t//returns the details of the driver\n\t$sql=\"select * from driver_detail where status=0 order by rand() limit 1\";\n\tforeach($GLOBALS['db']->query($sql) as $row);\n\tif(isset($row))\n\t\treturn $row;\n}", "public function show(Driver $driver)\n {\n //\n }", "public function getDefaultDriver()\n {\n return $this->app['config']['option.default'];\n }", "public function setDefaultDriver($name)\n {\n $this->app['config']->set(self::$packageName.'::driver', $name);\n }", "public function set_driver($driver)\n {\n $this->_driver = $driver;\n }", "public function getDefaultDriverClass()\n {\n $oDriver = $this->getDefaultDriver();\n $sDriverNamespace = ArrayHelper::get('namespace', (array) $oDriver->data);\n $sDriverClass = ArrayHelper::get('class', (array) $oDriver->data);\n return $sDriverNamespace . $sDriverClass;\n }", "public function getConnectionName();", "public function getConnectionName();", "public function getConnectionName();", "public function driver($provider = null);", "public function driver($driver = null)\n {\n return parent::driver($this->getDefaultDriver());\n }", "public function setDefaultDriver($name)\n {\n $this->app['config']['staff_session.driver'] = $name;\n }", "public function getDriver(array $params = null)\n {\n return $this->driver;\n }", "public function show(driver $driver)\n {\n //\n }", "public function show(driver $driver)\n {\n //\n }", "public function driver($name = null)\n {\n $name = $name ?: $this->getDefaultDriver();\n\n return $this->drivers[$name] = $this->get($name);\n }", "public function getDefaultDriver()\n\t{\n\t\treturn $this->royalcms['config']['filesystems.default'];\n\t}", "protected function getDefaultDriver()\r\n\t{\r\n\t\treturn $this->royalcms['config']['filesystems.default'];\r\n\t}", "public function getDefaultDriver()\n {\n return $this->app['config']['staff_session.driver'];\n }", "protected static function getAvailableDriver()\n {\n $serverDiagnostic = new ServerDiagnostic();\n $candidates = [\n [\n \"name\" => \"gd\",\n \"type\" => \"extension\",\n ],\n [\n \"name\" => \"imagick\",\n \"type\" => \"extension\",\n ],\n ];\n $diagnostic = $serverDiagnostic->checkRequirements($candidates);\n\n if ($diagnostic[\"imagick\"][\"passed\"]) {\n return \"imagick\";\n } else if ($diagnostic[\"gd\"][\"passed\"]) {\n return \"gd\";\n }\n\n // Return gd by default\n return \"gd\";\n }", "public function getDefaultDriver()\n {\n throw new InvalidArgumentException('No wechatpay driver was specified.');\n }", "public static function load_driver(){\n\t\t\n\t\t$config = Config::read();\t\n\t\tif(isset($config->database->type)){\n\t\t\ttry {\t\t\t\t\n\t\t\t\tif($config->database->type){\t\t\t\t\t\n\t\t\t\t\t$config->database->type = escapeshellcmd($config->database->type);\n\t\t\t\t\trequire \"forms/db/adapters/\".$config->database->type.\".php\";\n\t\t\t\t\treturn true;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} \n\t\t\tcatch(kumbiaException $e){\n\t\t\t\t$e->show_message();\n\t\t\t}\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function getDefaultDriver()\n\t{\n\t\treturn $this->app['config']['nova-dynamic-lang.sections.default'];\n\t}", "function autoDriver() {\n\n $driver = \"files\";\n\n if(extension_loaded('apc') && ini_get('apc.enabled') && strpos(PHP_SAPI,\"CGI\") === false)\n {\n $driver = \"apc\";\n }elseif(extension_loaded('pdo_sqlite') && is_writeable($this->getPath())) {\n $driver = \"sqlite\";\n }elseif(is_writeable($this->getPath())) {\n $driver = \"files\";\n }else if(class_exists(\"memcached\")) {\n $driver = \"memcached\";\n }elseif(extension_loaded('wincache') && function_exists(\"wincache_ucache_set\")) {\n $driver = \"wincache\";\n }elseif(extension_loaded('xcache') && function_exists(\"xcache_get\")) {\n $driver = \"xcache\";\n }else if(function_exists(\"memcache_connect\")) {\n $driver = \"memcache\";\n }else {\n $path = dirname(__FILE__).DIRECTORY_SEPARATOR.\"drivers\";\n $dir = opendir($path);\n while($file = readdir($dir)) {\n if($file!=\".\" && $file!=\"..\" && strpos($file,\".php\") !== false) {\n $namex = str_replace(\".php\",\"\",$file);\n $class = \"phpfastcache_\".$namex;\n $option = $this->option;\n $option['skipError'] = true;\n $driver = new $class($option);\n $driver->option = $option;\n if($driver->checkdriver()) {\n $driver = $namex;\n }\n }\n }\n }\n\n return $driver;\n }", "public function getName()\n {\n return php_uname('s');\n }" ]
[ "0.83211637", "0.80917203", "0.7945755", "0.77755094", "0.7648272", "0.7643283", "0.76142627", "0.7589426", "0.7474596", "0.7386407", "0.7340963", "0.73209834", "0.72974336", "0.72418374", "0.7232473", "0.7199621", "0.71601415", "0.7134186", "0.70024645", "0.7002381", "0.69941413", "0.69891465", "0.6975659", "0.6975659", "0.69703996", "0.69450605", "0.69276786", "0.6916066", "0.69147474", "0.68961996", "0.6877958", "0.6858004", "0.68367183", "0.6822669", "0.6822669", "0.67813474", "0.6764018", "0.6764018", "0.6764018", "0.67544425", "0.6747061", "0.67175436", "0.66780084", "0.6632472", "0.66175145", "0.66164815", "0.65972173", "0.6557201", "0.65380305", "0.6536286", "0.6510118", "0.6509324", "0.6479197", "0.64484257", "0.64443696", "0.6442962", "0.64397347", "0.6424944", "0.64110833", "0.6404393", "0.6361521", "0.63296914", "0.6325578", "0.6317814", "0.6271786", "0.6262145", "0.62301576", "0.6225897", "0.62218934", "0.61896455", "0.6179945", "0.61794806", "0.6161218", "0.6123212", "0.60884154", "0.6086166", "0.60847527", "0.60834396", "0.6068714", "0.6046687", "0.6029675", "0.60233855", "0.60233855", "0.60233855", "0.6023055", "0.60223407", "0.6008542", "0.5986912", "0.5974365", "0.5974365", "0.595324", "0.595135", "0.5950296", "0.593496", "0.5928811", "0.5921033", "0.5914735", "0.59139884", "0.5910017", "0.5909625" ]
0.68005615
35
corrige l'encodage d'une chaine
private function corrigeInputEncoding($string) { if (!is_string($string)) { return $string; } $encodageSupporte = []; $encodageSupporte[] = "UTF-8"; $encodageSupporte[] = "CP1252"; $encodageSupporte[] = "ISO-8859-15"; $encodageSupporte[] = "ISO-8859-1"; $encodageSupporte[] = "ASCII"; $encodageDetecte = mb_detect_encoding($string, $encodageSupporte, true); if ($encodageDetecte != $this->pdoCharset) { return mb_convert_encoding( $string, $this->pdoCharset, $encodageDetecte ); } return $string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function a_mayusculas($cadena)\n{\n $cadena = strtr(strtoupper($cadena), 'àèìòùáéíóúçñäëïöü', 'ÀÈÌÒÙÁÉÍÓÚÇÑÄËÏÖÜ');\n\n return $cadena;\n}", "function convMajuscule($valeur){\r\n if($valeur>=\"a\" && $valeur<=\"z\"){\r\n $codeValeur = ord($valeur) - 32;\r\n }\r\n return chr($codeValeur);\r\n }", "function UTF2ASCII($code) {\n $UTFchars = array ( //code point UTF8 character name\n '/À/' => 'A', // U+00C0 c3 80 Latin capital letter A with grave\n '/Á/' => 'A', // U+00C1 c3 81 Latin capital letter A with acute\n '/Â/' => 'A', // U+00C2 c3 82 Latin capital letter A with circumflex\n '/Ã/' => 'A', // U+00C3 c3 83 Latin capital letter A with tilde\n '/Ä/' => 'A', // U+00C4 c3 84 Latin capital letter A with diaeresis\n '/Å/' => 'A', // U+00C5 c3 85 Latin capital letter A with ring above\n '/Æ/' => 'AE', // U+00C6 c3 86 Latin capital letter AE\n '/Č/' => 'C', // U+010C c4 8c Latin capital letter C with caron\n '/Ç/' => 'C', // U+00C7 c3 87 Latin capital letter C with cedilla\n '/È/' => 'E', // U+00C8 c3 88 Latin capital letter E with grave\n '/É/' => 'E', // U+00C9 c3 89 Latin capital letter E with acute\n '/Ê/' => 'E', // U+00CA c3 8a Latin capital letter E with circumflex\n '/Ë/' => 'E', // U+00CB c3 8b Latin capital letter E with diaeresis\n '/Ì/' => 'I', // U+00CC c3 8c Latin capital letter I with grave\n '/Í/' => 'I', // U+00CD c3 8d Latin capital letter I with acute\n '/Î/' => 'I', // U+00CE c3 8e Latin capital letter I with circumflex\n '/Ï/' => 'I', // U+00CF c3 8f Latin capital letter I with diaeresis\n '/Ł/' => 'L', // U+0141 c5 81 Latin capital letter L with stroke\n '/Ñ/' => 'N', // U+00D1 c3 91 Latin capital letter N with tilde\n '/Ò/' => 'O', // U+00D2 c3 92 Latin capital letter O with grave\n '/Ó/' => 'O', // U+00D3 c3 93 Latin capital letter O with acute\n '/Ô/' => 'O', // U+00D4 c3 94 Latin capital letter O with circumflex\n '/Õ/' => 'O', // U+00D5 c3 95 Latin capital letter O with tilde\n '/Ö/' => 'O', // U+00D6 c3 96 Latin capital letter O with diaeresis\n '/Ø/' => 'O', // U+00D8 c3 98 Latin capital letter O with stroke\n '/Ù/' => 'U', // U+00D9 c3 99 Latin capital letter U with grave\n '/Ú/' => 'U', // U+00DA c3 9a Latin capital letter U with acute\n '/Û/' => 'U', // U+00DB c3 9b Latin capital letter U with circumflex\n '/Ü/' => 'U', // U+00DC c3 9c Latin capital letter U with diaeresis\n '/Ř/' => 'R', // U+0158 c5 98 Latin capital letter R with caron\n '/Š/' => 'S', // U+0160 c5 a0 Latin capital letter S with caron\n '/Ý/' => 'Y', // U+00DD c3 9d Latin capital letter Y with acute\n '/Ỳ/' => 'Y', // U+1EF2 e1 bb b2 Latin capital letter Y with grave\n '/Ž/' => 'Z', // U+017D c5 bd Latin capital letter Z with caron\n '/Ż/' => 'Z', // U+017B c5 bb Latin capital letter Z with dot above\n '/à/' => 'a', // U+00E0 c3 a0 Latin small letter a with grave\n '/á/' => 'a', // U+00E1 c3 a1 Latin small letter a with acute\n '/â/' => 'a', // U+00E2 c3 a2 Latin small letter a with circumflex\n '/ã/' => 'a', // U+00E3 c3 a3 Latin small letter a with tilde\n '/ä/' => 'a', // U+00E4 c3 a4 Latin small letter a with diaeresis\n '/å/' => 'a', // U+00E5 c3 a5 Latin small letter a with ring above\n '/æ/' => 'ae', // U+00E6 c3 a6 Latin small letter ae\n '/č/' => 'c', // U+010D c4 8d Latin small letter c with caron\n '/ç/' => 'c', // U+00E7 c3 a7 Latin small letter c with cedilla\n '/è/' => 'e', // U+00E8 c3 a8 Latin small letter e with grave\n '/é/' => 'e', // U+00E9 c3 a9 Latin small letter e with acute\n '/ê/' => 'e', // U+00EA c3 aa Latin small letter e with circumflex\n '/ë/' => 'e', // U+00EB c3 ab Latin small letter e with diaeresis\n '/ì/' => 'i', // U+00EC c3 ac Latin small letter i with grave\n '/í/' => 'i', // U+00ED c3 ad Latin small letter i with acute\n '/î/' => 'i', // U+00EE c3 ae Latin small letter i with circumflex\n '/ï/' => 'i', // U+00EF c3 af Latin small letter i with diaeresis\n '/ł/' => 'l', // U+0142 c5 82 Latin small letter l with stroke\n '/ñ/' => 'n', // U+00F1 c3 b1 Latin small letter n with tilde\n '/ò/' => 'o', // U+00F2 c3 b2 Latin small letter o with grave\n '/ó/' => 'o', // U+00F3 c3 b3 Latin small letter o with acute\n '/ô/' => 'o', // U+00F4 c3 b4 Latin small letter o with circumflex\n '/õ/' => 'o', // U+00F5 c3 b5 Latin small letter o with tilde\n '/ö/' => 'o', // U+00F6 c3 b6 Latin small letter o with diaeresis\n '/ø/' => 'o', // U+00F8 c3 b8 Latin small letter O with stroke\n '/ù/' => 'u', // U+00F9 c3 b9 Latin small letter u with grave\n '/ú/' => 'u', // U+00FA c3 ba Latin small letter u with acute\n '/û/' => 'u', // U+00FB c3 bb Latin small letter u with circumflex\n '/ü/' => 'u', // U+00FC c3 bc Latin small letter u with diaeresis\n '/ř/' => 'r', // U+0159 c5 99 Latin small letter r with caron\n '/š/' => 's', // U+0161 c5 a1 latin small letter s with caron\n '/ÿ/' => 'y', // U+00FF c3 bf Latin small letter y with diaeresis\n '/ý/' => 'y', // U+00FD c3 bd Latin small letter y with acute\n '/ỳ/' => 'y', // U+1EF3 e1 bb b3 Latin small letter y with acute\n '/ž/' => 'z', // U+017E c5 be Latin small letter z with caron\n '/ż/' => 'z' // U+017C c5 bc Latin small letter z with dot above\n );\n\n $code = preg_replace(array_keys($UTFchars), array_values($UTFchars), $code);\n return $code;\n }", "static function Sustituto_Cadena($rb){\n $rb = str_replace(\"á\", \"&aacute;\", $rb);\n $rb = str_replace(\"é\", \"&eacute;\", $rb);\n $rb = str_replace(\"®\", \"&reg;\", $rb);\n $rb = str_replace(\"í\", \"&iacute;\", $rb);\n $rb = str_replace(\"�\", \"&iacute;\", $rb);\n $rb = str_replace(\"ó\", \"&oacute;\", $rb);\n $rb = str_replace(\"ú\", \"&uacute;\", $rb);\n $rb = str_replace(\"n~\", \"&ntilde;\", $rb);\n $rb = str_replace(\"º\", \"&ordm;\", $rb);\n $rb = str_replace(\"ª\", \"&ordf;\", $rb);\n $rb = str_replace(\"á\", \"&aacute;\", $rb);\n $rb = str_replace(\"ñ\", \"&ntilde;\", $rb);\n $rb = str_replace(\"Ñ\", \"&Ntilde;\", $rb);\n $rb = str_replace(\"ñ\", \"&ntilde;\", $rb);\n $rb = str_replace(\"n~\", \"&ntilde;\", $rb);\n $rb = str_replace(\"Ú\", \"&Uacute;\", $rb);\n return $rb;\n }", "function elimina_acentos($cadena){\n $tofind = \"ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ\";\n $replac = \"AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn\";\n return utf8_encode((strtr($cadena,utf8_decode($tofind),$replac)));\n }", "function __($cadena) {\n return idioma::traducir($cadena);\n}", "function chMajuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\"){\r\n $codeValeur = ord($valeur[$i]) - 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "function limpiar($cadena){\n\t\t$cadena=str_replace(\"_\",\" \",$cadena);//alt + 15\n\t\t$cadena=str_replace(\"|\",\"=\",$cadena);//alt + 10\n\t\treturn $cadena=str_replace(\"*\",\"'\",$cadena);//alt + 16\n\t}", "private function calculateBelfioreCode()\n {\n return strtoupper($this->subject->getBelfioreCode());\n }", "function convertir( $texte )\n\t{\n\n\t\t$tableau = array (\n\n\t\t\t'A' => '1',\n\t\t\t'B' => '2',\n\t\t\t'C' => '3',\n\t\t\t'D' => '4',\n\t\t\t'E' => '5',\n\t\t\t'F' => '6',\n\t\t\t'G' => '7',\n\t\t\t'H' => '8',\n\t\t\t'I' => '9',\n\t\t\t'J' => '10',\n\t\t\t'K' => '11',\n\t\t\t'L' => '12',\n\t\t\t'M' => '13',\n\t\t\t'N' => '14',\n\t\t\t'O' => '15',\n\t\t\t'P' => '16',\n\t\t\t'Q' => '17',\n\t\t\t'R' => '18',\n\t\t\t'S' => '19',\n\t\t\t'T' => '20',\n\t\t\t'U' => '21',\n\t\t\t'V' => '22',\n\t\t\t'W' => '23',\n\t\t\t'X' => '24',\n\t\t\t'Y' => '25',\n\t\t\t'Z' => '26',\n\n\t\t\t);\n\n\t\t$texte = strtr(\"$texte\", $tableau);\n\t\treturn $texte;\n\t}", "private function obtenerIdioma($idioma){\n\t\tif (strpos($idioma, \"Español Latino\") !== false) {\n\t\t\treturn \"ESPL\";\n\t\t} else if(strpos($idioma, \"Español Castellano\") !== false){\n\t\t\treturn \"ESP\";\n\t\t} else if(strpos($idioma, \"Ingles\") !== false){\n\t\t\treturn \"ENG\";\n\t\t} else if(strpos($idioma, \"VOSE\") !== false) {\n\t\t\treturn \"VOSE\";\t\n\t\t}\n\t\t\n\t\treturn \"-\";\n\t}", "public static function limpiaUrl($entra) {\n\t\t$traduce = array (\n\t\t\t\t'á' => 'a',\n\t\t\t\t'é' => 'e',\n\t\t\t\t'í' => 'i',\n\t\t\t\t'ó' => 'o',\n\t\t\t\t'ú' => 'u',\n\t\t\t\t'Á' => 'A',\n\t\t\t\t'É' => 'E',\n\t\t\t\t'Í' => 'I',\n\t\t\t\t'Ó' => 'O',\n\t\t\t\t'Ú' => 'U',\n\t\t\t\t'ñ' => 'n',\n\t\t\t\t'Ñ' => 'N',\n\t\t\t\t'ä' => 'a',\n\t\t\t\t'ë' => 'e',\n\t\t\t\t'ï' => 'i',\n\t\t\t\t'ö' => 'o',\n\t\t\t\t'ü' => 'u',\n\t\t\t\t'Ä' => 'A',\n\t\t\t\t'Ë' => 'E',\n\t\t\t\t'Ï' => 'I',\n\t\t\t\t'Ö' => 'O',\n\t\t\t\t'Ü' => 'U' \n\t\t);\n\t\t$sale = strtr ( $entra, $traduce );\n\t\t\n\t\t$texto = str_replace ( \" \", \"-\", $sale );\n\t\t\n $texto = strtolower($texto);\n \n\t\treturn $texto;\n\t}", "public static function ascii($value)\n\t{\n\t\t//$foreign = Config::get('strings.ascii');\n\t\t$foreign = array(\n\t\t'/æ|ǽ/' => 'ae',\n\t\t'/œ/' => 'oe',\n\t\t'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|А/' => 'A',\n\t\t'/à|á|â|ã|ä|å|ǻ|ā|ă|ą|ǎ|ª|а/' => 'a',\n\t\t'/Б/' => 'B',\n\t\t'/б/' => 'b',\n\t\t'/Ç|Ć|Ĉ|Ċ|Č|Ц/' => 'C',\n\t\t'/ç|ć|ĉ|ċ|č|ц/' => 'c',\n\t\t'/Ð|Ď|Đ|Д/' => 'Dj',\n\t\t'/ð|ď|đ|д/' => 'dj',\n\t\t'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Е|Ё|Э/' => 'E',\n\t\t'/è|é|ê|ë|ē|ĕ|ė|ę|ě|е|ё|э/' => 'e',\n\t\t'/Ф/' => 'F',\n\t\t'/ƒ|ф/' => 'f',\n\t\t'/Ĝ|Ğ|Ġ|Ģ|Г/' => 'G',\n\t\t'/ĝ|ğ|ġ|ģ|г/' => 'g',\n\t\t'/Ĥ|Ħ|Х/' => 'H',\n\t\t'/ĥ|ħ|х/' => 'h',\n\t\t'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|И/' => 'I',\n\t\t'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|и/' => 'i',\n\t\t'/Ĵ|Й/' => 'J',\n\t\t'/ĵ|й/' => 'j',\n\t\t'/Ķ|К/' => 'K',\n\t\t'/ķ|к/' => 'k',\n\t\t'/Ĺ|Ļ|Ľ|Ŀ|Ł|Л/' => 'L',\n\t\t'/ĺ|ļ|ľ|ŀ|ł|л/' => 'l',\n\t\t'/М/' => 'M',\n\t\t'/м/' => 'm',\n\t\t'/Ñ|Ń|Ņ|Ň|Н/' => 'N',\n\t\t'/ñ|ń|ņ|ň|ʼn|н/' => 'n',\n\t\t'/Ö|Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|О/' => 'O',\n\t\t'/ö|ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|о/' => 'o',\n\t\t'/П/' => 'P',\n\t\t'/п/' => 'p',\n\t\t'/Ŕ|Ŗ|Ř|Р/' => 'R',\n\t\t'/ŕ|ŗ|ř|р/' => 'r',\n\t\t'/Ś|Ŝ|Ş|Ș|Š|С/' => 'S',\n\t\t'/ś|ŝ|ş|ș|š|ſ|с/' => 's',\n\t\t'/Ţ|Ț|Ť|Ŧ|Т/' => 'T',\n\t\t'/ţ|ț|ť|ŧ|т/' => 't',\n\t\t'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ü|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|У/' => 'U',\n\t\t'/ù|ú|û|ũ|ū|ŭ|ů|ü|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|у/' => 'u',\n\t\t'/В/' => 'V',\n\t\t'/в/' => 'v',\n\t\t'/Ý|Ÿ|Ŷ|Ы/' => 'Y',\n\t\t'/ý|ÿ|ŷ|ы/' => 'y',\n\t\t'/Ŵ/' => 'W',\n\t\t'/ŵ/' => 'w',\n\t\t'/Ź|Ż|Ž|З/' => 'Z',\n\t\t'/ź|ż|ž|з/' => 'z',\n\t\t'/Æ|Ǽ/' => 'AE',\n\t\t'/ß/'=> 'ss',\n\t\t'/IJ/' => 'IJ',\n\t\t'/ij/' => 'ij',\n\t\t'/Œ/' => 'OE',\n\t\t'/Ч/' => 'Ch',\n\t\t'/ч/' => 'ch',\n\t\t'/Ю/' => 'Ju',\n\t\t'/ю/' => 'ju',\n\t\t'/Я/' => 'Ja',\n\t\t'/я/' => 'ja',\n\t\t'/Ш/' => 'Sh',\n\t\t'/ш/' => 'sh',\n\t\t'/Щ/' => 'Shch',\n\t\t'/щ/' => 'shch',\n\t\t'/Ж/' => 'Zh',\n\t\t'/ж/' => 'zh'\n\t\t);\n\n\t\t$value = preg_replace(array_keys($foreign), array_values($foreign), $value);\n\n\t\treturn preg_replace('/[^\\x09\\x0A\\x0D\\x20-\\x7E]/', '', $value);\n\t}", "function utf8_code($c) {\n return 'U+' . sprintf('%04X', utf8_ord($c));\n}", "abstract public function getLocaleCode();", "function convMinuscule($valeur){\r\n if($valeur>=\"A\" && $valeur<=\"Z\"){\r\n $codeValeur = ord($valeur) + 32;\r\n }\r\n return chr($codeValeur);\r\n }", "function encode($name){\n\t\treturn $name->toUTF8();\n\t}", "function cambiaLetras($string){\n\t\n\t$arrayBusqueda = array(\"Á\",\"É\",\"Í\",\"Ó\",\"Ú\", \"Ñ\");\n\t$arrayReemplazo = array(\"á\",\"é\",\"í\",\"ó\",\"ú\", \"ñ\");\n\t$caden = utf8_decode(str_replace($arrayBusqueda, $arrayReemplazo, utf8_encode($string)));\n\t\n\treturn ucwords(strtolower($caden));\n\t\n}", "function strcode($texto,$debug=false){\n\tif(!is_string($texto)) return 0;\n\t$c=0;\n\t$ascii=true;\n\tfor($i=0;$i<strlen($texto);$i++){\n\t\t$byte=ord($texto[$i]);\n\t\tif($debug) echo $texto[$i].'='.$byte.'<br/>';\n\t\tif($c>0){\n\t\t\tif(($byte>>6)!=0x2){\n\t\t\t\treturn 3;#ISO_8859_1;\n\t\t\t}else{\n\t\t\t\t$c--;\n\t\t\t}\n\t\t}elseif($byte&0x80){\n\t\t\t$ascii=false;\n\t\t\tif(($byte>>5)==0x6){\n\t\t\t\t$c=1;\n\t\t\t}elseif(($byte>>4)==0xE){\n\t\t\t\t$c=2;\n\t\t\t}elseif(($byte>>3)==0x1E){\n\t\t\t\t$c=3;\n\t\t\t}else{\n\t\t\t\treturn 3;#ISO_8859_1;\n\t\t\t}\n\t\t}\n\t}\n\treturn ($ascii)?1:2;#ASCII:UTF_8;\n}", "function normalise_fichier($NomComplet){\n\t\t$valRetour = str_replace(\"'\",\"\",$NomComplet);\n\t\t$valRetour = str_replace(\" \",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"-\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\",\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"¦\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"/\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"+\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"=\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"!\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"?\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"œ\",\"oe\",$valRetour);\n\t\t$valRetour = str_replace(\"æ\",\"ae\",$valRetour);\n\t\t$valRetour = mb_convert_encoding($valRetour,\"iso-8859-1\",\"UTF-8\");\n\t\t$valRetour = strtolower($valRetour);\n\t\t$valRetour = vireAccents($valRetour);\n\t\treturn($valRetour);\n\t}", "function tep_an_zen_to_han($string) {\n return mb_convert_kana($string, \"a\");\n}", "public function veriCode() {}", "function encodeTuulo'Esse($text)\r\n\t{\r\n\t\t// Activate tanya following line manka antaed\r\n\t\t// $text = \"=?{$sina->charSet}?B?\".base64_encode($text).\"?=\";\r\n\t\treturn $text;\r\n\t}", "public static function translitStringToAscii($str) {\n $LATV=array(\"ā\",\"Ā\",\"č\",\"Č\",\"ē\",\"Ē\",\"ģ\",\"Ģ\",\"ī\",\"Ī\",\"ķ\",\"Ķ\",\"ļ\",\"Ļ\",\"ņ\",\"Ņ\",\"š\",\"Š\",\"ū\",\"Ū\",\"ž\",\"Ž\",\".\",'\"',\" \",\"-\",\"_\",\"/\"); //Latviešu garie un mīkste burti un neatļautie simboli\n $LATIN=array(\"a\",\"A\",\"c\",\"C\",\"e\",\"E\",\"g\",\"G\",\"i\",\"I\",\"k\",\"K\",\"l\",\"L\",\"n\",\"N\",\"s\",\"S\",\"u\",\"U\",\"z\",\"Z\",\"\",\"\",\" \",\"\",\" \",\" \"); //Latviešu mīksto un garo burtu un neatļauto simbolu aizstāēji\n return str_replace($LATV,$LATIN,$str); //Latviešu garos un mīkstos burtus aizstāj ar latīņu burtiem\n //$str = str_replace(array('й','ц','у','к','е','н','г','ш','щ','з','х','ъ','ф','ы','в','а','п','р','о','л','д','ж','э','я','ч','с','м','и','т','ь','б','ю','Й','Ц','У','К','Е','Н','Г','Ш','Щ','З','Х','Ъ','Ф','Ы','В','А','П','Р','О','Л','Д','Ж','Э','Я','Ч','С','М','И','Т','Ь','Б','Ю','Ā','Č','Ē','Ģ','Ī','Ķ','Ļ','Ņ','Š','Ū','Ž', 'ā','č','ē','ģ','ī','ķ','ļ','ņ','š','ū','ž'),array('A','C','E','G','I','K','L','N','S','U','Z','a','c','e','g','i','k','l','n','s','u','z','i','c','u','k','e','n','g','sh','sh','z','h','i','f','i','v','a','p','r','o','l','d','zh','e','ja','ch','s','m','i','t','','b','ju','I','C','U','K','E','N','G','SH','SH','Z','H','I','F','I','V','A','P','R','O','L','D','ZH','E','JA','CH','S','M','I','T','','B','JU','A','C','E','G','I','K','L','N','S','U','Z','a','c','e','g','i','k','l','n','s','u','z'),$str);\n\treturn $str;\n}", "function buenosDias(){\n return \"Hola! buenos días!!\".salto;\n}", "function uni2utf8($uniescape)\n\t{\n\t\t$c = \"\";\n\t\t\n\t\t$n = intval(substr($uniescape, -4), 16);\n\t\tif ($n < 0x7F) {// 0000-007F\n\t\t\t$c .= chr($n);\n\t\t} elseif ($n < 0x800) {// 0080-0800\n\t\t\t$c .= chr(0xC0 | ($n / 64));\n\t\t\t$c .= chr(0x80 | ($n % 64));\n\t\t} else {\t\t\t\t// 0800-FFFF\n\t\t\t$c .= chr(0xE0 | (($n / 64) / 64));\n\t\t\t$c .= chr(0x80 | (($n / 64) % 64));\n\t\t\t$c .= chr(0x80 | ($n % 64));\n\t\t}\n\t\treturn $c;\n\t}", "public function getAsciiReplace();", "function char_vigen_encode($a, $b)\r\n{\r\n\treturn char_rot(ord($b) - 65, $a);\r\n}", "function processName($name) {\n//\tUncomment the next two lines and change only ISO-8859-9 to your site encoding type\n\n//\t$name = iconv(\"UTF-8\", \"ISO-8859-1\", $name);\n//\t$name = iconv(\"ISO-8859-9\", \"UTF-8\", $name);\n\n\treturn $name;\n}", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "function fixKimi($name)\n\t{\n\t\t$name = str_replace(\"ä\", \"a\", $name);\n\t\t$name = str_replace(\"ö\", \"o\", $name);\t\n\t\treturn $name;\n\t}", "public static function ascii() {}", "protected function getCodeCaisse()\r\n {\r\n $table = $this->getDbManager()->get('Sbm\\Db\\System\\Libelles');\r\n return $table->getCode('Caisse', 'DFT');\r\n }", "function checkAndLatinize($txt)\n{\n $lang = getTransLang();\n switch($lang)\n {\n case 'hr': \n case 'bs':\n case 'sr1':\n $out = cir2lat($txt);\n break;\n default: $out = $txt;\n }\n return $out;\n}", "function translit($name)\r\n{\r\n $rus = array('а', 'б', 'в', 'г', 'д', 'е', 'ё', 'ж', 'з', 'и', 'й', 'к', 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', 'ъ', 'ы', 'ь', 'э', 'ю', 'я', ' ');\r\n $rusUp = array('А', 'Б', 'В', 'Г', 'Д', 'Е', 'Ё', 'Ж', 'З', 'И', 'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ъ', 'Ы', 'Ь', 'Э', 'Ю', 'Я', ' ');\r\n $lat = array('a', 'b', 'v', 'g', 'd', 'e', 'e', 'zh', 'z', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'h', 'c', 'ch', 'sh', 'sh', '', 'i', '', 'e', 'u', 'ya', '-');\r\n $characters = 'abcdefghijklmnopqrstuvwxyz1234567890-_';\r\n\r\n $res = str_replace($rus, $lat, trim($name));\r\n $res = str_replace($rusUp, $lat, $res);\r\n\r\n $return = '';\r\n\r\n for ($i = 0; $i < strlen($res); $i++) {\r\n $c = strtolower(substr($res, $i, 1));\r\n if (strpos($characters, $c) === false)\r\n $c = '';\r\n $return .= $c;\r\n }\r\n\r\n $r = $return;\r\n\r\n if (DEV)\r\n xlogc('translit', $r, $name);\r\n\r\n return $r;\r\n\r\n}", "function uniord($c)\n{\n// $k = mb_convert_encoding($c, 'UCS-2LE', 'UTF-8');\n// $k1 = ord(substr($k, 0, 1));\n// $k2 = ord(substr($k, 1, 1));\n// return $k2 * 256 + $k1;\n \n\t$h = ord($c[0]);\n\tif ($h <= 0x7F) {\n\t\treturn $h;\n\t} else if ($h < 0xC2) {\n\t\treturn false;\n\t} else if ($h <= 0xDF) {\n\t\treturn ($h & 0x1F) << 6 | (ord($c[1]) & 0x3F);\n\t} else if ($h <= 0xEF) {\n\t\treturn ($h & 0x0F) << 12 | (ord($c[1]) & 0x3F) << 6\n\t\t\t\t\t\t\t\t | (ord($c[2]) & 0x3F);\n\t} else if ($h <= 0xF4) {\n\t\treturn ($h & 0x0F) << 18 | (ord($c[1]) & 0x3F) << 12\n\t\t\t\t\t\t\t\t | (ord($c[2]) & 0x3F) << 6\n\t\t\t\t\t\t\t\t | (ord($c[3]) & 0x3F);\n\t} else {\n\t\treturn false;\n\t}\n}", "public static function limpiaUrl($entra) \n {\n # code...\n $traduce = array('á' => 'a', 'é' => 'e', 'í' => 'i', 'ó' => 'o', 'ú' => 'u', 'Á' => 'A', 'É' => 'E', 'Í' => 'I', 'Ó' => 'O', 'Ú' => 'U',\n 'ñ' => 'n', 'Ñ' => 'N',\n 'ä' => 'a', 'ë' => 'e', 'ï' => 'i', 'ö' => 'o', 'ü' => 'u', 'Ä' => 'A', 'Ë' => 'E', 'Ï' => 'I', 'Ö' => 'O', 'Ü' => 'U');\n $sale = strtr($entra, $traduce);\n\n $texto = str_replace(\" \", \"-\", $sale);\n\n return $texto;\n }", "function filter_ige($ige) {\r\n if (substr($ige, -2) === 'ik') {\r\n $ige = str_replace('ik','',$ige);\r\n }\r\n if (substr($ige,-2) === 'sz') {\r\n $ige = str_replace('z','',$a);\r\n }\r\n return $ige; \r\n }", "function quitar_tildes($cadena) {\r\n $no_permitidas = array (\"à\",\"á\",\"é\",\"í\",\"ó\",\"ú\",\"Á\",\"É\",\"Í\",\"Ó\",\"Ú\",\"À\",\"Ì\",\"Ò\",\"Ù\");\r\n $permitidas = array (\"a\",\"a\",\"e\",\"i\",\"o\",\"u\",\"A\",\"E\",\"I\",\"O\",\"U\",\"A\",\"I\",\"O\",\"U\");\r\n $texto = str_replace($no_permitidas, $permitidas ,$cadena);\r\n return $texto;\r\n }", "function crypter($maCleDeCryptage, $maChaineACrypter){\n\t\t$maCleDeCryptage = md5($maCleDeCryptage);\n\t\t$letter = -1;\n\t\t$newstr = '';\n\t\t$strlen = strlen($maChaineACrypter);\n\t\tfor($i = 0; $i < $strlen; $i++ ){\n\t\t\t$letter++;\n\t\t\tif ( $letter > 31 ){\n\t\t\t\t$letter = 0;\n\t\t\t}\n\t\t\t$neword = ord($maChaineACrypter{$i}) + ord($maCleDeCryptage{$letter});\n\t\t\tif ( $neword > 255 ){\n\t\t\t\t$neword -= 256;\n\t\t\t}\n\t\t\t$newstr .= chr($neword);\n\t\t}\n\t\treturn base64_encode($newstr);\n\t}", "public static function convertirAMinusculas($cadena) {\n\t\treturn strtolower($cadena);\n\t}", "function lang_encode_from_utf($strValue)\r\n{\r\n\tif(function_exists(\"iconv\"))\r\n\t\treturn iconv('UTF-8','Windows-1252',$strValue);\r\n\treturn $strValue;\r\n}", "public function codifica($senha)\n {\n $senha = addslashes($senha);\n $key = md5($senha);\n return $key;\n }", "function eliminar_acentos($cadena)\n {\n $cadena = str_replace(\n array('Á', 'À', 'Â', 'Ä', 'á', 'à', 'ä', 'â', 'ª'),\n array('A', 'A', 'A', 'A', 'a', 'a', 'a', 'a', 'a'),\n $cadena\n );\n\n //Reemplazamos la E y e\n $cadena = str_replace(\n array('É', 'È', 'Ê', 'Ë', 'é', 'è', 'ë', 'ê'),\n array('E', 'E', 'E', 'E', 'e', 'e', 'e', 'e'),\n $cadena );\n\n //Reemplazamos la I y i\n $cadena = str_replace(\n array('Í', 'Ì', 'Ï', 'Î', 'í', 'ì', 'ï', 'î'),\n array('I', 'I', 'I', 'I', 'i', 'i', 'i', 'i'),\n $cadena );\n\n //Reemplazamos la O y o\n $cadena = str_replace(\n array('Ó', 'Ò', 'Ö', 'Ô', 'ó', 'ò', 'ö', 'ô'),\n array('O', 'O', 'O', 'O', 'o', 'o', 'o', 'o'),\n $cadena );\n\n //Reemplazamos la U y u\n $cadena = str_replace(\n array('Ú', 'Ù', 'Û', 'Ü', 'ú', 'ù', 'ü', 'û'),\n array('U', 'U', 'U', 'U', 'u', 'u', 'u', 'u'),\n $cadena );\n\n //Reemplazamos la N, n, C y c\n $cadena = str_replace(\n array('Ñ', 'ñ', 'Ç', 'ç'),\n array('N', 'n', 'C', 'c'),\n $cadena\n );\n \n return $cadena;\n }", "function limpiarcadena($char)\n{\n\t$ban=0;//Bandera para saber si estan ejecutando una Inyeccion SQL\n\t$char_w_replaced = stripslashes($char);//Guardamos la Inyeccion original para informacion a la BD\n\t//Array con las palabras reservadas, para modificar a gusto :D\n\t$hack_array = array(\"'\", '\"', \";\", \"UNION\", \"union\", \"DROP\", \"drop\", \"table\", \"TABLE\", \"SET\", \"set\", \"UPDATE\", \"update\", \"SELECT\", \"select\", \"-\", \"--\", \"MEMB_INFO\", \"memb_info\", \"memb__pwd\", \"memb___id\"); //Caracter por el que será reemplazada cada palabra reservada del sitio\n\t$hack_replace = \"\"; //Separamos la cadena en un Array para poder hacer la comparacion y determinar si estan\n\t//ejecutando o no una Inyeccion SQL\n\t$char1=explode(\" \",$char);\n\tfor($i=0;$i<count($char1);$i++)\n\t{\n\t\tif(in_array($char1[$i],$hack_array))//si se quiere se puede convertir todo a mayusculas para la comprobacion.\n\t\t{\n\t \t\t$ban=1;\n\t\t}\n\t}\n\t\n\tif ($ban==1)\n\t{\n\t\t$add=\"ESTAS HACKEANDO SI SI\"; \t\n\t}\n\telse \n\t{\n\t\t$add=\"NO ESTAS HACKEANDO\"; \n\t\t//seguir con los procesos del POST o GET sin guardar ips ni nada\n\t} \n\t\n\t//reemplazamos las palabras reservadas\n\t$char_replaced = str_replace($hack_array, $hack_replace, $char);\n\t//evitamos codigos html y espacios en blanco\n\t$char_clean=htmlentities(trim($char_replaced)); //retornamos la cadena limpia para usar en nuestra consulta, o podemos devolver segun el resultado de ban\n\t//un die para no ejecutar nada o como se les ocurra\n\treturn $char_clean;\n}", "function s_z($ige) {\r\n $s_z = '';\r\n $veg1 = substr($ige,-1);\r\n if ($veg1 === 's') {\r\n $s_z = 's';\r\n }\r\n if ($veg1 === 'z') {\r\n $s_z = 'z';\r\n }\r\n return $s_z;\r\n }", "function chMinuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"A\" && $valeur[$i]<=\"Z\"){\r\n $codeValeur = ord($valeur[$i]) + 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "function uniencode($s)\n{\n $r = \"\";\n for ($i=0;$i<strlen($s);$i++) $r.= \"&#\".ord(substr($s,$i,1)).\";\";\n return $r;\n}", "public function getLanguageCode();", "public function getCodice() \n\t{\n return $this->codice;\n }", "public function bersuara()\n {\n return \"DARAWET ANJING DAWET\";\n }", "function stringToAscii($string)\n {\n $transliteration = array(\n \"À\" => \"A\",\"Á\" => \"A\",\"Â\" => \"A\",\"Ã\" => \"A\",\"Ä\" => \"A\",\n \"Å\" => \"A\",\"Æ\" => \"A\",\"Ā\" => \"A\",\"Ą\" => \"A\",\"Ă\" => \"A\",\n \"Ç\" => \"C\",\"Ć\" => \"C\",\"Č\" => \"C\",\"Ĉ\" => \"C\",\"Ċ\" => \"C\",\n \"Ď\" => \"D\",\"Đ\" => \"D\",\"È\" => \"E\",\"É\" => \"E\",\"Ê\" => \"E\",\n \"Ë\" => \"E\",\"Ē\" => \"E\",\"Ę\" => \"E\",\"Ě\" => \"E\",\"Ĕ\" => \"E\",\n \"Ė\" => \"E\",\"Ĝ\" => \"G\",\"Ğ\" => \"G\",\"Ġ\" => \"G\",\"Ģ\" => \"G\",\n \"Ĥ\" => \"H\",\"Ħ\" => \"H\",\"Ì\" => \"I\",\"Í\" => \"I\",\"Î\" => \"I\",\n \"Ï\" => \"I\",\"Ī\" => \"I\",\"Ĩ\" => \"I\",\"Ĭ\" => \"I\",\"Į\" => \"I\",\n \"İ\" => \"I\",\"IJ\" => \"IJ\",\"Ĵ\" => \"J\",\"Ķ\" => \"K\",\"Ľ\" => \"K\",\n \"Ĺ\" => \"K\",\"Ļ\" => \"K\",\"Ŀ\" => \"K\",\"Ł\" => \"L\",\"Ñ\" => \"N\",\n \"Ń\" => \"N\",\"Ň\" => \"N\",\"Ņ\" => \"N\",\"Ŋ\" => \"N\",\"Ò\" => \"O\",\n \"Ó\" => \"O\",\"Ô\" => \"O\",\"Õ\" => \"O\",\"Ö\" => \"Oe\",\"Ø\" => \"O\",\n \"Ō\" => \"O\",\"Ő\" => \"O\",\"Ŏ\" => \"O\",\"Œ\" => \"OE\",\"Ŕ\" => \"R\",\n \"Ř\" => \"R\",\"Ŗ\" => \"R\",\"Ś\" => \"S\",\"Ş\" => \"S\",\"Ŝ\" => \"S\",\n \"Ș\" => \"S\",\"Š\" => \"S\",\"Ť\" => \"T\",\"Ţ\" => \"T\",\"Ŧ\" => \"T\",\n \"Ț\" => \"T\",\"Ù\" => \"U\",\"Ú\" => \"U\",\"Û\" => \"U\",\"Ü\" => \"Ue\",\n \"Ū\" => \"U\",\"Ů\" => \"U\",\"Ű\" => \"U\",\"Ŭ\" => \"U\",\"Ũ\" => \"U\",\n \"Ų\" => \"U\",\"Ŵ\" => \"W\",\"Ŷ\" => \"Y\",\"Ÿ\" => \"Y\",\"Ý\" => \"Y\",\n \"Ź\" => \"Z\",\"Ż\" => \"Z\",\"Ž\" => \"Z\",\"à\" => \"a\",\"á\" => \"a\",\n \"â\" => \"a\",\"ã\" => \"a\",\"ä\" => \"ae\",\"ā\" => \"a\",\"ą\" => \"a\",\n \"ă\" => \"a\",\"å\" => \"a\",\"æ\" => \"ae\",\"ç\" => \"c\",\"ć\" => \"c\",\n \"č\" => \"c\",\"ĉ\" => \"c\",\"ċ\" => \"c\",\"ď\" => \"d\",\"đ\" => \"d\",\n \"è\" => \"e\",\"é\" => \"e\",\"ê\" => \"e\",\"ë\" => \"e\",\"ē\" => \"e\",\n \"ę\" => \"e\",\"ě\" => \"e\",\"ĕ\" => \"e\",\"ė\" => \"e\",\"ƒ\" => \"f\",\n \"ĝ\" => \"g\",\"ğ\" => \"g\",\"ġ\" => \"g\",\"ģ\" => \"g\",\"ĥ\" => \"h\",\n \"ħ\" => \"h\",\"ì\" => \"i\",\"í\" => \"i\",\"î\" => \"i\",\"ï\" => \"i\",\n \"ī\" => \"i\",\"ĩ\" => \"i\",\"ĭ\" => \"i\",\"į\" => \"i\",\"ı\" => \"i\",\n \"ij\" => \"ij\",\"ĵ\" => \"j\",\"ķ\" => \"k\",\"ĸ\" => \"k\",\"ł\" => \"l\",\n \"ľ\" => \"l\",\"ĺ\" => \"l\",\"ļ\" => \"l\",\"ŀ\" => \"l\",\"ñ\" => \"n\",\n \"ń\" => \"n\",\"ň\" => \"n\",\"ņ\" => \"n\",\"ʼn\" => \"n\",\"ŋ\" => \"n\",\n \"ò\" => \"o\",\"ó\" => \"o\",\"ô\" => \"o\",\"õ\" => \"o\",\"ö\" => \"oe\",\n \"ø\" => \"o\",\"ō\" => \"o\",\"ő\" => \"o\",\"ŏ\" => \"o\",\"œ\" => \"oe\",\n \"ŕ\" => \"r\",\"ř\" => \"r\",\"ŗ\" => \"r\",\"ś\" => \"s\",\"š\" => \"s\",\n \"ť\" => \"t\",\"ù\" => \"u\",\"ú\" => \"u\",\"û\" => \"u\",\"ü\" => \"ue\",\n \"ū\" => \"u\",\"ů\" => \"u\",\"ű\" => \"u\",\"ŭ\" => \"u\",\"ũ\" => \"u\",\n \"ų\" => \"u\",\"ŵ\" => \"w\",\"ÿ\" => \"y\",\"ý\" => \"y\",\"ŷ\" => \"y\",\n \"ż\" => \"z\",\"ź\" => \"z\",\"ž\" => \"z\",\"ß\" => \"ss\",\"ſ\" => \"ss\");\n\n return str_replace( array_keys( $transliteration ), array_values( $transliteration ), $string);\n }", "function testFinalNomCoureur($str) {\n // ##### Test charactère par charactère ######\n $str = str_split($str);\n foreach($str as $char) {\n if(!preg_match(\"#[A-Z]|'|-|\\040#\", $char)) {\n //echo \"Charactère interdit : \" . utf8_encode($char) . \"<br>\";\n return false;\n }\n }\n $str = implode($str);\n // ##### Fin test charactère #####\n \n // ##### Test cas bizarre #####\n if(preg_match(\"#^'*$|''+|^' '$|' '$|^' '|^\\\"*$#\", $str) || preg_match(\"#(\\040\\\"\\040)|(\\040''\\040)|(\\040'\\040)#\", $str) || preg_match(\"#--.*--#\", $str)) {\n //echo \"Cas bizarre : \" . utf8_encode($str) . \"<br>\";\n return false;\n }\n // ##### Fin test cas bizarre\n return $str;\n }", "function testAlphabet($valeurTeste){\r\n $retour = \"faux\";\r\n if(testMinuscle($valeurTeste)==\"vrai\" || testMajuscule($valeurTeste)==\"vrai\"){\r\n $retour = \"vrai\";\r\n }\r\n return $retour;\r\n }", "public function encodeEncodesCorrectlyDataProvider() {}", "abstract public function encode();", "public function getNiche_code () {\n\t$preValue = $this->preGetValue(\"niche_code\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->niche_code;\n\treturn $data;\n}", "function Code39 ($Asc)\n{\n switch ($Asc)\n {\n case ' ':\n return \"011000100\"; \n case '$':\n return \"010101000\"; \n case '%':\n return \"000101010\"; \n case '*':\n return \"010010100\"; // * Start/Stop\n case '+':\n return \"010001010\"; \n case '|':\n return \"010000101\"; \n case '.':\n return \"110000100\"; \n case '/':\n return \"010100010\"; \n\t\t\t\tcase '-':\n\t\t\t\t\t\treturn \"010000101\";\n case '0':\n return \"000110100\"; \n case '1':\n return \"100100001\"; \n case '2':\n return \"001100001\"; \n case '3':\n return \"101100000\"; \n case '4':\n return \"000110001\"; \n case '5':\n return \"100110000\"; \n case '6':\n return \"001110000\"; \n case '7':\n return \"000100101\"; \n case '8':\n return \"100100100\"; \n case '9':\n return \"001100100\"; \n case 'A':\n return \"100001001\"; \n case 'B':\n return \"001001001\"; \n case 'C':\n return \"101001000\";\n case 'D':\n return \"000011001\";\n case 'E':\n return \"100011000\";\n case 'F':\n return \"001011000\";\n case 'G':\n return \"000001101\";\n case 'H':\n return \"100001100\";\n case 'I':\n return \"001001100\";\n case 'J':\n return \"000011100\";\n case 'K':\n return \"100000011\";\n case 'L':\n return \"001000011\";\n case 'M':\n return \"101000010\";\n case 'N':\n return \"000010011\";\n case 'O':\n return \"100010010\";\n case 'P':\n return \"001010010\";\n case 'Q':\n return \"000000111\";\n case 'R':\n return \"100000110\";\n case 'S':\n return \"001000110\";\n case 'T':\n return \"000010110\";\n case 'U':\n return \"110000001\";\n case 'V':\n return \"011000001\";\n case 'W':\n return \"111000000\";\n case 'X':\n return \"010010001\";\n case 'Y':\n return \"110010000\";\n case 'Z':\n return \"011010000\";\n default:\n return \"011000100\"; \n }\n}", "public function getCodice()\n {\n return $this->codice;\n }", "function get_encoded_string ($str) {\n setlocale(LC_ALL, 'fr_FR.UTF-8');\n return iconv('UTF-8', 'ASCII//TRANSLIT', $str);\n}", "function corriger_caracteres_windows($texte, $charset='AUTO') {\n\tstatic $trans;\n\n\tif ($charset=='AUTO') $charset = $GLOBALS['meta']['charset'];\n\tif ($charset == 'utf-8') {\n\t\t$p = chr(194);\n\t} else if ($charset == 'iso-8859-1') {\n\t\t$p = '';\n\t} else\n\t\treturn $texte;\n\n\tif (!isset($trans[$charset])) {\n\t\t$trans[$charset] = array(\n\t\t\t$p.chr(128) => \"&#8364;\",\n\t\t\t$p.chr(129) => ' ', # pas affecte\n\t\t\t$p.chr(130) => \"&#8218;\",\n\t\t\t$p.chr(131) => \"&#402;\",\n\t\t\t$p.chr(132) => \"&#8222;\",\n\t\t\t$p.chr(133) => \"&#8230;\",\n\t\t\t$p.chr(134) => \"&#8224;\",\n\t\t\t$p.chr(135) => \"&#8225;\",\n\t\t\t$p.chr(136) => \"&#710;\",\n\t\t\t$p.chr(137) => \"&#8240;\",\n\t\t\t$p.chr(138) => \"&#352;\",\n\t\t\t$p.chr(139) => \"&#8249;\",\n\t\t\t$p.chr(140) => \"&#338;\",\n\t\t\t$p.chr(141) => ' ', # pas affecte\n\t\t\t$p.chr(142) => \"&#381;\",\n\t\t\t$p.chr(143) => ' ', # pas affecte\n\t\t\t$p.chr(144) => ' ', # pas affecte\n\t\t\t$p.chr(145) => \"&#8216;\",\n\t\t\t$p.chr(146) => \"&#8217;\",\n\t\t\t$p.chr(147) => \"&#8220;\",\n\t\t\t$p.chr(148) => \"&#8221;\",\n\t\t\t$p.chr(149) => \"&#8226;\",\n\t\t\t$p.chr(150) => \"&#8211;\",\n\t\t\t$p.chr(151) => \"&#8212;\",\n\t\t\t$p.chr(152) => \"&#732;\",\n\t\t\t$p.chr(153) => \"&#8482;\", \n\t\t\t$p.chr(154) => \"&#353;\",\n\t\t\t$p.chr(155) => \"&#8250;\",\n\t\t\t$p.chr(156) => \"&#339;\",\n\t\t\t$p.chr(157) => ' ', # pas affecte\n\t\t\t$p.chr(158) => \"&#382;\",\n\t\t\t$p.chr(159) => \"&#376;\",\n\t\t);\n\t}\n\treturn strtr($texte, $trans[$charset]);\n}", "function encode($s,$key) {\r\n\r\n\t$o = \"\";\r\n\r\n\tfor ($i=0;$i<strlen($s);$i++) {\r\n\r\n\t\t$char = substr($s, $i, 1);\r\n\t\t$pos = alphabet_position($char);\r\n\r\n\t\tif ($pos !== false) {\r\n\t\t\t$key_char = substr($key, $i, 1);\r\n\t\t\t$char_pos = (alphabet_position($key_char) + $pos) % 52;\r\n\t\t\t$char = char_at_position($char_pos);\r\n\t\t}\r\n\r\n\t\t$o .= $char;\r\n\t}\r\n\treturn $o;\r\n}", "function change_hunchar($text)\n{\n\t\n\t$text = htmlentities($text);\n\t\n\t$mit = array(\"í\", \"é\", \"á\", \"ú\", \"ő\", \"ü\", \"ö\", \"ű\", \"ó\", \"Í\", \"É\", \"Á\", \"Ú\", \"Ó\", \"Ü\", \"Ö\", \"Ű\", \"Ő\", \" \", \",\");\n\t$mire = array(\"i\", \"e\", \"a\", \"u\", \"o\", \"u\", \"o\", \"u\", \"o\", \"i\", \"e\", \"a\", \"u\", \"o\", \"u\", \"o\", \"u\", \"o\", \"_\", \"\");\n\t$szoveg = str_replace($mit, $mire, strtolower($text));\n\t\n\n\treturn $szoveg;\n}", "function getfield(){\r\n // Талбаруудын утгыг авах\r\n }", "abstract function encode($s);", "function hash_ligne($ligne) {\n\treturn urldecode ( $ligne );\n}", "protected static function limpiar_cadena($cadena)\n {\n $cadena = str_ireplace(\"<script>\", \"\", $cadena);\n $cadena = str_ireplace(\"</script>\", \"\", $cadena);\n $cadena = str_ireplace(\"<script src>\", \"\", $cadena);\n $cadena = str_ireplace(\"<script type>\", \"\", $cadena);\n $cadena = str_ireplace(\"SELECT * FROM\", \"\", $cadena);\n $cadena = str_ireplace(\"DELETE FROM\", \"\", $cadena);\n $cadena = str_ireplace(\"INSERT INTO\", \"\", $cadena);\n $cadena = str_ireplace(\"DROP TABLE\", \"\", $cadena);\n $cadena = str_ireplace(\"DROP DATABASE\", \"\", $cadena);\n $cadena = str_ireplace(\"TRUNCATE TABLE\", \"\", $cadena);\n $cadena = str_ireplace(\"SHOW TABLE\", \"\", $cadena);\n $cadena = str_ireplace(\"SHOW DATABASES\", \"\", $cadena);\n $cadena = str_ireplace(\"<?php\", \"\", $cadena);\n $cadena = str_ireplace(\"?>\", \"\", $cadena);\n $cadena = str_ireplace(\"<\", \"\", $cadena);\n $cadena = str_ireplace(\">\", \"\", $cadena);\n $cadena = str_ireplace(\"[\", \"\", $cadena);\n $cadena = str_ireplace(\"]\", \"\", $cadena);\n $cadena = str_ireplace(\"==\", \"\", $cadena);\n $cadena = str_ireplace(\";\", \"\", $cadena);\n $cadena = str_ireplace(\"::>\", \"\", $cadena);\n $cadena = str_ireplace(\"||\", \"\", $cadena);\n $cadena = str_ireplace(\"&\", \"\", $cadena);\n $cadena = str_ireplace(\"|\", \"\", $cadena);\n /*elimina barras invertidas*/\n $cadena = stripslashes($cadena);\n $cadena = trim($cadena);\n return $cadena;\n }", "function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->codedificio)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "public function corrigeNome($nome)\r\n {\r\n\r\n $nomeLimpo = str_replace('/', '-', $nome);\r\n $nomeLimpo = str_replace('&', 'e', $nomeLimpo);\r\n $nomeLimpo = str_replace('+', '-', $nomeLimpo);\r\n $nomeLimpo = str_replace('.', '', $nomeLimpo);\r\n $nomeLimpo = str_replace('(', '', $nomeLimpo);\r\n $nomeLimpo = str_replace(')', '', $nomeLimpo);\r\n $nomeLimpo = strtolower($nomeLimpo);\r\n $nomeLimpo = preg_replace(array(\"/(á|à|ã|â|ä)/\", \"/(Á|À|Ã|Â|Ä)/\", \"/(é|è|ê|ë)/\", \"/(É|È|Ê|Ë)/\", \"/(í|ì|î|ï)/\", \"/(Í|Ì|Î|Ï)/\", \"/(ó|ò|õ|ô|ö)/\", \"/(Ó|Ò|Õ|Ô|Ö)/\", \"/(ú|ù|û|ü)/\", \"/(Ú|Ù|Û|Ü)/\", \"/(ñ)/\", \"/(Ñ)/\"), explode(\" \", \"a A e E i I o O u U n N\"), $nomeLimpo);\r\n return ucwords($nomeLimpo);\r\n }", "function konjugacija($ige) {\r\n $sug = ('(b|c|d|f|g|h|k|m|p|t|v)');\r\n $sugl = ('(b|c|d|f|g|h|j|k|l|m|n|p|r|t|v)'); \r\n $av1 = '';\r\n $av2 = '';\r\n $h1 = harmony1($ige);\r\n $h2 = ($h1 === 'o') ? 'u' : 'ü';\r\n $h3 = ($h1 === 'o') ? 'o' : 'e';\r\n $ai = ($h1 === 'o') ? 'a' : 'i';\r\n $aai = ($h1 === 'o') ? 'á' : 'i';\r\n $ae = a_e($h1);\r\n $aaee = aa_ee($h1);\r\n $ik = check_ik($ige);\r\n $it = check_it($ige);\r\n $ige1 = filter_ige_past1($ige,$h1);\r\n $ige2 = filter_ige_past2($ige, $h1); \r\n $ige3 = filter_ige($ige);\r\n $te = te($ige3,$h1);\r\n $duplo1 = check_duplo1($ige, $h1);\r\n $duplo2 = check_duplo2($ige);\r\n $z = check_z($ige);\r\n $z2 = check_z2($ige, $h1);\r\n $inf = inf($ige, $ae);\r\n $cond = str_replace(substr($inf,-1),'',$inf);\r\n $imp = imperativ($ige);\r\n $imp2 = imperativ2($imp);\r\n \r\n if ($it === 1) {\r\n $av1 = $h1;\r\n $av2 = $ae;\r\n }\r\n if ((preg_match($sugl, substr($ige,-2,1))) && (preg_match($sug, substr($ige,-2,2)))) {\r\n $av1 = $h1;\r\n $av2 = $ae;\r\n }\r\n echo \"<h2>Osnovni oblik: \" . \"<strong>\" . $ige . \r\n \"</strong></h2>\" . \"<br>\" . \"<h3>Infinitiv: $inf</h3><br>\";\r\n \r\n echo \"<table id=\\\"sad\\\">\" .\r\n \"<tr><td>én</td><td>\" . $ige3 . $z . $h1 . \"k\" . \"</td>\" .\r\n \"<td>\" . $ige3 . $z . $h1 . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $ige3 . $z . $av2 . $te . \"</td>\"\r\n . \"<td>\" . $ige3 . $z . $h1 . \"d</td></tr>\" .\r\n \"<tr><td>Ön,ő</td><td>\" . $ige3 . $z . $ik . \"</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $ai . \"</td></tr>\" .\r\n \"<tr><td>mi</td><td>\" . $ige3 . $z . $h2 . \"nk</td>\" .\r\n \"<td>\" . $ige3 . $duplo2 . $h2 . \"k</td></tr>\"\r\n . \"<tr><td>ti</td><td>\" . $ige3 . $z . $av1 . \"t\" . $h1 . \"k</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $aai . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td>\" . \"<td>\" . $ige3 . $z . $av2 . \"n\" . $ae . \"k</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $aai . \"k</td></tr>\" .\r\n \"</table>\";\r\n \r\n echo \"<table id=\\\"pro\\\">\" . \r\n \"<tr><td>én</td><td>\" . $ige1 . $ae . \"m\" . \"</td>\" . \r\n \"<td>\" . $ige1 . $ae . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $ige1. $aaee . \"l</td>\" .\r\n \"<td>\" .$ige1 . $ae . \"d</td></tr>\" . \r\n \"<tr><td>Ön,ő</td><td>\" . $ige2 . \"</td>\" . \r\n \"<td>\" . $ige1 . $ae . \"</td></tr>\" .\r\n \"<tr><td>mi</td><td>\" . $ige1 . $h2 . \"nk</td>\" .\r\n \"<td>\" . $ige1 . $h2 . \"k</td></tr>\" . \r\n \"<tr><td>ti</td><td>\" . $ige1 . $ae . \"t\" . $h3 . \"k</td><td>\"\r\n . $ige1 . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $ige1 . $ae . \"k</td><td>\" \r\n . $ige1 . $aaee . \"k</td></tr></table>\";\r\n \r\n echo \"<table id=\\\"kond\\\"><tr><td>én</td><td>\" . $cond . \"ék\" . \r\n \"</td><td>\" . $cond . $aaee . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $cond . $aaee . \"l</td><td>\" .\r\n $cond . $aaee . \"d</td></tr><tr><td>Ön,ő</td><td>\" .\r\n $cond . $ae . \"</td><td>\" . $cond . $aaee . \r\n \"</td></tr><tr><td>mi</td><td>\" . $cond . $aaee . \r\n \"nk</td><td>\" . $cond . $aaee . \"nk</td></tr><tr><td>\"\r\n . \"ti</td><td>\" . $cond . $aaee . \"t\" . $h3 . \"k</td><td>\"\r\n . $cond . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $cond . $aaee . \"n\" . $ae . \r\n \"k</td><td>\" . $cond . $aaee . \"k</td></tr></table>\";\r\n \r\n echo \"<table id=\\\"imp\\\"><tr><td>én</td><td>\" . $imp . $ae . \r\n \"k</td><td>\" . $imp . $ae . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $imp . \"(\" . $aaee . \"l)</td><td>\" .\r\n $imp2 . \"d</td></tr><tr><td>Ön,ő</td><td>\" .\r\n $imp . $h1 . \"n</td><td>\" . $imp . $ae . \r\n \"</td></tr><tr><td>mi</td><td>\" . $imp . $h2 . \r\n \"nk</td><td>\" . $imp . $h2 . \"k</td></tr><tr><td>\"\r\n . \"ti</td><td>\" . $imp . $ae . \"t\" . $h3 . \"k</td><td>\"\r\n . $imp . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $imp . $ae . \"n\" . $ae . \r\n \"k</td><td>\" . $imp . $aaee . \"k</td></tr></table>\";\r\n }", "function replaceAccents($str)\n{\n $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ');\n $b = array('A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o');\n $str = str_replace($a, $b, $str,$count);\n return [$str,$count];\n}", "function huruf($jenis, $papar)\n{\n \n switch ($jenis) \n {// mula - pilih $jenis\n case 'BESAR':\n $papar = strtoupper($papar);\n break;\n case 'kecil':\n $papar = strtolower($papar);\n break;\n case 'Depan':\n $papar = ucfrist($papar);\n break;\n case 'Besar_Depan':\n $papar = mb_convert_case($papar, MB_CASE_TITLE);\n break;\n }// tamat - pilih $jenis\n \n return $papar;\n}", "public function countryCode();", "public function encodeAddress($casilla) {\n\n $casilla = trim($casilla);\n // Si la casilla no trae name, no le hace nada\n if (preg_match('/^<?[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}>?$/', $casilla)) {\n return $casilla;\n };\n\n // Si trae name, ve si hay que encodificarlo\n $matches = array();\n if (preg_match('/(.+)(<[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}>)$/', $casilla, $matches)) {\n $name = $matches[1];\n $email = $matches[2];\n\n // Si el nombre tiene tildes o ()<>@,;\\:\". lo encodifica\n if (preg_match('/([\\x80-\\xFF\\(\\)\\<\\>\\@\\,\\;\\\\\\:\\\"\\.]){1}/', $name)) {\n $preferences = array(\n 'input-charset' => 'UTF-8',\n 'output-charset' => 'UTF-8', // ISO-8859-1 o UTF-8\n 'line-length' => 255,\n 'scheme' => 'B', // o Q\n 'line-break-chars' => \"\\n\"\n );\n $name = iconv_mime_encode('Reply-to', $name, $preferences);\n $name = preg_replace(\"#^Reply-to\\:\\ #\", '', $name);\n $casilla = $name . $email;\n };\n };\n return $casilla;\n }", "function to_html($cadena){\n $busqueda = array(\"á\",\"é\",\"í\",\"ó\",\"ú\",\"Á\",\"É\",\"Í\",\"Ó\",\"Ú\",\"ñ\",\"Ñ\",\"¿\");\n $reemplazo= array(\"&aacute;\",\"&eacute;\",\"&iacute;\",\"&oacute;\",\"&uacute;\",\"&Aacute;\",\"&Eacute;\",\"&Iacute;\",\"&Oacute;\",\"&Uacute;\",\n \"&ntilde;\",\"&Ntilde;\",\"&#191;\");\n $resultado = str_replace($busqueda, $reemplazo, $cadena);\n return $resultado;\n}", "function translitteration($texte, $charset='AUTO', $complexe='') {\n\tstatic $trans;\n\tif ($charset == 'AUTO')\n\t\t$charset = $GLOBALS['meta']['charset'];\n\n\t$table_translit ='translit'.$complexe;\n\n\t// 0. Supprimer les caracteres illegaux\n\tinclude_spip('inc/filtres');\n\t$texte = corriger_caracteres($texte);\n\n\t// 1. Passer le charset et les &eacute en utf-8\n\t$texte = unicode_to_utf_8(html2unicode(charset2unicode($texte, $charset, true)));\n\n\t// 2. Translitterer grace a la table predefinie\n\tif (!$trans[$complexe]) {\n\t\tglobal $CHARSET;\n\t\tload_charset($table_translit);\n\t\tforeach ($CHARSET[$table_translit] as $key => $val)\n\t\t\t$trans[$complexe][caractere_utf_8($key)] = $val;\n\t}\n\n\treturn strtr($texte, $trans[$complexe]);\n}", "function getChambrehospi(){\n return $this->chambre;\n }", "function RetiraAcentos($texto)\n{\n $array1 = array( \"á\", \"à\", \"â\", \"ã\", \"ä\", \"é\", \"è\", \"ê\", \"ë\", \"í\", \"ì\", \"î\", \"ï\", \"ó\", \"ò\", \"ô\", \"õ\", \"ö\", \"ú\", \"ù\", \"û\", \"ü\", \"ç\"\n , \"Á\", \"À\", \"Â\", \"Ã\", \"Ä\", \"É\", \"È\", \"Ê\", \"Ë\", \"Í\", \"Ì\", \"Î\", \"Ï\", \"Ó\", \"Ò\", \"Ô\", \"Õ\", \"Ö\", \"Ú\", \"Ù\", \"Û\", \"Ü\", \"Ç\" );\n $array2 = array( \"a\", \"a\", \"a\", \"a\", \"a\", \"e\", \"e\", \"e\", \"e\", \"i\", \"i\", \"i\", \"i\", \"o\", \"o\", \"o\", \"o\", \"o\", \"u\", \"u\", \"u\", \"u\", \"c\"\n , \"A\", \"A\", \"A\", \"A\", \"A\", \"E\", \"E\", \"E\", \"E\", \"I\", \"I\", \"I\", \"I\", \"O\", \"O\", \"O\", \"O\", \"O\", \"U\", \"U\", \"U\", \"U\", \"C\" );\n return str_replace( $array1, $array2, $texto );\n}", "function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODEDIFICIO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "function caesar_cypher($cyrillic_string, $code) {\n $string = mb_strtolower(mb_convert_encoding($cyrillic_string, 'UTF-8', 'auto'));\n $string_array = mbStringToArray($string);\n $alph = mb_strtolower(mb_convert_encoding('АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ', 'UTF-8', 'auto')); // Cyrillic alphabet.\n $alph_array = mbStringToArray($alph);\n $alph_arr_count = count($alph_array);\n $code = strval($code); // cipher code\n $code_count = strlen($code);\n $ci = 0; // code element position\n $target_string = '';\n foreach ($string_array as $letter) {\n $source_position = array_search($letter, $alph_array);\n\n if ($source_position !== FALSE) {\n $target_position = $source_position + $code[$ci];\n if ($target_position >= $alph_arr_count) {\n $target_position = $target_position - $alph_arr_count;\n }\n $letter = $alph_array[$target_position];\n // Make sure we go to the 1st symbol.\n $ci++;\n if ($ci == $code_count) {\n $ci = 0;\n }\n }\n\n $target_string .= $letter;\n }\n return $target_string;\n}", "public function getCode()\r\r\n\t{\r\r\n\t\treturn \"\";#getCountryFromIP($this->ip,\"code\");\r\r\n\t}", "protected function getCertificacionEnergetica() {\n\t\tif (!empty($this->item['ec'])) {\n\t\t\treturn strtolower($this->item['ec']);\n\t\t}\n\t\treturn 'no disponible';\n\t}", "public function getCodare(){\n\t\treturn $this->codare;\n\t}", "public function getLeiCode(): ?string;", "public function Chiffrer($id){\n\t\t$data=Message::find($id);\n\t\t$text=$data->text;\n\t\t$str = strtoupper($text);\n\t\techo $str.\"<br>\";\n //letters of alphabet array\n\t\t$alphabet=array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', \n\t\t\t'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',' ');\n //array_flip — Remplace les clés par les valeurs, et les valeurs par les clés\n\t\t$flip=array_flip($alphabet);\n\t\t$mod = count( $alphabet );\n\n //Convertit une chaîne de caractères en tableau\n\t\t$str=str_split($str);\n\t\t$n=count($str);\n\t\t$convert='';\n\t\tfor ($i=0; $i<$n; $i++){\n\t\t\t//strtoupper — Renvoie une chaîne en majuscules\n\t\t\t$n = strtoupper( $n );\n\n //encryption\n\t\t\t$str[$i];\n\t\t\techo $emplacement= $flip[$str[$i]];\n\t\t\t$convert.=$alphabet[($emplacement+3) % $mod];\n\t\t}\n\n\t\t$convert;\n\t}", "function estUnCp($codePostal)\n{\n return strlen($codePostal)== 5 && estEntier($codePostal);\n}", "function precoBrasileiro ($preco){\n \n $precoBrasileiro = str_replace(\".\",\",\",$preco);\n \n \n \n return $precoBrasileiro;\n \n \n }", "public function testAscii1()\n {\n $this->assertEquals(Str::ascii('étoile'), 'etoile');\n }", "public static function funkyCharsMap() {\n $convert_table = [\n '©' => 'c',\n '®' => 'r',\n 'À' => 'a',\n 'Ã' => 'a',\n 'Á' => 'a',\n 'Â' => 'a',\n 'Ä' => 'a',\n 'Å' => 'a',\n 'Æ' => 'ae',\n 'Ç' => 'c',\n 'È' => 'e',\n 'É' => 'e',\n 'Ë' => 'e',\n 'Ì' => 'i',\n 'Í' => 'i',\n 'Î' => 'i',\n 'Ï' => 'i',\n 'Ò' => 'o',\n 'Ó' => 'o',\n 'Ô' => 'o',\n 'Õ' => 'o',\n 'Ö' => 'o',\n 'Ø' => 'o',\n 'Ù' => 'u',\n 'Ú' => 'u',\n 'Û' => 'u',\n 'Ü' => 'u',\n 'Ý' => 'y',\n 'ß' => 'ss',\n 'à' => 'a',\n 'á' => 'a',\n 'â' => 'a',\n 'ä' => 'a',\n 'å' => 'a',\n 'æ' => 'ae',\n 'ç' => 'c',\n 'è' => 'e',\n 'é' => 'e',\n 'ê' => 'e',\n 'ë' => 'e',\n 'ì' => 'i',\n 'í' => 'i',\n 'î' => 'i',\n 'ï' => 'i',\n 'ò' => 'o',\n 'ó' => 'o',\n 'ô' => 'o',\n 'õ' => 'o',\n 'ö' => 'o',\n 'ø' => 'o',\n 'ù' => 'u',\n 'ú' => 'u',\n 'û' => 'u',\n 'ü' => 'u',\n 'ý' => 'y',\n 'þ' => 'p',\n 'ÿ' => 'y',\n 'Ā' => 'a',\n 'ā' => 'a',\n 'Ă' => 'a',\n 'ă' => 'a',\n 'Ą' => 'a',\n 'ą' => 'a',\n 'Ć' => 'c',\n 'ć' => 'c',\n 'Ĉ' => 'c',\n 'ĉ' => 'c',\n 'Ċ' => 'c',\n 'ċ' => 'c',\n 'Č' => 'c',\n 'č' => 'c',\n 'Ď' => 'd',\n 'ď' => 'd',\n 'Đ' => 'd',\n 'đ' => 'd',\n 'Ē' => 'e',\n 'ē' => 'e',\n 'Ĕ' => 'e',\n 'ĕ' => 'e',\n 'Ė' => 'e',\n 'ė' => 'e',\n 'Ę' => 'e',\n 'ę' => 'e',\n 'Ě' => 'e',\n 'ě' => 'e',\n 'Ĝ' => 'g',\n 'ĝ' => 'g',\n 'Ğ' => 'g',\n 'ğ' => 'g',\n 'Ġ' => 'g',\n 'ġ' => 'g',\n 'Ģ' => 'g',\n 'ģ' => 'g',\n 'Ĥ' => 'h',\n 'ĥ' => 'h',\n 'Ħ' => 'h',\n 'ħ' => 'h',\n 'Ĩ' => 'i',\n 'ĩ' => 'i',\n 'Ī' => 'i',\n 'ī' => 'i',\n 'Ĭ' => 'i',\n 'ĭ' => 'i',\n 'Į' => 'i',\n 'į' => 'i',\n 'İ' => 'i',\n 'ı' => 'i',\n 'IJ' => 'ij',\n 'ij' => 'ij',\n 'Ĵ' => 'j',\n 'ĵ' => 'j',\n 'Ķ' => 'k',\n 'ķ' => 'k',\n 'ĸ' => 'k',\n 'Ĺ' => 'l',\n 'ĺ' => 'l',\n 'Ļ' => 'l',\n 'ļ' => 'l',\n 'Ľ' => 'l',\n 'ľ' => 'l',\n 'Ŀ' => 'l',\n 'ŀ' => 'l',\n 'Ł' => 'l',\n 'ł' => 'l',\n 'Ń' => 'n',\n 'ń' => 'n',\n 'Ņ' => 'n',\n 'ņ' => 'n',\n 'Ň' => 'n',\n 'ň' => 'n',\n 'ʼn' => 'n',\n 'Ŋ' => 'n',\n 'ŋ' => 'n',\n 'ñ' => 'n',\n 'Ō' => 'o',\n 'ō' => 'o',\n 'Ŏ' => 'o',\n 'ŏ' => 'o',\n 'Ő' => 'o',\n 'ő' => 'o',\n 'Œ' => 'oe',\n 'œ' => 'oe',\n 'Ŕ' => 'r',\n 'ŕ' => 'r',\n 'Ŗ' => 'r',\n 'ŗ' => 'r',\n 'Ř' => 'r',\n 'ř' => 'r',\n 'Ś' => 's',\n 'ś' => 's',\n 'Ŝ' => 's',\n 'ŝ' => 's',\n 'Ş' => 's',\n 'ş' => 's',\n 'Š' => 's',\n 'š' => 's',\n 'Ţ' => 't',\n 'ţ' => 't',\n 'Ť' => 't',\n 'ť' => 't',\n 'Ŧ' => 't',\n 'ŧ' => 't',\n 'Ũ' => 'u',\n 'ũ' => 'u',\n 'Ū' => 'u',\n 'ū' => 'u',\n 'Ŭ' => 'u',\n 'ŭ' => 'u',\n 'Ů' => 'u',\n 'ů' => 'u',\n 'Ű' => 'u',\n 'ű' => 'u',\n 'Ų' => 'u',\n 'ų' => 'u',\n 'Ŵ' => 'w',\n 'ŵ' => 'w',\n 'Ŷ' => 'y',\n 'ŷ' => 'y',\n 'Ÿ' => 'y',\n 'Ź' => 'z',\n 'ź' => 'z',\n 'Ż' => 'z',\n 'ż' => 'z',\n 'Ž' => 'z',\n 'ž' => 'z',\n 'ſ' => 'z',\n 'Ə' => 'e',\n 'ƒ' => 'f',\n 'Ơ' => 'o',\n 'ơ' => 'o',\n 'Ư' => 'u',\n 'ư' => 'u',\n 'Ǎ' => 'a',\n 'ǎ' => 'a',\n 'Ǐ' => 'i',\n 'ǐ' => 'i',\n 'Ǒ' => 'o',\n 'ǒ' => 'o',\n 'Ǔ' => 'u',\n 'ǔ' => 'u',\n 'Ǖ' => 'u',\n 'ǖ' => 'u',\n 'Ǘ' => 'u',\n 'ǘ' => 'u',\n 'Ǚ' => 'u',\n 'ǚ' => 'u',\n 'Ǜ' => 'u',\n 'ǜ' => 'u',\n 'Ǻ' => 'a',\n 'ǻ' => 'a',\n 'Ǽ' => 'ae',\n 'ǽ' => 'ae',\n 'Ǿ' => 'o',\n 'ǿ' => 'o',\n 'ə' => 'e',\n 'Ё' => 'jo',\n 'Є' => 'e',\n 'І' => 'i',\n 'Ї' => 'i',\n 'А' => 'a',\n 'Б' => 'b',\n 'В' => 'v',\n 'Г' => 'g',\n 'Д' => 'd',\n 'Е' => 'e',\n 'Ж' => 'zh',\n 'З' => 'z',\n 'И' => 'i',\n 'Й' => 'j',\n 'К' => 'k',\n 'Л' => 'l',\n 'М' => 'm',\n 'Н' => 'n',\n 'О' => 'o',\n 'П' => 'p',\n 'Р' => 'r',\n 'С' => 's',\n 'Т' => 't',\n 'У' => 'u',\n 'Ф' => 'f',\n 'Х' => 'h',\n 'Ц' => 'c',\n 'Ч' => 'ch',\n 'Ш' => 'sh',\n 'Щ' => 'sch',\n 'Ъ' => '-',\n 'Ы' => 'y',\n 'Ь' => '-',\n 'Э' => 'je',\n 'Ю' => 'ju',\n 'Я' => 'ja',\n 'а' => 'a',\n 'б' => 'b',\n 'в' => 'v',\n 'г' => 'g',\n 'д' => 'd',\n 'е' => 'e',\n 'ж' => 'zh',\n 'з' => 'z',\n 'и' => 'i',\n 'й' => 'j',\n 'к' => 'k',\n 'л' => 'l',\n 'м' => 'm',\n 'н' => 'n',\n 'о' => 'o',\n 'п' => 'p',\n 'р' => 'r',\n 'с' => 's',\n 'т' => 't',\n 'у' => 'u',\n 'ф' => 'f',\n 'х' => 'h',\n 'ц' => 'c',\n 'ч' => 'ch',\n 'ш' => 'sh',\n 'щ' => 'sch',\n 'ъ' => '-',\n 'ы' => 'y',\n 'ь' => '-',\n 'э' => 'je',\n 'ю' => 'ju',\n 'я' => 'ja',\n 'ё' => 'jo',\n 'є' => 'e',\n 'і' => 'i',\n 'ї' => 'i',\n 'Ґ' => 'g',\n 'ґ' => 'g',\n 'א' => 'a',\n 'ב' => 'b',\n 'ג' => 'g',\n 'ד' => 'd',\n 'ה' => 'h',\n 'ו' => 'v',\n 'ז' => 'z',\n 'ח' => 'h',\n 'ט' => 't',\n 'י' => 'i',\n 'ך' => 'k',\n 'כ' => 'k',\n 'ל' => 'l',\n 'ם' => 'm',\n 'מ' => 'm',\n 'ן' => 'n',\n 'נ' => 'n',\n 'ס' => 's',\n 'ע' => 'e',\n 'ף' => 'p',\n 'פ' => 'p',\n 'ץ' => 'C',\n 'צ' => 'c',\n 'ק' => 'q',\n 'ר' => 'r',\n 'ש' => 'w',\n 'ת' => 't',\n '™' => 'tm',\n '°' => 'degree',\n '’' => '\\'',\n ];\n\n return $convert_table;\n }", "public function testTransliterate() {\n $this->assertEquals('Ingles', Inflector::transliterate('Inglés'));\n $this->assertEquals('Uber', Inflector::transliterate('Über'));\n }", "function nilaiSiswa($nilai) {\nif($nilai==0){ \n\t$nilai = '';\n}\nelseif($nilai==4){ \n\t$nilai = 'SB';\n}\nelseif($nilai==3){ \n\t$nilai = 'B';\n}\nelseif($nilai==2){ \n\t$nilai = 'C';\n}\nelse { \n\t$nilai = 'K';\n}\n\treturn $nilai;\n}", "public static function unaccent($instr, $tolower = true) {\n\t\t$instr = str_replace( array(\"\\xe2\\x80\\x98\", \"\\xe2\\x80\\x99\", \"\\xe2\\x80\\x9c\", \"\\xe2\\x80\\x9d\", \"\\xe2\\x80\\x93\", \"\\xe2\\x80\\x94\", \"\\xe2\\x80\\xa6\"),\n\t\t\t\t\t\t\t array(\"'\", \"'\", '\"', '\"', '-', '--', '...'),\n\t\t\t\t\t\t\t $instr );\n\t\t$tranmap = array(\n\t\t\t\t\"\\xC3\\x80\" => \"A\", \"\\xC3\\x81\" => \"A\", \"\\xC3\\x82\" => \"A\", \"\\xC3\\x83\" => \"A\", \n\t\t\t\t\"\\xC3\\x84\" => \"A\", \"\\xC3\\x85\" => \"A\", \"\\xC3\\x86\" => \"AE\", \"\\xC3\\x87\" => \"C\",\n\t\t\t\t\"\\xC3\\x88\" => \"E\", \"\\xC3\\x89\" => \"E\", \"\\xC3\\x8A\" => \"E\", \"\\xC3\\x8B\" => \"E\",\n\t\t\t\t\"\\xC3\\x8C\" => \"I\", \"\\xC3\\x8D\" => \"I\", \"\\xC3\\x8E\" => \"I\", \"\\xC3\\x8F\" => \"I\",\n\t\t\t\t\"\\xC3\\x90\" => \"D\", \"\\xC3\\x91\" => \"N\", \"\\xC3\\x92\" => \"O\", \"\\xC3\\x93\" => \"O\",\n\t\t\t\t\"\\xC3\\x94\" => \"O\", \"\\xC3\\x95\" => \"O\", \"\\xC3\\x96\" => \"O\", \"\\xC3\\x98\" => \"O\",\n\t\t\t\t\"\\xC3\\x99\" => \"U\", \"\\xC3\\x9A\" => \"U\", \"\\xC3\\x9B\" => \"U\", \"\\xC3\\x9C\" => \"U\",\n\t\t\t\t\"\\xC3\\x9D\" => \"Y\", \"\\xC3\\x9E\" => \"P\", \"\\xC3\\x9F\" => \"ss\",\n\t\t\t\t\"\\xC3\\xA0\" => \"a\", \"\\xC3\\xA1\" => \"a\", \"\\xC3\\xA2\" => \"a\", \"\\xC3\\xA3\" => \"a\",\n\t\t\t\t\"\\xC3\\xA4\" => \"a\", \"\\xC3\\xA5\" => \"a\", \"\\xC3\\xA6\" => \"ae\", \"\\xC3\\xA7\" => \"c\",\n\t\t\t\t\"\\xC3\\xA8\" => \"e\", \"\\xC3\\xA9\" => \"e\", \"\\xC3\\xAA\" => \"e\", \"\\xC3\\xAB\" => \"e\",\n\t\t\t\t\"\\xC3\\xAC\" => \"i\", \"\\xC3\\xAD\" => \"i\", \"\\xC3\\xAE\" => \"i\", \"\\xC3\\xAF\" => \"i\",\n\t\t\t\t\"\\xC3\\xB0\" => \"o\", \"\\xC3\\xB1\" => \"n\", \"\\xC3\\xB2\" => \"o\", \"\\xC3\\xB3\" => \"o\",\n\t\t\t\t\"\\xC3\\xB4\" => \"o\", \"\\xC3\\xB5\" => \"o\", \"\\xC3\\xB6\" => \"o\", \"\\xC3\\xB8\" => \"o\",\n\t\t\t\t\"\\xC3\\xB9\" => \"u\", \"\\xC3\\xBA\" => \"u\", \"\\xC3\\xBB\" => \"u\", \"\\xC3\\xBC\" => \"u\",\n\t\t\t\t\"\\xC3\\xBD\" => \"y\", \"\\xC3\\xBE\" => \"p\", \"\\xC3\\xBF\" => \"y\",\n\t\t\t\t\"\\xC4\\x80\" => \"A\", \"\\xC4\\x81\" => \"a\", \"\\xC4\\x82\" => \"A\", \"\\xC4\\x83\" => \"a\", \"\\xC2\\xAD\" => \"a\", \"\\xC2\\xAA\" => \"a\", \n\t\t\t\t\"\\xC4\\x84\" => \"A\", \"\\xC4\\x85\" => \"a\", \"\\xC4\\x86\" => \"C\", \"\\xC4\\x87\" => \"c\",\n\t\t\t\t\"\\xC4\\x88\" => \"C\", \"\\xC4\\x89\" => \"c\", \"\\xC4\\x8A\" => \"C\", \"\\xC4\\x8B\" => \"c\",\n\t\t\t\t\"\\xC4\\x8C\" => \"C\", \"\\xC4\\x8D\" => \"c\", \"\\xC4\\x8E\" => \"D\", \"\\xC4\\x8F\" => \"d\",\n\t\t\t\t\"\\xC4\\x90\" => \"D\", \"\\xC4\\x91\" => \"d\", \"\\xC4\\x92\" => \"E\", \"\\xC4\\x93\" => \"e\",\n\t\t\t\t\"\\xC4\\x94\" => \"E\", \"\\xC4\\x95\" => \"e\", \"\\xC4\\x96\" => \"E\", \"\\xC4\\x97\" => \"e\",\n\t\t\t\t\"\\xC4\\x98\" => \"E\", \"\\xC4\\x99\" => \"e\", \"\\xC4\\x9A\" => \"E\", \"\\xC4\\x9B\" => \"e\",\n\t\t\t\t\"\\xC4\\x9C\" => \"G\", \"\\xC4\\x9D\" => \"g\", \"\\xC4\\x9E\" => \"G\", \"\\xC4\\x9F\" => \"g\",\n\t\t\t\t\"\\xC4\\xA0\" => \"G\", \"\\xC4\\xA1\" => \"g\", \"\\xC4\\xA2\" => \"G\", \"\\xC4\\xA3\" => \"g\",\n\t\t\t\t\"\\xC4\\xA4\" => \"H\", \"\\xC4\\xA5\" => \"h\", \"\\xC4\\xA6\" => \"H\", \"\\xC4\\xA7\" => \"h\",\n\t\t\t\t\"\\xC4\\xA8\" => \"I\", \"\\xC4\\xA9\" => \"i\", \"\\xC4\\xAA\" => \"I\", \"\\xC4\\xAB\" => \"i\", \n\t\t\t\t\"\\xC4\\xAC\" => \"I\", \"\\xC4\\xAD\" => \"i\", \"\\xC4\\xAE\" => \"I\", \"\\xC4\\xAF\" => \"i\",\n\t\t\t\t\"\\xC4\\xB0\" => \"I\", \"\\xC4\\xB1\" => \"i\", \"\\xC4\\xB2\" => \"IJ\", \"\\xC4\\xB3\" => \"ij\",\n\t\t\t\t\"\\xC4\\xB4\" => \"J\", \"\\xC4\\xB5\" => \"j\", \"\\xC4\\xB6\" => \"K\", \"\\xC4\\xB7\" => \"k\", \"\\xD1\\x9C\" => \"K\", \"\\xD0\\x8C\" => \"k\",\n\t\t\t\t\"\\xC4\\xB8\" => \"k\", \"\\xC4\\xB9\" => \"L\", \"\\xC4\\xBA\" => \"l\", \"\\xC4\\xBB\" => \"L\",\n\t\t\t\t\"\\xC4\\xBC\" => \"l\", \"\\xC4\\xBD\" => \"L\", \"\\xC4\\xBE\" => \"l\", \"\\xC4\\xBF\" => \"L\",\n\t\t\t\t\"\\xC5\\x80\" => \"l\", \"\\xC5\\x81\" => \"L\", \"\\xC5\\x82\" => \"l\", \"\\xC5\\x83\" => \"N\",\n\t\t\t\t\"\\xC5\\x84\" => \"n\", \"\\xC5\\x85\" => \"N\", \"\\xC5\\x86\" => \"n\", \"\\xC5\\x87\" => \"N\",\n\t\t\t\t\"\\xC5\\x88\" => \"n\", \"\\xC5\\x89\" => \"n\", \"\\xC5\\x8A\" => \"N\", \"\\xC5\\x8B\" => \"n\",\n\t\t\t\t\"\\xC5\\x8C\" => \"O\", \"\\xC5\\x8D\" => \"o\", \"\\xC5\\x8E\" => \"O\", \"\\xC5\\x8F\" => \"o\", \"\\xD0\\xBE\" => \"o\",\n\t\t\t\t\"\\xC5\\x90\" => \"O\", \"\\xC5\\x91\" => \"o\", \"\\xC5\\x92\" => \"CE\", \"\\xC5\\x93\" => \"ce\",\n\t\t\t\t\"\\xC5\\x94\" => \"R\", \"\\xC5\\x95\" => \"r\", \"\\xC5\\x96\" => \"R\", \"\\xC5\\x97\" => \"r\",\n\t\t\t\t\"\\xC5\\x98\" => \"R\", \"\\xC5\\x99\" => \"r\", \"\\xC5\\x9A\" => \"S\", \"\\xC5\\x9B\" => \"s\",\n\t\t\t\t\"\\xC5\\x9C\" => \"S\", \"\\xC5\\x9D\" => \"s\", \"\\xC5\\x9E\" => \"S\", \"\\xC5\\x9F\" => \"s\", \"\\xC8\\x98\" => \"S\",\"\\xC8\\x99\" => \"s\",\n\t\t\t\t\"\\xC5\\xA0\" => \"S\", \"\\xC5\\xA1\" => \"s\", \"\\xC5\\xA2\" => \"T\", \"\\xC5\\xA3\" => \"t\",\n\t\t\t\t\"\\xC5\\xA4\" => \"T\", \"\\xC5\\xA5\" => \"t\", \"\\xC5\\xA6\" => \"T\", \"\\xC5\\xA7\" => \"t\", \"\\xC8\\x9B\" => \"t\", \"\\xC8\\x9A\" => \"T\",\n\t\t\t\t\"\\xC5\\xA8\" => \"U\", \"\\xC5\\xA9\" => \"u\", \"\\xC5\\xAA\" => \"U\", \"\\xC5\\xAB\" => \"u\",\n\t\t\t\t\"\\xC5\\xAC\" => \"U\", \"\\xC5\\xAD\" => \"u\", \"\\xC5\\xAE\" => \"U\", \"\\xC5\\xAF\" => \"u\",\n\t\t\t\t\"\\xC5\\xB0\" => \"U\", \"\\xC5\\xB1\" => \"u\", \"\\xC5\\xB2\" => \"U\", \"\\xC5\\xB3\" => \"u\",\n\t\t\t\t\"\\xC5\\xB4\" => \"W\", \"\\xC5\\xB5\" => \"w\", \"\\xC5\\xB6\" => \"Y\", \"\\xC5\\xB7\" => \"y\",\n\t\t\t\t\"\\xC5\\xB8\" => \"Y\", \"\\xC5\\xB9\" => \"Z\", \"\\xC5\\xBA\" => \"z\", \"\\xC5\\xBB\" => \"Z\",\n\t\t\t\t\"\\xC5\\xBC\" => \"z\", \"\\xC5\\xBD\" => \"Z\", \"\\xC5\\xBE\" => \"z\", \"\\xC6\\x8F\" => \"E\",\n\t\t\t\t\"\\xC6\\xA0\" => \"O\", \"\\xC6\\xA1\" => \"o\", \"\\xC6\\xAF\" => \"U\", \"\\xC6\\xB0\" => \"u\",\n\t\t\t\t\"\\xC7\\x8D\" => \"A\", \"\\xC7\\x8E\" => \"a\", \"\\xC7\\x8F\" => \"I\",\n\t\t\t\t\"\\xC7\\x90\" => \"i\", \"\\xC7\\x91\" => \"O\", \"\\xC7\\x92\" => \"o\", \"\\xC7\\x93\" => \"U\",\n\t\t\t\t\"\\xC7\\x94\" => \"u\", \"\\xC7\\x95\" => \"U\", \"\\xC7\\x96\" => \"u\", \"\\xC7\\x97\" => \"U\",\n\t\t\t\t\"\\xC7\\x98\" => \"u\", \"\\xC7\\x99\" => \"U\", \"\\xC7\\x9A\" => \"u\", \"\\xC7\\x9B\" => \"U\",\n\t\t\t\t\"\\xC7\\x9C\" => \"u\",\n\t\t\t\t\"\\xC7\\xBA\" => \"A\", \"\\xC7\\xBB\" => \"a\", \"\\xC7\\xBC\" => \"AE\", \"\\xC7\\xBD\" => \"ae\",\n\t\t\t\t\"\\xC7\\xBE\" => \"O\", \"\\xC7\\xBF\" => \"o\",\n\t\t\t\t\"\\xC9\\x99\" => \"e\",\n\t\n\t\t\t\t\"\\xC2\\xB4\" => \"'\", // Tilde\n\t\t\t\t\"\\xE2\\x80\\x99\" => \"'\", // Tilde\n\t\t\t\t\"\\xC2\\x82\" => \",\", // High code comma\n\t\t\t\t\"\\xC2\\x84\" => \",,\", // High code double comma\n\t\t\t\t\"\\xC2\\x85\" => \"...\", // Tripple dot\n\t\t\t\t\"\\xC2\\x88\" => \"^\", // High carat\n\t\t\t\t\"\\xC2\\x91\" => \"\\x27\", // Forward single quote\n\t\t\t\t\"\\xC2\\x92\" => \"\\x27\", // Reverse single quote\n\t\t\t\t\"\\xC2\\x93\" => \"\\x22\", // Forward double quote\n\t\t\t\t\"\\xC2\\x94\" => \"\\x22\", // Reverse double quote\n\t\t\t\t\"\\xC2\\x96\" => \"-\", // High hyphen\n\t\t\t\t\"\\xC2\\x97\" => \"--\", // Double hyphen\n\t\t\t\t\"\\xC2\\xA6\" => \"|\", // Split vertical bar\n\t\t\t\t\"\\xC2\\xAB\" => \"<<\", // Double less than\n\t\t\t\t\"\\xC2\\xBB\" => \">>\", // Double greater than\n\t\t\t\t\"\\xC2\\xBC\" => \"1/4\", // one quarter\n\t\t\t\t\"\\xC2\\xBD\" => \"1/2\", // one half\n\t\t\t\t\"\\xC2\\xBE\" => \"3/4\", // three quarters\n\t\n\t\t\t\t\"\\xCA\\xBF\" => \"\\x27\", // c-single quote\n\t\t\t\t\"\\xCC\\xA8\" => \"\", // modifier - under curve\n\t\t\t\t\"\\xCC\\xB1\" => \"\", // modifier - under line\n\t\t\t\t\"\\xC2\\xA0\" => \" \", // &nbsp;\n\t\t\t\t\"\\xE3\\x80\\x80\" => \" \", // space;\n\t\t\t\t\"\\xC2\\xBA\" => \"\" \t // Degree;\n\t );\n\t\tif( $tolower ) {\n\t\t\treturn strtolower( strtr($instr, $tranmap) );\n\t\t}\n\t\treturn strtr($instr, $tranmap);\n\t}", "function preparaCaracter($string)\n{\n $temp = explode(\" \", $string);\n $id = \"\";\n for($x=0;$x<count($temp);$x++)\n {\n if($x != 1)\n {\n $id .= $temp[$x].\"_\";\n }\n }\n $string = substr($id,0,-1);\n return strtolower(retiraAcentos($string));\n}", "function convert_vi_to_en($str) {\n $str = preg_replace(\"/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/\", 'a', $str);\n $str = preg_replace(\"/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/\", 'e', $str);\n $str = preg_replace(\"/(ì|í|ị|ỉ|ĩ)/\", 'i', $str);\n $str = preg_replace(\"/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/\", 'o', $str);\n $str = preg_replace(\"/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/\", 'u', $str);\n $str = preg_replace(\"/(ỳ|ý|ỵ|ỷ|ỹ)/\", 'y', $str);\n $str = preg_replace(\"/(đ)/\", 'd', $str);\n $str = preg_replace(\"/(À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ)/\", 'A', $str);\n $str = preg_replace(\"/(È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ)/\", 'E', $str);\n $str = preg_replace(\"/(Ì|Í|Ị|Ỉ|Ĩ)/\", 'I', $str);\n $str = preg_replace(\"/(Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ)/\", 'O', $str);\n $str = preg_replace(\"/(Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ)/\", 'U', $str);\n $str = preg_replace(\"/(Ỳ|Ý|Ỵ|Ỷ|Ỹ)/\", 'Y', $str);\n $str = preg_replace(\"/(Đ)/\", 'D', $str);\n return $str;}", "function p_enc($string) {\r\n $char_encoded = mb_convert_encoding($string, 'UTF-8', 'SJIS');\r\n return urlencode($char_encoded);\r\n}", "function unicode_encode( $name )\r\n{\r\n\t\t\t\t$name = iconv( \"UTF-8\", \"UCS-2\", $name );\r\n\t\t\t\t$len = strlen( $name );\r\n\t\t\t\t$str = \"\";\r\n\t\t\t\t$i = 0;\r\n\t\t\t\tfor ( ;\t$i < $len - 1;\t$i += 2\t)\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$c = $name[$i];\r\n\t\t\t\t\t\t\t\t$c2 = $name[$i + 1];\r\n\t\t\t\t\t\t\t\tif ( 0 < ord( $c ) )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$c2 = base_convert( ord( $c2 ), 10, 16 );\r\n\t\t\t\t\t\t\t\t\t\t\t\tif ( strlen( $c2 ) == 1 )\r\n\t\t\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\t\t\t$c2 = \"0\".$c2;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t$str .= \"\\\\u\".base_convert( ord( $c ), 10, 16 ).$c2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$str .= $c2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn $str;\r\n}", "function dividirPalabraEnLetras($palabra){\n \n /*>>> Completar para generar la estructura de datos b) indicada en el enunciado. \n recuerde que los string pueden ser recorridos como los arreglos. <<<*/\n \n}", "function MoisEnLettre($mois){\n\t\t$moisLettre = \"\";\n\t\tswitch($mois){\n\t\t\tcase \"1\": $moisLettre = \"janvier\"; break;\n\t\t\tcase \"2\": $moisLettre = \"f&eacute;vrier\"; break;\n\t\t\tcase \"3\": $moisLettre = \"mars\"; break;\n\t\t\tcase \"4\": $moisLettre = \"avril\"; break;\n\t\t\tcase \"5\": $moisLettre = \"mai\"; break;\n\t\t\tcase \"6\": $moisLettre = \"juin\"; break;\n\t\t\tcase \"7\": $moisLettre = \"juillet\"; break;\n\t\t\tcase \"8\": $moisLettre = \"ao&ucirc;t\"; break;\n\t\t\tcase \"9\": $moisLettre = \"septembre\"; break;\n\t\t\tcase \"10\": $moisLettre = \"octobre\"; break;\n\t\t\tcase \"11\": $moisLettre = \"novembre\"; break;\n\t\t\tcase \"12\": $moisLettre = \"d&eacute;cembre\"; break;\n\t\t}\n\t\treturn($moisLettre);\n\t}", "function Comprobar_codcentro()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODCENTRO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "function sanear_string2($string){\n \n $string = trim($string);\n \n $string = str_replace(\n array('á', 'à', 'ä', 'â', 'ª', 'Á', 'À', 'Â', 'Ä'),\n array('a', 'a', 'a', 'a', 'a', 'A', 'A', 'A', 'A'),\n $string\n );\n \n $string = str_replace(\n array('é', 'è', 'ë', 'ê', 'É', 'È', 'Ê', 'Ë'),\n array('e', 'e', 'e', 'e', 'E', 'E', 'E', 'E'),\n $string\n );\n \n $string = str_replace(\n array('í', 'ì', 'ï', 'î', 'Í', 'Ì', 'Ï', 'Î'),\n array('i', 'i', 'i', 'i', 'I', 'I', 'I', 'I'),\n $string\n );\n \n $string = str_replace(\n array('ó', 'ò', 'ö', 'ô', 'Ó', 'Ò', 'Ö', 'Ô'),\n array('o', 'o', 'o', 'o', 'O', 'O', 'O', 'O'),\n $string\n );\n \n $string = str_replace(\n array('ú', 'ù', 'ü', 'û', 'Ú', 'Ù', 'Û', 'Ü'),\n array('u', 'u', 'u', 'u', 'U', 'U', 'U', 'U'),\n $string\n );\n \n $string = str_replace(\n array('ñ', 'Ñ', 'ç', 'Ç'),\n array('n', 'N', 'c', 'C',),\n $string\n );\n \n //Esta parte se encarga de eliminar cualquier caracter extraño\n $string = str_replace(\n array(\"\\\\\", \"¨\", \"º\", \"-\", \"~\",\n \"#\", \"@\", \"|\", \"!\", '\"',\n \"·\", \"$\", \"%\", \"&\", \"/\",\n \"(\", \")\", \"?\", \"'\", \"¡\",\n \"¿\", \"[\", \"^\", \"<code>\", \"]\",\n \"+\", \"}\", \"{\", \"¨\", \"´\",\n \">\", \"< \", \";\", \",\", \":\",\n \".\"),\n '',\n $string\n );\n return $string;\n}", "public function getCode(): string;" ]
[ "0.6887669", "0.65741646", "0.6557049", "0.64724046", "0.6369432", "0.62903714", "0.62803173", "0.62032235", "0.61684155", "0.61607414", "0.6158614", "0.6076856", "0.6071001", "0.60648984", "0.60432583", "0.59601694", "0.5940908", "0.5911368", "0.5901652", "0.58923167", "0.5890692", "0.58873945", "0.5856123", "0.5845468", "0.5806818", "0.58063126", "0.5803929", "0.577876", "0.57706815", "0.5764923", "0.57510227", "0.57310843", "0.5697808", "0.568924", "0.5689225", "0.5685048", "0.5677813", "0.56774515", "0.56717557", "0.5667606", "0.56673074", "0.5666354", "0.5657858", "0.56563777", "0.5651183", "0.56500083", "0.5648658", "0.56454515", "0.5643023", "0.56413263", "0.5639254", "0.56384575", "0.5622826", "0.5619766", "0.5613403", "0.5605784", "0.5605151", "0.5582691", "0.55783767", "0.5577247", "0.5565754", "0.55641645", "0.5556741", "0.55565476", "0.55557495", "0.5554643", "0.55530214", "0.5549311", "0.5547005", "0.55385774", "0.5533191", "0.5530907", "0.5527185", "0.5522054", "0.55142045", "0.55064976", "0.55023986", "0.54998296", "0.54997694", "0.5495934", "0.5489347", "0.54891837", "0.54891485", "0.54886985", "0.54877996", "0.5484461", "0.5481377", "0.5481329", "0.54717237", "0.5467777", "0.54636806", "0.5455923", "0.5446917", "0.5443802", "0.54423356", "0.54373807", "0.54364985", "0.5436096", "0.54307723", "0.54277056", "0.54256487" ]
0.0
-1
$row = array(); $row["pos"] = $pos; $row["title"] = $title; $row["create_auditorid"] = $create_auditorid; $row["content"] = $content;
public static function createByBiz($row) { DBC::requireNotEmpty($row, "PatientGroup::createByBiz row cannot empty"); $default = array(); $default["pos"] = 0; $default["title"] = ''; $default["create_auditorid"] = 0; $default["content"] = ''; $row += $default; return new self($row); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NewRow() {\n\t\t$row = array();\n\t\t$row['unid'] = NULL;\n\t\t$row['u_id'] = NULL;\n\t\t$row['acl_id'] = NULL;\n\t\t$row['Title'] = NULL;\n\t\t$row['LV'] = NULL;\n\t\t$row['Type'] = NULL;\n\t\t$row['ResetTime'] = NULL;\n\t\t$row['ResetType'] = NULL;\n\t\t$row['CompleteTask'] = NULL;\n\t\t$row['Occupation'] = NULL;\n\t\t$row['Target'] = NULL;\n\t\t$row['Data'] = NULL;\n\t\t$row['Reward_Gold'] = NULL;\n\t\t$row['Reward_Diamonds'] = NULL;\n\t\t$row['Reward_EXP'] = NULL;\n\t\t$row['Reward_Goods'] = NULL;\n\t\t$row['Info'] = NULL;\n\t\t$row['DATETIME'] = NULL;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$row = array();\n\t\t$row['tanggal'] = NULL;\n\t\t$row['auc_number'] = NULL;\n\t\t$row['start_bid'] = NULL;\n\t\t$row['close_bid'] = NULL;\n\t\t$row['lot_number'] = NULL;\n\t\t$row['chop'] = NULL;\n\t\t$row['grade'] = NULL;\n\t\t$row['estate'] = NULL;\n\t\t$row['sack'] = NULL;\n\t\t$row['netto'] = NULL;\n\t\t$row['open_bid'] = NULL;\n\t\t$row['last_bid'] = NULL;\n\t\t$row['highest_bid'] = NULL;\n\t\t$row['enter_bid'] = NULL;\n\t\t$row['auction_status'] = NULL;\n\t\t$row['gross'] = NULL;\n\t\t$row['row_id'] = NULL;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$row = array();\n\t\t$row['row_id'] = NULL;\n\t\t$row['auc_date'] = NULL;\n\t\t$row['auc_number'] = NULL;\n\t\t$row['auc_place'] = NULL;\n\t\t$row['start_bid'] = NULL;\n\t\t$row['close_bid'] = NULL;\n\t\t$row['auc_notes'] = NULL;\n\t\t$row['total_sack'] = NULL;\n\t\t$row['total_netto'] = NULL;\n\t\t$row['total_gross'] = NULL;\n\t\t$row['auc_status'] = NULL;\n\t\t$row['rate'] = NULL;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$row = array();\n\t\t$row['product_id'] = NULL;\n\t\t$row['cat_id'] = NULL;\n\t\t$row['company_id'] = NULL;\n\t\t$row['pro_model'] = NULL;\n\t\t$row['pro_name'] = NULL;\n\t\t$row['pro_description'] = NULL;\n\t\t$row['pro_condition'] = NULL;\n\t\t$row['pro_features'] = NULL;\n\t\t$row['post_date'] = NULL;\n\t\t$row['ads_id'] = NULL;\n\t\t$row['pro_base_price'] = NULL;\n\t\t$row['pro_sell_price'] = NULL;\n\t\t$row['featured_image'] = NULL;\n\t\t$row['folder_image'] = NULL;\n\t\t$row['pro_status'] = NULL;\n\t\t$row['branch_id'] = NULL;\n\t\t$row['lang'] = NULL;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$row = array();\n\t\t$row['id'] = NULL;\n\t\t$row['fecha_tamizaje'] = NULL;\n\t\t$row['id_centro'] = NULL;\n\t\t$row['apellidopaterno'] = NULL;\n\t\t$row['apellidomaterno'] = NULL;\n\t\t$row['nombre'] = NULL;\n\t\t$row['ci'] = NULL;\n\t\t$row['fecha_nacimiento'] = NULL;\n\t\t$row['dias'] = NULL;\n\t\t$row['semanas'] = NULL;\n\t\t$row['meses'] = NULL;\n\t\t$row['sexo'] = NULL;\n\t\t$row['discapacidad'] = NULL;\n\t\t$row['id_tipodiscapacidad'] = NULL;\n\t\t$row['resultado'] = NULL;\n\t\t$row['resultadotamizaje'] = NULL;\n\t\t$row['tapon'] = NULL;\n\t\t$row['tipo'] = NULL;\n\t\t$row['repetirprueba'] = NULL;\n\t\t$row['observaciones'] = NULL;\n\t\t$row['id_apoderado'] = NULL;\n\t\t$row['id_referencia'] = NULL;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$row = array();\n\t\t$row['id'] = NULL;\n\t\t$row['id_sector'] = NULL;\n\t\t$row['id_actividad'] = NULL;\n\t\t$row['id_categoria'] = NULL;\n\t\t$row['apellidopaterno'] = NULL;\n\t\t$row['apellidomaterno'] = NULL;\n\t\t$row['nombre'] = NULL;\n\t\t$row['fecha_nacimiento'] = NULL;\n\t\t$row['sexo'] = NULL;\n\t\t$row['ci'] = NULL;\n\t\t$row['nrodiscapacidad'] = NULL;\n\t\t$row['celular'] = NULL;\n\t\t$row['direcciondomicilio'] = NULL;\n\t\t$row['ocupacion'] = NULL;\n\t\t$row['email'] = NULL;\n\t\t$row['cargo'] = NULL;\n\t\t$row['nivelestudio'] = NULL;\n\t\t$row['id_institucion'] = NULL;\n\t\t$row['observaciones'] = NULL;\n\t\t$row['id_centro'] = NULL;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$row = array();\n\t\t$row['unid'] = NULL;\n\t\t$row['u_id'] = NULL;\n\t\t$row['acl_id'] = NULL;\n\t\t$row['Name'] = NULL;\n\t\t$row['Basics'] = NULL;\n\t\t$row['HP'] = NULL;\n\t\t$row['MP'] = NULL;\n\t\t$row['AD'] = NULL;\n\t\t$row['AP'] = NULL;\n\t\t$row['Defense'] = NULL;\n\t\t$row['Hit'] = NULL;\n\t\t$row['Dodge'] = NULL;\n\t\t$row['Crit'] = NULL;\n\t\t$row['AbsorbHP'] = NULL;\n\t\t$row['ADPTV'] = NULL;\n\t\t$row['ADPTR'] = NULL;\n\t\t$row['APPTR'] = NULL;\n\t\t$row['APPTV'] = NULL;\n\t\t$row['ImmuneDamage'] = NULL;\n\t\t$row['Intro'] = NULL;\n\t\t$row['ExclusiveSkills'] = NULL;\n\t\t$row['TransferDemand'] = NULL;\n\t\t$row['TransferLevel'] = NULL;\n\t\t$row['FormerOccupation'] = NULL;\n\t\t$row['Belong'] = NULL;\n\t\t$row['AttackEffect'] = NULL;\n\t\t$row['AttackTips'] = NULL;\n\t\t$row['MagicResistance'] = NULL;\n\t\t$row['IgnoreShield'] = NULL;\n\t\t$row['DATETIME'] = NULL;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$row = array();\n\t\t$row['id'] = NULL;\n\t\t$row['nombre_contacto'] = NULL;\n\t\t$row['name'] = NULL;\n\t\t$row['lastname'] = NULL;\n\t\t$row['email'] = NULL;\n\t\t$row['address'] = NULL;\n\t\t$row['phone'] = NULL;\n\t\t$row['cell'] = NULL;\n\t\t$row['is_active'] = NULL;\n\t\t$row['created_at'] = NULL;\n\t\t$row['id_sucursal'] = NULL;\n\t\t$row['documentos'] = NULL;\n\t\t$row['DateModified'] = NULL;\n\t\t$row['DateDeleted'] = NULL;\n\t\t$row['CreatedBy'] = NULL;\n\t\t$row['ModifiedBy'] = NULL;\n\t\t$row['DeletedBy'] = NULL;\n\t\t$row['latitud'] = NULL;\n\t\t$row['longitud'] = NULL;\n\t\t$row['tipoinmueble'] = NULL;\n\t\t$row['id_ciudad_inmueble'] = NULL;\n\t\t$row['id_provincia_inmueble'] = NULL;\n\t\t$row['imagen_inmueble01'] = NULL;\n\t\t$row['imagen_inmueble02'] = NULL;\n\t\t$row['imagen_inmueble03'] = NULL;\n\t\t$row['imagen_inmueble04'] = NULL;\n\t\t$row['imagen_inmueble05'] = NULL;\n\t\t$row['imagen_inmueble06'] = NULL;\n\t\t$row['imagen_inmueble07'] = NULL;\n\t\t$row['imagen_inmueble08'] = NULL;\n\t\t$row['tipovehiculo'] = NULL;\n\t\t$row['id_ciudad_vehiculo'] = NULL;\n\t\t$row['id_provincia_vehiculo'] = NULL;\n\t\t$row['imagen_vehiculo01'] = NULL;\n\t\t$row['imagen_vehiculo02'] = NULL;\n\t\t$row['imagen_vehiculo03'] = NULL;\n\t\t$row['imagen_vehiculo04'] = NULL;\n\t\t$row['imagen_vehiculo05'] = NULL;\n\t\t$row['imagen_vehiculo06'] = NULL;\n\t\t$row['imagen_vehiculo07'] = NULL;\n\t\t$row['imagen_vehiculo08'] = NULL;\n\t\t$row['tipomaquinaria'] = NULL;\n\t\t$row['id_ciudad_maquinaria'] = NULL;\n\t\t$row['id_provincia_maquinaria'] = NULL;\n\t\t$row['imagen_maquinaria01'] = NULL;\n\t\t$row['imagen_maquinaria02'] = NULL;\n\t\t$row['imagen_maquinaria03'] = NULL;\n\t\t$row['imagen_maquinaria04'] = NULL;\n\t\t$row['imagen_maquinaria05'] = NULL;\n\t\t$row['imagen_maquinaria06'] = NULL;\n\t\t$row['imagen_maquinaria07'] = NULL;\n\t\t$row['imagen_maquinaria08'] = NULL;\n\t\t$row['tipomercaderia'] = NULL;\n\t\t$row['imagen_mercaderia01'] = NULL;\n\t\t$row['documento_mercaderia'] = NULL;\n\t\t$row['tipoespecial'] = NULL;\n\t\t$row['imagen_tipoespecial01'] = NULL;\n\t\t$row['email_contacto'] = NULL;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$this->LoadDefaultValues();\n\t\t$row = array();\n\t\t$row['replid'] = $this->replid->CurrentValue;\n\t\t$row['nama'] = $this->nama->CurrentValue;\n\t\t$row['besar'] = $this->besar->CurrentValue;\n\t\t$row['idkategori'] = $this->idkategori->CurrentValue;\n\t\t$row['rekkas'] = $this->rekkas->CurrentValue;\n\t\t$row['rekpendapatan'] = $this->rekpendapatan->CurrentValue;\n\t\t$row['rekpiutang'] = $this->rekpiutang->CurrentValue;\n\t\t$row['aktif'] = $this->aktif->CurrentValue;\n\t\t$row['keterangan'] = $this->keterangan->CurrentValue;\n\t\t$row['departemen'] = $this->departemen->CurrentValue;\n\t\t$row['info1'] = $this->info1->CurrentValue;\n\t\t$row['info2'] = $this->info2->CurrentValue;\n\t\t$row['info3'] = $this->info3->CurrentValue;\n\t\t$row['ts'] = $this->ts->CurrentValue;\n\t\t$row['token'] = $this->token->CurrentValue;\n\t\t$row['issync'] = $this->issync->CurrentValue;\n\t\treturn $row;\n\t}", "function initRow( $row ) {\r\n\t\t$this->oid = $row['id'];\n\t\t$this->uid = $row['uid'];\n\t\t$this->name = $row['name'];\n\t\t$this->description = $row['description'];\n\t\t\r\n\t}", "function _build_row_by_post()\n{\n\t$row = array(\n\t\t'syno_id' => $this->_post_class->get_post_get_int( 'syno_id' ),\n\t\t'syno_time_create' => $this->_post_class->get_post_int( 'syno_time_create' ),\n\t\t'syno_time_update' => $this->_post_class->get_post_int( 'syno_time_update' ),\n\t\t'syno_weight' => $this->_post_class->get_post_int( 'syno_weight' ),\n\t\t'syno_key' => $this->_post_class->get_post_text( 'syno_key' ),\n\t\t'syno_value' => $this->_post_class->get_post_text( 'syno_value' ),\n\t);\n\treturn $row;\n}", "protected function newRow()\n\t{\n\t\t$this->loadDefaultValues();\n\t\t$row = [];\n\t\t$row['document_sequence'] = $this->document_sequence->CurrentValue;\n\t\t$row['firelink_doc_no'] = $this->firelink_doc_no->CurrentValue;\n\t\t$row['project_name'] = $this->project_name->CurrentValue;\n\t\t$row['document_tittle'] = $this->document_tittle->CurrentValue;\n\t\t$row['submit_no'] = $this->submit_no->CurrentValue;\n\t\t$row['revision_no'] = $this->revision_no->CurrentValue;\n\t\t$row['transmit_no'] = $this->transmit_no->CurrentValue;\n\t\t$row['transmit_date'] = $this->transmit_date->CurrentValue;\n\t\t$row['direction'] = $this->direction->CurrentValue;\n\t\t$row['approval_status'] = $this->approval_status->CurrentValue;\n\t\t$row['document_link'] = $this->document_link->Upload->DbValue;\n\t\t$row['transaction_date'] = $this->transaction_date->CurrentValue;\n\t\t$row['document_native'] = $this->document_native->CurrentValue;\n\t\t$row['username'] = $this->username->CurrentValue;\n\t\t$row['expiry_date'] = $this->expiry_date->CurrentValue;\n\t\treturn $row;\n\t}", "function NewRow() {\n\t\t$this->LoadDefaultValues();\n\t\t$row = array();\n\t\t$row['row_id'] = $this->row_id->CurrentValue;\n\t\t$row['master_id'] = $this->master_id->CurrentValue;\n\t\t$row['lot_number'] = $this->lot_number->CurrentValue;\n\t\t$row['chop'] = $this->chop->CurrentValue;\n\t\t$row['estate'] = $this->estate->CurrentValue;\n\t\t$row['grade'] = $this->grade->CurrentValue;\n\t\t$row['jenis'] = $this->jenis->CurrentValue;\n\t\t$row['sack'] = $this->sack->CurrentValue;\n\t\t$row['netto'] = $this->netto->CurrentValue;\n\t\t$row['gross'] = $this->gross->CurrentValue;\n\t\t$row['open_bid'] = $this->open_bid->CurrentValue;\n\t\t$row['currency'] = $this->currency->CurrentValue;\n\t\t$row['bid_step'] = $this->bid_step->CurrentValue;\n\t\t$row['rate'] = $this->rate->CurrentValue;\n\t\t$row['winner_id'] = $this->winner_id->CurrentValue;\n\t\t$row['sold_bid'] = $this->sold_bid->CurrentValue;\n\t\t$row['proforma_number'] = $this->proforma_number->CurrentValue;\n\t\t$row['proforma_amount'] = $this->proforma_amount->CurrentValue;\n\t\t$row['proforma_status'] = $this->proforma_status->CurrentValue;\n\t\t$row['auction_status'] = $this->auction_status->CurrentValue;\n\t\t$row['enter_bid'] = $this->enter_bid->CurrentValue;\n\t\t$row['last_bid'] = $this->last_bid->CurrentValue;\n\t\t$row['highest_bid'] = $this->highest_bid->CurrentValue;\n\t\treturn $row;\n\t}", "public function get_newrow(){\n $ar = array(\n 'id' => 0,\n 'category_id' => 0,\n 'art' => '',\n 'title' => '',\n 'description' => '',\n 'price' => 0,\n\n 'category_name' => ''\n );\n return $ar;\n }", "function _build_row_by_post()\n{\n\t$row = array(\n\t\t'vote_id' => $this->_post_class->get_post_get_int( 'vote_id' ),\n\t\t'vote_time_create' => $this->_post_class->get_post_int( 'vote_time_create' ),\n\t\t'vote_time_update' => $this->_post_class->get_post_int( 'vote_time_update' ),\n\t\t'vote_photo_id' => $this->_post_class->get_post_int( 'vote_photo_id' ),\n\t\t'vote_uid' => $this->_post_class->get_post_int( 'vote_uid' ),\n\t\t'vote_rating' => $this->_post_class->get_post_int( 'vote_rating' ),\n\t\t'vote_hostname' => $this->_post_class->get_post_text( 'vote_hostname' ),\n\n\t);\n\treturn $row;\n}", "function _build_row_by_post()\n{\n\t$row = array(\n\t\t'user_id' => $this->_post_class->get_post_get_int( 'user_id' ),\n\t\t'user_time_create' => $this->_post_class->get_post_int( 'user_time_create' ),\n\t\t'user_time_update' => $this->_post_class->get_post_int( 'user_time_update' ),\n\t\t'user_uid' => $this->_post_class->get_post_int( 'user_uid' ),\n\t\t'user_cat_id' => $this->_post_class->get_post_int( 'user_cat_id' ),\n\t\t'user_email' => $this->_post_class->get_post_text( 'user_email' ),\n\t\t'user_text1' => $this->_post_class->get_post_text( 'user_text1' ),\n\t\t'user_text2' => $this->_post_class->get_post_text( 'user_text2' ),\n\t\t'user_text3' => $this->_post_class->get_post_text( 'user_text3' ),\n\t\t'user_text4' => $this->_post_class->get_post_text( 'user_text4' ),\n\t\t'user_text5' => $this->_post_class->get_post_text( 'user_text5' ),\n\t);\n\n\tfor ( $i=1; $i <= _C_WEBPHOTO_MAX_CAT_TEXT; $i++ ) \n\t{\n\t\t$name = 'user_text'.$i;\n\t\t$row[ $name ] = $this->_post_class->get_post_text( $name );\n\t}\n\n\treturn $row;\n}", "function to_array() \n {\n $d = array();\n $d[\"id\"] = $this->id;\n $d[\"offset\"] = $this->offset;\n $d[\"title\"] = $this->title;\n $d[\"description\"] = $this->description;\n $d[\"author\"] = $this->author;\n $d[\"type\"] = $this->type;\n $d[\"updated\"] = $this->updated;\n $d[\"published\"] = $this->published;\n $d[\"publish_time\"] = $this->publish_time;\n $d[\"insert_time\"] = $this->insert_time;\n return $d;\n }", "private function _fill_insert_data() {\n $data = array();\n $data['numero_ticket'] = $this->_generate_numero_ticket();\n $data['descripcion'] = $this->post('descripcion');\n $data['soporte_categoria_id'] = $this->post('soporte_categoria_id');\n $data['persona_id'] = get_persona_id();\n $data['created_at'] = date('Y-m-d H:i:s');\n $data['status'] = 1;\n return $data;\n }", "public static function context($row)\n\t{\n\t\tif (!$row['title']) $row['title'] = \"Untitled\";\n\n\t\tif ($row['body'] && !self::$raw) {\n\t\t\t$p = new WikiParser();\n\t\t\t$row['body'] = $p->parse($row['body']);\n\t\t} else if ($row['body']) {\n\t\t\t$row['body'] = htmlentities($row['body']);\n\t\t}\n\n\t\treturn array(\n\t\t\t'id' => $row['id'],\n\t\t\t'title' => $row['title'],\n\t\t\t'search_title' => $row['search_title'],\n\t\t\t'link' => '<a href=\"'.r::$link->to('blog','view',$row['id']).'\">'.\n\t\t\t\t$row['title'].'</a>',\n\t\t\t'author' => array(\n\t\t\t\t'name' => $row['member_name'] ? $row['member_name'] : \"Guest\", \n\t\t\t\t'id' => $row['author_id'],\n\t\t\t\t'link' => $row['author_id'] ? \n\t\t\t\t\t'<a href=\"'.r::$link->to('members','profile',$row['author_id']).'\">'.\n\t\t\t\t\t$row['member_name'].'</a>' : \"Guest\",\n\t\t\t),\n\t\t\t'icon' => $row['icon'],\n\t\t\t'icon_url' => 'not sure yet!',\n\t\t\t'num_comments' => $row['num_comments'],\n\t\t\t// 'timestamp' => Util::timestamp($row['post_date']),\n\t\t\t'post_date' => $row['post_date'],\n\t\t\t'formatted_date' => date('F jS Y', $row['post_date']),\n\t\t\t'body' => $row['body'],\n\t\t);\n\n\t}", "function to_array() \n {\n $d = array();\n $d[\"id\"] = $this->id;\n $d[\"offset\"] = $this->offset;\n $d[\"title\"] = $this->title;\n $d[\"description\"] = $this->description;\n return $d;\n }", "public function prepareRow($row) {\n\n\t#$wp_row = $row->xml->children($this->arguments['namespaces']['wp']);\n\t#$content_row = $row->xml->children($this->arguments['namespaces']['content']);\n\t$xml_data = $row->xml->children();\n\n\t// skipe if there is not title\n\t$row->title = (string) $xml_data->title;\n if (!$row->title) {\n \treturn FALSE;\n }\n\t// ONLY migrate publish or draft content\n\t$status = $this->xpathValue($row->xml->xpath(\"wp:status\")); \n\tif ($status == 'publish') {\n\t\t$row->status = 1;\n\t} elseif ($status == 'draft') {\n\t\t$row->status = 0;\t\n\t} else {\n\t\treturn FALSE;\n\t}\n\n\t$row->pubdate = $this->xpathValue($row->xml->xpath(\"pubDate\"));\n\t$row->urlalias = $this->xpathValue($row->xml->xpath(\"wp:post_name\"));\n\t$row->native_advertiser = $this->xpathValue($row->xml->xpath(\"category[@domain = 'sponsor' and @nicename]\"));\n\t$row->eyebrow_text = $this->xpathValue($row->xml->xpath(\"wp:postmeta[wp:meta_key = 'digital-issue-text']/wp:meta_value\"));\n\t$row->eyebrow_link = $this->xpathValue($row->xml->xpath(\"wp:postmeta[wp:meta_key = 'digital-issue-url']/wp:meta_value\"));\n\t$row->disable_flipboard = $this->xpathValue($row->xml->xpath(\"wp:postmeta[wp:meta_key = 'disable_flipboard']/wp:meta_value\"));\n\t$row->google_news_standout = $this->xpathValue($row->xml->xpath(\"wp:postmeta[wp:meta_key = 'post_standout_tag']/wp:meta_value\"));\n\n\t// drush_print_r($row);\n }", "public function getNoteContentFromRow($tableName,$row){\n\t\tglobal $TCA;\n\n\t\t$htmlContent = array('<table>');\n\t\t$htmlContent[] = $this->_getNoteTableRow('UID',$row['uid']); unset($row['uid']);\n\n\t\t$col = 'crdate';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Created');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) ); unset($row[$col]);\n\n\t\t$col = 'cruser_id';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Created by');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getUserById($row[$col]) ); unset($row[$col]);\n\n\t\t$col = 'tstamp';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Last update');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) ); unset($row[$col]);\n\n\n\t\tif( isset($row['sys_language_uid']) ){\n\t\t\t$col = 'sys_language_uid';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Language ID');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,'('.$row[$col].') '.$this->getSysLanguageDetails($row[$col],'title').' <img src=\"'.$this->getBEHttpHost().$this->getSysLanguageDetails($row[$col],'flag').'\"/>' );\n\t\t} unset($row[$col]);\n\n\t\tif( isset($row['starttime']) && $row['starttime'] > 0 ){\n\t\t\t$col = 'starttime';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Starttime');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) );\n\t\t}\n\t\tunset($row['starttime']);\n\t\tif( isset($row['endtime']) && $row['endtime'] > 0 ){\n\t\t\t$col = 'endtime';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Endtime');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) );\n\t\t}\n\t\tunset($row['endtime']);\n\t\tunset($row['uid']);\n\t\tunset($row['pid']);\n\t\tunset($row['titInt0']);\n\t\tunset($row['title']);\n\t\tunset($row['doktype']);\n\t\tunset($row['shortcut_mode']);\n\t\tunset($row['module']);\n\t\tunset($row['deleted']);\n\t\tunset($row['hidden']);\n\t\tunset($row['disable']);\n\n\t\t/* list user defined columsn for a table listet in a sysfolder */\n\t\tif( $tableName <> '' && count($row)>0 ){\n\t\t\n\t\t\t$bodyLength = isset($this->settings['SysFolderContentListTextMaxLength']) ? (int)$this->settings['SysFolderContentListTextMaxLength'] : 250;\n\n\t\t\tforeach($row as $colName=>$colVal){\n\t\t\t\t$noLtGtReplace = 0;\n\t\t\t\n\t\t\t\tif( $colVal <> '' ){\n\t\t\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$colName,$colName);\n\t\t\t\t\t$tcaEval = isset($TCA[$tableName]['columns'][$colName]['config']['eval']) ? $TCA[$tableName]['columns'][$colName]['config']['eval'] : '';\n\t\t\t\t\t$tcaType = isset($TCA[$tableName]['columns'][$colName]) ? strtolower($TCA[$tableName]['columns'][$colName]['config']['type']) : 'text';\n\t\t\t\t\t\n\t\t\t\t\t/*<TemplaVoila>*/\n\t\t\t\t\tif( $tableName == 'tx_templavoila_tmplobj' && in_array($colName,array('fileref_md5','fileref','datastructure')) ){\n\t\t\t\t\t\n\t\t\t\t\t\tif( $colName=='fileref_md5' && isset($row['fileref_md5']) && \n\t\t\t\t\t\t\tisset($row['fileref']) && file_exists(PATH_site.$row['fileref']) ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$currentMD5 = @md5_file(PATH_site.$row['fileref']);\n\t\t\t\t\t\t\tif($currentMD5 <> $row['fileref_md5'] ){\n\t\t\t\t\t\t\t\t$label .= $this->convertLTGT(' <img src=\"'.$this->getBEHttpHost().'typo3/sysext/t3skin/icons/gfx/icon_warning.gif\"/>');\n\t\t\t\t\t\t\t\t$colVal = ' New: '.$currentMD5.'<br />Old: '.$colVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}elseif($colName=='datastructure' || $colName=='fileref'){\n\t\t\t\t\t\t\t$colVal = $this->_value2ATag($colVal);\n\t\t\t\t\t\t}\n\t\t\t\t\t}/*</TemplaVoila>*/\n\t\t\t\t\t\n\t\t\t\t\t/*<Templates>*/\n\t\t\t\t\telseif( ($tableName == 'sys_template' || $tableName == 'pages' ) && \n\t\t\t\t\t\tin_array($colName,array('include_static_file','constants','config','TSconfig')) ){\n\t\t\t\t\t\t/* @TODO better implementing of tables which has TS column */\n\t\t\t\t\t\tif( $colName == 'include_static_file' ){\n\t\t\t\t\t\t\t$colVal = implode('<br />',explode(',',$colVal));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( $colName == 'constants' || $colName == 'config' || $colName == 'TSconfig' ){\n\t\t\t\t\t\t\t$noLtGtReplace = 1;\n\n\t\t\t\t\t\t\t/* @todo link external TS files via eID ... still to think about it ...\n\t\t\t\t\t\t\t$colVal = Tx_Typo3mind_Utility_Helpers::TSReplaceFileLinkWithHref($colVal); \n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\t$colVal = $this->convertLTGT('<pre>').trim($colVal).$this->convertLTGT('</pre>');\n\t\t\t\t\t\t}\n\t\t\t\t\t}/*</Templates>*/\n\t\t\t\t\t\n\t\t\t\t\t/*<default values>*/\n\t\t\t\t\telseif( stristr($tcaEval,'date')!==false ){ $colVal = $this->getDateTime($colVal); }\n\t\t\t\t\telseif( $tcaType == 'text' || $tcaType == 'input' ){\n\t\t\t\t\t\t/* we can't relay on the user, that all HTML is XML valid ... */\n\t\t\t\t\t\t$colVal = strip_tags($colVal);\n\t\t\t\t\t\tif( strlen($colVal) > $bodyLength ){ $colVal = preg_replace('/^(.{'.$bodyLength.'}\\S*).*$/s','\\\\1 ...',$colVal); }\n\t\t\t\t\t\t$colVal = preg_replace('~[\\r\\n]+~',\"\\n\",$colVal);\n\t\t\t\t\t\t$colVal = nl2br($colVal);\n\t\t\t\t\t}\n\t\t\t\t\t/*</default values>*/\n\t\t\t\t\t \n\t\t\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$colVal,$noLtGtReplace );\n\t\t\t\t}/*endif*/\n\t\t\t}/*endforeach*/\n\n\t\t}/*endif $tableName*/\n\n\t\t$htmlContent[] = '</table>';\n\t\treturn implode('',$htmlContent);\n\t}", "function load_from_row ($row) {\n $this->id = $row['content_id'];\n $this->path = $row['content_path'];\n $this->user_id = $row['user_id'];\n $this->perso_id = $row['perso_id'];\n $this->title = $row['content_title'];\n }", "private function buildRow($session_user, $feedback): array\n {\n return $row = [\n 'id' => $feedback['id'],\n 'name' => $session_user['name'],\n 'comment' => $feedback['comment'],\n 'date' => date('Y-m-d')\n ];\n }", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\t}", "function setRowDatas(&$row) {\r\n\t\t\r\n }", "function __construct($row) {\n\t\t $this->id = $row ['id'];\n\t\t $this->name = $row ['name'];\n\t\t $this->city = $row ['city'];\n\t\t $this->street = $row ['street'];\n\t\t $this->contact = $row ['contact'];\t\t \t\n\t }", "function getEverythingFromDatabase($row) {\r\n\t\t//initilizing variables from row data\r\n\t\t$this->id = $row['id'];\r\n\t\t$this->email = $row['email'];\r\n\t\t$this->phone_number = $row['phoneNumber'];\r\n\t\t$this->name = $row['eventName'];\r\n\t\t$this->event_date_time = $row['eventDateTime'];\r\n\t\t$this->reminder_date_time = $row['reminderDateTime'];\r\n\t\t$this->notif_method = $row['method'];\r\n\t\t$this->time_before = $row['timeBefore'];\r\n\t\t$this->freq = $row['frequency'];\r\n\t}", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\r\n\t\t//$this->_specific_data\t= isset($row->specific) ? $row->specific : '';\r\n\t}", "public function __construct($row) {\n $this->id = $row['id'];\n $this->name = $row['name'];\n $this->description = $row['description'];\n $this->userid = $row['userid'];\n $this->created = strtotime($row['created']);\n }", "public function __construct($row) {\n $this->pd_id = $row['pd_id'];\n//each column data is extracted\n $this->collected_time = $row['collected_time'];\n $this->rpm = $row['rpm'];\n $this->coolant_temp = $row['coolant_temp'];\n $this->soot_buildup = $row['soot_buildup'];\n $this->average_consumption = $row['average_consumption']; }", "private function _prepareRow($array){\n return array_merge($this->_blankRow, $array);\n }", "function stdRec_loadRow($row, $flags=0) {\n $this->rstKid_kidId = $row['rKd:KidId'];\n $this->rstParent_name[] = $row['rPU:FirstName'] . ' ' . $row['rPU:LastName'];\n $this->rstParent_home[] = $row['rPU:HomePhone'];\n $this->rstParent_cell[] = $row['rPU:CellPhone'];\n $this->rstParent_work[] = $row['rPU:WorkPhone'];\n $this->rstParent_emergency_name = $row['rFa:EmergencyPhone'];\n $this->rstParent_emergency_phone = $row['rFa:EmergencyName'];\n}", "private function mod_prep($row){\n $meta = new dbMeta(); \n $cols = $meta->get_tabel_columns(); // array w/ all metadata \n $form_array_mod = $meta->buildFormArray($cols); // make to nice form ready\n // insert the values to the form array for mod form\n foreach($row as $k => $v) {\n $form_array_mod[$k]['VALUE'] = $v;\n } \n \n update_form($form_array_mod); // returns array ready to be processed \n }", "function setupNewItem()\n {\n $item = array(\n 'id' => null,\n 'pending_id' => null,\n 'content_id' => null,\n 'created' => date( 'Y-m-d H:i:s'),\n 'createdBy' => $_SESSION['isLoggedUID'],\n 'updated' => null,\n 'updatedBy' => null,\n 'status' => 'create',\n 'topic' => null,\n 'subtopic' => null,\n 'heading' => null,\n 'date' => date( 'Y-m-d H:i:s'),\n 'caption' => null,\n 'text' => null,\n 'download_src' => null,\n 'download_name' => null,\n 'images' => array(),\n 'tags' => array(),\n 'terms' => array());\n $_SESSION['cropId'] = null;\n\n return($item);\n }", "function __construct($row) {\n\t\t$this->number = $row ['number'];\n\t\t$this->description = $row ['description'];\n\t\t$this->price = $row ['price'];\n\t}", "function add_row($arr_html,$row){\r\n\r\n\t\tarray_splice($this->data, $row-1, 0, array($arr_html));\r\n\r\n\t}", "public function entryList() {\n $content = [];\n\n $content['message'] = [\n '#markup' => $this->t('Generate a list of all entries in the database. There is no filter in the query.'),\n ];\n\n $rows = [];\n $headers = [\n $this->t('pid'),\n $this->t('uid'),\n $this->t('studentname'),\n $this->t('studentno'),\n $this->t('chapter'),\n\t \n\t $this->t('status'),\n\t\t$this->t('link'),\n ];\n//print_r($this->repository);exit;\n\n$results = $this->repository->load();\n//echo\"<pre>\";//print_r($entries);exit;\n \n\t\n\t\n\t$k1=array();\n $output=array();\n\n foreach($results as $k=>$data){\n\n \n//print_r($results[$k]);exit;\n if($results[$k]->status ==1)\n {\n\t\t \n\t\t $edit = Url::fromUserInput('/update');\n $output[] = [\n\t\t 'pid' => $results[$k]->pid,\n\t\t 'uid' => $results[$k]->uid,\n 'studentname' => $results[$k]->studentname, // 'userid' was the key used in the header\n 'studentno' => $results[$k]->studentno, // 'Username' was the key used in the header\n 'chapter' => $results[$k]->chapter,\n\t\t \n 'status' => 'Granted',\n \\Drupal::l('Edit', $edit),\n\n\n\n\n ];\n }\n if($results[$k]->status ==0)\n {\n\t\t \n\t\t $edit = Url::fromUserInput('/update');\n $output[] = [\n 'pid' => $results[$k]->pid,\n\t\t 'uid' => $results[$k]->uid,\n 'studentname' => $results[$k]->studentname, // 'userid' was the key used in the header\n 'studentno' => $results[$k]->studentno, // 'Username' was the key used in the header\n 'chapter' => $results[$k]->chapter,\n\t\t \n 'status' => 'Notgranted',\n \\Drupal::l('Edit', $edit),\n\n\n\n\n ];\n }\n\n\n\n//print_r($output);exit;\n\n array_push($k1,$output);\n //display data in site\n\n }\n//print_r($k1);exit;\n $content['table'] = [\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $output,\n '#empty' => t('No users found'),\n ];\n return $content;\n\n }", "function __construct($row){\n\t\t$this->id = $row['id'];\n\t\t$this->first_name = $row['first_name'];\n\t\t$this->last_name = $row['last_name'];\n\t\t$this->email = $row['email'];\n\t\t$this->country = $row['country'];\n\t\t$this->city = $row['city'];\n\t\t$this->photo = $row['photo'];\n\t}", "abstract protected function createEntity(array $row);", "public function prepareRow($row) {\n parent::prepareRow($row);\n\n $row->field_ref_document = unserialize($row->field_ref_document);\n $row->field_event_location = unserialize($row->field_event_location);\n $row->field_event_organiser = unserialize($row->field_event_organiser);\n\n $row->body = $this->prepareHtml($row->body);\n\n $row->field_event_full_description = $this->prepareHtml(\n $row->field_event_full_description\n );\n\n if (strlen($row->field_event_full_description) <= 0) {\n $row->field_event_full_description = $row->body;\n }\n\n // Will map to the summary, which is plain text.\n $row->body = drupal_html_to_text(\n $row->body\n );\n\n if (!$row->field_event_location == '' && !empty($row->field_event_location)) {\n\n $location = $row->field_event_location;\n\n $mapping = array(\n 'UK' => 'GB',\n );\n\n $country = strtoupper($location['country']);\n\n $row->c4m_location_address_country = (!empty($mapping[$country])) ? $mapping[$country] : $country;\n $row->c4m_location_address_street = $location['street'];\n $row->c4m_location_address_additional = $location['additional'];\n $row->c4m_location_address_postal = $location['postal_code'];\n $row->c4m_location_address_city = $location['city'];\n $row->c4m_location_address_state = $location['province'];\n $row->c4m_location_address_name = $location['name'];\n }\n\n return TRUE;\n }", "private function _make_item_row($data,$before) {\r\n // $type = $data->unit_type ? $data->unit_type : \"\";\r\n\r\n $name=$data->name;\r\n //$code=$data->code;\r\n if($data->name==$before){\r\n $name='';\r\n }\r\n\r\n\r\n return array(\r\n $data->code,\r\n $name,\r\n $data->title,\r\n $data->stock_on_hand,\r\n $data->description,\r\n $data->date_adjusment,\r\n modal_anchor(get_uri(\"inventory/stock/modal_form_edit\"), \"<i class='fa fa-pencil'></i>\", array(\"class\" => \"edit\", \"title\" => lang('edit_item'), \"data-post-id\" => $data->id))\r\n . js_anchor(\"<i class='fa fa-times fa-fw'></i>\", array('title' => lang('delete'), \"class\" => \"delete\", \"data-id\" => $data->id, \"data-action-url\" => get_uri(\"inventory/stock/delete\"), \"data-action\" => \"delete\"))\r\n );\r\n }", "public function exchanegArray($_data)\n {\n $this->page_no = (int) gv('page_no', $_data);\n $this->category_no = (int) gv('category_no', $_data);\n $this->controller_no = (int) gv('controller_no', $_data);\n $this->page_title = (string) gv('page_title', $_data);\n $this->page_uri = (string) gv('page_uri', $_data);\n $this->page_description = (string) gv('page_description', $_data);\n $this->icon = (string) gv('icon', $_data);\n $this->order_no = (int) gv('order_no', $_data);\n $this->use_mobile = (int) gv('use_mobile', $_data);\n $this->update_time = (string) gv('update_time', $_data);\n }", "private function _make_item_row($data) {\n $item = \"<b>$data->title</b>\";\n if ($data->description) {\n $item.=\"<br /><span>\" . nl2br($data->description) . \"</span><br><span style='float:right;'>\".$data->category.\"<span>\";\n }\n $type = $data->unit_type ? $data->unit_type : \"\";\n\n $val = $this->Sales_Invoices_model->get_details(array(\"id\" => $data->fid_invoices))->row();\n\n if($val->status != \"posting\"){\n return array(\n modal_anchor(get_uri(\"sales/s_invoices/item_modal_form\"), \"<i class='fa fa-pencil'></i>\", array(\"class\" => \"edit\", \"title\" => lang('edit_invoice'), \"data-post-id\" => $data->id)).js_anchor(\"<i class='fa fa-times fa-fw'></i>\", array('title' => lang('delete'), \"class\" => \"delete\", \"data-id\" => $data->id, \"data-action-url\" => get_uri(\"sales/s_invoices/delete_item\"), \"data-action\" => \"delete\")),\n $item,\n to_decimal_format($data->quantity) . \" \" . $type,\n to_currency($data->rate),\n to_currency($data->total),\n\n\n );\n\n }else{\n return array(\n \"&nbsp;\",\n $item,\n to_decimal_format($data->quantity) . \" \" . $type,\n to_currency($data->rate),\n to_currency($data->total)\n\n \n\n );\n\n }\n }", "function getBlogPostsArray(){\n\t\n\tglobal $db; // database needs to be openen within the scope of the function if funtion is being called from outside of the file\t\t\n\t$sql =<<<EOF\n\tSELECT rowid, * from BLOGPOSTS;\nEOF;\n\n\t$ret = $db->query($sql); // what is the datatype ret? object of type SQLite3Result\t\t\t\n\twhile($row = $ret->fetchArray(SQLITE3_ASSOC) ){ // I believe this means while there is another row in the array\t\n\t\t$blogPosts[$row['rowid']] = $row; // this adds the post array to the blogposts array with the post as the pk\t\t\t \n } \n\t//print_r($blogPosts);\n\t//echo \"Operation done successfully\\n\"; \n\t//$db->close();\n\treturn $blogPosts;\n}", "public function _format_row($row)\n {\n $row['config'] = !empty($row['config']) ? unserialize($row['config']) : array();// 活动配置\n return $row;\n }", "public function _format_row($row)\n {\n $row['config'] = !empty($row['config']) ? unserialize($row['config']) : array();// 活动配置\n return $row;\n }", "function injectTableRow ($row) {\n\tglobal $tableRow;\n\t$injected = $tableRow;\n\t$injected = page_replace ($injected, \"{{title}}\", ($row[1]));\n\t$injected = page_replace ($injected, \"{{author}}\", ($row[2]));\n\t$injected = page_replace ($injected, \"{{link}}\", ($row[3]));\n\treturn $injected;\n}", "function getFromDatabase($row) {\r\n\t\t//id\r\n\t\t$this->id = $row['id'];\r\n\t\t//eventDateTime\r\n\t\t$this->event_date_time = $row['eventDateTime'];\r\n\t\t//time before\r\n\t\t$this->time_before = $row['timeBefore'];\r\n\t\t//frequency\r\n\t\t$this->freq = $row['frequency'];\r\n\t\t//method\r\n\t\t$this->notif_method = $row['method'];\r\n\t}", "function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}", "public function createDataRow()\n\t{\n\t\t$row = array() ;\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\t$row[$field] = $this->$field ;\n\t\t}\n\t\treturn $row ;\n\t}", "function build_row($row)\n{\n\t$name = $row->getColumnVal('Name');\n\t$id = $row->getColumnVal('Id');\n\n\t// Setup the columns you want to work with\n\t$idCol = $row->getCol('Id');\n\t$nameCol = $row->getCol('Name');\n\t$actionCol = $row->getCol('Action');\n\t$typeCol = $row->getCol('Type');\n\n\t// Set some HTML properties on the give column\n\t$idCol->setProp('width','50');\n\t$typeCol->setProp('width','50');\n\t$typeCol->addClass('center');\n\n\t// Add some CSS classes to the action column\n\t$actionCol\n\t\t-> addClass('center')\n\t\t-> addClass('btn');\n\n\t// Add an action link to the Action column\n\t$row->addLink('Action', \"examples.php?id=$id\", '[edit]', \"\", \"no-un\");\n\t$row->addLink('Action', \"examples.php?id=$id\", '[delete]', \"\", \"no-un\");\n\n\t// Set an ID on the row\n\t$row->setProp('id', \"tr_$id\");\n\n\t// set the background of the strawberry column to black\n\tif($name == \"Strawberry\")\n\t{\n\t\t// get an instance of the column and set a css class\n\t\t$nameCol->addClass('strawberry');\n\t}\n\n\t// set the background of the entire shoe row to red\n\tif($name == \"Chocolate\")\t\n\t{\n\t\t$row->addClass('chocolate');\n\t}\n\n\t// change one of the cell values\n\tif($name == \"Banana\")\t\n\t{\n\t\t$row->setVal('Name', $name . \" (favorite) <img src='https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcROTNegrNoPzMFMcpQ4pl7tko9LMwgoXuZyjTmX8vpUuPS_RfZr' />\");\n\t}\n\n\treturn $row;\n}", "function __tpl_assign_rows(&$res)\n\t{\n\t\tglobal $current_lang;\n\t\t\n\t\t$i = 0;\n\t\twhile($row = $res->fetchrow())\n\t\t{\n\t\t\t$this->content->rows[$row['id']] = $row;\n\n\t\t\tif (isset($row['name_'.$current_lang]))\n\t\t\t{\n\t\t\t\t$this->content->rows[$row['id']]['name'] = $row['name_'.$current_lang];\n\t\t\t}\n\t\t\t//echo 'name: '.$row['name_'.$current_lang].\"\\n<br />\";\n\t\t\n\t\t\t/**\n\t\t\t * Check thumbnails and create if needed\n\t\t\t */\n\t\t\t$tmp = $this->create_thumbnail($row['id'], $this->thumb_size);\n\t\t\t\n\t\t\t$thumbs_dir = UPLOAD_THUMB_REL_PATH.'/'. substr(get_class($this->dao), 4) .'/'.$this->thumb_size.'/'.$row['id'];\n\n\t\t\t$this->content->rows[$row['id']]['photo_file'] = $thumbs_dir .'/1.'. $this->thumb_type; \n\t\t\t$this->content->rows[$row['id']]['split_start'] = ! fmod($i, $this->records_per_row); \n\t\t\t$this->content->rows[$row['id']]['split_end'] = ! fmod($i + 1, $this->records_per_row);\n\t\t\t\n\t\t\t$size = @getimagesize($this->content->rows[$row['id']]['photo_file']);\n\t\t\t$this->content->rows[$row['id']]['photo_width'] = \n\t\t\t\t($size[0] > $this->thumb_size) ? $this->thumb_size : $size[0];\n\t\t\t$i++;\n\t\t}\n\t}", "public function __construct($row) {\n $this->pd_id = isset($row['pd_id']) ? intval($row['pd_id']) : null;\n//each column data is extracted\n $this->product_id = $row['product_id'];\n $this->org_id = $row['org_id'];\n $this->machine_id = $row['machine_id'];\n $this->machine_name = $row['machine_name'];\n }", "function Submission_Author_Data()\n {\n return\n array\n (\n \"Title\",\"Name\",\"Institution\",\"Lattes\",\"Email\"\n );\n }", "function infographies_edit_config($row){\n\treturn array();\n}", "function generateContent($resultArray)\n{\n for ($count = 0; $count < count($resultArray); $count++) {\n echo \"<tr name=\\\"content\\\" id=\\\"\" . $resultArray[$count][\"id\"] . \"\\\" ><td>\" . $resultArray[$count][\"id\"] . \"</td><td><a href=\\\"result.php?id=\" . $resultArray[$count][\"id\"] . \"\\\" target=\\\"_blank\\\">\" . $resultArray[$count][\"Title\"] . \"</td><td>\" . $resultArray[$count][\"Year\"] . \"</td><td>\" . $resultArray[$count][\"Authors\"] . \"</td><td><del>\" . $resultArray[$count][\"MisMatch\"] . \"</del></td><td>\" . $resultArray[$count][\"MatchScore\"] . \"</td></tr>\";\n }\n \n}", "function gttn_tpps_parse_file_helper($row, &$options) {\n $options['content'][] = $row;\n}", "public function getRow($row){\n\t\t\t$this->groupId = $row['groupId'];\n\t\t\t$this->name = $row['name'];\n\t\t\t$this->description = $row['description'];\n\t\t\t\n\t\t\t$this->isLoaded = true;\n\t\t}", "function prepare_array() {\n\n\t\t$obj['name'] = $this->name->value;\n\t\t$obj['url'] = $this->url->value;\n\t\t$obj['image'] = $this->image->value;\n\t\t$obj['description'] = $this->description->value;\n\t\t/*\n\t\tforeach($this as $key => $value) {\n\n\t\t\t$obj[$key] = $value;\n\n\t\t}\n\t*/\n\t\treturn $obj;\n\t}", "function to_entry() \n {\n $entry = array(\"entry\" => array(\"content\" => array()));\n # set file array\n $entry[\"entry\"][\"content\"][\"file\"] = array();\n foreach ($this->file_objs as $f) {\n array_push($entry[\"entry\"][\"content\"][\"file\"], $f->to_array());\n }\n # set params dict\n $entry[\"entry\"][\"content\"][\"params\"] = array();\n $entry[\"entry\"][\"content\"][\"params\"][\"name\"] = $this->name;\n $entry[\"entry\"][\"content\"][\"params\"][\"yt_id\"] = $this->yt_id;\n $entry[\"entry\"][\"content\"][\"params\"][\"tag\"] = $this->tags;\n if (! empty($this->meta_objs) ) {\n $entry[\"entry\"][\"content\"][\"params\"][\"meta\"] = array();\n foreach ($this->meta_objs as $m) {\n array_push($entry[\"entry\"][\"content\"][\"params\"][\"meta\"], $m->to_array());\n }\n }\n # set file_params dict\n $entry[\"entry\"][\"content\"][\"file_params\"] = array();\n $entry[\"entry\"][\"content\"][\"file_params\"][\"thumb_used\"] = $this->thumb_used;\n $entry[\"entry\"][\"content\"][\"file_params\"][\"update_files\"] = $this->update_files;\n # set chapters\n $entry[\"entry\"][\"content\"][\"chapter\"] = array();\n foreach ($this->chapters as $ch) {\n array_push($entry[\"entry\"][\"content\"][\"chapter\"], $ch->to_array());\n }\n # set comments\n $entry[\"entry\"][\"content\"][\"comment\"] = array();\n // foreach ($this->comments as $ch) {\n // array_push($entry[\"entry\"][\"content\"][\"comment\"], $ch->to_array());\n // }\n\n return $entry;\n }", "public function prepareRow($row) {\n\t\n if ($row->DateQuit) {\n\t\t$row->DateQuit = $this->formatdate($row->DateQuit);\t\t\n }\n if ($row->Postcode) {\n\t\t$Postcode = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $row->Postcode);\n\t\tif (ctype_digit($Postcode) && strlen($Postcode) == \"4\") {\n\t\t\t$row->Postcode = $Postcode;\t\t\t\n\t\t} else {\n\t\t\t$row->Postcode = \"\";\n\t\t}\n } \n if ($row->State) {\n\t\t$states = array( 'ACT','NSW','NT','QLD','SA','TAS','VIC','WA');\n\t\t$str = strtoupper($row->State);\n\t\tif (in_array($str, $states)) {\n\t\t\t$row->State = $str;\n\t\t} else {\n\t\t\t$row->State = \"\";\n\t\t}\n } \n if ($row->Gender) {\n\t\t$gender_options = array('male', 'female');\n\t\tif (in_array(strtolower($row->Gender), $gender_options)) {\n\t\t\t$gender = strtolower($row->Gender);\n\t\t\t$row->Gender = $gender;\n\t\t} else {\n\t\t\t$row->Gender = \"\";\n\t\t}\n }\n if ($row->DateOfBirth) {\t\n\t\t$row->DateOfBirth = $this->formatdate($row->DateOfBirth);\n }\n if ($row->DateTreatmentStart) {\t\n\t\t$row->DateTreatmentStart = $this->formatdate($row->DateTreatmentStart);\n }\n if ($row->PhoneMobile) {\n\t\t$PhoneMobile = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $row->PhoneMobile);\n\t\tif (ctype_digit($PhoneMobile)) {\n\t\t\tif (substr( trim($PhoneMobile ), 0, 2 ) == \"61\" && strlen( trim($PhoneMobile) ) >= \"11\") {\n\t\t\t\t$newphone = substr(trim($PhoneMobile), 2);\n\t\t\t\t$row->PhoneMobile = $newphone;\n\t\t\t}\n\t\t\telse if (substr( trim($PhoneMobile ), 0, 1 ) == \"0\" && strlen( trim($PhoneMobile) ) >= \"10\") {\n\t\t\t\t$newphone = substr(trim($PhoneMobile), 1);\n\t\t\t\t$row->PhoneMobile = $newphone;\t\t\t\t\n\t\t\t}\n\t\t\tif (!(strlen($row->PhoneMobile) >= \"9\" && strlen($row->PhoneMobile) <= \"11\")) {\n\t\t\t\t$row->PhoneMobile = \"\";\n\t\t\t}\n\t\t\t//$row->PhoneMobile = '91'.$PhoneMobile;\n\t\t} else {\n\t\t\t$row->PhoneMobile = \"\";\n\t\t}\n } \n return TRUE;\n }", "function genSubmitRow(){\n\t\t$row = array();\n\t\tarray_pad($row, sizeof($this->table[0]), '');\n\n\t\tif($this->state->isNewEntry()){\n\t\t\t$textField = 'text';\n\t\t\t$row[0] = $this->translator->markupAttributes('input', '',array('type'=>'text', 'name'=>'user'));\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'submit', 'value'=>'Submit'));\n\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = $this->translator->markupAttributes('input', '',array('type'=>'checkbox', 'name'=>$count));\n\t\t\n\t\t}\n\t\telse{\n\t\t\t$row[0] = '';\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'new', 'value'=>'New'));\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = '';\n\t\t}\n\n\t\treturn $row;\n\t}", "private function generateFakeData() {\n\n if( !isset($_SESSION['blogs']) ) { //Para no sobreescribi cada vez q refresquen la pagina\n \n for( $i = 1; $i <= 3; $i++ ) {\n $_SESSION['blogs'] = array(\n [\n 'title' => 'Tutorial de PHP ' . $i, \n 'body' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Enim id sint repudiandae sit assumenda ullam doloremque quisquam? Omnis quaerat, animi commodi officia alias eos, obcaecati impedit est voluptatem distinctio illum!'\n ],\n );\n }\n } \n }", "public function eventsSchema($rows,$userid)\n\t{\n\t\t$lang = JFactory::getLanguage();\n\t\t$lang->load('com_easysocial', JPATH_ADMINISTRATOR, '', true);\n\t\t$result = array();\t\t\n\t\tforeach($rows as $ky=>$row)\n\t\t{\n\t\t\tif(isset($row->id))\n\t\t\t{\t\n\t\t\t\t$item = new EventsSimpleSchema();\n\t\t\t\t\n\t\t\t\t/*Get Cover POsition */\n\t\t\t\t$grpobj = FD::event( $row->id );\n\t\t\t\t$x = $grpobj->cover->x;\n\t\t\t\t$y = $grpobj->cover->y;\n\t\t\t\t$item->cover_position = $x.'% '.$y.'%';\n\t\t\t\t\n\t\t\t\t$item->id=$row->id;\n\t\t\t\t$item->title=$row->title;\n\t\t\t\t$item->description=$row->description;\n\t\t\t\t//getting all event images\n\t\t\t\tforeach($row->avatars As $ky=>$avt)\n\t\t\t\t{\n\t\t\t\t\t$avt_key = 'avatar_'.$ky;\n\t\t\t\t\t$item->$avt_key = JURI::root().'media/com_easysocial/avatars/event/'.$row->id.'/'.$avt;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$fst = JFile::exists('media/com_easysocial/avatars/event/'.$row->id.'/'.$avt);\n\t\t\t\t\t//set default image\n\t\t\t\t\tif(!$fst)\n\t\t\t\t\t{\n\t\t\t\t\t\t$item->$avt_key = JURI::root().'media/com_easysocial/defaults/avatars/event/'.$ky.'.png';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//end\n\t\t\t\n\t\t\t\t$item->params=json_decode($row->params);\n\t\t\t\t$item->details=$row->meta;\n\t\t\t\t//ios format date\n\t\t\t\tif(!empty($item->details->start))\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$item->details->ios_start = $this->listDate($item->details->start);\n\t\t\t\t\t$item->start_date = date('D M j Y h:i a',strtotime($row->meta->start));\t\t\t\t\t\n\t\t\t\t\t$item->start_date_unix = strtotime($row->meta->start);\n\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tif( $item->details->end == \"0000-00-00 00:00:00\")\n\t\t\t\t{\n\t\t\t\t\t$item->details->ios_end = null;\n\t\t\t\t\t$item->end_date = null;\n\t\t\t\t\t$item->end_date_unix = null;\n\t\t\t\t}\n\t\t\t\telse\t\t\t\t\n\t\t\t\t{\n\t\t\t\t\t$item->details->ios_end = $this->listDate($item->details->end);\n\t\t\t\t\t$item->end_date = date('D M j Y h:i a ',strtotime($row->meta->end));\n\t\t\t\t\t$item->end_date_unix = strtotime($row->meta->end);\n\t\t\t\t}\n\n\t\t\t\t$item->start_date_unix = strtotime($row->meta->start);\n\t\t\t\t$item->end_date_unix = strtotime($row->meta->end);\n\t\t\t\t\n\t\t\t\t$event = FD::model( 'events' );\n\t\t\t\t$item->guests= $event->getTotalAttendees($row->id);\n\t\t\t\t\n\t\t\t\t$item->featured=$row->featured;\n\t\t\t\t$item->created=$row->created;\n\t\t\t\t$item->categoryId=$row->category_id;\n\t\t\t\t$item->type=$row->type;\n\t\t\t\n\t\t\t\t//get category name\n\t\t\t\t$category \t= FD::table('EventCategory');\n\t\t\t\t$category->load($row->category_id);\t\t\t\t\n\t\t\t\t$item->category_name = $category->get('title');\n\t\t\t\t\n\t\t\t\t//event guest status\n\t\t\t\t$eventobj=FD::event($row->id);\t\n\t\t\t\t$item->isAttending=$eventobj->isAttending($userid);\n\t\t\t\t$item->isNotAttending=$eventobj->isNotAttending($userid);\n\t\t\t\t$item->isOwner=$eventobj->isOwner($userid);\n\t\t\t\t$item->isPendingMember = $eventobj->isPendingMember($userid);\n\t\t\t\t$item->isMember=$eventobj->isMember($userid);\t\n\t\t\t\t$item->isRecurring=$eventobj->isRecurringEvent(); \n\t\t\t\t$item->hasRecurring=$eventobj->hasRecurringEvents();\t\t\t\t\n\t\t\t\t\n\t\t\t\t$event_owner = reset($row->admins);\n\t\t\t\tif($event_owner)\n\t\t\t\t{\n\t\t\t\t$item->owner = $this->createUserObj($event_owner)->username;\n\t\t\t\t$item->owner_id = $event_owner;\n\t\t\t\t} \t\t\n\t\t\t\t//$item->owner=$user->username;\n\t\t\t\t\n\t\t\t\t$item->isMaybe=in_array($userid,$row->maybe);\n\t\t\t\t$item->total_guest=$eventobj->getTotalGuests();\n\t\t\t\t// this node is for past events\n\t\t\t\t$item->isoverevent=$eventobj->isOver();\n\t\t\t\tif($item->end_date == null){\n\t\t\t\t\t$item->isoverevent = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$item->location=$row->address;\n\t\t\t\t$item->longitude=$row->longitude;\n\t\t\t\t$item->latitude=$row->latitude;\n\t\t\t\t$NameLocationLabel = $item->location;\n\t\t\t\t$item->event_map_url_andr = \"geo:\".$item->latitude.\",\".$item->longitude.\"?q=\".$NameLocationLabel;\n\t\t\t\t$item->event_map_url_ios = \"http://maps.apple.com/?q=\".$NameLocationLabel.\"&sll=\".$item->latitude.\",\".$item->longitude;\t\t\t\t\n\t\t\t\t$item->share_url = JURI::root().$eventobj->getPermalink(true, false, 'item', false);\n\t\t\t\t//getting cover image of event\n\t\t\t\t$eve = FD::table( 'Cover' );\n\t\t\t\t$eve->type='event';\n\t\t\t\t$eve->photo_id=$row->cover->photo_id;\n\t\t\t\t$item->cover_image=$eve->getSource();\n\t\t\t\t//end\n\t\t\t\t$item->isInvited = false;\n\t\t\t\t$event = FD::event($row->id);\n\t\t\t\t$guest = $event->getGuest($userid);\n\t\t\t\tif ($guest->invited_by) {\t\n\t\t\t\t\t$item->isInvited = true;\n\t\t\t\t}\n\t\t\t\t$result[] = $item;\n\t\t\t}\n\t\t}\n\t\treturn($result);\t\n\t}", "function code_chrev_scenes_insert(){\n\tglobal $Translation;\n\n\tif($_GET['insert_x']!=''){$_POST=$_GET;}\n\n\t// mm: can member insert record?\n\t$arrPerm=getTablePermissions('code_chrev_scenes');\n\tif(!$arrPerm[1]){\n\t\treturn false;\n\t}\n\n\t$data['author'] = makeSafe($_POST['author']);\n\t\tif($data['author'] == empty_lookup_value){ $data['author'] = ''; }\n\t$data['bibliography'] = makeSafe($_POST['bibliography']);\n\t\tif($data['bibliography'] == empty_lookup_value){ $data['bibliography'] = ''; }\n\t$data['transcript'] = makeSafe($_POST['transcript']);\n\t\tif($data['transcript'] == empty_lookup_value){ $data['transcript'] = ''; }\n\t$data['token_sequence'] = makeSafe($_POST['token_sequence']);\n\t\tif($data['token_sequence'] == empty_lookup_value){ $data['token_sequence'] = ''; }\n\t$data['token'] = makeSafe($_POST['token_sequence']);\n\t\tif($data['token'] == empty_lookup_value){ $data['token'] = ''; }\n\t$data['agent'] = makeSafe($_POST['agent']);\n\t\tif($data['agent'] == empty_lookup_value){ $data['agent'] = ''; }\n\t$data['invivo_code'] = makeSafe($_POST['invivo_code']);\n\t\tif($data['invivo_code'] == empty_lookup_value){ $data['invivo_code'] = ''; }\n\t$data['startdate'] = makeSafe($_POST['invivo_code']);\n\t\tif($data['startdate'] == empty_lookup_value){ $data['startdate'] = ''; }\n\t$data['end_date'] = makeSafe($_POST['invivo_code']);\n\t\tif($data['end_date'] == empty_lookup_value){ $data['end_date'] = ''; }\n\t$data['person'] = makeSafe($_POST['invivo_code']);\n\t\tif($data['person'] == empty_lookup_value){ $data['person'] = ''; }\n\t$data['place'] = makeSafe($_POST['invivo_code']);\n\t\tif($data['place'] == empty_lookup_value){ $data['place'] = ''; }\n\t$data['freecode'] = makeSafe($_POST['invivo_code']);\n\t\tif($data['freecode'] == empty_lookup_value){ $data['freecode'] = ''; }\n\t$data['herme_code'] = makeSafe($_POST['herme_code']);\n\t\tif($data['herme_code'] == empty_lookup_value){ $data['herme_code'] = ''; }\n\t$data['impression'] = makeSafe($_POST['herme_code']);\n\t\tif($data['impression'] == empty_lookup_value){ $data['impression'] = ''; }\n\t$data['noetictension'] = makeSafe($_POST['herme_code']);\n\t\tif($data['noetictension'] == empty_lookup_value){ $data['noetictension'] = ''; }\n\t$data['comment'] = makeSafe($_POST['herme_code']);\n\t\tif($data['comment'] == empty_lookup_value){ $data['comment'] = ''; }\n\t$data['scene'] = makeSafe($_POST['scene']);\n\t\tif($data['scene'] == empty_lookup_value){ $data['scene'] = ''; }\n\tif($data['startdate'] == '') $data['startdate'] = \"1\";\n\tif($data['end_date'] == '') $data['end_date'] = \"1\";\n\n\t// hook: code_chrev_scenes_before_insert\n\tif(function_exists('code_chrev_scenes_before_insert')){\n\t\t$args=array();\n\t\tif(!code_chrev_scenes_before_insert($data, getMemberInfo(), $args)){ return false; }\n\t}\n\n\t$o=array('silentErrors' => true);\n\tsql('insert into `code_chrev_scenes` set `author`=' . (($data['author'] !== '' && $data['author'] !== NULL) ? \"'{$data['author']}'\" : 'NULL') . ', `bibliography`=' . (($data['bibliography'] !== '' && $data['bibliography'] !== NULL) ? \"'{$data['bibliography']}'\" : 'NULL') . ', `transcript`=' . (($data['transcript'] !== '' && $data['transcript'] !== NULL) ? \"'{$data['transcript']}'\" : 'NULL') . ', `token_sequence`=' . (($data['token_sequence'] !== '' && $data['token_sequence'] !== NULL) ? \"'{$data['token_sequence']}'\" : 'NULL') . ', `token`=' . (($data['token'] !== '' && $data['token'] !== NULL) ? \"'{$data['token']}'\" : 'NULL') . ', `agent`=' . (($data['agent'] !== '' && $data['agent'] !== NULL) ? \"'{$data['agent']}'\" : 'NULL') . ', `invivo_code`=' . (($data['invivo_code'] !== '' && $data['invivo_code'] !== NULL) ? \"'{$data['invivo_code']}'\" : 'NULL') . ', `startdate`=' . (($data['startdate'] !== '' && $data['startdate'] !== NULL) ? \"'{$data['startdate']}'\" : 'NULL') . ', `end_date`=' . (($data['end_date'] !== '' && $data['end_date'] !== NULL) ? \"'{$data['end_date']}'\" : 'NULL') . ', `person`=' . (($data['person'] !== '' && $data['person'] !== NULL) ? \"'{$data['person']}'\" : 'NULL') . ', `place`=' . (($data['place'] !== '' && $data['place'] !== NULL) ? \"'{$data['place']}'\" : 'NULL') . ', `freecode`=' . (($data['freecode'] !== '' && $data['freecode'] !== NULL) ? \"'{$data['freecode']}'\" : 'NULL') . ', `herme_code`=' . (($data['herme_code'] !== '' && $data['herme_code'] !== NULL) ? \"'{$data['herme_code']}'\" : 'NULL') . ', `impression`=' . (($data['impression'] !== '' && $data['impression'] !== NULL) ? \"'{$data['impression']}'\" : 'NULL') . ', `noetictension`=' . (($data['noetictension'] !== '' && $data['noetictension'] !== NULL) ? \"'{$data['noetictension']}'\" : 'NULL') . ', `comment`=' . (($data['comment'] !== '' && $data['comment'] !== NULL) ? \"'{$data['comment']}'\" : 'NULL') . ', `scene`=' . (($data['scene'] !== '' && $data['scene'] !== NULL) ? \"'{$data['scene']}'\" : 'NULL'), $o);\n\tif($o['error']!=''){\n\t\techo $o['error'];\n\t\techo \"<a href=\\\"code_chrev_scenes_view.php?addNew_x=1\\\">{$Translation['< back']}</a>\";\n\t\texit;\n\t}\n\n\t$recID=db_insert_id(db_link());\n\n\t// hook: code_chrev_scenes_after_insert\n\tif(function_exists('code_chrev_scenes_after_insert')){\n\t\t$res = sql(\"select * from `code_chrev_scenes` where `id`='\" . makeSafe($recID) . \"' limit 1\", $eo);\n\t\tif($row = db_fetch_assoc($res)){\n\t\t\t$data = array_map('makeSafe', $row);\n\t\t}\n\t\t$data['selectedID'] = makeSafe($recID);\n\t\t$args=array();\n\t\tif(!code_chrev_scenes_after_insert($data, getMemberInfo(), $args)){ return (get_magic_quotes_gpc() ? stripslashes($recID) : $recID); }\n\t}\n\n\t// mm: save ownership data\n\tsql(\"insert into membership_userrecords set tableName='code_chrev_scenes', pkValue='$recID', memberID='\".getLoggedMemberID().\"', dateAdded='\".time().\"', dateUpdated='\".time().\"', groupID='\".getLoggedGroupID().\"'\", $eo);\n\n\treturn (get_magic_quotes_gpc() ? stripslashes($recID) : $recID);\n}", "public function addRow(array $row) {\n\t\t$this->tableInfo['rows'][] = $row;\t\n\t}", "function insertArray($data) {\n\t\t$ar = array();\n\t\t$str = '';\n\t\t$str1 = '';\n\t\tforeach($data as $key=>$value)\n\t\t{\n\t\t\tif(empty($str))\n\t\t\t{\n\t\t\t\t$str1 = $key;\n\t\t\t\t$str = '\"'.strip_tags(trim($value)).'\"';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$str1 = ','.$key;\n\t\t\t\t$str .=' ,\"'.strip_tags(trim($value)).'\"';\n\t\t\t}\n\t\t}\n\t\t$ar['fields'] = $str1;\n\t\t$ar['values'] = $str;\n\t\treturn $ar;\n\t}", "public function insertRow($row);", "private static function _cookData($data) {\n\t\t$tmp = array();\n\t\tif(isset($data['id'])) $tmp['id'] = $data['id'];\n\t\tif(isset($data['title'])) $tmp['title'] = $data['title'];\n\t\tif(isset($data['guide'])) $tmp['guide'] = $data['guide'];\n\t\tif(isset($data['gtype'])) $tmp['gtype'] = $data['gtype'];\n\t\tif(isset($data['ntype'])) $tmp['ntype'] = $data['ntype'];\n\t\tif(isset($data['btype'])) $tmp['btype'] = $data['btype'];\n\t\tif(isset($data['img'])) $tmp['img'] = $data['img'];\n\t\tif(isset($data['status'])) $tmp['status'] = intval($data['status']);\n\t\tif(isset($data['start_time'])) $tmp['start_time'] = $data['start_time'];\n\t\tif(isset($data['update_time'])) $tmp['update_time'] = intval($data['update_time']);\n\t\tif(isset($data['end_time'])) $tmp['end_time'] = intval($data['end_time']);\n\t\treturn $tmp;\n\t}", "public function _build_row_by_post()\n {\n $row = [\n 'mime_id' => $this->_post_class->get_post_get_int('mime_id'),\n 'mime_time_create' => $this->_post_class->get_post_int('mime_time_create'),\n 'mime_time_update' => $this->_post_class->get_post_int('mime_time_update'),\n 'mime_ext' => $this->_post_class->get_post_text('mime_ext'),\n 'mime_medium' => $this->_post_class->get_post_text('mime_medium'),\n 'mime_type' => $this->_post_class->get_post_text('mime_type'),\n 'mime_name' => $this->_post_class->get_post_text('mime_name'),\n 'mime_perms' => $this->_post_class->get_post_text('mime_perms'),\n 'mime_ffmpeg' => $this->_post_class->get_post_text('mime_ffmpeg'),\n 'mime_kind' => $this->_post_class->get_post_int('mime_kind'),\n 'mime_option' => $this->_post_class->get_post_text('mime_option'),\n ];\n\n return $row;\n }", "public function creaDaArray(&$row){\n $insegnamento = new Insegnamento();\n $insegnamento->setId($row['insegnamenti_id']);\n $insegnamento->setCfu($row['insegnamenti_cfu']);\n $insegnamento->setCodice($row['insegnamenti_codice']);\n $insegnamento->setTitolo($row['insegnamenti_titolo']);\n if(isset($row['docenti_id'])){\n $insegnamento->setDocente(UserFactory::instance()->creaDocenteDaArray($row));\n }\n if(isset($row['insegnamenti_id'])){\n $insegnamento->setCorsoDiLaurea(CorsoDiLaureaFactory::instance()->creaDaArray($row));\n }\n return $insegnamento;\n }", "public function create_entry(array $data)\n\t{\n\t\t$this->load->model('cartthrob_field_model');\n\t\t\n\t\tif ( ! isset($data['channel_id']))\n\t\t{\n\t\t\t$this->errors[] = 'no_channel_id';\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$fields = $this->cartthrob_field_model->get_fields_by_channel($data['channel_id']);\n\t\t\n\t\t$title_fields = $this->db->list_fields('channel_titles');\n\t\t\n\t\t$site_id = $this->config->item('site_id'); \n\t\tif (isset($data['site_id']))\n\t\t{\n\t\t\t$site_id = $data['site_id'];\n\t\t}\n\t\t$title_defaults = array(\n\t\t\t'author_id' => $this->session->userdata('member_id'),\n\t\t\t'site_id' => $site_id,\n\t\t\t'ip_address' => $this->input->ip_address(),\n\t\t\t'entry_date' => $this->localize->now - 60, // subtracting a minute to keep this entry from accidentally being a \"future\" entry\n\t\t\t'edit_date' => date(\"YmdHis\"),\n\t\t\t'versioning_enabled' => 'y',\n\t\t\t'status' => 'open',\n\t\t\t'forum_topic_id' => 0,\n\t\t);\n\t\t\n\t\t$channel_titles = array();\n\t\t\n\t\tforeach ($title_fields as $key)\n\t\t{\n\t\t\tif (isset($data[$key]) && $key != 'entry_id')\n\t\t\t{\n\t\t\t\t$channel_titles[$key] = $data[$key];\n\t\t\t}\n\t\t\telse if (isset($title_defaults[$key]))\n\t\t\t{\n\t\t\t\t$channel_titles[$key] = $title_defaults[$key];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$channel_titles['year'] = date('Y', $channel_titles['entry_date']);\n\t\t$channel_titles['month'] = date('m', $channel_titles['entry_date']);\n\t\t$channel_titles['day'] = date('d', $channel_titles['entry_date']);\n \n\t\tif (empty($data['author_id']))\n\t\t{\n\t\t\t$this->errors[] = 'no_author_id';\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$this->db->insert('channel_titles', $channel_titles);\n\t\t\n\t\tunset($channel_titles, $title_fields, $title_defaults);\n\t\t\n\t\t$entry_id = $this->db->insert_id();\n\n\t\t$channel_data = array(\n\t\t\t'entry_id' => $entry_id,\n\t\t\t'channel_id' => $data['channel_id'],\n\t\t\t'site_id' => $site_id\n\t\t);\n\t\t\n\t\tforeach ($fields as $field)\n\t\t{\n\t\t\tif (isset($data['field_id_'.$field['field_id']]))\n\t\t\t{\n\t\t\t\t// accounting for items that are passed in as arrays\n\t\t\t\t$field_data = $data['field_id_'.$field['field_id']];\n\t\t\t\tif (is_array($field_data))\n\t\t\t\t{\n\t\t\t\t\t$field_data = implode('|', $field_data);\n\t\t\t\t}\n\t\t\t\t$data['field_id_'.$field['field_id']] = $field_data;\n\n\t\t\t\t$channel_data['field_id_'.$field['field_id']] = $data['field_id_'.$field['field_id']];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// accounting for items that are passed in as arrays\n\t\t\t\t$field_data = (isset($data[$field['field_name']])) ? $data[$field['field_name']] : '';\n\t\t\t\tif (is_array($field_data))\n\t\t\t\t{\n\t\t\t\t\t$field_data = implode('|', $field_data);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$channel_data['field_id_'.$field['field_id']] = $field_data; \n\t\t\t}\n\t\t\t\n\t\t\tif (isset($data['field_ft_'.$field['field_id']]))\n\t\t\t{\n\t\t\t\t$channel_data['field_ft_'.$field['field_id']] = $data['field_ft_'.$field['field_id']];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$channel_data['field_ft_'.$field['field_id']] = $field['field_fmt'];\n\t\t\t}\n\t\t}\n\n\t\t$this->db->insert('channel_data', $channel_data);\n\t\t\n\t\tunset($channel_data);\n\t\t\n\t\t$total_entries = 1;\n\t\t\n\t\t$query = $this->db->select('total_entries')\n\t\t\t\t ->where('member_id', $data['author_id'])\n\t\t\t\t ->get('members');\n\t\t\n\t\tif ($query->row('total_entries'))\n\t\t{\n\t\t\t$total_entries = (int) $query->row('total_entries') + 1;\n\t\t}\n\t\t\n\t\t$this->db->update('members', array('total_entries' => $total_entries), array('member_id' => $data['author_id']));\n\n\t\t$this->stats->update_channel_stats($data['channel_id']);\n\n\t\tif ($this->config->item('new_posts_clear_caches') == 'y')\n\t\t{\n\t\t\t$this->functions->clear_caching('all');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->functions->clear_caching('sql');\n\t\t}\n\n\t\treturn $entry_id;\n\t}", "public function __construct($row = null)\n\n{\n\n if (!$row == null) {\n\n $this->idUsuario = $row[\"idUsuario\"];\n $this->nombre = $row[\"nombre\"];\n $this->fechaRegistro = $row [\"fechaRegistro\"];\n $this->email = $row [\"email\"];\n $this->telefono = $row [\"telefono\"];\n $this->apellido = $row [\"apellido\"];\n $this->direccion = $row [\"direccion\"];\n $this->ciudad = $row [\"ciudad\"];\n $this->pais = $row [\"pais\"];\n $this->codigoPostal = $row [\"codigoPostal\"];\n $this->tarjeta = $row [\"tarjeta\"];\n\n } \n}", "public function _build_row_by_post()\n {\n $row = [\n 'file_id' => $this->_post_class->get_post_get_int('file_id'),\n 'file_time_create' => $this->_post_class->get_post_int('file_time_create'),\n 'file_time_update' => $this->_post_class->get_post_int('file_time_update'),\n 'file_item_id' => $this->_post_class->get_post_int('file_item_id'),\n 'file_kind' => $this->_post_class->get_post_int('file_kind'),\n 'file_url' => $this->_post_class->get_post_url('file_url'),\n 'file_path' => $this->_post_class->get_post_text('file_path'),\n 'file_name' => $this->_post_class->get_post_text('file_name'),\n 'file_ext' => $this->_post_class->get_post_text('file_ext'),\n 'file_mime' => $this->_post_class->get_post_text('file_mime'),\n 'file_medium' => $this->_post_class->get_post_text('file_medium'),\n 'file_size' => $this->_post_class->get_post_int('file_size'),\n 'file_width' => $this->_post_class->get_post_int('file_width'),\n 'file_height' => $this->_post_class->get_post_int('file_height'),\n 'file_duration' => $this->_post_class->get_post_int('file_duration'),\n ];\n\n return $row;\n }", "function updateNewsDbTableRow($updateList, $row, $vars) {\n $setFields = array();\n\n if (in_array('APPLY_BBCODE', $updateList)) {\n $setFields['texte'] = $vars['bbcode']->apply(stripslashes($row['texte']));\n\n if ($row['suite'] != '')\n $setFields['suite'] = $vars['bbcode']->apply(stripslashes($row['suite']));\n }\n\n if (in_array('UPDATE_AUTHOR_DATA', $updateList)) {\n $userData = getUserData($row['auteur_id']);\n\n if ($userData === false)\n $setFields['auteur_id'] = null;\n else\n $setFields['auteur'] = $userData['pseudo'];\n }\n\n return $setFields;\n}", "public function create()\n {\n\n if(isset($_POST['dosubmit'])){\n \n\t\theader(\"Content-type:text/html;charset=utf-8\");\n\t\t\n\t\t$cachedata=array();\n \n \n //新闻\n $sqlWhere = \"status =1\";\n $sqlOrder = \" sort asc ,id DESC \";\n $this->ModManager = M('news');\n $fields = $this->ModManager->getDbFields();\n $rst=$this->GeneralActionForListing('news', $sqlWhere, $sqlOrder, '10000', 'M');\n if(isset($rst['dataset']) && count($rst['dataset'])>0){\n \t$stars=$rst['dataset'];\n \tforeach ($stars as $k => $item) {\n\t\t\t\t$content_show=\"\";\n\t\t\t\t$content_show = $content_show.$this->html2text($item['summary']).\"&nbsp;&nbsp;\";\n\t\t\t\t$content_show = $content_show.$this->html2text($item['content']).\"&nbsp;&nbsp;\";\n\t\t\t\t$foreachdata['content']=$content_show;\n\t\t\t\t$foreachdata['boardname']=\"news\";\n\t\t\t\t$foreachdata['view_allow']=\"0\";\n\t\t\t\t$foreachdata['title']=$item['title'];\n\t\t\t\t$foreachdata['pic_show']=$item['pic_show'];\n\t\t\t\t$foreachdata['create_time']=$item['create_time'];\n\t\t\t\t$foreachdata['linkurl']=empty($item['linkurl'])?'http://'.$_SERVER[\"HTTP_HOST\"].\"/event/news_d/id/\".$item['id']:$item['linkurl'];\n\t\t\t\t$cachedata[]=$foreachdata;\n\t\t\t}\n }\n \n //echo \"<pre>\";print_r($cachedata);exit;\n \n \n \n //活动\n $sqlWhere = \"status =1\";\n $sqlOrder = \" sort asc ,id DESC \";\n $this->ModManager = M('activity');\n $fields = $this->ModManager->getDbFields();\n $rst=$this->GeneralActionForListing('activity', $sqlWhere, $sqlOrder, '10000', 'M');\n if(isset($rst['dataset']) && count($rst['dataset'])>0){\n \t$stars=$rst['dataset'];\n \tforeach ($stars as $k => $item) {\n\t\t\t\t$content_show=\"\";\n\t\t\t\t$content_show = $content_show.$this->html2text($item['summary']).\"&nbsp;&nbsp;\";\n\t\t\t\t$content_show = $content_show.$this->html2text($item['content']).\"&nbsp;&nbsp;\";\n\t\t\t\t$foreachdata['content']=$content_show;\n\t\t\t\t$foreachdata['boardname']=\"activity\";\n\t\t\t\t$foreachdata['view_allow']=\"0\";\n\t\t\t\t$foreachdata['title']=$item['title'];\n\t\t\t\t$foreachdata['pic_show']=$item['pic_show'];\n\t\t\t\t$foreachdata['create_time']=$item['create_time'];\n\t\t\t\t$foreachdata['linkurl']=$item['link_url'];\n\t\t\t\t$cachedata[]=$foreachdata;\n\t\t\t}\n }\n \n \n //echo \"<pre>\";print_r($cachedata);exit;\n \n if(!empty($cachedata)){\n \t//删除表内旧数据\n \t$cachesearchMod = M('cachesearch');\n \t$sql=\" 1 \";\n $cachesearchMod->where($sql)->delete();\n \t\n \t$table_name=$cachesearchMod->getTableName();\n \tforeach ($cachedata as $k => $item) {\n\t\t\t\t\n\t $sql=\"insert into \".$table_name.\" SET title='\".addslashes($item[\"title\"]).\"'\n\t , content='\".addslashes($item[\"content\"]).\"'\n\t , linkurl='\".addslashes($item[\"linkurl\"]).\"'\n\t , boardname='\".addslashes($item[\"boardname\"]).\"'\n\t , view_allow='\".addslashes($item[\"view_allow\"]).\"'\n\t , create_time='\".addslashes($item[\"create_time\"]).\"'\n\t , pic_show='\".addslashes($item[\"pic_show\"]).\"'\n\t \";\n\t $result = $cachesearchMod->execute($sql);\n //echo var_dump($sql);echo \"**\";var_dump($result);echo \"<br>\";\n\t\t\t}\n\t\t\t\n }\n \n $this->success('操作成功!');\n\n\n\n }else{\n\n $PageTitle = L('刷新搜索缓存');\n $PageMenu = array(\n //array( U('cachesearch/listing'), L('搜索缓存列表') ),\n );\n $this->setPagething( $PageTitle, $PageMenu, true);\n $this->display();\n }\n }", "function tck_table_add_row_cell_array( $cells, $keyword, $url, $title, $ip, $clicks, $timestamp ) {\n $fkeyword = tck_get_keyword($keyword);\n \n if ( $fkeyword != $keyword ) {\n $shorturl = yourls_link($fkeyword);\n $cells['keyword']['shorturl'] = yourls_esc_url($shorturl);\n $cells['keyword']['keyword_html'] = yourls_esc_html( $fkeyword );\n $cells['actions']['keyword'] = $fkeyword;\n }\n \n $newcells['custom']['template'] = '%custom%';\n $newcells['custom']['custom'] = (tck_is_custom_keyword($fkeyword) ? 'Yes' : 'No');\n $newcells['actions'] = $cells['actions'];\n\n unset($cells['actions']);\n return array_merge($cells, $newcells);\n }", "public function onContentPrepareData($context, $data)\n {\n\t $cols = array(\"fanimani_id\"=>\"\",\"fanimani_url\"=>\"\",\"fanimani_msg\"=>\"\",\"fanimani_exists\"=>0);\n if (is_object($data))\n {\n\t\tforeach($cols as $k=>$v)\n\t\t\t$data->{attribs}[$k] = $v;\n\t\t \n\t\t $db = JFactory::getDbo();\n $articleId = isset($data->id) ? $data->id : 0;\n\t\t $popup = array();\n\t\t if( $articleId != 0 ){\n\t\t\t $query = $db->getQuery(true)\n\t\t\t\t->select(\"profile_key, profile_value\")\n\t\t\t\t->from($db->quoteName('#__user_profiles'))\n\t\t\t\t->where('user_id = '.$articleId)\n\t\t\t\t->where('profile_key LIKE ' . $db->Quote('fanimani.%'));\n\t\t\t$db->setQuery($query);\n\t\t\t$results = $db->loadRowList();\n\t\t\tforeach($results as $v)\n\t\t\t\t$popup[str_replace('fanimani.','',$v[0])] = $v[1];\n\t\t\t//$data->fanimani = $popup;\n\t\t\tforeach($popup as $k=>$v)\n\t\t\t\t$data->{attribs}[$k] = $v;\n\t\t\t\n\t\t\t\n\t\t\t /*$query = $db->getQuery(true)\n\t\t\t\t->select(\"user_id, profile_key, profile_value\")\n\t\t\t\t->from($db->quoteName('#__user_profiles'))\n\t\t\t\t->where('profile_key LIKE ' . $db->Quote('fanimani.%'));\n\t\t\t$db->setQuery($query);\n\t\t\t$results = $db->loadRowList();\n\t\t//$a = print_r($results, true);\n\t\t//JError::raiseNotice( 100+strlen($a),\"<br/><br/>Results: \".$a.\"<br/><br/>\" );\n\t\techo '--------------<pre>';\n\t\techo $articleId.'<br/>';\n\t\tvar_dump($results);\n\t\techo '</pre>--------------';\n\t\techo '--------------<pre>';\n\t\tvar_dump($data);\n\t\techo '</pre>--------------';*/\n\t\t }\n\t\t \n\t\t//$a = print_r($data->attribs, true);\n\t\t//JError::raiseNotice( 100+strlen($a),\"3Desc: \".$a.\"<br/>\" );\n\t\t \n\t\t if( !isset($data->attribs['fanimani_id']) || $data->attribs['fanimani_id'] == '' || $data->attribs['fanimani_id'] == 0 ){\n\t\t\t$data->attribs['fanimani_msg'] = JText::_('PLG_CONTENT_FANIMANI_NOT_IN_DB');//'Użytkownika nie ma w bazie!';\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->delete($db->quoteName('#__user_profiles'))\n\t\t\t\t->where('user_id = '.$articleId)\n\t\t\t\t->where('profile_key LIKE ' . $db->Quote('fanimani.%'));\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->insert($db->quoteName('#__user_profiles'))\n\t\t\t\t->columns($db->quoteName(array('user_id','profile_key','profile_value')))\n\t\t\t\t->values(implode(',',array($articleId,$db->quote(\"fanimani.fanimani_msg\"),$db->quote(JText::_('PLG_CONTENT_FANIMANI_NOT_IN_DB')))));\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\t\t }\n\t\t\n\t\t echo \"<script type=\\\"text/javascript\\\">\";\n\t\t\tinclude (dirname(__FILE__) . '/custom_fields.js');\n\t\t echo \"</script>\";\n\t\t \n }\n \n return true;\n }", "private function _make_row($data) {\n $options = array(\n \"id\" => $data->fid_cust\n );\n\n $query = $this->Master_Customers_model->get_details($options)->row();\n $value = $this->Sales_Invoices_model->get_invoices_total_summary($data->id);\n $originalDate = $data->inv_date;\n $newDate = date(\"d-M-Y\", strtotime($originalDate));\n $row_data = array(\n \n anchor(get_uri(\"sales/s_invoices/view/\" . $data->id.\"/\".str_replace(\"/\", \"-\", $data->code)), \"#\".$data->code),\n modal_anchor(get_uri(\"master/customers/view/\" . $data->fid_cust), $query->name, array(\"class\" => \"view\", \"title\" => \"Customers \".$query->name, \"data-post-id\" => $data->fid_cust)),\n $this->_get_invoices_status_label($data),\n $data->email_to,\n $newDate,\n $data->currency,\n to_currency($value->invoice_total)\n\n );\n\n if($data->status != \"posting\"){\n $row_data[] = anchor(get_uri(\"sales/s_invoices/edit/\".$data->id), \"<i class='fa fa-pencil'></i>\", array(\"class\" => \"edit\", \"title\" => lang('edit_client')))\n . js_anchor(\"<i class='fa fa-times fa-fw'></i>\", array('title' => lang('delete_client'), \"class\" => \"delete\", \"data-id\" => $data->id, \"data-action-url\" => get_uri(\"sales/s_invoices/delete\"), \"data-action\" => \"delete\"));\n\n }\n $row_data[] = anchor(get_uri(\"sales/s_invoices/view/\").$data->id, \"<i class='fa fa-eye'></i>\", array(\"class\" => \"view\", \"title\" => lang('view'), \"data-post-id\" => $data->id));\n\n return $row_data;\n }", "public static function create(array $row = array())\n {\n if (!isset($row['published'])) \n $row['published'] = time();\n \n if (!isset($row['modified'])) \n $row['modified'] = time();\n \n if (!isset($row['state']) \n || !in_array($row['state'], self::availableStates())) \n $row['state'] = self::STATUS_PUBLISHED;\n \n if (!isset($row['node_id'])) \n {\n $contentIni = eZINI::instance('content.ini.append.php');\n $row['node_id'] = $contentIni->variable('NodeSettings', 'ForumRootNode');\n }\n \n if (!isset($row['user_id'])) \n {\n $user = eZUser::currentUser();\n $row['user_id'] = $user->id();\n }\n \n if (!isset($row['language_id']))\n {\n $row['language_id'] = false;\n }\n $row['language_id'] = SimpleForumTools::getLanguageId($row['node_id'], $row['language_id']);\n \n $object = new self( $row );\n return $object;\n }", "function insertarProceso(){\n global $conexion, $data;\n $slug = $data[\"slug\"];\n $hashtag = $data[\"hashtag\"];\n $dec_org_id = $data[\"decidim_organization_id\"];\n $created_at = $data[\"created_at\"];\n $updated_at = $data[\"updated_at\"];\n $title = '{\"en\": \"'.$data[\"title\"].'\", \"es\":\"'.$data[\"title\"].'\"}';\n $subtitle = '{\"en\": \"'.$data[\"subtitle\"].'\", \"es\":\"'.$data[\"subtitle\"].'\"}';\n $sh_description = '{\"en\": \"'.$data[\"description\"].'\", \"es\":\"'.$data[\"description\"].'\"}';\n $description = '{\"en\": \"'.$data[\"description\"].'\", \"es\":\"'.$data[\"description\"].'\"}';\n $hero_image = $data[\"hero_image\"];\n $banner_image = $data[\"banner_image\"];\n $promoted = true;\n $published_at = $data[\"published_at\"];\n $developer_group= '{\"en\": \"'.$data[\"developer_group\"].'\", \"es\":\"'.$data[\"developer_group\"].'\"}';\n $end_date = $data[\"end_date\"];\n $meta_scope = '{\"en\": \"'.$data[\"meta_scope\"].'\", \"es\":\"'.$data[\"meta_scope\"].'\"}';\n $local_area = '{\"en\": \"'.$data[\"local_area\"].'\", \"es\":\"'.$data[\"local_area\"].'\"}';\n $target = '{\"en\": \"'.$data[\"target\"].'\", \"es\":\"'.$data[\"target\"].'\"}';\n $par_scope = '{\"en\": \"'.$data[\"participatory_scope\"].'\", \"es\":\"'.$data[\"participatory_scope\"].'\"}';\n $par_structure = '{\"en\": \"'.$data[\"participatory_structure\"].'\", \"es\":\"'.$data[\"participatory_structure\"].'\"}';\n $dec_scope_id = (int)$data[\"decidim_scope_id\"];\n $pro_group_id = (int)$data[\"decidim_participatory_process_group_id\"];\n $show_statistics= true;\n $announcement = null;\n $scopes_enabled = false;\n $start_date = $data[\"start_date\"];\n $private_space = false;\n $reference = $data[\"reference\"];\n $resultado = pg_query($conexion, \"INSERT INTO decidim_participatory_processes (slug, hashtag, decidim_organization_id, created_at, updated_at, title, subtitle, short_description, description, hero_image, banner_image, promoted, published_at, developer_group, end_date, meta_scope, local_area, target, participatory_scope, participatory_structure, decidim_scope_id, decidim_participatory_process_group_id, show_statistics, announcement, scopes_enabled, start_date, private_space, reference) VALUES ('$slug', '$hashtag', '$dec_org_id', '$created_at', '$updated_at', '$title', '$subtitle', '$sh_description', '$description', '$hero_image', '$banner_image', '$promoted', '$published_at', '$developer_group', '$end_date', '$meta_scope', '$local_area', '$target', '$par_scope', '$par_structure', '$dec_scope_id', '$pro_group_id', true, null, false, '$start_date', false, '$reference') RETURNING id, slug \");\n validarErrorPG($resultado);\n }", "function __construct($row = null) {\n $this->_data = array();\n $this->_extra = array();\n if (!isset(self::$_defaults[$this->getObjectName()])) {\n // maintain the default data (column values) separately\n self::$_defaults[$this->getObjectName()] = array();\n $this->loadDefaults();\n }\n\n // clone from the default data. much faster than reloading the column values every time\n $def =& self::$_defaults[$this->getObjectName()];\n foreach ($def as $k => &$d) {\n $this->_data[$k] = clone $d;\n }\n\n if (is_array($row)) {\n $this->loadFromRow($row);\n } else if (is_int($row)) {\n $this->setValue('id', $row);\n }\n }", "function createTr($v){\r\n echo \"<tr>\";\r\n foreach($v as $cheie=>$valaore){\r\n $id = array_search($v[$cheie],$v);\r\n $poza = $v[$cheie][\"Poza\"];\r\n $titlu = $v[$cheie][\"Titlu\"];\r\n $descriere = $v[$cheie][\"Descriere\"];\r\n createTd($id,$poza,$titlu,$descriere);\r\n }\r\n //print_r($poza);\r\n echo \"</tr>\";\r\n\r\n}", "function getData($conn, $sql, $inputObject)\n{\n $result = $conn->query($sql);\n $resultArray = array();\n $count = 0; // No. of contribution in the list (for toggling row color)\n //echo $result->num_rows . \"results<br>\";\n if ($result->num_rows > 0) {\n //Get all data row by row, pass attribute of \"id\" by URL to detail page\n while ($row = $result->fetch_assoc()) {\n $rowElement = new searchObject();\n $rowElement->set_dataAttributes($inputObject, $row);\n $resultArray[$count] = array();\n $resultArray[$count][\"id\"] = $row[\"id\"];\n $resultArray[$count][\"Title\"] = $row[\"Title\"];\n $resultArray[$count][\"Year\"] = $row[\"Year\"];\n $resultArray[$count][\"Authors\"] = $row[\"Authors\"];\n $resultArray[$count][\"Score\"] = $row[\"Score\"];\n $resultArray[$count][\"MatchScore\"] = $rowElement->get_matchScore();\n $resultArray[$count][\"MisMatch\"] = $rowElement->get_misMatch();\n $count += 1;\n }\n }\n changeText(\"ResultCount\", \"Result list: \" . $count. \" contribution(s)\");\n if ($count != 0) {\n generateContent($resultArray);\n }\n \n return $resultArray;\n}", "public function createData()\n {\n $data['locations'] = ['top', 'left', 'bottom'];\n\n $data['positions'] = [\n 'top' => $this->positionCount('top'), \n 'left' => $this->positionCount('left'),\n 'bottom' => $this->positionCount('bottom'),\n ];\n\n return (object) $data;\n }", "private function mapToEmailCampaignsTable($row) { $firstSectionOpen = $this->getFirstItem($row->esp_first_open_datetimes, null);\n $lastSectionOpen = $this->getFirstItem($row->esp_last_open_datetimes, null);\n\n $firstSectionClick = $this->getFirstItem($row->esp_first_click_datetimes, null);\n $lastSectionClick = $this->getFirstItem($row->esp_last_click_datetimes, null);\n\n if (null === $firstSectionOpen) {\n $firstSectionOpen = $firstSectionClick;\n }\n\n return [\n 'email_id' => $row->email_id,\n 'campaign_id' => $row->deploy_id,\n 'last_status' => $this->getFirstItem($row->statuses, ''),\n 'esp_first_open_datetime' => $firstSectionOpen,\n 'esp_last_open_datetime' => $lastSectionOpen,\n 'esp_total_opens' => $row->opens_counted,\n 'esp_first_click_datetime' => $firstSectionClick,\n 'esp_last_click_datetime' => $lastSectionClick,\n 'esp_total_clicks' => $row->clicks_counted,\n 'unsubscribed' => ((int)$row->unsubscribed > 0 ? 1 : 0)\n ];\n }", "function create_table($log)\n {\n $colOrder = array('title','artist','time','count');\n $excludeCols = array('channel','','albumart','keep');\n\n //Select data for table\n list($nrows, $sliced) = select_table_rows($log);\n \n //Create table\n echo '<center><table>';\n \n echo \"\\n <tr>\";\n \n //create header row\n foreach($colOrder as $val) \n {\n echo \"\\n <th>\".$val.\"</th>\";\n }\n echo \"\\n </tr>\";\n\n //create data rows\n for ($i=0; $i <= $nrows; $i++) \n {\n $orderedRow = array_replace(array_flip($colOrder), $sliced[$i]);\n echo \"\\n <tr>\";\n foreach ($orderedRow as $key => $value) \n {\n if (!in_array($key, $excludeCols)) \n {\n echo \"\\n <td>\";\n switch ($key)\n {\n case \"albumart\":\n echo '<a href=\"'.$value.'\"><img src=\"'.$value.'\" alt=\"Album Art\" style=\"width:60px;height:60px;border:0;\"></a>'; \n case \"time\":\n echo date(\"D j M Y\",$value).\"<br>\".date(\"G:i:s\",$value);\n break;\n default:\n echo $value;\n } \n echo \"</td>\";\n }\n } \n echo \"\\n </tr>\";\n }\n echo \"</table></center>\";\n }", "public function buildFromQueryRow($row)\n\t{\n\t\tif(isset($row['name']))\n\t\t{\n\t\t\t$tempArray = array(\n\t\t\t\t\t'id'\t=> $row['taskId'],\n\t\t\t\t\t'value'\t=> $row['name']\n\t\t\t);\n\t\t\t$this->setParentTask($tempArray);\n\t\t}else\n\t\t{\n\t\t\t$this->setTaskId($row['taskId']);\n\t\t}\n\t\t$this->setTag($row['tag']);\n\t\t$this->setTitle($row['title']);\n\t\t$this->setContent($row['content']);\n\t\t/* SEE COMMENT IN THE SAME METHOD FOR TASK TO SEE WHY THIS WAS DONE */\n\t\t$this->commentArray['member'] = $row['firstName'];\n\t\t$this->setDate($row['postedDate']);\n\t}", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\t\r\n\t\t\tif (isset ( $this->title )) {\r\n\t\t\t\t$insertCols .= \"dsh_title, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->title;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->desc )) {\r\n\t\t\t\t$insertCols .= \"dsh_desc, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->desc;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->portlet )) {\r\n\t\t\t\t$insertCols .= \"dsh_portlet, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->portlet;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->hide )) {\r\n\t\t\t\t$insertCols .= \"dsh_hide, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->hide;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->createdBy )) {\r\n\t\t\t\t$insertCols .= \"dsh_created_by, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->createdBy;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->modifiedBy )) {\r\n\t\t\t\t$insertCols .= \"dsh_modified_by, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->modifiedBy;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->createdDate )) {\r\n\t\t\t\t$insertCols .= \"dsh_created_date, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->createdDate;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->modifiedDate )) {\r\n\t\t\t\t$insertCols .= \"dsh_modified_date, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->modifiedDate;\r\n\t\t\t}\r\n\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the auto-increment property, only if the primary column is auto-increment\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\r\n\t\t\t$ks_db->commit ();\r\n\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "protected function remplirBD(array $row){\r\n\t\t$this->idQCM=$row['idQCM'];\r\n\t\t$this->intituleQCM=$row['intituleQCM'];\r\n\t\t$this->difficulte=$row['difficulte'];\r\n\t\t$this->matiere=$row['matiere'];\r\n\t}", "function addDataRow($row_str, $num) {\n\t\t/*$str = substr($row_str, 1, -3);\n\t\tif(!$str) {\n\t\t\t$this->footnote_index = $num;\n\t\t\tvar_dump($this->footnote_index);\n\t\t\treturn;\n\t\t}*/\n\t\t\n\t\t//$arr = explode(',', $str);\n\n\t\t$this->first_newcode = 0;\n\n\t\t$arr = $row_str;\n\t\tif(count($arr) < 1) {\n\t\t\t$this->footnote_index = $num;\n\t\t\tvar_dump($this->footnote_index);\n\n\t\t\t//insert last dataset\n\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\tvar_dump($arr);\n\t\tif($num===0) {\n\t\t\t$this->headers = $arr;\n\t\t\t$this->code_index = array_search('WEO Subject Code', $arr);\n\t\t\t$this->name_index = array_search('Subject Descriptor', $arr);\n\t\t\t$this->note_index = array_search('Subject Notes', $arr);\n\t\t\t$this->unit_index = array_search('Units', $arr);\n\t\t\t$this->data = array();\n\n\t\t} else {\n\t\t\t$this->crnt_code = $arr[$this->code_index];\n\t\t\tif($this->crnt_code != $this->last_code) { //first line of new code\n\t\t\t\t$this->first_newcode = 1;\n\t\t\t\t$this->data[] = array(\n\t\t\t\t\t'code' => $this->crnt_code,\n\t\t\t\t\t'name' => $arr[$this->name_index].\" \".$arr[$this->unit_index],\n\t\t\t\t\t'note' => $arr[$this->note_index],\n\t\t\t\t\t\"data\" => array()\n\t\t\t\t);\n\t\t\t\t$this->data_index = count($this->data) - 1;\n\n\t\t\t\t/*if($this->last_code && $this->last_code != 'BCA') {\n\t\t\t\t\t$this->dumpJSON($this->data[0]);\n\t\t\t\t\t//var_dump($this->data);\n\t\t\t\t\tdie(); //tmp\n\t\t\t\t}*/\n\t\t\t}\n\t\t}\n\n\n\t\t//footnotes\n\t\t//var_dump(\"num:\".$num, \"footnote_index:\".$this->footnote_index);\n\t\tif($this->footnote_index > 0 && $num > $this->footnote_index) {\n\t\t\tif($num > $this->footnote_index+1) {}\n\t\t\treturn;\n\t\t}\n\n\t\tfor($i=-1,$l=count($arr);++$i<$l;) { //yoko\n\t\t\tif($num===0) {\n\t\t\t\tif(!$this->code_year_index && is_numeric($arr[$i])) {\n\t\t\t\t\t$this->code_year_index = $i;\n\t\t\t\t} else {\n\t\t\t\t\t$this->code_year_end = $i;\n\t\t\t\t}\n\n\t\t\t\t/*if($this->code_year_index && $i >= $this->code_year_index) {\n\t\t\t\t\t$this->data[$this->data_index][\"data\"][] = array(\n\t\t\t\t\t\t'year' => $arr[$i],\n\t\t\t\t\t\t'country_value' => array()\n\t\t\t\t\t);\n\t\t\t\t}*/\n\t\t\t} else {\n\t\t\t\tif($this->first_newcode) {\n\t\t\t\t\t/*$this->data[$this->data_index][\"data\"][] = array(\n\t\t\t\t\t\t'year' => $arr[$i],\n\t\t\t\t\t\t'country_value' => array()\n\t\t\t\t\t);*/\n\t\t\t\t\tif($i >= $this->code_year_index && $i < $this->code_year_end) {\n\t\t\t\t\t\t$this->data[$this->data_index][\"data\"][$i-$this->code_year_index]['year'] = $this->headers[$i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($i==0) {\n\t\t\t\t\t$tmp = array();\n\t\t\t\t}\n\t\t\t\tif($i >= $this->code_year_index && $i < $this->code_year_end) {\n\t\t\t\t\t$tmp['value'] = str_replace(\",\", \"\", $arr[$i]) + 0;\n\t\t\t\t\t//var_dump($tmp);\n\t\t\t\t\t/*var_dump($this->data[\"data\"]);\n\t\t\t\t\tvar_dump($i-$this->code_year_index);\n\t\t\t\t\tvar_dump($this->data->data[$i-$this->code_year_index]);*/\n\t\t\t\t\t$this->data[$this->data_index][\"data\"][$i-$this->code_year_index]['country_value'][] = $tmp;\n\t\t\t\t\t//var_dump($this->data);\n\t\t\t\t} elseif($i != $this->name_index && $i != $this->code_index && $i != $this->note_index) {\n\t\t\t\t\t$tmp[$this->headers[$i]] = mb_convert_encoding($arr[$i], \"UTF-8\");\n\t\t\t\t}\n\n\n\n\t\t\t}\n\t\t}\n\t\t$this->last_code = $this->crnt_code; //last of 1 tate\n\t}", "public function insert_entry($data) //makanya perlu $data berupa array karena lemparan\n {\n /*\n\t\t\t $this->title = $_POST['title']; // please read the below note\n $this->content = $_POST['content'];\n $this->date = time();\n\t\t\t\t*/\n $this->db->insert('jenis_menu', $data); //method baru bukan kepunyaan controller maupun model ERORRR\n }", "protected function createRenderArray(array $result) {\n $items = [];\n foreach ($result as $id => $row) {\n\n $items[$id] = [\n 'vsite_name' => [\n '#type' => 'link',\n '#url' => Url::fromUri($row['vsite_url'], ['absolute' => TRUE]),\n '#title' => $row['vsite_name'],\n '#attributes' => [\n 'class' => 'lynx-title',\n ],\n ],\n 'vsite_description' => [\n '#markup' => '<div class=\"meta-description\">' . $row['vsite_description'] . '</div>',\n ],\n 'content_type' => [\n '#markup' => '<div class=\"content-type\">' . $row['content_type'] . '</div>',\n ],\n 'title' => [\n '#prefix' => '<h2 class=\"node--title\">',\n '#type' => 'link',\n '#url' => Url::fromUri($row['url'], ['absolute' => TRUE]),\n '#title' => $row['title'],\n '#suffix' => '</h2>',\n ],\n 'body' => [\n '#markup' => '<div class=\"body\">' . Unicode::truncate($row['body'], 128, TRUE, TRUE) . '</div>',\n ],\n 'see_more' => [\n '#type' => 'link',\n '#url' => Url::fromUri($row['url'], ['absolute' => TRUE]),\n '#title' => $this->t('Read more'),\n ],\n ];\n if ($row['vsite_logo']) {\n $image = [\n '#theme' => 'image',\n '#uri' => $row['vsite_logo'],\n '#alt' => $row['vsite_name'],\n '#weight' => -1,\n ];\n $items[$id]['vsite_logo'] = [\n '#type' => 'link',\n '#url' => Url::fromUri($row['vsite_url'], ['absolute' => TRUE]),\n '#title' => $image,\n '#weight' => -2,\n ];\n }\n }\n\n $build['search_results'] = [\n '#title' => $this->t('Search'),\n 'content' => [\n '#theme' => 'item_list__search_results',\n '#items' => $items,\n '#empty' => [\n '#markup' => '<h3>' . $this->t('Your search yielded no results.') . '</h3>',\n ],\n '#type' => 'remote',\n '#attributes' => [\n 'class' => ['lynx-search-listing'],\n ],\n ],\n ];\n return $build;\n }", "public static function split_entry($row)\n\t{\n\t\t// Get the date\n\t\tpreg_match(self::$date_regex, $row, $matches);\n $data = array(\n 'date' => $matches[0],\n );\n\n\n\t\t// Trim off the date and ---\n\t\t$row = str_replace($data['date'].\" --- \", \"\", $row);\n\n\t\t// Now get the type\n\t\tpreg_match(\"/^\\w+/\", $row, $matches);\n\t\t$data['type'] = strtolower($matches[0]);\n\t\t$data['log'] = $row;\n\n\t\treturn $data;\n\t}", "function print_record_positions2($record) {\n ?>\n <tr>\n <td><?php echo htmlspecialchars($record[\"title\"]);?></td>\n <td class=\"centered\"><a class=\"link\" href=\"<?php echo 'delete_position.php?'.http_build_query(array('delete'=>htmlspecialchars($record[\"id\"]), 'id'=>htmlspecialchars($record[\"id\"]))) ?>\">Delete</a> </td>\n </tr>\n <?php\n }", "public function get_journal_articles($id){\n $sql46 = \"select * from articals where journal_id='$id' order by Position\";\n $result46 = mysqli_query($this->db,$sql46);\n while($articledata = mysqli_fetch_array($result46)){\n echo '\n <tr data-position='.$articledata['Position'].' data-index='.$articledata['artical_id'].'>\n <td>'.$articledata['artical_name'].'</td>\n <td>'.$articledata['artical_short_name'].'</td>\n <td>'.$articledata['issue_number'].'</td>\n <td>'.$articledata['volume_number'].'</td>\n <td class=\"text-center\">\n <a href=\"about_article.php?journal_id='.$articledata['journal_id'].'&article_id='.$articledata['artical_id'].'\" title=\"Edit\"><i class=\"fa fa-edit\"></i></a>\n </td>\n <td class=\"text-center\">\n <a href=\"deletebyid.php?article_id='.$articledata['artical_id'].'\" title=\"Delete\"><i class=\"fa fa-trash-o\"></i></a>\n </td>\n </tr>\n ';\n }\n }", "public static function accueilDatas(){\n return ['title'=>'Notre page d\\'accueil',\n 'h1'=>'Bienvenue',\n 'h2'=>'sur notre site',\n 'content' => [\"premier paragraphe\",\"Deuxieme paragraphe\",\"Paragraphe final\"]\n\n ];\n }", "function tpl_assign_rows(&$res)\n\t{\n\t\tglobal $current_lang, $page, $title;\n\n\t\t$row = $res->fetchrow(DB_FETCHMODE_ASSOC, 0); // rewind result set\n\t\tif (! $row) { return; }\n\n\t\tdo\n\t\t{\n\t\t\t$this->content->rows[$row['id']]['link'] = \n\t\t\t\tcommon::get_url_path('exdetails/'. (int) common::arg(1) .'/'. $row['id']);\n\t\t\t//common::get_url_path('productdetails/'. $row['id']);\n\n\t\t\t$this->content->rows[$row['id']]['price'] = (int) ($row['price'] * SITE_CURRENCY_RATE) .' '. SITE_CURRENCY_NAME;\n\t\t\t//$type_fk = $this->content->rows[$row['id']]['type_fk'];\n\n\t\t\t/**\n\t\t\t * Check thumbnails existence and create them if needed\n\t\t\t */\n\t\t\t$this->create_thumbnail($row['id'], THUMBNAIL_MIDDLE_SIZE);\n\n\t\t} while($row = $res->fetchrow());\n\n\t\t//echo '<pre>';\n\t\t//print_r($this->content->rows);\n\t\t//echo '</pre>';\n\t}", "public function getContentPrint(){\n \n $db = \\Drupal::database()->select('node_field_data','data')\n ->fields('data', array('title','type'))\n ->condition('status',1)\n ->execute()->fetchAll();\n // print_r($resultArray);\n // kint($resultArray);\n // var_dump($resultArray);\n // die();\n // while ($comment = $result->fetchAssoc()) {\n // print_r($comment);\n // }\n $str = '<table><thead><th>ID</th><th>Name</th></thead>';\n foreach($db as $key)\n {\n $str .='<tr>';\n foreach($key as $subkey)\n {\n $str .='<td>'.$subkey.'</td>';\n }\n $str .='</tr>';\n }\n $str .= '</table>';\n // $strArray = explode('.',$str);\n // foreach ($strArray as $key) {\n // # code...\n // echo $key.'<br>';\n // }\n // die();\n return [\n '#type' => '#markup',\n '#markup' => $str,\n ];\n \n }", "public static function LoadWithData($row)\n \t{\n \t\treturn new Announcement_model(\n \t\t\t$row->announcement_id,\n \t\t\t$row->title,\n \t\t\t$row->content,\n \t\t\t$row->posted_by,\n \t\t\t$row->posted_on\n \t\t);\n \t}" ]
[ "0.672333", "0.6709544", "0.6677965", "0.6493607", "0.6470499", "0.6432613", "0.6425414", "0.6398348", "0.62266165", "0.61630726", "0.61447376", "0.6125102", "0.5955416", "0.5847154", "0.5758112", "0.57260275", "0.5699102", "0.56871617", "0.5684768", "0.5672663", "0.5652481", "0.56524134", "0.5648335", "0.5619038", "0.55382484", "0.55324817", "0.552063", "0.5481076", "0.5475109", "0.5463024", "0.5458537", "0.5437289", "0.54334694", "0.54326165", "0.5428064", "0.5413042", "0.539425", "0.5388428", "0.53787416", "0.5340124", "0.5308768", "0.5306346", "0.5298046", "0.5273494", "0.5269255", "0.52647585", "0.52647585", "0.5264745", "0.5251975", "0.52450246", "0.5238399", "0.52321607", "0.5219132", "0.5216531", "0.52152586", "0.519954", "0.51989996", "0.519766", "0.5188994", "0.5179639", "0.51706254", "0.51589143", "0.5157982", "0.51478916", "0.51445305", "0.5139531", "0.51378775", "0.5137746", "0.51336205", "0.51294464", "0.51292455", "0.5113422", "0.5113289", "0.5112807", "0.5104733", "0.5084865", "0.5073994", "0.5069322", "0.5068212", "0.50535995", "0.5052437", "0.5050795", "0.5047383", "0.5041778", "0.503829", "0.5033454", "0.5031333", "0.50292283", "0.5027525", "0.50227785", "0.50224173", "0.50223035", "0.50176394", "0.5014662", "0.5006238", "0.50012374", "0.500102", "0.4998424", "0.49969354", "0.49957645", "0.49929714" ]
0.0
-1
==================================== obj method ====================================
public function getPatientCnt() { $sql = "select count(*) from patients where patientgroupid = :patientgroupid "; $bind = [ ':patientgroupid' => $this->id]; return Dao::queryValue($sql, $bind); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getObj();", "public function aObjeto() {\t}", "abstract public function object();", "abstract public function objId();", "public function extObjContent() {}", "public function extObjContent() {}", "function FetchObj() {}", "public function _init_obj()\n {\n // dummy\n }", "public function getObject();", "public function getObject();", "function getObject();", "function getObject();", "public function getObject() {}", "public function getObject() {}", "public function otherObject(){\n\t\t//Ex : tableau\n\t\t\n\t}", "function _newobj()\n\t\t{\n\t\t\t$this->n++;\n\t\t\t$this->offsets[$this->n]=strlen($this->buffer);\n\t\t\t$this->_out($this->n.' 0 obj');\n\t\t}", "function getContentObject() ;", "public static function RTEgetObj() {}", "abstract public function object_data(&$data);", "public function getObj() {\n return $this->obj;\n }", "function __construct($obj)\r\n\t{\r\n\t\t$this->obj = $obj;\r\n\t}", "public function toObject();", "abstract public function objType();", "public function getObject(): object;", "public function getCurrentObjectData() {}", "public function find($obj){\n\t}", "abstract protected function getObjectTag();", "function FetchNextObj() {}", "function __construct($obj){\n parent::__construct($obj->ID);\n $this->that = $obj;\n }", "public function base (\\stdClass $param);", "protected function testObject() {\n }", "public function getObjectIdent() {}", "public function getObjectIdent() {}", "function getObjectIt()\r\n \t{\r\n \t\treturn $this->object_it;\r\n \t}", "public function fixObject(){\n\t\t//Ex : cadre et texte d'entete\n\t}", "private function get_object_array($array){\n \n }", "function _init_obj()\r\n{\r\n\t//\tdummy\r\n}", "public function objectify(){ return array( 'aID' => $this->ulA()->ID, 'bID' => $this->ulB()->ID, 'connection' => $this->connection() ); }", "public function checkExtObj() {}", "public function checkExtObj() {}", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "public function extObjHeader() {}", "public function __construct($obj)\n\t{\n\t\t$this->obj = $obj;\n\t}", "function _getProperties() ;", "abstract public function getResultObjectProperty();", "public function checkSubExtObj() {}", "public function readObject();", "function __toString() ;", "function __toString() ;", "public function getContentObject() {}", "public function __init(){}", "abstract public function __toString() ;", "public function create($obj)\n {\n }", "public function buscar($objeto){\r\n\t}", "public function __CONSTRUCT(){\n\t}", "function tinkers($obj) {\n }", "public function test2()\n\t\t{\n\t\t\treturn get_object_vars($this);\n\t\t}", "protected function testObjects() {\n }", "private function __construct($obj) {\n\t\t$this->_base_obj = $obj;\n\t\t$this->_cached_properties = array();\n\t\t$this->_cached_methods = array();\n\t}", "function basefrndObj($data=null)\n\t{\n\t\tif($data==null)\n\t\treturn 0;\n\t\t\n\t\t$list = array();\n\t\tforeach($data as $k=>$node)\n\t\t{\n\t\t\t$obj = new stdclass;\n\t\t\t$obj->id = $node->id;\n\t\t\t$obj->name = $node->name;\n\t\t\t$obj->username = $node->username;\n\t\t\t$obj->email = $node->email;\n\t\t\t\n\t\t\tforeach($node->avatars As $ky=>$avt)\n\t\t\t{\n\t\t\t\t$avt_key = 'avtar_'.$ky;\n\t\t\t\t$obj->$avt_key = JURI::root().'media/com_easysocial/avatars/users/'.$node->id.'/'.$avt;\n\t\t\t}\n\t\t\t$list[] = $obj;\n\t\t}\n\t\t\n\t\treturn $list;\n\t\t\n\t}", "public function createValidObject() : object {\n\t\treturn (object) [\"tweetContent\" => bin2hex(random_bytes(12))];\n\t}", "public function __toString(){ }", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "public function loadFromObject($obj)\n\t{\n\t\t//throw new Exception('i');\n\t\t//var_dump($obj);\n\t\t//print_r($obj);\n\t\t\n\t\t$vars_info = $this->loadTableDescription($obj->getTableName());\n\t\t//print_r($vars_info);\n\t\t$vars = array();\n\t\tforeach($vars_info as $inf)\n\t\t{\n\t\t\t$varname = $inf['COLUMN_NAME'];\n\t\t\t$vars[$varname] = array();\n\t\t\t$v =& $vars[$varname];\n\t\t\t\n\t\t\t$v['current_value'] = $obj->$varname;\n\t\t\t\n\t\t\t//TODO: use export instead??\n\t\t\t$v['DATA_TYPE'] = $inf['DATA_TYPE'];\n\t\t\t$v['CHARACTER_MAXIMUM_LENGTH'] = $inf['CHARACTER_MAXIMUM_LENGTH'];\n\t\t\t$v['NUMERIC_PRECISION'] = $inf['NUMERIC_PRECISION'];\n\t\t\t$v['COLUMN_TYPE'] = $inf['COLUMN_TYPE'];\n\t\t\t$v['IS_NULLABLE'] = $inf['IS_NULLABLE'];\n\t\t\t$v['COLUMN_KEY'] = $inf['COLUMN_KEY'];\n\t\t\t$v['COLUMN_COMMENT'] = $inf['COLUMN_COMMENT'];\n\t\t\t\n\t\t\t$ref_tbl = $inf['REFERENCED_TABLE_NAME'];\n\t\t\t$ref_col = $inf['REFERENCED_COLUMN_NAME'];\n\t\t\tif(!empty($ref_tbl) && !empty($ref_col))\n\t\t\t{\n\t\t\t\t//TODO: this is a workaround.\n\t\t\t\t$name = ($ref_tbl == 'style') ? 'class' : 'name';\n\t\t\t\t$name = ($ref_tbl == 'user') ? 'username' : $name;\n\t\t\t\t$name = ($ref_tbl == 'IBO_student_exam') ? 'id' : $name;\n\t\t\t\t$v['references'] = SqlQuery::getInstance()->listQuery($ref_tbl,$ref_col,$name,'DISTINCT',1);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$v['references'] = NULL;\n\t\t}\n\t\t\n\t\t//and make the call to construct elements:\n\t\t$this->loadFromDescription($vars);\n\t\t\n\t}", "function print_obj($obj)\n{\n echo \"<pre>\".print_r($obj,1).\"</pre>\";\n}", "function data2Object($data) { \n\t\t\t$class_object = new getData($data); \n\t\t\treturn $class_object; \n\t\t}", "public abstract function FetchObject();", "function aggregate_info($object)\n{\n}", "abstract public function get() ;", "private function obj()\n {\n $object = $this->associative ? [] : new \\stdClass;\n\n if (++$this->depth > $this->maxDepth) {\n $this->throwSyntaxError('Maximum stack depth exceeded');\n }\n\n $this->nextOrFail('{');\n $this->white();\n while ($this->currentByte !== null) {\n if ($this->currentByte === '}') {\n $this->nextOrFail('}');\n $this->depth--;\n return $object; // Potentially empty object\n }\n\n // Keys can be unquoted. If they are, they need to be\n // valid JS identifiers.\n if ($this->currentByte === '\"' || $this->currentByte === \"'\") {\n $key = $this->string();\n } else {\n $key = $this->identifier();\n }\n\n $this->white();\n $this->nextOrFail(':');\n if ($this->associative) {\n $object[$key] = $this->value();\n } else {\n $object->{$key} = $this->value();\n }\n $this->white();\n // If there's no comma after this pair, this needs to be\n // the end of the object.\n if ($this->currentByte !== ',') {\n $this->nextOrFail('}');\n $this->depth--;\n return $object;\n }\n $this->nextOrFail(',');\n $this->white();\n }\n\n $this->throwSyntaxError('Invalid object');\n }", "protected function initializeObject() {}", "function __toString() \n {\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) {\n if ($obj != NULL) {\n $obj->name = $name; #nombre de la variable que hace de nombre de objecto\n $str .= $obj->label();\n $str .= $obj;\n $str .= \"<br />\\n\";\n }\n }\n return $str;\n }", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function get_object()\n {\n return $this->_object;\n }", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "function set_object( $objname, &$obj, $scope='', $tagname=null ){\n\n if( $scope=='global' ){\n $this->ctx[0]['_obj_'][$objname] = &$obj;\n return 1;\n }\n\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( !is_null($tagname) ){\n if( isset($this->ctx[$x]['_obj_']) && ($this->ctx[$x]['name']==$tagname) ){\n $this->ctx[$x]['_obj_'][$objname] = &$obj;\n return 1;\n }\n }\n else{\n if( isset($this->ctx[$x]['_obj_']) ){\n $this->ctx[$x]['_obj_'][$objname] = &$obj;\n return 1;\n }\n }\n }\n\n }", "public function __toString() {}" ]
[ "0.7199428", "0.6664443", "0.6620499", "0.62085456", "0.62034065", "0.6203372", "0.6184038", "0.6132262", "0.6119994", "0.6119994", "0.61193085", "0.61193085", "0.6053953", "0.6053953", "0.604622", "0.602721", "0.6007993", "0.5990999", "0.5988021", "0.59578586", "0.59369165", "0.5905176", "0.5897698", "0.5889411", "0.5888586", "0.5826394", "0.58167964", "0.58144265", "0.5806321", "0.578051", "0.5774144", "0.5771009", "0.5771009", "0.57507277", "0.5739627", "0.5733267", "0.57274735", "0.5688108", "0.5667293", "0.56664973", "0.5666494", "0.5666494", "0.56534284", "0.56482565", "0.56269014", "0.5626241", "0.562438", "0.5615136", "0.56146294", "0.5614484", "0.5601344", "0.55941135", "0.5593756", "0.5590382", "0.557724", "0.55712265", "0.55670565", "0.5557028", "0.5547097", "0.55387217", "0.5537092", "0.5526221", "0.55185336", "0.5510839", "0.5510839", "0.5510839", "0.5510839", "0.5510839", "0.5510839", "0.5505535", "0.55051893", "0.55023736", "0.5495401", "0.54718447", "0.5467727", "0.5458695", "0.5457962", "0.54520494", "0.54391634", "0.54391634", "0.54391634", "0.54391634", "0.54391634", "0.543875", "0.54382914", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437723", "0.5437313", "0.5436777" ]
0.0
-1
NOTE: The event table is prefilled
function process_data($arrData) { // 1) sql connection $conn = new mysqli(SRVRNAME, USERNAME, PASSWORD, DATABASE); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $stmt = $conn->stmt_init(); // 2) insert new record into Person // Prepared statement, stage 1: prepare if (!($stmt->prepare("INSERT INTO Person(fname,mi,lname,title,degrees,cell,email,preferred_email,addr1,addr2,city,state,zip,pro_titles,specialty,state_licensed,license_number,HCP_NCI_number,Payment_Mailing_Addr_1,Payment_Mailing_Addr_2,Payment_Mailing_City,Payment_Mailing_State,Payment_Mailing_Zip) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"))) { $db_errmsg = "Person Table-INSERT:Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error; return $db_errmsg; } // Prepared statement, stage 2: bind and execute if (!$stmt->bind_param("sssssssssssssssssssssss", $arrData['fname'],$arrData['middle_initial'],$arrData['lname'],$arrData['title'],$arrData['degrees'],$arrData['cell'],$arrData['email'],$arrData['email_preferred'],$arrData['addr1'],$arrData['addr2'],$arrData['city'],$arrData['state'],$arrData['zip'],$arrData['pro_titles'],$arrData['specialty'],$arrData['state_licensed'],$arrData['license_number'],$arrData['HCP_NCI_number'],$arrData['pay_addr1'],$arrData['pay_addr2'],$arrData['pay_city'],$arrData[',pay_state'],$arrData['pay_zip'])) { $db_errmsg = "Person Table-INSERT:Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error; return $db_errmsg; } // If error, return to regis page with message, close cxn if (!$stmt->execute()) { $db_errmsg = "Person Table-INSERT:Execute failed: (" . $stmt->errno . ") " . $stmt->error; return $db_errmsg; } // 3) select new pid from Person table if (!($stmt->prepare("SELECT pid FROM Person WHERE email = (?)"))) { $db_errmsg = "Person Table-SELECT:Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error; return $db_errmsg; } // If error, return to regis page with message, close cxn if (!$stmt->bind_param("s", $arrData['email'])) { $db_errmsg = "Person Table-SELECT:Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error; return $db_errmsg; } // If error, return to regis page with message, close cxn if (!$stmt->execute()) { $db_errmsg = "Person Table-SELECT:Execute failed: (" . $stmt->errno . ") " . $stmt->error; return $db_errmsg; } /* bind result variables */ $stmt->bind_result($pID); $stmt->fetch(); // 4) select eid from Event table if (!($stmt->prepare("SELECT eid FROM Event"))) { $db_errmsg = "Event Table-SELECT: Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error; return $db_errmsg; } // If error, return to regis page with message, close cxn if (!$stmt->execute()) { $db_errmsg = "Event Table-SELECT: Execute failed: (" . $stmt->errno . ") " . $stmt->error; return $db_errmsg; } /* bind result variables */ $stmt->bind_result($eID); $stmt->fetch(); // If error, return to regis page with message, close cxn // 5) insert records into P-E table if (!($stmt->prepare("INSERT INTO `Person-Event` (pid,eid,org_name,org_addr1,org_addr2,org_city,org_state,org_zip,emergency_contact_name,emergency_contact_phone,emergency_contact_email,hotel,comments,special_needs,display_name) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"))) { $db_errmsg = "Person-Event Table-INSERT: Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error; return $db_errmsg; } // Prepared statement, stage 2: bind and execute if (!$stmt->bind_param("iisssssssssssss", $pID,$eID,$arrData['org_name'],$arrData['org_addr1'],$arrData['org_addr2'],$arrData['org_city'],$arrData['org_state'],$arrData['org_zip'],$arrData['emergency_contact_name'],$arrData['emergency_contact_phone'],$arrData['emergency_contact_email'],$arrData['hotel'],$arrData['comments'],$arrData['special_needs'],$arrData['Name_In_Print'])) { $db_errmsg = "Person-Event Table-INSERT: Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error; return $db_errmsg; } // If error, return to regis page with message, close cxn if (!$stmt->execute()) { $db_errmsg = "Person-Event Table-INSERT:Execute failed: (" . $stmt->errno . ") " . $stmt->error; return $db_errmsg; } // 6) close connection $stmt->close(); $conn->close(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventsTable()\n {\n return \n $this->ItemsTableDataGroup\n (\n \"\",\n 0,\n $this->ApplicationObj()->EventGroup,\n $this->ApplicationObj()->Events\n );\n }", "function CreateTableEvent(){\r\n\t\t$qry = \"CREATE TABLE IF NOT EXISTS $this->tablename2 (\". \r\n\t\t\t\t\"Eid INT AUTO_INCREMENT,\".\r\n\t\t\t\t\"UuserName CHAR(255) NOT NULL,\".\r\n\t\t\t\t\"Evename VARCHAR(255) NOT NULL,\".\r\n\t\t\t\t\"EstartDate VARCHAR(20) NOT NULL,\".\r\n\t\t\t\t\"EendDate VARCHAR(20) NOT NULL,\".\r\n\t\t\t\t\"Eaddress VARCHAR(255) NOT NULL,\".\r\n\t\t\t\t\"Ecity VARCHAR(50) NOT NULL,\".\r\n\t\t\t\t\"Estate CHAR(10) NOT NULL,\".\r\n\t\t\t\t\"Ezip INT(5) NOT NULL,\".\r\n\t\t\t\t\"EphoneNumber VARCHAR(50),\".\r\n\t\t\t\t\"Edescription VARCHAR(500) NOT NULL,\".\r\n\t\t\t\t\"Etype VARCHAR(26) NOT NULL,\".\r\n\t\t\t\t\"Ewebsite VARCHAR(500) NOT NULL,\".\r\n\t\t\t\t\"Ehashtag CHAR(255),\".\r\n\t\t\t\t\"Efacebook CHAR(255),\".\r\n\t\t\t\t\"Etwitter CHAR(255),\".\r\n\t\t\t\t\"Egoogle CHAR(255),\".\r\n\t\t\t\t\"Eflyer CHAR(255),\".\r\n\t\t\t\t\"Ebanner CHAR(255),\".\r\n\t\t\t\t\"Eother CHAR(255),\".\r\n\t\t\t\t\"EtimeStart CHAR(255),\".\r\n\t\t\t\t\"EtimeEnd CHAR(255),\".\r\n\t\t\t\t\"Elat DECIMAL(10,6),\".\r\n\t\t\t\t\"Elong DECIMAL(10,6),\".\r\n\t\t\t\t\"Erank CHAR(255),\".\r\n\t\t\t\t\"Edisplay INT(1),\".\r\n\t\t\t\t\"PRIMARY KEY(Eid, UuserName)\".\r\n\t\t\t\");\";\r\n\r\n\t\tif(!mysql_query($qry, $this->connection)){\r\n\t\t\t$this->HandleDBError(\"Error creating the table \\nquery was\\n $qry\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function bindEventObject()\r\n\t{\r\n JTable::addIncludePath( JPATH_ADMINISTRATOR . '/components/com_calendar/tables' );\r\n\t\t$table = JTable::getInstance( 'Events', 'CalendarTable' );\r\n\t\t\r\n\t if (!empty($this->event_id))\r\n\t {\r\n\t $table->load( $this->event_id );\r\n\t }\r\n\t \r\n\t\t$table->trimProperties();\r\n\t\t\r\n\t\t$properties = $this->getProperties();\r\n\t\t$table_properties = $table->getProperties();\r\n\r\n\t\tforeach ($table_properties as $prop=>$value)\r\n\t\t{\r\n\t\t if (!array_key_exists($prop, $properties))\r\n\t\t {\r\n\t\t $this->$prop = $table->$prop;\r\n\t\t }\r\n\t\t}\r\n\t}", "function ReadEvents()\n {\n $this->ApplicationObj()->Events=\n $this->Sql_Select_Hashes\n (\n $this->ApplicationObj()->HtmlEventsWhere(),\n array(),\n array(\"StartDate\",\"ID\")\n );\n \n $this->ApplicationObj()->Events=array_reverse($this->ApplicationObj()->Events);\n }", "public function createEventTable()\n {\n $table = $this->getEventTable();\n $recurr = $this->getRecurrenceTable();\n if (empty($table) || empty($recurr)) {\n return PHPWS_Error::get(CAL_CANNOT_MAKE_EVENT_TABLE, 'calendar',\n 'Calendar_Schedule::createEventTable');\n }\n\n $template['TABLE'] = $table;\n $template['RECURR_TABLE'] = $recurr;\n $template['INDEX_NAME'] = str_replace('_', '', $table) . '_idx';\n $template['RECURR_INDEX_NAME'] = str_replace('_', '', $recurr) . '_idx';\n\n $file = PHPWS_SOURCE_DIR . 'mod/calendar/inc/event_table.sql';\n\n if (!is_file($file)) {\n return PHPWS_Error::get(PHPWS_FILE_NOT_FOUND, 'calendar',\n 'Calendar_Schedule::createEventTable', $file);\n }\n\n $query = PHPWS_Template::process($template, 'calendar', $file, true);\n return PHPWS_DB::import($query);\n }", "function afficherevent(){\r\n\t\t$sql=\"SElECT * From eventt\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t\t$liste=$db->query($sql);\r\n\t\t\treturn $liste;\r\n\t\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '. $e->getMessage());\r\n \t\t\t\t\t}\t\r\n\t}", "private function add_events()\r\n {\r\n $events = $this->events;\r\n foreach ($events as $time => $items)\r\n {\r\n $column = date('H', $time) / $this->hour_step + 1;\r\n foreach ($items as $item)\r\n {\r\n $content = $item['content'];\r\n $row = $item['index'] + 1;\r\n \r\n $cell_content = $this->getCellContents($row, $column);\r\n $cell_content .= $content;\r\n $this->setCellContents($row, $column, $cell_content);\r\n }\r\n }\r\n \r\n }", "function ShowEvents()\n {\n $this->ReadEvents();\n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Events_Table_Title\")).\n $this->EventsHtmlTable(),\n \"\";\n }", "function eventclass_bill_record()\n\t{\n\t\t$this->events[\"BeforeDelete\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "public function showEventsTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM event\");\r\n\t\techo \"<h3>Event Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"competition_id\" . \"</td><td>\" . \"name\" . \"</td><td>\" . \"score\" . \"</td><td>\" . \"time\" . \"</td><td>\" . \"tie_break\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['competition_id'] . \"</td><td>\" . $row['name'] . \"</td><td>\" . $row['score'] . \"</td><td>\" . $row['time'] . \"</td><td>\" . $row['tie_break'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "public function getTableName()\n\t\t{\n\t\t\treturn 'cfe_event';\n\t\t}", "function EventsHtmlTable()\n {\n return \n $this->Html_Table\n (\n \"\",\n $this->EventsTable()\n );\n }", "protected function setEventName() {\n return NULL;\n }", "public function dispalyEventsTable(){\n $sql=\"SELECT * FROM `events` ORDER BY `event_date` asc\";\n $result=$this->conn->query($sql);\n $rows=array();\n\n if($result->num_rows>0){\n while($displayEvent=$result->fetch_assoc()){\n $rows[]=$displayEvent;\n }\n return $rows;\n }else{\n return false;\n }\n\n }", "private function initEvents() : void {\n\n $arenas = MineceitCore::getArenas()->getEventArenas();\n\n foreach($arenas as $arena) {\n $this->createEvent($arena);\n }\n }", "function build_event_tbl() {\n global $wpdb;\n\n $charset_collate = $wpdb->get_charset_collate();\n\n $table_name = $wpdb->prefix . \"events\";\n\n $sql = \"CREATE TABLE $table_name (\n id mediumint(9) NOT NULL,\n time datetime DEFAULT '0000-00-00 00:00:00',\n venue mediumint(9),\n performer mediumint(9),\n city text,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n \n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql );\n\n $performer_name = $wpdb->prefix . \"performers\";\n $performerSql = \"CREATE TABLE $performer_name (\n id mediumint(9) NOT NULL,\n name text,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n dbDelta( $performerSql );\n\n $category_name = $wpdb->prefix . \"categories\";\n $categorySql = \"CREATE TABLE $category_name (\n id mediumint(9) NOT NULL,\n name text,\n wp_id mediumint(9),\n PRIMARY KEY (id)\n ) $charset_collate;\";\n dbDelta( $categorySql );\n\n $searched_terms_name = $wpdb->prefix . \"searched_terms\";\n $searchedSql = \"CREATE TABLE $searched_terms_name (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n term text,\n num_searched mediumint(9) DEFAULT 1,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n dbDelta( $searchedSql );\n\n $cached_results_name = $wpdb->prefix . \"cached_results\";\n $cachedSql = \"CREATE TABLE $cached_results_name (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n term text,\n result blob,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n dbDelta( $cachedSql );\n\n $predictive_name = $wpdb->prefix . \"predictive_terms\";\n $predictiveSql = \"CREATE TABLE $predictive_name (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n term text,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n dbDelta( $predictiveSql );\n}", "public function get_test_scheduled_events()\n {\n }", "function ajax_event_table_AddNew($db, $eventID, $postData, $postNames)\r\n{\r\n\t/*\r\n\t\t$postNames array values\r\n\t\t-----------------------\r\n\t\t0 = Event Location\r\n\t\t1 = Event Name\r\n\t\t2 = Start Date\r\n\t\t3 = Start Time\r\n\t\t4 = Number of Seats\r\n\t\t5 = Server IP Address\r\n\t\t6 = Amount of Days this event runs for\r\n\t*/\r\n\r\n\t$_SESSION['errMsg'] = \"\";\r\n\t$errCount = 0;\r\n\r\n\t//Validate the fields - first check to see if they are empty\r\n for($i = 0; $i<sizeof($postData); ++$i)\r\n\t{\r\n\t\tif ($postData[$i] == '')\r\n\t\t{\r\n\t\t\tif ($i != 5)\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['errMsg'] .= $postNames[$i] . ' is empty.' . '<br />';\r\n\t\t\t\t$errCount ++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//Check if event exists -\r\n\tif(!$postData[1] == '')\r\n\t{\r\n\t\t$query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND event_name='\" . $postData[1]. \"'\";\r\n\t\t$result = $db->query($query);\r\n\t\tif ($result->num_rows > 0)\r\n\t\t{\r\n\t\t\t$_SESSION['errMsg'] .= 'Event Name Exists, Please choose another' . '<br />';\r\n\t\t\t$errCount ++;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// CONVERT DATE TO mySQL DATE\r\n\t$sqlDate = dateToDatabase($postData[2]);\r\n\r\n\tif ($sqlDate == '00/00/0000')\r\n\t{\r\n\t\t$_SESSION['errMsg'] .= 'Start Date is not Valid' . '<br />';\r\n\t\t$errCount ++;\r\n\t}\r\n\tif (check_time_format($postData[3])== false)\r\n\t{\r\n\t\t$_SESSION['errMsg'] .= 'Start Time is not Valid' . '<br />';\r\n\t\t$errCount ++;\r\n\t}\r\n\tif ($postData[5] != '' && validateIpAddress($postData[5])== false)\r\n\t{\r\n\t\t$_SESSION['errMsg'] .= 'Server I.P Address is not valid' . '<br />';\r\n\t\t$errCount ++;\r\n\t}\r\n\tif (!is_numeric($postData[4]))\r\n\t{\r\n\t\t$_SESSION['errMsg'] .= 'Seat Quantity Should be a number' . '<br />';\r\n\t\t$errCount ++;\r\n\t}\r\n\r\n\r\n\tif ($errCount > 0)\r\n\t{\r\n\t\t$errCount = 0;\r\n\t\t$eventID = getThisEvent($db);\r\n\t\tajax_event_table_basic($db, $eventID);\r\n\r\n\t\techo \"<br /><font class='error'>\" . $_SESSION['errMsg'] . \"</font>\";\r\n\t\t$eName= $_POST['event_name'];\r\n\t\t$eLocation = $_POST['event_location'];\r\n\t\t$eStartTime = $_POST['startTime'];\r\n\t\t$eEventDate = $_POST['startDate'];\r\n\t\t$days = $_POST['days'];\r\n\t\t$eServerIP = $_POST['server_IP_address'];\r\n\t\t$eSeatNum = $_POST['seatQuantity'];\r\n\t}\r\n\telseif($errCount <= 0)\r\n\t{\r\n\t\t$event_location = $_POST['event_location'];\r\n\t\t$event_name = $_POST['event_name'];\r\n\t\t$days = $_POST['days'];\r\n\t\t$startTime = $_POST['startTime'];\r\n\t\t$server_IP_address = $_POST['server_IP_address'];\r\n\t\t$seatQuantity = $_POST['seatQuantity'];\r\n \r\n\t\t$query = \"INSERT INTO `event` (`eventID`, `event_name`, `event_location`, `startDate`, `days`, `startTime`, `seatQuantity`, `server_IP_address`, `event_started`, `event_completed`)\"; \r\n\t\t$query .= \"VALUES (NULL, '\".$event_name.\"', '\".$event_location.\"', '\".$sqlDate.\"', '\".$days.\"', \";\r\n\t\t$query .= \"'\".$startTime.\"', '\".$seatQuantity.\"', '\".$server_IP_address.\"', 0, 0);\"; \r\n\t\t\t\t\r\n\t\t$page = $_SERVER['PHP_SELF']; \r\n\r\n\t\t$db->autocommit(FALSE); \r\n\t\t$db->query($query);\r\n\r\n\t\tif($db->error)\r\n\t\t{\r\n\t\t\t$_SESSION['errMsg'] .= 'Transaction aborted:<br/>';\r\n\t\t\tprintf(\"Error Message:\", $db->error);\r\n\r\n\t\t\t$db->rollback();\r\n\t\t\tajax_event_table_Add($db);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmysqli_commit($db);\r\n\t\t\t$db->autocommit(TRUE);\r\n\t\t\t$query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND event_name='\" . $_POST['event_name'] . \"';\";\r\n\t\t\t$result = $db->query($query);\r\n\r\n\t\t\t$row = $result->fetch_array(MYSQLI_BOTH);\r\n\t\t\t$eventID = $row['eventID']; \r\n\t\t\tajax_event_table_basic($db,$eventID);\r\n\t\t}\r\n\t\techo '<script type=\"text/javascript\">refreshEvent();</script>';\r\n\t}\r\n }", "public function dumpEventTable(){\n\t\t$this->db->select('name, id, CAST(status AS UNSIGNED) AS status');\n\t\t$this->db->from('event');\n\t\t$this->db->order_by('creationDate', 'DESC');\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\n\t}", "public function fetchEvents()\n {\n // TODO: Implement fetchEvents() method.\n }", "abstract public function getEventName();", "public function testQueryEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function showEvents() {\r\n\r\n\t// Lets import some globals, shall we?\r\n\tglobal $MySelf;\r\n\tglobal $DB;\r\n\tglobal $TIMEMARK;\r\n\t$delta = $TIMEMARK -259200;\r\n\t\r\n\t// is the events module active?\r\n\tif (!getConfig(\"events\")) {\r\n\t\tmakeNotice(\"The admin has deactivated the events module.\", \"warning\", \"Module not active\");\r\n\t}\r\n\r\n\t// Load all events.\r\n\t$EVENTS_DS = $DB->query(\"SELECT * FROM events WHERE starttime >= '\" . $delta . \"' ORDER BY starttime ASC\");\r\n\r\n\t// .. right?\r\n\tif ($EVENTS_DS->numRows() >= 1) {\r\n\r\n\t\t// Lets keep in mind: We have events.\r\n\t\t$haveEvents = true;\r\n\r\n\t\twhile ($event = $EVENTS_DS->fetchRow()) {\r\n\r\n\t\t\t// get the date.\r\n\t\t\t$date = date(\"d.m.y\", $event[starttime]);\r\n\r\n\t\t\t// open up a new table for each day.\r\n\t\t\tif ($date != $previousdate) {\r\n\r\n\t\t\t\t$workday = date(\"l\", $event[starttime]);\r\n\r\n\t\t\t\tif ($beenhere) {\r\n\t\t\t\t\t$html .= $temp->flush();\r\n\t\t\t\t\t$html .= \"<br>\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$beenhere = true;\r\n\r\n\t\t\t\t// We need an additional row if we are allowed to delete events.\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp = new table(8, true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$temp = new table(7, true);\r\n\t\t\t\t}\r\n\t\t\t\t$temp->addHeader(\">> Events for \" . $workday . \", the \" . $date);\r\n\t\t\t\t$previousdate = $date;\r\n\r\n\t\t\t\t$temp->addRow(\"#060622\");\r\n\t\t\t\t$temp->addCol(\"ID\");\r\n\t\t\t\t$temp->addCol(\"Starttime\");\r\n\t\t\t\t$temp->addCol(\"Starts in / Runs for\");\r\n\t\t\t\t$temp->addCol(\"Mission Type\");\r\n\t\t\t\t$temp->addCol(\"Short Description\");\r\n\t\t\t\t$temp->addCol(\"System\");\r\n\t\t\t\t$temp->addCol(\"Security\");\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp->addCol(\"Delete\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add Event to the current database.\r\n\t\t\t$temp->addRow();\r\n\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=showevent&id=\" . $event[id] . \"\\\">\" . str_pad($event[id], 4, \"0\", STR_PAD_LEFT) . \"</a>\");\r\n\t\t\t$temp->addCol(date(\"d.m.y H:i\", $event[starttime]));\r\n\r\n\t\t\t$delta = $TIMEMARK - $event[starttime];\r\n\t\t\tif ($TIMEMARK > $event[starttime]) {\r\n\t\t\t\t// Event underway.\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#00ff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t} else {\r\n\t\t\t\t// Event not started yet.\r\n\t\t\t\t$delta = $delta * -1;\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#ffff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t}\r\n\r\n\t\t\t$temp->addCol($event[type]);\r\n\t\t\t$temp->addCol($event[sdesc]);\r\n\t\t\t$temp->addCol($event[system]);\r\n\t\t\t$temp->addCol($event[security]);\r\n\t\t\t\r\n\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=deleteevent&id=$event[id]\\\">delete event</a>\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Lets recall, did we have events scheduled?\r\n\tif ($haveEvents) {\r\n\t\t// We do!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2>\" . $html . $temp->flush();\r\n\t} else {\r\n\t\t// We dont!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2><b>There are currently no scheduled events in the database.</b>\";\r\n\t}\r\n\t// Return what we got.\r\n\treturn ($html);\r\n\r\n}", "public function getOtherEvents();", "public function __deleteEvents() {\n $_deleteEventCodes_ = array(\n 'wk_pa_add_column_menu',\n 'wk_pa_addJs_product',\n 'wk_pa_product_model_delete',\n 'wk_pricealert_account_view',\n 'wk_pricealert_header',\n 'wk_pricealert_addJs_add',\n 'wk_pricealert_addJs_edit',\n 'wk_pa_product_model_update',\n 'wk_pa_product_model_add',\n );\n\n foreach ($_deleteEventCodes_ as $_DE_code) {\n $this->helper_event->deleteEventByCode($_DE_code);\n }\n }", "private function _getEventData()\n {\n $query = $this->app->query->newSelect();\n $query->cols(['*'])\n ->from('events')\n ->orderBy(['event_date desc', 'post_date desc'])\n ->limit(3);\n\n return $this->app->db->fetchAll($query);\n }", "private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}", "private function display_custom_events_table()\n\t{\n\t\t// Show the custom PHP events\n\t\t// Firstly, convert our custom event list to a proper map\n\t\t$map = [];\n\n\t\t// Sort alphabetically\n\t\tksort($this->custom_php_events);\n\n\t\tforeach ($this->custom_php_events as $extension => $events)\n\t\t{\n\t\t\tksort($events);\n\n\t\t\t// Grab each event\n\t\t\tforeach ($events as $event)\n\t\t\t{\n\t\t\t\t$map[] = [$extension, $event];\n\t\t\t}\n\t\t}\n\n\t\t// Show the table\n\t\t$table_header = [$this->language->lang('CLI_EXTENSION_EVENTS_EXTENSION_NAME'), $this->language->lang('CLI_EXTENSION_EVENTS_NAME')];\n\t\t$this->render_table($table_header, $map);\n\t}", "public function event_joined()\r\n\t{\r\n\t\r\n\t}", "public function viewAllEvents();", "public function getEvents();", "public function getEvents();", "function allEventRowsForDocument($doc,$table)\r{\r\r\tglobal $db_conn;\r\t$query = \"SELECT * FROM $table WHERE tmlfile = '$doc'\";\r\t//if ($table == 'tb_events') {\r\t//\t$query = \"SELECT * FROM $table WHERE tmlfile = '$doc' order by sentid\"; }\r\t// echo $query;\r\t$result = mysql_query($query, $db_conn);\r\t$rows = Array();\r\tif (mysql_errno()) {\r\t\tprintMySqlErrors($query,\"allLinkRowsForDocument($doc,$table)\"); }\r\telse {\r\t\twhile ($row = mysql_fetch_assoc($result)) {\r\t\t\t$rows[] = $row; }}\r\treturn $rows; \r}", "public function getEventObject(){\n $eventTimeID = $this->getID();\n\n $prepared = self::adhocQuery(function( \\PDO $connection ) use ($eventTimeID){\n $statement = $connection->prepare(\"\n SELECT sev.id FROM SchedulizerEvent sev\n JOIN SchedulizerEventTime sevTime ON sevTime.eventID = sev.id\n WHERE sevTime.id = :eventTimeID\n \");\n $statement->bindValue(\":eventTimeID\", $eventTimeID);\n return $statement;\n });\n\n return Event::getByID($prepared->fetch(\\PDO::FETCH_COLUMN));\n }", "public function initEvent() {\n \t\t$dateend = date_format(date_create(),'Y-m-d H:i:s');\n\t\t$datebegin = date_create();\n\t\tdate_sub($datebegin, date_interval_create_from_date_string('10 days'));\n\t\t$datebegin = date_format($datebegin, 'Y-m-d H:i:s');\n\t\t// get event logs from event_log table\n \t\t$EventLogs = DB::table('event_log')->join('client','client.client_id','=','event_log.client_id')->join('mandant','client.mandant_id','=','mandant.mandant_id')->select('log_nr', 'message_id','mandant.mandant_firmname','useragent','client.client_id','client_ip','action',DB::raw('date_format(insert_date, \\'%d.%m.%Y %H:%i:%s\\') as insert_date'))->where('mandant.user_id','1')->where('insert_date','>',$datebegin)->where('insert_date','<',$dateend)->orderby('log_nr','ASC')->get();\n \t\treturn View::make('eventlog/eventlog_gui')->with('page',2)->with('title','Event Logs')->with('events',$EventLogs);\n \t}", "public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Schedule'),\n \\adminer\\lang('Start'),\n // \\adminer\\lang('End'),\n ];\n\n // From db.inc.php\n $events = \\adminer\\support(\"event\") ? \\adminer\\get_rows(\"SHOW EVENTS\") : [];\n $details = [];\n foreach($events as $event)\n {\n $detail = [\n 'name' => \\adminer\\h($event[\"Name\"]),\n ];\n if(($event[\"Execute at\"]))\n {\n $detail['schedule'] = \\adminer\\lang('At given time');\n $detail['start'] = $event[\"Execute at\"];\n // $detail['end'] = '';\n }\n else\n {\n $detail['schedule'] = \\adminer\\lang('Every') . \" \" .\n $event[\"Interval value\"] . \" \" . $event[\"Interval field\"];\n $detail['start'] = $event[\"Starts\"];\n // $detail['end'] = '';\n }\n $details[] = $detail;\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "function ajax_event_table_basic($db, $eventID)\r\n{\r\n?>\r\n<table class='pizzaOrder'>\r\n<tr>\r\n\t<td class='MANheader' width='600px' colspan='2'>\r\n\t&nbsp;&nbsp;Current Events: \r\n\t<font size=\"2\" class=\"subtitle\">Click on an event to see more information below</font></td>\r\n</tr>\r\n\r\n<?php\r\n$query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND event_started != 2 ORDER BY startDate ASC\";\r\n$result = $db->query($query);\r\nif ($result->num_rows == 0)\r\n{\r\n\techo '<tr><td><i>There are no current events in the system</i></td></tr>';\r\n\tdie();\r\n}\r\n\r\n\r\n// Now we can output the option fields to populate the list box.\r\nfor ($i=0; $i<$result->num_rows; $i++) \r\n{\r\n\t$row = $result->fetch_assoc(); \r\n\r\n\techo '<tr class=\"pointer\" id=\"eventRow_'.$i.'\" onclick=\"getEvent('.$row[\"eventID\"].')\">';\r\n\t\techo '<td width=\"70px\">';\r\n\t\t\techo '<div style=\"position: relative; top: 5px;\">';\r\n\t\t?>\r\n\t\t\t<!-- // DELETE EVENT BUTTON -->\r\n\t\t\t<img class=\"pointer\"\r\n\t\t\t\tsrc=\"../images/buttons/delete_60.png\"';\r\n\t\t\t\talt=\"Delete this event\" \r\n\t\t\t\tonclick=\"deleteEvent(<?php echo $row[\"eventID\"]; ?>, '<?php echo $row[\"event_name\"]; ?>')\" />\r\n\t\t<?php\r\n\t\t\techo '</div>';\r\n\t\techo '</td>';\r\n\t\techo '<td>';\r\n\t\t\techo $row['event_name'];\r\n\t\t\techo '&nbsp;-&nbsp;<font size=\"1\">['.dateToScreen($row['startDate']).']</font>';\r\n\t\techo '</td>';\r\n\techo '</tr>';\r\n}\r\necho '</table>';\r\n?>\r\n\r\n\r\n\r\n\r\n\r\n<?php\r\n\t//Create the general select query.\r\n $query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND eventID=\".$eventID.\";\"; \t\r\n $result = $db->query($query); \t\t\t\r\n\r\n\r\n\t//use it first for the title\t\r\n $row1 = $result->fetch_array(MYSQLI_BOTH);\t\t\r\n\t\r\n\t//then close it ready for the next execution\r\n $result->close();\t\t\t\t\t\t\t\t\r\n $result = $db->query($query); \t\r\n\r\n\r\n\techo '<br />';\r\n\r\n\r\necho '<table class=\"pizzaOrder\">';\r\n $on = 'this.src=\"../images/buttons/edit_dwn.png\"';\r\n $off = 'this.src=\"../images/buttons/edit_up.png\"';\r\n\r\n echo '<tr>';\r\n\t\techo '<td colspan=\"2\" id=\"headCell_left\">&nbsp;&nbsp;';\r\n\t\techo '<font class=\"subtitle\" style=\"font-size: 14pt;\">'.$row1['event_name'].'</font></td>';\r\n\t\techo '<td id=\"headCell_right\">';\r\n\t\techo '<img class=\"button\" src=\"../images/buttons/edit_dwn.png\"';\r\n\t\t\techo 'alt=\"Edit The Selected Event\" onclick=\"editEvent('.$row1['eventID'].')\"';\r\n\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\techo '</tr>';\r\n\r\n\t\t\t\t\t\r\n\t//While Loop starts here - \r\n\t// Retrieve the data for the table. There should only be one row.\r\n\twhile($row = $result->fetch_assoc())\r\n\t{\r\n\t\techo '<tr>';\r\n\t\t\techo '<td width=\"150px\"><b>Event Location: </b></td>';\r\n\t\t\techo '<td>'.$row['event_location'].'</td>';\r\n\t\t\techo '<td>&nbsp;</td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Date: </b></td>';\r\n\t\t\techo '<td>'.dateToScreen($row['startDate']).'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Day Count: </b></td>';\r\n\t\t\techo '<td>'.$row['days'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Time: </b></td>';\r\n\t\t\techo '<td>'.$row['startTime'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Server IP Address: </b></td>';\r\n\t\t\techo '<td>'.$row['server_IP_address'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Number of Seats: </b></td>';\r\n\t\t\techo '<td>'.$row['seatQuantity'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\t$on = 'this.src=\"../images/buttons/stop_dwn.png\"';\r\n\t\t$off = 'this.src=\"../images/buttons/stop.png\"';\r\n\t\t\r\n\t\t$on1 = 'this.src=\"../images/buttons/start_dwn.png\"';\r\n\t\t$off1 = 'this.src=\"../images/buttons/start.png\"';\r\n\r\n\t\t// If the event has started place the stop event button in the table.\r\n\t\tif($row['event_started'] == 1) \r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\techo '<td>Yes</td>';\r\n\t\t\techo '<td><img src=\"../images/buttons/stop_dwn.png\" class=\"button\"'; \r\n\t\t\t\techo 'alt=\"Stop the current event.\" onclick=\"stopEvent(' . $row['eventID'] . ')\" ';\r\n\t\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has not started place the start event button in the table. \r\n\t\t\r\n\r\n\t\t\r\n\t\telseif ($row['event_started'] == 0)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>No</td>';\r\n\t\t\t\techo '<td><img src=\"../images/buttons/start_dwn.png\" class=\"button\"';\r\n\t\t\t\t\techo 'alt=\"Start the selected event. Stops all others.\" onclick=\"startEvent(' . $row['eventID'] . ')\"'; \r\n\t\t\t\t\techo 'onmouseover='.$off1.' onmouseout='.$on1.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has completed or been stopped. \r\n\t\telseif ($row['event_started'] == 2)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>Finished</td>';\r\n\t\t\t\techo '<td>&nbsp;</td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t}\r\necho '</table>';\r\n}", "public static function __events () {\n \n }", "public function testGetValidEventByEventName (): void {\n // count the number of rows and save it for later\n $numRows = $this->getConnection()->getRowCount(\"event\");\n // create a new Event and insert it into mySQL\n $eventId = generateUuidV4();\n\t\t $event = new Event ($eventId, $this->profile->getProfileId(), $this->VALID_EVENTATTENDEELIMIT,$this->VALID_EVENTDETAIL, $this->VALID_EVENTENDDATETIME,$this->VALID_EVENTIMAGE, $this->VALID_EVENTLAT, $this->VALID_EVENTLONG, $this->VALID_EVENTNAME, $this->VALID_EVENTPRICE, $this->VALID_EVENTSTARTDATETIME);\n $event->insert($this->getPDO());\n // grab the data from mySQL and enforce the fields match our expectations\n $results = Event::getEventByEventName($this->getPDO(), $event->getEventName());\n $this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"event\"));\n $this->assertCount(1, $results);\n\n // enforce no other objects are bleeding into the test\n $this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\CrowdVibe\\\\Event\", $results);\n\n\n // grab the result from the array and validate it\n $pdoEvent = $results[0];\n $this->assertEquals($pdoEvent->getEventId(), $eventId);\n $this->assertEquals($pdoEvent->getEventProfileId(), $this->profile->getProfileId());\n $this->assertEquals($pdoEvent->getEventDetail(), $this->VALID_EVENTDETAIL);\n //format the date too seconds since the beginning of time to avoid round off error\n $this->assertEquals($pdoEvent->getEventStartDateTime(), $this->VALID_EVENTSTARTDATETIME);\n }", "public function get_events_table_name() {\n\t\treturn $this::$dbtable;\n\t}", "public function listEvents()\n\t{\n\n\t\t$table=CaseItemModel::getInstance()->getTable();\n $pTable=ProcessModel::getInstance()->getTable();\n $piTable=ProcessItemModel::getInstance()->getTable();\n \n\t\t$status =\"status not in ('Complete','Terminated') \";\n \n\t\t$sql=\"select 'Case Item' as source,id,null as processName, processNodeId,caseId,type,subType,label,timer,timerDue,message,signalName \"\n . \" from $table \"\n . \" where $status\"\n .\" and subType in('timer','message','signal')\";\n\t\t$arr1= $this->db->select($sql);\n\n\t\t$sql=\"select 'Process Item' as source ,p.processName as processName, pi.id as id,pi.processNodeId,null as caseId,pi.type,subType,label,timer,timerDue,message,signalName \"\n . \" from $piTable pi\n join $pTable p on p.processId=pi.processId\n where subType in('timer','message','signal')\";\n \n \n\t\t$arr2= $this->db->select($sql);\n\t\t$results= array_merge($arr1,$arr2);\n\n\t\treturn $results;\n\t}", "function event_list(){\n\tglobal $DB;\n\t$currenttime = time();\n\t$query = \"SELECT * FROM {event} WHERE eventtype='site' ORDER By id DESC\";\n $result = $DB->get_records_sql($query);\n\treturn $result;\n}", "function listEventInfo() {\n\t\t$query = \"SELECT e_description, c_name, tag_name, start_datetime, end_datetime, capacity, v.name AS vname, address,o.name AS oname, v.address, v.city, v.state, v.postal_code \n\t\tFROM yam14.F_event e, yam14.F_venue v, yam14.F_category c, yam14.F_topic t, yam14.F_organizer o\n\t\tWHERE e.venue_id = v.v_id \n\t\tAND c.c_id = e.c_id \n\t\tAND t.tag_id = e.tag_id \n\t\tAND o.o_id = e.organizer_id\n\t\tAND e.e_id = $this->eid ;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->category = $row['c_name'];\n\t\t\t$this->tag = $row['tag_name'];\n\t\t\t$this->description = $row['e_description'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t$this->capacity = $row['capacity'];\n\t\t\t$this->venue = $row['vname'];\n\t\t\t$this->address = $row['address'] . \", \" . $row['city'] . \", \" . $row['state'] . \" \" . $row['postal_code'];\n\t\t\t$this->organizer = $row['oname'];\n\t\t\techo \"<hr />\";\n\t\t\techo \"<div class=\\\"panel panel-default\\\">\";\n\t\t\techo \t\"<div class=\\\"panel-heading\\\">\";\n\t\t\techo \t\"<h3 class=\\\"panel-title\\\">Event Information</h3>\";\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"<div class=\\\"panel-body\\\">\";\n\t\t\techo \"<p><b>Description: </b>$this->description</p>\";\n\t\t\techo \t\"<p><b>Category: </b>$this->category</p>\";\n\t\t\techo \t\"<p><b>Topic: </b>$this->tag</p>\";\n\t\t\techo \t\"<p><b>Start Date: </b>$this->startdate</p>\";\n\t\t\techo \t\"<p><b>Start Time: </b>$this->starttime</p>\";\n\t\t\techo \t\"<p><b>End Date: </b>$this->enddate</p>\";\n\t\t\techo \t\"<p><b>End Time: </b>$this->endtime</p>\";\n\t\t\techo \t\"<p><b>Capacity: </b>$this->capacity</p>\";\n\t\t\techo \t\"<p><b>Organizer: </b>$this->organizer</p>\";\n\t\t\techo \t\"<p><b>Location: </b>$this->venue</p>\";\n\t\t\techo \t\"<p><b>Address: </b>$this->address</p>\";\n\t\t\t\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"</div>\";\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t}", "abstract protected function get_event_name();", "public function viewEvents();", "function eventclass_offeraride()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "public function get_events()\n {\n $table_name = $this->input->get_post(\"table_name\");\n\n log_message(\"debug\", \"Posted table name {$table_name}\");\n\n $config = [\n 'base_url' => $this->config->base_url(\"welcome/get_events/\"),\n 'total_rows' => $this->Xform_model->count_all_records($table_name),\n 'uri_segment' => 4,\n 'per_page' => 100,\n ];\n\n $this->pagination->initialize($config);\n $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n\n $events = $this->Xform_model->get_geospatial_data($table_name, $this->pagination->per_page, $page);\n $links = $this->pagination->create_links();\n\n if ($this->input->is_ajax_request()) {\n $result = [\n 'status' => \"success\",\n \"events_count\" => $config['total_rows'],\n \"events\" => $events,\n \"links\" => $links\n ];\n $result = array_utf8_encode($result);\n echo json_encode($result);\n } else {\n show_error(\"Not Implement\", 501, \"Page not implemented\"); //page not implemented\n }\n }", "private function pushEvents ($e)\n\t\t{\n\t\t\t if ( self::chkOrgId () ) { /* Check main Id */\n\t\t\t\t $dbs = new DB ( $this->config['database'] );\n\t\t\t\t $c = $dbs->query (\"SELECT COUNT(*) AS C FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t\t if ( ! $c[0]['C'] ) { /* Event not found in events table , Insert */ \n\t\t\t\t\t$db_ins = new DB ( $this->config['database'] ) ;\n \t \t$e_ins = $db_ins->query (\"INSERT INTO tbl_events_record \n\t\t\t\t\t\tVALUES('\" . $this->c . \"','\" . $e . \"','\". date('Y-m-d H:i:s').\"');\");\n\t\t\t\t\t$db_ins->CloseConnection ();\n\t\t\t\t\treturn true;\n\t\t\t\t } else { /* Event found in events table , Update events by Id */\n\t\t\t\t\t$db_upd = new DB ( $this->config['database'] ) ;\n\t\t\t\t\t$e_upd = $db_upd->query (\"UPDATE tbl_events_record \n\t\t\t\t\t\tSET events = '\".$e.\"', date_rec = '\". date('Y-m-d H:i:s') . \n\t\t\t\t\t\t\"' WHERE org_id = '\" . $this->c .\"'\");\n\t\t\t\t\t$db_upd->CloseConnection ();\n\t\t\t\t}\n\t\t\t\t$dbs->CloseConnection ();\n\t\t\t\t$this->result['data']['id'] = $this->c;\n\t\t\t\t$this->result['data']['result'] = \"Push event: \" . $e; /* Events status */\n\t\t\t } else /* Id not found */\n\t\t\t\t$this->result['data']['result'] = \"Id not found [error code:100:101]\";\n\n\t\t\treturn false;\n\t\t}", "public function test_database_events_check()\n {\n $this->seeInDatabase('events', ['event_name' => 'Test Event1']);\n }", "private function _getEventRow($event, $input = 'alias')\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$table = JTable::getInstance('Event', 'JticketingTable', array('dbo', $db));\n\t\t$table->load(array($input => $event));\n\n\t\treturn $table;\n\t}", "function mainEvent(&$req, &$t) {\n\t\t$d = dir(BASE_DIR.'var/search_cache/');\n\t\t$data = array();\n\n\n\t\t$list = new Cgn_Mvc_TableModel();\n\t\t$list->data = array(\n\t\t\t0=> array('link 1','foobar.php'),\n\t\t\t1=> array('link 2','foobar.php'),\n\t\t\t2=> array('link 3','foobar.php')\n\t\t);\n\n\t\twhile ($entry = $d->read()) {\n\t\t\t//skip private files, . and ..\n\t\t\tif ( strpos($entry , '.') === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!is_dir(BASE_DIR.'var/search_cache/'.$entry)) continue;\n\n\t\t\ttry {\n\t\t\t\t$index = new Cgn_Search_Index($entry);\n\t\t\t\t$count = $index->getDocumentCount();\n\t\t\t\t$status = 'OK';\n\t\t\t\t$index->close();\n\t\t\t} catch (Zend_Search_Lucene_Exception $e) {\n\t\t\t\t//set status as 'error'\n\t\t\t\t$status = 'error';\n\t\t\t\t$count = 'N/A';\n\t\t\t\t//swallow PHP error in ZF for chmod\n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\tthrow $e;\n\t\t\t}\n\n\t\t\t$data[] = array(\n\t\t\t\t$entry,\n\t\t\t\t$count,\n\t\t\t\t$status\n\t\t\t);\n\t\t}\n\n\t\t$list->data = $data;\n\t\t$list->headers = array('Name', 'Num. Documents', 'Status');\n\t\t$t['listPanel'] = new Cgn_Mvc_AdminTableView($list);\n\t\t$t['listPanel']->attribs['width'] = '600';\n\t\t$t['listPanel']->setColWidth(0, '300');\n\t\t$t['listPanel']->setColWidth(1, '100');\n\t\t$t['listPanel']->setColWidth(2, '100');\n\n\t\t$t['message'] = \"This is the main event.\";\n\t}", "function dbGetEvents()\r\n\t{\r\n\t\t//$sql = \"SELECT idEvents,NameEnglish, DateStart, DateEnd, countries.Country, Website FROM events inner join countries on events.Countries_idCountries = countries.idCountries ORDER BY DateStart\";\r\n\t\t\r\n\t\t$sql = \"SELECT p.id as idEvents, p.post_title as NameEnglish, \".\r\n\t\t\t\t\" e.post_id, e.country as Country, e.start as DateStart, e.end as DateEnd, e.contact_url as Website\".\r\n\t\t\t\t\" from wordpress.wp_posts p inner join wordpress.wp_ai1ec_events e on ( p.id = e.post_id)\".\r\n\t\t\t\t\" where post_type = \\\"ai1ec_event\\\" and post_status=\\\"publish\\\" order by DateStart;\";\r\n\t\t$result = $this->conn->query($sql);\r\n\t\treturn $result;\r\n\t}", "function BH_event_subpannel_columns( $columns ) {\r\n\r\n\t$event_columns = array(\r\n\t\t'start_date'\t=> 'Start Date',\r\n\t\t'end_date'\t\t=> 'End Date'\r\n\t);\r\n\r\n\t$columns = array_merge(\r\n\t\tarray_slice($columns, 0, -1),\t// before\r\n\t\t$event_columns,\t\t\t\t\t// inserted\r\n\t\tarray_slice($columns, -1)\t\t// after\r\n\t);\r\n\r\n\t// return\r\n\treturn $columns;\r\n\r\n}", "function ct_event() {\n\t\tglobal $Language;\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID = new cField('t_event', 't_event', 'x_C_EVENT_ID', 'C_EVENT_ID', '`C_EVENT_ID`', 3, -1, FALSE, '`C_EVENT_ID`', FALSE);\n\t\t$this->C_EVENT_ID->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_EVENT_ID'] =& $this->C_EVENT_ID;\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID = new cField('t_event', 't_event', 'x_FK_CONGTY_ID', 'FK_CONGTY_ID', '`FK_CONGTY_ID`', 3, -1, FALSE, '`FK_CONGTY_ID`', FALSE);\n\t\t$this->FK_CONGTY_ID->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['FK_CONGTY_ID'] =& $this->FK_CONGTY_ID;\n\n\t\t// C_EVENT_NAME\n\t\t$this->C_EVENT_NAME = new cField('t_event', 't_event', 'x_C_EVENT_NAME', 'C_EVENT_NAME', '`C_EVENT_NAME`', 201, -1, FALSE, '`C_EVENT_NAME`', FALSE);\n\t\t$this->fields['C_EVENT_NAME'] =& $this->C_EVENT_NAME;\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT = new cField('t_event', 't_event', 'x_C_TYPE_EVENT', 'C_TYPE_EVENT', '`C_TYPE_EVENT`', 3, -1, FALSE, '`C_TYPE_EVENT`', FALSE);\n\t\t$this->C_TYPE_EVENT->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_TYPE_EVENT'] =& $this->C_TYPE_EVENT;\n\n\t\t// C_POST\n\t\t$this->C_POST = new cField('t_event', 't_event', 'x_C_POST', 'C_POST', '`C_POST`', 3, -1, FALSE, '`C_POST`', FALSE);\n\t\t$this->C_POST->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_POST'] =& $this->C_POST;\n\n\t\t// C_URL_IMAGES\n\t\t$this->C_URL_IMAGES = new cField('t_event', 't_event', 'x_C_URL_IMAGES', 'C_URL_IMAGES', '`C_URL_IMAGES`', 201, -1, FALSE, '`C_URL_IMAGES`', FALSE);\n\t\t$this->fields['C_URL_IMAGES'] =& $this->C_URL_IMAGES;\n\n\t\t// C_URL_LINK\n\t\t$this->C_URL_LINK = new cField('t_event', 't_event', 'x_C_URL_LINK', 'C_URL_LINK', '`C_URL_LINK`', 201, -1, FALSE, '`C_URL_LINK`', FALSE);\n\t\t$this->fields['C_URL_LINK'] =& $this->C_URL_LINK;\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN = new cField('t_event', 't_event', 'x_C_DATETIME_BEGIN', 'C_DATETIME_BEGIN', '`C_DATETIME_BEGIN`', 135, 7, FALSE, '`C_DATETIME_BEGIN`', FALSE);\n\t\t$this->C_DATETIME_BEGIN->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_DATETIME_BEGIN'] =& $this->C_DATETIME_BEGIN;\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END = new cField('t_event', 't_event', 'x_C_DATETIME_END', 'C_DATETIME_END', '`C_DATETIME_END`', 135, 7, FALSE, '`C_DATETIME_END`', FALSE);\n\t\t$this->C_DATETIME_END->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_DATETIME_END'] =& $this->C_DATETIME_END;\n\n\t\t// C_ODER\n\t\t$this->C_ODER = new cField('t_event', 't_event', 'x_C_ODER', 'C_ODER', '`C_ODER`', 135, 7, FALSE, '`C_ODER`', FALSE);\n\t\t$this->C_ODER->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_ODER'] =& $this->C_ODER;\n\n\t\t// C_NOTE\n\t\t$this->C_NOTE = new cField('t_event', 't_event', 'x_C_NOTE', 'C_NOTE', '`C_NOTE`', 201, -1, FALSE, '`C_NOTE`', FALSE);\n\t\t$this->fields['C_NOTE'] =& $this->C_NOTE;\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD = new cField('t_event', 't_event', 'x_C_USER_ADD', 'C_USER_ADD', '`C_USER_ADD`', 3, -1, FALSE, '`C_USER_ADD`', FALSE);\n\t\t$this->C_USER_ADD->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_USER_ADD'] =& $this->C_USER_ADD;\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME = new cField('t_event', 't_event', 'x_C_ADD_TIME', 'C_ADD_TIME', '`C_ADD_TIME`', 135, 7, FALSE, '`C_ADD_TIME`', FALSE);\n\t\t$this->C_ADD_TIME->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_ADD_TIME'] =& $this->C_ADD_TIME;\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT = new cField('t_event', 't_event', 'x_C_USER_EDIT', 'C_USER_EDIT', '`C_USER_EDIT`', 3, -1, FALSE, '`C_USER_EDIT`', FALSE);\n\t\t$this->C_USER_EDIT->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_USER_EDIT'] =& $this->C_USER_EDIT;\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME = new cField('t_event', 't_event', 'x_C_EDIT_TIME', 'C_EDIT_TIME', '`C_EDIT_TIME`', 135, 7, FALSE, '`C_EDIT_TIME`', FALSE);\n\t\t$this->C_EDIT_TIME->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_EDIT_TIME'] =& $this->C_EDIT_TIME;\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE = new cField('t_event', 't_event', 'x_C_ACTIVE_LEVELSITE', 'C_ACTIVE_LEVELSITE', '`C_ACTIVE_LEVELSITE`', 3, -1, FALSE, '`C_ACTIVE_LEVELSITE`', FALSE);\n\t\t$this->C_ACTIVE_LEVELSITE->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_ACTIVE_LEVELSITE'] =& $this->C_ACTIVE_LEVELSITE;\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE = new cField('t_event', 't_event', 'x_C_TIME_ACTIVE', 'C_TIME_ACTIVE', '`C_TIME_ACTIVE`', 135, 7, FALSE, '`C_TIME_ACTIVE`', FALSE);\n\t\t$this->C_TIME_ACTIVE->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_TIME_ACTIVE'] =& $this->C_TIME_ACTIVE;\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL = new cField('t_event', 't_event', 'x_C_SEND_MAIL', 'C_SEND_MAIL', '`C_SEND_MAIL`', 3, -1, FALSE, '`C_SEND_MAIL`', FALSE);\n\t\t$this->C_SEND_MAIL->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_SEND_MAIL'] =& $this->C_SEND_MAIL;\n\n\t\t// C_CONTENT_MAIL\n\t\t$this->C_CONTENT_MAIL = new cField('t_event', 't_event', 'x_C_CONTENT_MAIL', 'C_CONTENT_MAIL', '`C_CONTENT_MAIL`', 201, -1, FALSE, '`C_CONTENT_MAIL`', FALSE);\n\t\t$this->fields['C_CONTENT_MAIL'] =& $this->C_CONTENT_MAIL;\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE = new cField('t_event', 't_event', 'x_C_FK_BROWSE', 'C_FK_BROWSE', '`C_FK_BROWSE`', 200, -1, FALSE, '`C_FK_BROWSE`', FALSE);\n\t\t$this->fields['C_FK_BROWSE'] =& $this->C_FK_BROWSE;\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI = new cField('t_event', 't_event', 'x_FK_ARRAY_TINBAI', 'FK_ARRAY_TINBAI', '`FK_ARRAY_TINBAI`', 200, -1, FALSE, '`FK_ARRAY_TINBAI`', FALSE);\n\t\t$this->fields['FK_ARRAY_TINBAI'] =& $this->FK_ARRAY_TINBAI;\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY = new cField('t_event', 't_event', 'x_FK_ARRAY_CONGTY', 'FK_ARRAY_CONGTY', '`FK_ARRAY_CONGTY`', 200, -1, FALSE, '`FK_ARRAY_CONGTY`', FALSE);\n\t\t$this->fields['FK_ARRAY_CONGTY'] =& $this->FK_ARRAY_CONGTY;\n\t}", "function submitted_events_install() {\n\tglobal $submitted_events_db_version;\n\t\n\t// Only update database on version update\n\tif ($submitted_events_db_version != get_option ( 'submitted_events_version' )) {\n\t\t\n\t\tglobal $wpdb;\n\t\t\n\t\t$table_name = $wpdb->prefix . \"submitted_events\";\n\t\t\n\t\terror_log ( 'Submitted Events Plugin activated', 0 );\n\t\t\n\t\t// This is a harsh way of changing the database - all previous data will be lost!\n\t\t// But dbDelta wasn't doing the updates as intended\n\t\t$wpdb->query( \"DROP TABLE IF EXISTS \" . $table_name );\n\t\t\n\t\t$charset_collate = $wpdb->get_charset_collate ();\n\t\t\n\t\t// Max field lengths assumed, e.g.\n\t\t// date will be YYYY-MM-DD\n\t\t// packedlunch should be Yes or No but could be blank\n\t\t// altmeetpttime could be : or HH:MM\n\t\t$sql = \"CREATE TABLE \" . $table_name . \"(\n \tid mediumint(9) NOT NULL AUTO_INCREMENT,\n \tname VARCHAR(50) NOT NULL,\n\tdate VARCHAR(10) NOT NULL, \n\ttitle VARCHAR(150) NOT NULL,\n\tbrunelgroup VARCHAR(30) NOT NULL,\n\tlevel VARCHAR(30) NOT NULL,\n\tlength VARCHAR(30) NOT NULL,\n\tstarttime VARCHAR(20) NOT NULL,\n\tmeetpt VARCHAR(30) NOT NULL,\n\taltmeetpt VARCHAR(150) NOT NULL,\n\taltmeetgridref VARCHAR(20) NOT NULL,\n\taltmeetpttime VARCHAR(8) NOT NULL,\n\taltmeetcontactleader VARCHAR(4) NOT NULL,\t\t\n\tmapurl VARCHAR(200) NOT NULL,\n\temail VARCHAR(50) NOT NULL,\n\tphone VARCHAR(30) NOT NULL,\n\tpackedlunch VARCHAR(4) NOT NULL,\n\tpostwalk VARCHAR(20) NOT NULL,\n\tdescription text NOT NULL,\n\tcoleader VARCHAR(50) NOT NULL,\n\tcoleaderphone VARCHAR(30) NOT NULL,\t\t\n\tcarshareorganiser VARCHAR(4) NOT NULL,\t\n\teventgenerated boolean NOT NULL DEFAULT FALSE,\n \tPRIMARY KEY (id)\t\n\t) \" . $charset_collate . \";\";\n\t\t\n\t\trequire_once (ABSPATH . 'wp-admin/includes/upgrade.php');\n\t\t\n\t\t// This isn't allowing updates to the table - error table exists\n\t\t// see http://wordpress.stackexchange.com/questions/41293/dbdelta-failing-with-error-wordpress-database-error-table-wp-2-myplugin-alre\n\t\tdbDelta ( $sql );\n\t\t\n\t\t// WordPress Options Hooks\n\t\tupdate_option ( 'submitted_events_db_version', $submitted_events_db_version );\n\t}\n}", "function update_events ($eID, &$set_arr) {\n\t// Initialize variables\n\t$errArr=init_errArr(__FUNCTION__);\n\t// Construct passing parameters \n\t$table_name = \"events\";\n\t$key_arr = array();\n\t$key_1 = \"eID\"; // this is key column from events table\n\t$key_arr [$key_1] = $eID; // set up value to the key\n\t\n\t// call the universal function to do the update\n\t$errArr = update_any_table($table_name, $key_arr, $set_arr) ;\n\t\t\n\treturn $errArr;\n}", "protected function get_legacy_eventdata() {\n global $USER;\n $eventdata = (object)array('user' => $USER);\n foreach ($this->get_legacy_records() as $record) {\n list($name, $table, $id) = $record;\n $eventdata->$name = $this->get_record_snapshot($table, $id);\n }\n return $eventdata;\n }", "function get_all_events(){\n global $database_ged;\n $events = array();\n $sql = \"SELECT id FROM nagios_queue_active\";\n $result = sql($database_ged, $sql);\n foreach($result as $row){\n array_push($events,$row[\"id\"].\":nagios\");\n }\n $result = null;\n $sql = \"SELECT id FROM snmptrap_queue_active\";\n $result = sql($database_ged, $sql);\n foreach($result as $row){\n array_push($events,$row[\"id\"].\":snmptrap\");\n }\n\n return $events;\n}", "public function run()\n {\n DB::table('events')->insert([\n \t[\n\t 'name' => 'Premium Trade Cars BMW MINI Event',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-21',\n\t 'dealership_id' => 11,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Ribble Valley FCA Group Event',\n\t 'start_date' => '2019-07-26',\n\t 'end_date' => '2019-07-28',\n\t 'dealership_id' => 16,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Blackburn BMW VIP Event 2018',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-29',\n\t 'dealership_id' => 14,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Blackburn BMW VIP Event 2019',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-22',\n\t 'dealership_id' => 14,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Independent UK Dealership FCA Event',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-28',\n\t 'dealership_id' => 30,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Southport BMW VIP Event 2018',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-29',\n\t 'dealership_id' => 1,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Southport BMW Q2 VIP Event 2019',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-22',\n\t 'dealership_id' => 1,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Wilmslow BMW VIP Event 2018',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-29',\n\t 'dealership_id' => 5,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Wilmslow BMW VIP Event 2019',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-22',\n\t 'dealership_id' => 5,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Preston BMW VIP Event 2018',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-29',\n\t 'dealership_id' => 12,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Preston BMW VIP Event 2019',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-22',\n\t 'dealership_id' => 12,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Birmingham Central Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 17,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Erdington Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 18,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Solihull Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 22,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Tamworth Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 24,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Macclesfield Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 19,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Manchester Central Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 20,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Manchester Used Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 21,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Stockport Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 23,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Whitefield Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 25,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Gex Showroom VIP Event',\n\t 'start_date' => '2019-04-10',\n\t 'end_date' => '2019-04-13',\n\t 'dealership_id' => 31,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Le Cannet Platinum Event',\n\t 'start_date' => '2019-04-24',\n\t 'end_date' => '2019-04-27',\n\t 'dealership_id' => 32,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Salon de Provence Premium Event',\n\t 'start_date' => '2019-05-15',\n\t 'end_date' => '2019-05-18',\n\t 'dealership_id' => 33,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Rochefort Platinum Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 34,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Lille Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 35,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Dunkerque Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 36,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Saint-Quentin Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 37,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Fontaine-Les-Vervins Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 38,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Tourcoing Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 39,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Valenciennes Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 40,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Villeneuve d\\'Ascq Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 41,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Laon Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 42,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Frejus Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 45,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Soissons Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 47,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Orléans Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 49,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Tours Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 50,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'MC Motors Avignon VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 52,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'L.Warsemann Auto 37 Tours VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 53,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Nouvelle Excel Auto Rennes VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 54,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Espace 3000 Besançon VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 55,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Europe Garage Services Bourg en Bresse VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 56,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Skoda Paris Est Villemonble VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 57,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'NDS City Car Saint-Ouen l\\'Aumone VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 58,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Excel Motors Nancy VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 59,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Premium Picardie Amiens VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 60,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'WelcomCar Orléans VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 61,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Carlier Automobiles Douai VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 62,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Nice Car SA Nice VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 63,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Riviera Technic Cannes VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 64,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Peyo Automobiles Bayonne VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 65,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'L.G.A. La Rochelle VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 66,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Saphir Automobiles Montpellier VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 67,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Vega Automobile Brétigny sur Orge VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 68,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Espace Automobiles Nîmois Nîmes VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 69,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Feyaerts VIP Event',\n\t 'start_date' => '2018-05-30',\n\t 'end_date' => '2018-06-02',\n\t 'dealership_id' => 70,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Ciac VIP Event',\n\t 'start_date' => '2018-06-06',\n\t 'end_date' => '2018-06-09',\n\t 'dealership_id' => 71,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Morren St Truiden VIP Event',\n\t 'start_date' => '2018-10-10',\n\t 'end_date' => '2018-10-13',\n\t 'dealership_id' => 72,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Morren Diest VIP Event',\n\t 'start_date' => '2018-10-24',\n\t 'end_date' => '2018-10-27',\n\t 'dealership_id' => 73,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'AB Automotive VIP Event',\n\t 'start_date' => '2018-10-10',\n\t 'end_date' => '2018-10-13',\n\t 'dealership_id' => 74,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Driessen VIP Event',\n\t 'start_date' => '2018-12-06',\n\t 'end_date' => '2018-12-09',\n\t 'dealership_id' => 75,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Hasselt Motor VIP Event',\n\t 'start_date' => '2018-12-13',\n\t 'end_date' => '2018-12-16',\n\t 'dealership_id' => 76,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Van Hoye VIP Event',\n\t 'start_date' => '2018-12-20',\n\t 'end_date' => '2018-12-23',\n\t 'dealership_id' => 77,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Matel Motors VIP Event',\n\t 'start_date' => '2018-05-23',\n\t 'end_date' => '2018-05-26',\n\t 'dealership_id' => 78,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'De Doncker VIP Event',\n\t 'start_date' => '2018-06-06',\n\t 'end_date' => '2018-06-09',\n\t 'dealership_id' => 79,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'SPIRLET Auto VIP Event',\n\t 'start_date' => '2018-06-06',\n\t 'end_date' => '2018-06-09',\n\t 'dealership_id' => 80,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Centre Motor VIP Event',\n\t 'start_date' => '2018-12-06',\n\t 'end_date' => '2018-12-08',\n\t 'dealership_id' => 81,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Colson VIP Event',\n\t 'start_date' => '2018-11-28',\n\t 'end_date' => '2018-12-01',\n\t 'dealership_id' => 82,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Vanspringel VIP Event',\n\t 'start_date' => '2018-12-05',\n\t 'end_date' => '2018-12-08',\n\t 'dealership_id' => 83,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Premium Trade Cars All Brand Event',\n\t 'start_date' => '2019-07-26',\n\t 'end_date' => '2019-07-28',\n\t 'dealership_id' => 11,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Southport BMW Q3 VIP Event 2019',\n\t 'start_date' => '2019-10-31',\n\t 'end_date' => '2019-11-02',\n\t 'dealership_id' => 1,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n\t ]);\n }", "function get_event(){\n\t\tglobal $EM_Event;\n\t\tif( is_object($EM_Event) && $EM_Event->event_id == $this->event_id ){\n\t\t\treturn $EM_Event;\n\t\t}else{\n\t\t\tif( is_numeric($this->event_id) && $this->event_id > 0 ){\n\t\t\t\treturn em_get_event($this->event_id, 'event_id');\n\t\t\t}elseif( is_array($this->bookings) ){\n\t\t\t\tforeach($this->bookings as $EM_Booking){\n\t\t\t\t\t/* @var $EM_Booking EM_Booking */\n\t\t\t\t\treturn em_get_event($EM_Booking->event_id, 'event_id');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn em_get_event($this->event_id, 'event_id');\n\t}", "function eventclass_student_attendance()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "function target_load_calendar_event($event)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $event['descr']);\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'calendar (event_day, event_month, event_year, link, descr)\n\tVALUES(\n\t\t'. _esc($poll['day']) .',\n\t\t'. _esc($poll['month']) .',\n\t\t'. _esc($poll['year']) .',\n\t\t'. _esc($poll['link']) .',\n\t\t'. _esc($poll['descr']) .')'\n\t);\n}", "function GetOneEvents($event_id)\n\t{\n\t\t$sql = \"SELECT * FROM event WHERE event_id = '\".$event_id.\"'\";\n\t\t$data = CDBCon::GetInstance()->GetRow($sql);\n\t\treturn $data;\n\t}", "function orbis_events_upgrade_100() {\n\tglobal $wpdb;\n\n\t// Dates\n\t$keys = array(\n\t\t'_pronamic_start_date' => '_pronamic_event_start_date',\n\t\t'_pronamic_end_date' => '_pronamic_event_end_date',\n\t);\n\n\tforeach ( $keys as $old_key => $new_key ) {\n\t\t$query = \"INSERT\n\t\t\tINTO\n\t\t\t\t$wpdb->postmeta ( post_id, meta_key, meta_value )\n\t\t\tSELECT\n\t\t\t\tpost.ID AS post_id,\n\t\t\t\t%s AS meta_key,\n\t\t\t\tFROM_UNIXTIME( MAX( IF( meta.meta_key = %s, meta.meta_value, NULL ) ) ) AS meta_value\n\t\t\tFROM\n\t\t\t\t$wpdb->posts AS post\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t$wpdb->postmeta AS meta\n\t\t\t\t\t\tON post.ID = meta.post_id\n\t\t\tWHERE\n\t\t\t\tpost_type = 'pronamic_event'\n\t\t\t\t\tAND\n\t\t\t\tID NOT IN (\n\t\t\t\t\tSELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s\n\t\t\t\t)\n\t\t\tGROUP BY\n\t\t\t\tpost.ID\n\t\t\t;\n\t\t\";\n\n\t\t$query = $wpdb->prepare( $query, $new_key, $old_key, $new_key );\n\n\t\t$wpdb->query( $query );\n\t}\n}", "function generateSQL($event){\n\t$sqlhead=\"SELECT * FROM te_events WHERE \";\n\t$sqltail=\"\";\n\t$showError=false;\n\t$isTailEmpty = empty($sqltail);\n\t// if any field is not empty \n\t// means it is filled\n\t// do something with the data\n\tif(!(empty($event['title']))){\n\t\t$str1 = \"eventTitle LIKE \\\"%\" . $event['title'] . \"%\\\" \";\n\t\t$str2 = \"AND eventTitle LIKE \\\"%\" . $event['title'] . \"%\\\" \";\n\t\t$sqltail .= (empty($sqltail)) ? $str1 : $str2;\n\t}\n\t// from strcmp to is empty because array_filter //!(strcmp($event['venue'], \"0\")==0)\n\tif(!(empty($event['venue']))){\n\t\t$str1 = \"venueID = \\\"\" . $event['venue'] . \"\\\" \";\n\t\t$str2 = \"AND venueID = \\\"\" . $event['venue'] . \"\\\" \";\n\t\t$sqltail .= (empty($sqltail)) ? $str1 : $str2;\n\t}\n\tif(!(empty($event['category']))){\n\t\t$str1 = \"catID = \\\"\" . $event['category'] . \"\\\" \";\n\t\t$str2 = \"AND catID = \\\"\" . $event['category'] . \"\\\" \";\n\t\t$sqltail .= (empty($sqltail)) ? $str1 : $str2;\n\t}\n\tif(!(empty($event['startTime']))){\n\t\t$str1 = \"eventStartDate = \\\"\" . $event['startTime'] . \"\\\" \";\n\t\t$str2 = \"AND eventStartDate = \\\"\" . $event['startTime'] . \"\\\" \";\n\t\t$sqltail .= (empty($sqltail)) ? $str1 : $str2;\n\t}\n\tif(!(empty($event['endTime']))){\n\t\t$str1 = \"eventEndDate = \\\"\" . $event['endTime'] . \"\\\" \";\n\t\t$str2 = \"AND eventEndDate = \\\"\" . $event['endTime'] . \"\\\" \";\n\t\t$sqltail .= (empty($sqltail)) ? $str1 : $str2;\n\t}\n\tif(!(empty($event['price']))){\n\t\t$str1 = \"eventPrice = \\\"\" . $event['price'] . \"\\\" \";\n\t\t$str2 = \"AND eventPrice = \\\"\" . $event['price'] . \"\\\" \";\n\t\t$sqltail .= (empty($sqltail)) ? $str1 : $str2;\n\t}\n\treturn $sqlhead . $sqltail . \"ORDER BY eventTitle ASC\";\n}", "function UpdateEvents() {\n\t\tforeach ($this->data as $i => $row) {\n\t\t\tif (!is_null($row['EventId'])) {\n\t\t\t\t//check wheter event is assigned to calculated event. If it is take the calculated rating, otherwise set the rating to -0.5\n\t\t\t\tif (array_key_exists($i, $this -> rating)) {\n\t\t\t\t\t$rating = $this -> rating[$i];\n\t\t\t\t} else {\n\t\t\t\t\t$rating = -0.5;\n\t\t\t\t}\n\t\t\t\t//update all events\n\t\t\t\t$sql = \"UPDATE Event SET rating=\" . $rating . \" WHERE EventId=\" . $row['EventId'];\n\t\t\t\t$stmt = $this -> DB -> prepare($sql);\n\t\t\t\tif ($stmt -> execute()) {\n\t\t\t\t} else {\n\t\t\t\t\tinclude_once \"Email.php\";\n\t\t\t\t\tnew Email('failed', 'to update event rating with EventId=' . $row['EventId'], $this -> id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this -> updateTask();\n\n\t}", "function add_event ($bid_row)\n{\n // Verify that the title isn't in the database yet\n\n $Title = $bid_row['Title'];\n if ('' == $Title)\n return display_error ('A blank Title is invalid');\n\n // Check that the title isn't already in the Events table\n\n if (! title_not_in_events_table ($Title))\n return false;\n\n $sql = 'INSERT Events SET ';\n $sql .= build_sql_string ('Title', $Title, false);\n $sql .= build_sql_string ('Author');\n $sql .= build_sql_string ('GameEMail');\n $sql .= build_sql_string ('Organization');\n $sql .= build_sql_string ('Homepage');\n\n $sql .= build_sql_string ('MinPlayersMale');\n $sql .= build_sql_string ('MaxPlayersMale');\n $sql .= build_sql_string ('PrefPlayersMale');\n\n $sql .= build_sql_string ('MinPlayersFemale');\n $sql .= build_sql_string ('MaxPlayersFemale');\n $sql .= build_sql_string ('PrefPlayersFemale');\n\n $sql .= build_sql_string ('MinPlayersNeutral');\n $sql .= build_sql_string ('MaxPlayersNeutral');\n $sql .= build_sql_string ('PrefPlayersNeutral');\n\n $sql .= build_sql_string ('Hours');\n\n $sql .= build_sql_string ('Description');\n $sql .= build_sql_string ('ShortBlurb');\n $sql .= build_sql_string ('PlayerCommunications');\n\n/* $sql .= build_sql_string ('IsSmallGameContestEntry'); */\n\n $sql .= build_sql_string ('UpdatedById', $_SESSION[SESSION_LOGIN_USER_ID]);\n\n // echo \"$sql<P>\\n\";\n\n $result = mysql_query ($sql);\n if (! $result)\n return display_mysql_error (\"Insert into Events failed\");\n\n return mysql_insert_id();\n}", "public function getEvent();", "function addEvent($date, $title,$user_id, $fname, $address, $contact, $email, $location, $vlocation, $hour, $minutes, $deal,$guests, $chairs, $tables, $style, $types, $instruction, $confirmation) {\r\n //Include db configuration file\r\n include 'dbConfig.php';\r\n $currentDate = date(\"Y-m-d H:i:s\");\r\n //Insert the event data into database\r\n $insert = $db->query(\"INSERT INTO floralbookings (title,date,created,modified,user_id,fname,address,contact,email,location,vlocation,hour,minutes,deal,guests,chairs,tables,style,types,instruction,confirmation) VALUES ('\" . $title . \"','\" . $date . \"','\" . $currentDate . \"','\" . $currentDate . \"','\" . $user_id . \"','\" . $fname . \"','\" . $address . \"','\" . $contact . \"','\" . $email . \"','\" . $location . \"','\" . $vlocation . \"','\" . $hour . \"','\" . $minutes . \"','\" . $deal . \"','\" . $guests . \"','\" . $chairs . \"','\" . $tables . \"','\" . $style . \"','\" . $types . \"','\" . $instruction . \"','\" . $confirmation . \"')\");\r\n if ($insert) {\r\n echo 'ok';\r\n } else {\r\n echo 'err';\r\n }\r\n}", "public function initEvents()\n\t{\n\t\t$this->collEvents = new PropelObjectCollection();\n\t\t$this->collEvents->setModel('Event');\n\t}", "public function EventHelper()\n {\n $eventdata = $this->Event->find('all', \n array(\n 'order' => array('Event.time' => 'DESC')\n ));\n \n $this->set('events', $eventdata); \n }", "public function get_all_events()\n {\n // get today date for check past events or not\n $todayData = date(\"m/d/Y\");\n // get option from database\n $past_events_option = get_option('past_events');\n // preparing sql query\n $sql = \"SELECT * FROM $this->tableName \";\n if ($past_events_option != 'yes') {\n $sql .= \"WHERE `date` >= \" . $todayData;\n }\n global $wpdb;\n $allevents = $wpdb->get_results($sql);\n return $allevents;\n }", "function detail_table($db, $eventID)\r\n{\r\n $query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND eventID=\".$eventID.\";\"; \t\r\n $result = $db->query($query); \t\t\t\r\n\r\n\r\n\t//use it first for the title\t\r\n $row1 = $result->fetch_array(MYSQLI_BOTH);\t\t\r\n\t\r\n\t//then close it ready for the next execution\r\n $result->close();\t\t\t\t\t\t\t\t\r\n $result = $db->query($query); \t\r\n\r\n\r\n\techo '<br />';\r\n\r\n\r\necho '<table class=\"pizzaOrder\">';\r\n $on = 'this.src=\"../images/buttons/edit_dwn.png\"';\r\n $off = 'this.src=\"../images/buttons/edit_up.png\"';\r\n\r\n echo '<tr>';\r\n\t\techo '<td colspan=\"2\" id=\"headCell_left\"> Event Details for: <font class=\"subtitle\">'.$row1['event_name'].'</font></td>';\r\n\t\techo '<td id=\"headCell_right\">';\r\n\t\techo '<img class=\"button\" src=\"../images/buttons/edit_dwn.png\"';\r\n\t\t\techo 'alt=\"Edit The Selected Event\" onclick=\"editEvent('.$row1['eventID'].')\"';\r\n\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\techo '</tr>';\r\n\r\n\t\t\t\t\t\r\n\t//While Loop starts here - \r\n\t// Retrieve the data for the table. There should only be one row.\r\n\twhile($row = $result->fetch_assoc())\r\n\t{\r\n\t\techo '<tr>';\r\n\t\t\techo '<td width=\"150px\"><b>Event Location: </b></td>';\r\n\t\t\techo '<td>'.$row['event_location'].'</td>';\r\n\t\t\techo '<td>&nbsp;</td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Date: </b></td>';\r\n\t\t\techo '<td>'.dateToScreen($row['startDate']).'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Time: </b></td>';\r\n\t\t\techo '<td>'.$row['startTime'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Server IP Address: </b></td>';\r\n\t\t\techo '<td>'.$row['server_IP_address'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Number of Seats: </b></td>';\r\n\t\t\techo '<td>'.$row['seatQuantity'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\t$on = 'this.src=\"../images/buttons/stop_dwn.png\"';\r\n\t\t$off = 'this.src=\"../images/buttons/stop.png\"';\r\n\t\t\r\n\t\t$on1 = 'this.src=\"../images/buttons/start_dwn.png\"';\r\n\t\t$off1 = 'this.src=\"../images/buttons/start.png\"';\r\n\r\n\t\t// If the event has started place the stop event button in the table.\r\n\t\tif($row['event_started'] == 1) \r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\techo '<td>Yes</td>';\r\n\t\t\techo '<td><img src=\"../images/buttons/stop_dwn.png\" class=\"button\"'; \r\n\t\t\t\techo 'alt=\"Stop the current event.\" onclick=\"stopEvent(' . $row['eventID'] . ')\" ';\r\n\t\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has not started place the start event button in the table. \r\n\t\t\r\n\r\n\t\t\r\n\t\telseif ($row['event_started'] == 0)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>No</td>';\r\n\t\t\t\techo '<td><img src=\"../images/buttons/start_dwn.png\" class=\"button\"';\r\n\t\t\t\t\techo 'alt=\"Start the selected event. Stops all others.\" onclick=\"startEvent(' . $row['eventID'] . ')\"'; \r\n\t\t\t\t\techo 'onmouseover='.$off1.' onmouseout='.$on1.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has completed or been stopped. \r\n\t\telseif ($row['event_started'] == 2)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>Finished</td>';\r\n\t\t\t\techo '<td>&nbsp;</td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t}\r\necho '</table>';\r\n}", "public function initialize()\n {\n // attributes\n $this->setName('event');\n $this->setPhpName('Event');\n $this->setClassname('ArtRequestORM\\\\Event');\n $this->setPackage('ArtRequest');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('EVENT_ID', 'EventId', 'INTEGER', true, null, null);\n $this->addColumn('EVENT_TITLE', 'EventTitle', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_DESCRIPTION', 'EventDescription', 'LONGVARCHAR', true, null, null);\n $this->addColumn('EVENT_LOCATION', 'EventLocation', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_SPONSOR_NAME', 'EventSponsorName', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_START_TIME', 'EventStartTime', 'VARCHAR', true, 10, null);\n $this->addColumn('EVENT_END_TIME', 'EventEndTime', 'VARCHAR', true, 10, null);\n $this->addColumn('EVENT_START_DATE', 'EventStartDate', 'DATE', true, null, null);\n $this->addColumn('EVENT_END_DATE', 'EventEndDate', 'DATE', true, null, null);\n $this->addColumn('EVENT_PRICING_MEMBER', 'EventPricingMember', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_STAFF', 'EventPricingStaff', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_STUDENT', 'EventPricingStudent', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_PUBLIC', 'EventPricingPublic', 'DECIMAL', true, null, null);\n // validators\n }", "public function postEventadd();", "public function testUpdateValidEvent (): void {\n\t\t//count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"event\");\n\n\t\t// create a new Event and insert into mySQL\n\t\t$eventId = generateUuidV4();\n\t\t$event = new Event ($eventId, $this->profile->getProfileId(), $this->VALID_EVENTATTENDEELIMIT,$this->VALID_EVENTDETAIL, $this->VALID_EVENTENDDATETIME,$this->VALID_EVENTIMAGE, $this->VALID_EVENTLAT, $this->VALID_EVENTLONG, $this->VALID_EVENTNAME, $this->VALID_EVENTPRICE, $this->VALID_EVENTSTARTDATETIME);\n\t\t$event->insert($this->getPDO());\n\n\t\t// edit the event and update it in mySQL\n\t\t$event->setEventDetail($this->VALID_EVENTDETAIL2);\n\t\t$event->update($this->getPDO());\n\n\n\t\t// grab the data from mySQL and enforce the fields meet our expectations\n\t\t$pdoEvent = Event::getEventByEventId($this->getPDO(), $event->getEventId());\n\t\t$this->assertEquals($pdoEvent->getEventId(), $eventId);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"event\"));\n\t\t$this->assertEquals($pdoEvent->getEventId(), $eventId);\n\t\t$this->assertEquals($pdoEvent->getEventProfileId(),$this->profile->getProfileId());\n\t\t$this->assertEquals($pdoEvent->getEventAttendeeLimit(), $this->VALID_EVENTATTENDEELIMIT);\n\t\t// format the date too seconds since the beginning of time to avoid round off error\n\t\t$this->assertEquals($pdoEvent->getEventDetail(), $this->VALID_EVENTDETAIL2);\n\t\t$this->assertEquals($pdoEvent->getEventEndDateTime(),$this->VALID_EVENTENDDATETIME);\n\t\t$this->assertEquals($pdoEvent->getEventImage(), $this->VALID_EVENTIMAGE);\n\t\t$this->assertEquals($pdoEvent->getEventLat(), $this->VALID_EVENTLAT);\n\t\t$this->assertEquals($pdoEvent->getEventLong(), $this->VALID_EVENTLONG);\n\t\t$this->assertEquals($pdoEvent->getEventName(), $this->VALID_EVENTNAME);\n\t\t$this->assertEquals($pdoEvent->getEventPrice(), $this->VALID_EVENTPRICE);\n\t\t// format the date too seconds since the beginning of time to avoid round off error\n\t\t$this->assertEquals($pdoEvent->getEventStartDateTime(), $this->VALID_EVENTSTARTDATETIME);\n\t}", "function getEvents() {\n return [];\n }", "public function getAllEvents() {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM events\");\n\n\n\n if ($stmt->execute()) {\n $events = $stmt->get_result();\n $stmt->close();\n return $events;\n } else {\n return NULL;\n }\n }", "protected function getTableFromEvent(Doctrine_Event $event)\n {\n $treatedRecord = $event->getInvoker();\n if ($treatedRecord instanceof Doctrine_Record) {\n $recordClass = get_class($treatedRecord);\n return Doctrine::getTable($recordClass);\n } else if ($treatedRecord instanceof Doctrine_Table) {\n return $treatedRecord;\n } else {\n throw new LogicException(\"Zikula_Doctrine_Template_Listener_Base::getTableFromEvent() unknown invoker: \"+ get_class($treatedRecord));\n }\n }", "public function __construct() {\n\n $this->tableName = \"re_event_type\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->primaryKey = \"id\";\n }", "function add_event ($bid_row)\n{\n // Verify that the title isn't in the database yet\n\n $Title = $bid_row['Title'];\n if ('' == $Title)\n return display_error ('A blank Title is invalid');\n\n // Check that the title isn't already in the Events table\n\n if (! title_not_in_events_table ($Title))\n return false;\n\n $sql = 'INSERT Events SET ';\n $sql .= build_sql_string ('Title', $Title, false);\n $sql .= build_sql_string ('Author');\n $sql .= build_sql_string ('GameEMail');\n $sql .= build_sql_string ('Organization');\n $sql .= build_sql_string ('Homepage');\n\n $sql .= build_sql_string ('MinPlayersNeutral');\n $sql .= build_sql_string ('MaxPlayersNeutral');\n $sql .= build_sql_string ('PrefPlayersNeutral');\n\n $sql .= build_sql_string ('Hours');\n $sql .= build_sql_string ('GameType');\n $sql .= build_sql_string ('Description');\n $sql .= build_sql_string ('ShortBlurb');\n\n/* $sql .= build_sql_string ('IsSmallGameContestEntry'); */\n\n $sql .= build_sql_string ('UpdatedById', $_SESSION['SESSION_LOGIN_USER_ID']);\n\n // echo \"$sql<P>\\n\";\n\n $result = mysql_query ($sql);\n if (! $result)\n return display_mysql_error (\"Insert into Events failed\");\n\n return mysql_insert_id();\n}", "function get_new_events_no_page(){\n\t\n\t\tglobal $gamo, $dbh;\n\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\n\t\n\t\t$sql = \"SELECT id FROM \" . CORE_DB . \".\" . self::$table_name.\n\t\t\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC\";\n\t\n\t\t$sth = $dbh->prepare($sql);\n\t\n\t\t$vevents = array();\n\t\t$sth->execute();\n\n\n\t\twhile($row = $sth->fetch()) {\n\t\n\t\t\t$row = Core::r('virtual_events')->get_event(array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'public_has' => 1,\n\t\t\t\t\t'show_private_has' => 0\n\t\t\t\t)\n\t\t\t);\n\n\n\t\t\tarray_push($vevents, $row);\n\t\n\t\t}\n\t\n\t\treturn $vevents;\n\t\n\t}", "public function createSequencerTable();", "function getEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "function listEventTitle($e_id) {\n\t\t$e_id = mysql_real_escape_string($e_id);\n\t\t$this->eid = $e_id;\n\t\t$query = \"SELECT e_title, v.name, start_datetime, end_datetime \n\t\tFROM yam14.F_event e, yam14.F_venue v \n\t\tWHERE e.venue_id = v.v_id\n\t\tAND e_id = $this->eid;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\n\t\t\t$this->title = $row['e_title'];\n\t\t\t$this->venue = $row['name'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t\n\t\t\techo \"<div>\";\n\t\t\techo \"<h3>$this->title</h3>\";\n\t\t\techo \"<h4>$this->venue</h4>\";\n\t\t\techo \"<h4>From $this->startdate $this->starttime </h4><h4>To $this->enddate $this->endtime </h4>\";\n\t\t\techo \"<hr />\";\n\t\t\techo \"</div>\";\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t\t\n\t}", "function get_AllEvents(){\r\n $sql = $this->db->prepare(\"SELECT DISTINCT e.EventID, e.EventTitle, e.Event, e.EventDate, e.endTime, e.EventURL, e.DatePosted, e.Location\r\n FROM MYEVENTLOOKUP L\r\n LEFT JOIN MYEVENT e ON e.EventID = L.EventID\r\n WHERE :chamberid = L.ChamberID or :chamberid = L.RelatedChamber\r\n ORDER BY e.DatePosted DESC;\");\r\n $result = $sql->execute(array(\r\n \"chamberid\" => $_SESSION['chamber']\r\n ));\r\n if ($result)\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n else\r\n return false;\r\n }", "function event_info($dbObj, $event_id, $error_add = \"\") {\n\n\t$sql = \"SELECT * FROM events WHERE id=$event_id\";\n\t\n\t$res = $dbObj->getRow($sql, DB_FETCHMODE_ASSOC);\n\t\n\tif (DB::isError($res)) {\n\t\t$error_add = \" ($error_add)\";\n\t\tdbError(\"Could not retrieve event info$error_add\" . print_r($_SESSION), $res, $sql);\n\t}\n\t \n\treturn $res;\n\t\n}", "private function create_event_log_table($db) {\n\t\t$this->company_forge = $this->load->dbforge($db, TRUE);\n\t\t// Load fields to create the Event Log table\n\t\t$fields = array(\n\t\t\t'id' => array(\n\t\t\t\t'type'\t\t\t\t=> 'INT',\n\t\t\t\t'constraint'\t\t=> 11,\n\t\t\t\t'unsigned'\t\t\t=> TRUE,\n\t\t\t\t'null'\t\t\t\t=> FALSE,\n\t\t\t\t'auto_increment'\t=> TRUE\n\t\t\t),\n\t\t\t'user' => array(\n\t\t\t\t'type'\t\t\t\t=> 'INT',\n\t\t\t\t'constraint'\t\t=> 11,\n\t\t\t\t'unsigned'\t\t\t=> TRUE,\n\t\t\t\t'null'\t\t\t\t=> FALSE\n\t\t\t),\n\t\t\t'event' => array(\n\t\t\t\t'type'\t\t\t\t=> 'VARCHAR',\n\t\t\t\t'constraint'\t\t=> 100,\n\t\t\t\t'null'\t\t\t\t=> FALSE\n\t\t\t),\n\t\t\t'event_type' => array(\n\t\t\t\t'type'\t\t\t\t=> 'INT',\n\t\t\t\t'constraint'\t\t=> 11,\n\t\t\t\t'unsigned'\t\t\t=> TRUE,\n\t\t\t\t'null'\t\t\t\t=> TRUE\n\t\t\t),\n\t\t);\n\t\t// Add the fields before creating the Forms table\n\t\t$this->company_forge->add_field($fields);\n\t\t// Array format doesn't work for default DateTimes, so we add them by string\n\t\t$this->company_forge->add_field(\"date DATETIME NOT NULL\");\n\t\t$this->company_forge->add_field(\"signature BLOB NOT NULL\");\n\t\t// Make the id the primary key of the Event Log table\n\t\t$this->company_forge->add_key('id', TRUE);\n\t\t// Attempt to create the Event Log table and return success or failure\n\t\tif ($this->company_forge->create_table('event_log'))\n\t\t\treturn TRUE;\n\t\telse\n\t\t\treturn FALSE;\n\t}", "function allevents_widget() {\n\t\tparent::__construct( false, 'Row Seats Events' );\n\t}", "public function &getTransactionEvents()\n {\n $this->_generateEventLabels();\n return self::$_eventList;\n }", "public function &getTransactionEvents()\n {\n $this->_generateEventLabels();\n return self::$_eventList;\n }", "function MyEvents_Handle_Open()\n {\n $this->InscriptionsObj()->InitActions();\n\n echo\n $this->OpenEventsHtmlTable().\n \"\";\n }", "protected function getRegisteredEvents() {\n// $events = [];\n// foreach ($this->loadMultiple() as $rules_config) {\n// $event = $rules_config->getEvent();\n// if ($event && !isset($events[$event])) {\n// $events[$event] = $event;\n// }\n// }\n// return $events;\n }", "protected function initEvent()\n {\n $locales = $this->container->getParameter('event.locales');\n $event = $this->getRepository('EventEventBundle:Event')->getEvent();\n $now = new \\DateTime();\n\n if (!$event) {\n $event = new Event();\n $event\n ->setTitle('My Event')\n ->setDescription('My another awesome event!')\n ->setStartDate($now)\n ->setEndDate($now->modify('+1 day'))\n ->setVenue('Burj Khalifa Tower')\n ->setEmail('eventator@email.com')\n ;\n\n $speaker = new Speaker();\n $speaker\n ->setFirstName('Phill')\n ->setLastName('Pilow')\n ->setCompany('Reseach Supplier')\n ;\n\n if ($locales) {\n foreach ($locales as $locale => $title) {\n $eventTranslation = new EventTranslation();\n $eventTranslation->setEvent($event);\n $eventTranslation->setlocale($locale);\n\n $this->getManager()->persist($eventTranslation);\n\n $speakerTranslation = new SpeakerTranslation();\n $speakerTranslation->setSpeaker($speaker);\n $speakerTranslation->setlocale($locale);\n\n $this->getManager()->persist($speakerTranslation);\n }\n }\n\n $this->getManager()->persist($event);\n $this->getManager()->persist($speaker);\n $this->getManager()->flush();\n }\n }", "function usp_ews_event_information($courseid, $configmonitoreddata, $userid, $modules, $typeactivityconfig=\"monitor\") {\n global $DB, $USER;\n //$dbmanager = $DB->get_manager(); // used to check if tables exist\n $events = array();\n $numevents = 0;\n\t\n\tif (empty($configmonitoreddata)) {\n return null;\n }\n\n\t$modinfo = get_fast_modinfo($courseid, $userid);\n\n\tif($typeactivityconfig == \"monitor\"){\n\t\tforeach($configmonitoreddata as $monitor){\n\t\t\t\t$mod = $modinfo->cms[$monitor->cmid];\n\t\t\t\tif($mod->visible == 1 && $mod->uservisible == 1){\n\n\t\t\t\t\t$expected = $monitor->expected;\n\t\t\t\t\tif($monitor->locked == 1){\n\t\t\t\t\n\t\t\t\t\t\tif (array_key_exists('defaultTime', $modules[$monitor->module])) {\n\t\t\t\t\t\t\t$fields = $modules[$monitor->module]['defaultTime'].' as due';\n\t\t\t\t\t\t\t$record = $DB->get_record($monitor->module, array('id'=>$monitor->instanceid, 'course'=>$courseid), $fields);\n\n\t\t\t\t\t\t\tif($record->due != 0){\n\t\t\t\t\t\t\t\t$expected = $record->due;\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$numevents ++;\n\t\t\t\t\t$events[] = array(\n\t\t\t\t\t\t'expected'=>$expected,\n\t\t\t\t\t\t'type'=>$monitor->module,\n\t\t\t\t\t\t'id'=>$monitor->instanceid,\n\t\t\t\t\t\t'name'=>$mod->name,\n\t\t\t\t\t\t'cmid'=>$monitor->cmid,\n\t\t\t\t\t\t'action'=>$monitor->action\n\t\t\t\t\t);\n\t\t\t\t }\t\t\t\t\n\t\t}\t\n\t}else{\n\t\tforeach($configmonitoreddata as $critical){\n\t\t\t$mod = $modinfo->cms[$critical->cmid];\n\t\t\tif($critical->critical == 1 && $mod->visible == 1 && $mod->uservisible == 1){\n\t\t\t\t\n\t\t\t\t\t$expected = $critical->expected;\n\t\t\t\t\tif($critical->locked == 1){\n\t\t\t\t\n\t\t\t\t\t\tif (array_key_exists('defaultTime', $modules[$critical->module])) {\n\t\t\t\t\t\t\t$fields = $modules[$critical->module]['defaultTime'].' as due';\n\t\t\t\t\t\t\t$record = $DB->get_record($critical->module, array('id'=>$critical->instanceid, 'course'=>$courseid), $fields);\n\n\t\t\t\t\t\t\tif($record->due != 0){\n\t\t\t\t\t\t\t\t$expected = $record->due;\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\n\t\t\t\t$numevents ++;\n\t\t\t\t$events[] = array(\n\t\t\t\t\t'expected'=>$expected,\n\t\t\t\t\t'type'=>$critical->module,\n\t\t\t\t\t'id'=>$critical->instanceid,\n\t\t\t\t\t'name'=>$mod->name,\n\t\t\t\t\t'cmid'=>$critical->cmid,\n\t\t\t\t\t'action'=>$critical->action\n\t\t\t\t);\n\t\t\t }\t\t\t\t\n\t\t}\t\n\t}\n\n\tif ($numevents==0) {\n return null;\n }\n\n // Sort by first value in each element, which is time due\n sort($events);\n\n return $events;\n}", "public function getevents()\n\t{\n\t$query = mysql_query(\"SELECT * from events ORDER BY eventid DESC\");\n $data_result = array();\n\t\t\tif($query)\n\t\t\t{\n\t\t\t\twhile ($row = mysql_fetch_array($query)) {\n\t\t\t\t\tarray_push($data_result, $row);\n\t\t\t\t}\n\t\t\t\treturn $data_result;\n\t\t\t\n\t\t\t\t\n\t\t\t} \n\t\t\n\t\telse\n\t\t{\n\t\t\t\n\t\t\treturn false;\n\t\t}\t\n \n\t}", "function getEventID() \n {\n return $this->getValueByFieldName('event_id');\n }", "public function run()\n {\n //\n \\Illuminate\\Support\\Facades\\DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \\Illuminate\\Support\\Facades\\DB::table('events')->truncate();\n\n \\Illuminate\\Support\\Facades\\DB::table('events')->insert([\n [\n 'eventName' => 'Quần thời trang nam',\n 'bandNames' => 'Quần thời trang nam',\n 'startDate' => \\Illuminate\\Support\\Carbon::now()->addDays(-1),\n 'endDate' => \\Illuminate\\Support\\Carbon::now()->addDays(-2),\n 'ticketPrice'=> 1000,\n 'status'=> 1,\n ],\n [\n 'eventName' => 'Quần thời trang nam',\n 'bandNames' => 'Quần thời trang nam',\n 'startDate' => \\Illuminate\\Support\\Carbon::now()->addDays(-1),\n 'endDate' => \\Illuminate\\Support\\Carbon::now()->addDays(-2),\n 'ticketPrice'=> 1000,\n 'status'=> 1,\n ],\n [\n 'eventName' => 'Quần thời trang nam',\n 'bandNames' => 'Quần thời trang nam',\n 'startDate' => \\Illuminate\\Support\\Carbon::now()->addDays(-1),\n 'endDate' => \\Illuminate\\Support\\Carbon::now()->addDays(-2),\n 'ticketPrice'=> 1000,\n 'status'=> 1,\n ],\n\n ]);\n \\Illuminate\\Support\\Facades\\DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "public function testAggregateEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function send_events()\n {\n }" ]
[ "0.7125457", "0.66920435", "0.6518273", "0.64942336", "0.643458", "0.6237627", "0.61937106", "0.61108464", "0.60874665", "0.6075813", "0.6059498", "0.60535115", "0.5906486", "0.5871688", "0.5866398", "0.5857567", "0.58573353", "0.5844534", "0.582855", "0.58134717", "0.57746243", "0.5766293", "0.57626814", "0.5757783", "0.5754532", "0.5745623", "0.57246405", "0.5713252", "0.5695815", "0.56888825", "0.5686196", "0.5686196", "0.56847686", "0.5682495", "0.5681646", "0.56714505", "0.56675625", "0.56488717", "0.564643", "0.56450075", "0.5614035", "0.56068754", "0.5586043", "0.55645996", "0.5562988", "0.55604213", "0.5558617", "0.55580163", "0.5556853", "0.5552952", "0.55434847", "0.5538665", "0.551343", "0.5510009", "0.55054516", "0.55030096", "0.5502933", "0.5501294", "0.550128", "0.5499036", "0.5490079", "0.5489633", "0.5488322", "0.54817504", "0.54813075", "0.54772544", "0.54712", "0.54625136", "0.5458522", "0.54470235", "0.5438317", "0.54359627", "0.5434992", "0.5434624", "0.5429497", "0.5427467", "0.5422699", "0.5422422", "0.542103", "0.541792", "0.54165953", "0.54105055", "0.54100543", "0.54095215", "0.54093635", "0.5404448", "0.53993016", "0.5394532", "0.53939927", "0.5391601", "0.5384639", "0.5384639", "0.53845", "0.5384056", "0.53811675", "0.53778005", "0.53741974", "0.5370981", "0.53705853", "0.53639114", "0.5363319" ]
0.0
-1
Guardar en BD los datos del usuario
public function deleteSesion() { $idSesion = isset($_POST['idSesion']) ? $_POST['idSesion'] : null; return $this->modelS->deleteSesion($idSesion); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "function Save(){\n $rowsAffected = 0;\n if(isset($this->legajo)){\n $rowsAffected = $this->UpdateSQL([\"legajo = \".$this->legajo]);\n }else{\n $rowsAffected = $this->InsertSQL();\n if($rowsAffected > 0){\n $this->legajo = $this->Max(\"legajo\");\n }\n }\n if($rowsAffected == 0){\n throw new \\Exception(\"Error al guardar Usuario\");\n }else{\n $this->Refresh();\n }\n }", "public function guardar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n switch ($datosCampos[\"acceso\"]) {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n $datosCampos[\"pass\"] = sha1(\"123\"); //agrego la contraseña en sha1 para que solicite el cambio cada vez que se cree un usuario\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza transaccion\n $rtaVerifUser = $this->refControladorPersistencia->ejecutarSentencia(\n $guardar->verificarExistenciaUsuario($tabla, $datosCampos[\"usuario\"])); //verifico si ya hay un usuario con ese nombre \n $existeUser = $rtaVerifUser->fetch(); //paso a un array\n $this->refControladorPersistencia->get_conexion()->commit(); //cierro\n if ($existeUser[0] == '0') {//solamente si el usuario no existe se comienza con la carga a la BD\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $arrayCabecera = $guardar->meta($tabla); //armo la cabecera del array con los datos de la tabla de BD\n $sentencia = $guardar->armarSentencia($arrayCabecera, $tabla); //armo la sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos); //armo el array con los datos de la vista y los datos que obtuve de la BD \n array_shift($array); //remuevo el primer elemento id si es nuevo se genera automaticamente en la BD\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array); //genero la consulta\n $this->refControladorPersistencia->get_conexion()->commit();\n $this->refControladorPersistencia->get_conexion()->beginTransaction();\n $ultimo = $guardar->buscarUltimo($tabla);\n $idUser = $this->refControladorPersistencia->ejecutarSentencia($ultimo); //busco el ultimo usuario para mostrarlo en la vista \n $id = $idUser->fetchColumn(); //array \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id); //busco el usuario\n return $respuesta; //regreso\n } else {\n return $id = [\"incorrecto\" => \"incorrecto\"]; //si hubo un error volvemos a vista y corregimos\n }\n }", "public function persist() {\n $bd = BD::getConexion();\n $sql = \"insert into usuarios (nombre, clave) values (:nombre, :clave)\";\n $sthSql = $bd->prepare($sqlInsertUsuario);\n $result = $sthSql->execute([\":nombre\" => $this->nombre, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function guardarRegistro2(){\r\n $this->database->execute(\"INSERT INTO empleados (nombreApellido, dni, email, pass) VALUES ('rodri', '12345678', 'rodri@gmail.com', '123456'\");\r\n }", "public function guardar(){\r\n\t\t\t$user_table = Config::get()->db_user_table;\r\n\t\t\t$consulta = \"INSERT INTO $user_table(dni, nom, cognom1, cognom2, data_naixement, estudis,\r\n\t\t\t\t\t\tsituacio_laboral, prestacio, telefon_mobil, telefon_fix, email, admin, imatge)\r\n\t\t\tVALUES ('$this->dni','$this->nom','$this->cognom1','$this->cognom2','$this->data_naixement','\r\n\t\t\t\t\t$this->estudis','$this->situacio_laboral','$this->prestacio','$this->telefon_mobil', '\r\n\t\t\t\t\t$this->telefon_fix','$this->email','$this->admin','$this->imatge');\";\r\n\t\t\t\t\t\t\t\r\n\t\t\treturn Database::get()->query($consulta);\r\n\t\t}", "public function guardar(){\r\n $clave_activacion = Upload::generar_nombre(32);\r\n\t\t\t\r\n\t\t\t$user_table = Config::get()->db_user_table;\r\n\t\t\t$consulta = \"INSERT INTO $user_table(dni, password, admin, email, imagen, activo, clave_activacion, timestamp)\r\n\t\t\tVALUES ('$this->dni','$this->password',0,'$this->email', '$this->imagen', 0, '$clave_activacion', default);\";\r\n\t\t\treturn Database::get()->query($consulta);\r\n\r\n\t\t}", "public function persist() {\n $bd = BD::getConexion();\n $sqlInsertUsuario = \"insert into usuarios (nomUsuario, clave) values (:nomUsuario, :clave)\";\n $sthSqlInsertUsuario = $bd->prepare($sqlInsertUsuario);\n $result = $sthSqlInsertUsuario->execute([\":nomUsuario\" => $this->nomUsuario, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function save() {\n $this->destroy();\n $query = 'insert into Usuario (user_id,user_name,user_pass,user_desc,user_email) values (\"'.$this->getUser_id().'\",\"'.$this->getUser_name().'\",\"'.$this->getUser_pass().'\",\"'.$this->getUser_desc().'\",\"'.$this->getUser_email().'\")';\n $this->driver->exec($query);\n}", "private function saveUser(){\n\n if( ! $this->checkEmail() ){\n $password = password_hash($this->_userPassword, PASSWORD_DEFAULT);\n $request = $this->_connexion->prepare(\"INSERT INTO Users (user_name, user_email, user_password) VALUES (?, ?, ?)\");\n $request->execute(array($this->_userName, $this->_userEmail, $password));\n\n return $response = json_encode([\n 'status' => 'ok',\n 'message' => 'successfuly add'\n ]);\n }\n else{\n return $response = json_encode([\n 'status' => 'failed',\n 'message' => 'this email allready exist'\n ]);\n }\n\n }", "public function store(){\n //comprueba que llegur el formulario con los datos\n if(empty($_POST['guardar']))\n throw new Exception('No se recibieron datos');\n \n $usuario= new Usuario();\n //guardar la info del formulario\n \n //user, pass, nombre, apellidos, email, direccion, poblacion, provincia, cp\n $usuario->user= $_POST['user'];\n $usuario->pass= $_POST['pass'];\n $usuario->nombre= $_POST['nombre'];\n $usuario->apellidos= $_POST['apellidos'];\n $usuario->email= $_POST['email'];\n $usuario->direccion= $_POST['direccion'];\n $usuario->poblacion= $_POST['poblacion'];\n $usuario->provincia= $_POST['provincia'];\n $usuario->cp= $_POST['cp'];\n \n if(!$usuario->guardar()) //guarda el usuario en la bdd\n throw new Exception(\"No se pudo guardar $usuario->nombre\");\n \n // preparar un mensaje global\n $GLOBALS['mensaje']= \"Guardado del usuario $usuario->user correcto.\";\n \n //llevar a los detalles del usuario\n $this->show($usuario->id); \n }", "public function guardar()\n\t{\n\t\t// Crear una instancia de la conexion\n\t\t$conexion = new Conexion;\n\n\t\t// Comprobar si es un registro nuevo o uno ya existente\n\t\tif ($this->update) {\n\n\t\t\t// Preparar la sentencia para actualizar el tipo de rol en la bd\n\t\t\t$sentencia = $conexion->conn->prepare(\"UPDATE \". static::$tablaConsulta . \" SET medio= ? WHERE id= ?\");\n\n\t\t\t// Pasar los campos del objecto a la sentencia\n\t\t\t$sentencia->bind_param(\n\t\t\t\t\t'si',\n\t\t\t\t\t$this->medio,\n\t\t\t\t\t$this->id\n\t\t\t);\n\n\t\t} else {\n\n\t\t\t// Preparar la sentencia para isertar el tipo de rol en la bd\n\t\t\t$sentencia = $conexion->conn->prepare(\"INSERT INTO \". static::$tablaConsulta . \" VALUES (null, ?)\");\n\n\t\t\t// Pasar los campos del objecto a la sentencia\n\t\t\t$sentencia->bind_param(\n\t\t\t\t\t's',\n\t\t\t\t\t$this->medio\n\t\t\t);\n\t\t}\n\n\n // Ejecutar la sentencia\n\t\tif ( $sentencia->execute() ) {\n\n\t\t\t// Devolver un uno si fue un exito\n\t\t\treturn 1;\n\t\t} else {\n\n\t\t\t// Devolver un 0 si ocurrio un error\n\t\t\treturn 0;\n\t\t}\n\t}", "public function save(User $usuario){\n $sql = \"INSERT INTO users\n (name,\n email,\n password\n )\n VALUES\n ('\".$usuario->getName().\"', \n '\".$usuario->getEmail().\"',\n '\".$usuario->getPassword().\"')\";\n\n $stmt = $this->cnx->prepare($sql);\n //print $sql;\n $result = $stmt->execute();\n if(!$result){\n throw new Exception(\"Ocorreu um erro ao inserir o registro em usuario!\");\n }\n }", "public function save(){\n if(isset($_POST)){\n\n $nombre = isset($_POST[\"nombre\"]) ? $_POST[\"nombre\"] : false;\n $apellidos = isset($_POST[\"apellidos\"]) ? $_POST[\"apellidos\"] : false;\n $email = isset($_POST[\"email\"]) ? $_POST[\"email\"] : false;\n $password = isset($_POST[\"password\"]) ? $_POST[\"password\"] : false;\n\n\n\n if($nombre && $apellidos && $email && $password){\n \n $usuario= new Usuario(); \n $usuario->setNombre($nombre);\n $usuario->setApellidos($apellidos);\n $usuario->setEmail($email);\n $usuario->setPassword($password);\n /* llamo al metodo que tengo en el modelo para guardar el usuario */\n $save= $usuario->save();\n /* condicion por si el metodo save falla */\n if($save){\n /* cuando el registro esté correcto, abri una session */\n $_SESSION['register']= \"complete\";\n }else{\n $_SESSION['register']= \"failed\"; \n }\n }else{\n $_SESSION['register']= \"failed\"; \n }\n\n }else{\n $_SESSION['register']= \"failed\"; \n }\n /* para redirigir */\n header(\"Location:\".base_url.'usuario/registro');\n }", "public function guardar_usuario(UsuarioRequest $request)\n {\n //una vez ingresado la nueva persona, ya se tiene acceso a todos sus datos.\n $persona = new Persona();\n $persona->primer_nombre = $request->get(\"primer_nombre\");\n $persona->segundo_nombre = $request->get(\"segundo_nombre\");\n $persona->primer_apellido = $request->get(\"primer_apellido\");\n $persona->segundo_apellido = $request->get(\"segundo_apellido\");\n $persona->dui = $request->get(\"dui\");\n $persona->nit = $request->get(\"nit\");\n\n //sentencia para agregar la foto\n //$persona->foto = $request->get(\"foto\");\n\n $persona->afp = $request->get(\"afp\");\n $persona->cuenta = $request->get(\"cuenta\");\n $persona->save();\n\n $usuario = new User();\n $usuario->rol_id = $request->get(\"tipo_usuario\");\n $usuario->persona_id = $persona->id;\n $usuario->name = $persona->primer_nombre . \".\" . $persona->primer_apellido;\n $usuario->password = bcrypt(\"ATB\");\n $usuario->email = $request->get(\"correo\");\n $usuario->activo = 1;\n $usuario->save();\n\n $periodo_activo = Periodo::where(\"activo\", \"=\", 1)->first();\n //dd($periodo_activo);\n $asambleista = new Asambleista();\n $asambleista->user_id = $usuario->id;\n $asambleista->periodo_id = $periodo_activo->id;\n $asambleista->facultad_id = $request->get(\"facultad\");\n $asambleista->sector_id = $request->get(\"sector\");\n $asambleista->propietario = $request->get(\"propietario\");\n //setea al user como un asambleista activo\n $asambleista->activo = 1;\n\n $hoy = Carbon::now();\n $inicio_periodo = Carbon::createFromFormat(\"Y-m-d\", $periodo_activo->inicio);\n\n if ($hoy > $inicio_periodo) {\n $asambleista->inicio = $hoy;\n } else {\n $asambleista->inicio = $inicio_periodo;\n }\n $asambleista->save();\n\n $request->session()->flash(\"success\", \"Usuario agregado con exito\");\n return redirect()->route(\"mostrar_formulario_registrar_usuario\");\n }", "public function store()\n {\n //MEMBUAT VALIDASI\n $this->validate([\n 'name' => 'required|string',\n 'username' => 'required|string',\n 'email' => 'required|string'\n ]);\n $pass = $this->password;\n //QUERY UNTUK MENYIMPAN / MEMPERBAHARUI DATA MENGGUNAKAN UPDATEORCREATE\n //DIMANA ID MENJADI UNIQUE ID, JIKA IDNYA TERSEDIA, MAKA UPDATE DATANYA\n //JIKA TIDAK, MAKA TAMBAHKAN DATA BARU\n User::updateOrCreate(['id' => $this->idz], [\n 'name' => $this->name,\n 'username' => $this->username,\n 'email' => $this->email,\n 'password' => $pass,\n ]);\n\n //BUAT FLASH SESSION UNTUK MENAMPILKAN ALERT NOTIFIKASI\n session()->flash('message', $this->id ? $this->name . ' Diperbaharui': $this->name . ' Ditambahkan');\n $this->closeUser(); //TUTUP User\n $this->resetFields(); //DAN BERSIHKAN FIELD\n }", "public function guardarUsuario()\n {\n \n //ACCESO A DATOS\n $usu = new Usuario('usuarios');\n if (isset($this->request['usuario']))\n {\n $usu->load(\"id=\".$_SESSION['id']);\n }\n\n $usu->usuario=$this->request['usuario'];\n $usu->password=$this->request['nuevapassword'];\n $usu->fechamodificacion=date('Y-m-d');\n \n \n if($usu->save()){\n $this->cerrarSesion ();\n header('Location: /appnutri/index.php');\n }else echo'<script> \n alert(\"Error. No se pudo cerrar la conexion\") \n window.location=\"/appnutri/index.php\";\n </script>';\n \n }", "function saveUsuario(Usuario $objeto) {\n $campos = $this->_getCampos($objeto);\n \n $id = $campos['id'];\n unset($campos['id']);\n unset($campos['tipo']);\n unset($campos['activa']);\n unset($campos['falta']);\n if($objeto->getPassword() === null || $objeto->getPassword() === ''){\n unset($campos['password']);\n }\n return $this->db->updateParameters(self::TABLA, $campos, array('id' => $id));\n }", "function registrarUsuario($nombre,$apellidos,$email,$edad,$puntos,$passW)\n {\n $consulta =\"INSERT INTO usuario (nombre,apellidos,email,edad,puntos,password) VALUES ('$nombre','$apellidos','$email',$edad,$puntos,'$passW')\";\n if($this->conexion->query($consulta))\n {\n \n }else{ \n echo \"Falló la creación de la tabla: (\" . $this->conexion->errno . \")// \" . $this->conexion->error.\"<br>\";\n }\n }", "function insert($usuario) \n { \n $sql=\"INSERT INTO Usuarios values (\".$usuario->getId().\",\"\n .\"'\".$usuario->getNombre().\"',\" \n .\"'\".$usuario->getPaterno().\"',\" \n .\"'\".$usuario->getMaterno().\"',\" \n .\"'\".$usuario->getUsername().\"',\" \n .\"md5('\".$usuario->getPassword().\"'),\"\n .\"'\".$usuario->getFechaAlta().\"',\"\n .\"'\".$usuario->getEstatus().\"',\"\n .\"'\".$usuario->getTipoUsuario()->getId().\"')\"; \n \n $response = mysqli_query($this->_connDb, $sql); \n return $response; \n }", "public function saveUser()\n {\n $connection = \\Yii::$app->db;\n $command = $connection->createCommand()\n ->update('users', [\n 'name' => $this->name,\n 'email' => $this->email,\n ], 'id='.$this->id);\n $command->execute();\n }", "public function save() {\n\t\t$data = array(\n\t\t\t\t\"user\" => array(\n\t\t\t\t\t\t\"email\" => $this->_data[\"email\"],\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t// kontrola zmeny hesla\n\t\tif (in_array(\"password\", $this->_changed)) $data[\"user\"][\"password\"] = $this->_data[\"password\"];\n\t\t\n\t\t// odeslani dat\n\t\t$response = $this->_connection->sendRequest(self::OBJECT, \"put\", $this->_data[$this->_identifier], $data, \"post\");\n\t}", "public function registerUser(){\r\n\t\t$name = $_POST['register_name'];\r\n\t\t$email = $_POST['register_email'];\r\n\t\t$password = $_POST['register_password'];\r\n\r\n\t\t$sql = \"INSERT INTO users values (null,?,?,?)\";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$name,$email,$password]);\r\n\t\t//ako je registracija uspela pojavice se div u formu sa ispisom notifikacije!!!\r\n\t\tif ($query) {\r\n\t\t\t$this->register_result=true;\r\n\t\t}\r\n\t}", "public function guardarUsuario()\r\n {\r\n $user = new \\App\\Models\\User;\r\n \r\n $user->Seq_Usuario = $_REQUEST['Seq_Usuario'];\r\n $user->Usuario = $_REQUEST['username'];\r\n $user->Password = $_REQUEST['password'];\r\n $user->sys_rol_id = $_REQUEST['rolID'];\r\n\r\n\r\n $userController = new App\\Controllers\\UserController;\r\n\r\n if($user->Seq_Usuario > 0) {\r\n $result = $userController->updateUser($user);\r\n } else {\r\n $result = $userController->createUser($user);\r\n }\r\n \r\n /**\r\n * Variable de sesión usada para mostrar la notificación del\r\n * resultado de la solicitud.\r\n */\r\n $_SESSION['result'] = $result;\r\n \r\n header('Location: ?c=Registro&a=usuarios');\r\n }", "function guardarUsuario ($name,$email,$password,$avatar){\n$dsn = 'mysql:dbname=MySQL;host=127.0.0.1';\n$UserDB = 'root';\n$PassDB = '';\n\ntry {\n $gbd = new PDO($dsn, $UserDB, $PassDB);\n // echo \"entre en try, me conecte al MySql Local \";\n} catch (PDOException $e) {\n echo 'Falló la conexión: ' . $e->getMessage();\n}\n\n/*la columna id se genera sola por eso no esta declarado en insert*/\n/*todas las personas que se resigtran son usuarios por defaul de tipo 1(uno)*/\n$gsent = $gbd->prepare('INSERT INTO proyecto.usuarios(nickname,email,pass,tipoDeUsuario,avatar)\nVALUES(:name,:email,:password,1,:avatar);');\n $gsent->bindValue(':name', $name, PDO::PARAM_STR);\n $gsent->bindValue(':email', $email, PDO::PARAM_STR);\n $gsent->bindValue(':password', $password, PDO::PARAM_STR);\n $gsent->bindValue(':avatar', $avatar, PDO::PARAM_STR);\n //var_dump($gsent);\n $gsent->execute();\n $results = $gsent->fetchAll(PDO::FETCH_ASSOC);\n\n}", "public function saveToDatabase() {\n if($this->id != 0) {\n $dbResult = System::database()->query('update :table_users \n set `role_id` = :role_id, \n `login` = :login, \n `password` = :password, \n `auth_key` = :auth_key, \n `auth_expire` = :auth_expire, \n `last_login` = :last_login\n where `id` = :id');\n \n $dbResult->bindInt(':id', $this->id);\n $dbResult->bindValue(':auth_key', $this->authKey);\n $dbResult->bindInt(':auth_expire', $this->authExpired);\n $dbResult->bindInt(':last_login', $this->lastLoginTime);\n } else {\n $dbResult = System::database()->query('insert into :table_users (`role_id`, `login`, `password`)\n values (:role_id, :login, :password);');\n }\n $dbResult->bindTable(':table_users', TABLE_USERS);\n $dbResult->bindInt(':role_id', $this->role['id']);\n $dbResult->bindValue(':login', $this->login);\n $dbResult->bindValue(':password', $this->password);\n\n $dbResult->execute();\n }", "function insertar(){\n global $conexion, $data;\n $usuario = $data[\"usuario\"];\n $email = $data[\"email\"];\n $clave = $data[\"clave\"];\n $tipo = $data[\"tipo\"];\n $eliminado = $data[\"eliminado\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"INSERT INTO usuario(usu_usuario, usu_email, usu_clave, usu_estado, usu_eliminado, usu_id_tipo_usuario)VALUES ('$usuario', '$email', '$clave', '$estado', '$eliminado', '$tipo' ) \");\n echo validarError($conexion, true, $resultado);\n }", "public function guardar(){\r\n\r\n\t $conexion = new Conexion();\r\n\t if($this->nombre ==true ){\r\n\t \t $consulta = $conexion->prepare('INSERT INTO ' . self::TABLA .' ( nombre,apellidos,edad,curso,transporteEscolar) \r\n\t \tVALUES(:nombre,:apellidos,:edad,:curso,:transporteEscolar)');\r\n\t \r\n\t $consulta->bindParam(':nombre', $this->nombre);\r\n\t $consulta->bindParam(':apellidos', $this->apellidos);\r\n\t $consulta->bindParam(':edad', $this->edad);\r\n\t $consulta->bindParam(':curso', $this->curso);\r\n\t $consulta->bindParam(':transporteEscolar', $this->transporteEscolar);\r\n\t $consulta->execute();\r\n\t\t\t$this->idAlumno = $conexion->lastInsertId();\r\n\t\t//\tif($respuesta1){\r\n\t\t//\t\treturn $respuesta1;\r\n\t\t//\t}\t\r\n\t\t\techo \"<h2 style='color:white;'>El Alumno se ha registrado con el id: \" . $this->idAlumno.\"</h2>\";\r\n\t\t\t printf (\"<br/><a href='registroAlumnos.php'><button class='lila'>Volver</button></a>\");\t\r\n\t\t}else{\r\n\t\t\techo \"<h2 style='color:white;'>No se pudo realizar el registro.</h2>\";\r\n\t\t\t printf (\"<br/><a href='registroAlumnos.php'><button class='lila'>Volver</button></a>\");\r\n\t\t}\r\n\t\t$conexion = null; \r\n\t\t}", "public function save()\n {\n if (isset($_POST)) {\n \n #Validación Basica\n $nombre = isset($_POST['nombre']) ? $_POST['nombre'] : false;\n $apellidos = isset($_POST['apellidos']) ? $_POST['apellidos'] : false;\n $email = isset($_POST['email']) ? $_POST['email'] : false;\n $password = isset($_POST['password']) ? $_POST['password'] : false;\n\n if ($nombre && $apellidos && $email && $password) {\n #llamar al metodo save del modelo\n $usuario = new Usuario();\n\n #Pasar datos al modelo\n $usuario->setNombre($nombre);\n $usuario->setApellidos($apellidos);\n $usuario->setEmail($email);\n $usuario->setPassword($password);\n\n #guardar en BD\n $save = $usuario->save();\n\n if ($save) {\n #Crear una sesión\n $_SESSION['register'] = \"complete\";\n //echo \"<h4>Usuario Registrado Correctamente!!</h4>\";\n }else {\n #Crear una Sesión\n $_SESSION['register'] = \"failed\";\n //echo \"<h4>Error!! Fallo al registrar usuario</h4>\"; \n }\n } else {\n $_SESSION['register'] = \"failed\";\n }\n \n header(\"Location:\".base_url.'usuario/registro'); #Redirige al registro\n }\n }", "public function save()\n {\n //Ejecuta el método Validate para validar que el input sea correcto\n $this->validate();\n\n //Si errors está vacío, por lo tanto el método validate no devolvió mensajes de error, ejecuta las operaciones de guardado en DB\n if (empty($this->errors)) {\n //Hashea el password que viene por _POST\n $password_hash = password_hash($this->password, PASSWORD_DEFAULT);\n\n //Instancia un nuevo token para la activacion\n $token = new Token();\n $hashed_token = $token->getHash();\n $this->activation_token = $token->getValue();\n\n //Crea la consulta SQL , conecta a la DB y prepara la sentencia\n $sql = 'INSERT INTO users \n (name, email, password_hash, activation_hash) \n VALUES \n (:name, :email, :password_hash, :activation_hash)';\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n\n //Bindea los valores de _POST a las etiquetas de los valores de la sentencia \n $stmt->bindValue(':name', $this->name, PDO::PARAM_STR);\n $stmt->bindValue(':email', $this->email, PDO::PARAM_STR);\n $stmt->bindValue(':password_hash', $password_hash, PDO::PARAM_STR);\n $stmt->bindValue(':activation_hash', $hashed_token, PDO::PARAM_STR);\n\n\n //Ejecuta la sentencia\n return $stmt->execute();\n }\n \n //Al terminar devuelve false en caso de que la validación fracase\n return false;\n }", "public function store(Request $request){\n //Obtenemos los datos del formulario\n $user = new User($request -> all());\n //Validamos el campo de telefono\n if(strlen($user->phone) > 10){\n //Error al registrar usuario\n Flash('¡ Error en el campo de teléfono, ya que tiene más de 10 caracteres. Verifíque su información !')->error();\n //Redireccionamos\n return redirect()->route('users.create');\n }else{\n //Validamos campo de contraseña en cuanto al numero de caracteres\n if(strlen($user->password) <= 10 and strlen($user->password) >= 6){\n //Obtenemos la segunda contraseña para evaluación\n $secondpass = $request -> input('secondpass');\n //Verificamos Contraseña\n if(self::validarDatosContraseña($user->password, $secondpass)){\n //Encriptamos la contraseña\n $user->password = bcrypt($request->password);\n //Guardamos validando el estatus del usuario\n try{\n //Guardamos en BD\n $user->save();\n }catch(\\Exception $e){\n //Error al registrar usuario\n Flash('¡ Error al registrar usuario; verifique su conexión de internet, \n si persiste la falla pongase en contacto con el administrador !')->error();\n //Redireccionamos\n return redirect()->route('users.create');\n //Mandamos al Log\n Log::info($e);\n }\n //Imprimimos mensaje flash\n Flash('¡ Se a registrado a ' . $user->username . ' de forma exitosa !')->success();\n //Redireccionamos\n return redirect()->route('users.index');\n }else{\n //Error debido a que los campos de contraseña no son correctos\n Flash('¡ Contraseña no es igual en el segundo campo, verifique sus datos !')->error();\n //Redireccionamos\n return redirect()->route('users.create');\n }\n }else{\n //Error debido a que los campos de contraseña no son correctos\n Flash('¡ Contraseña con numero incorrecto de caracteres, verifíque su información !')->error();\n //Redireccionamos\n return redirect()->route('users.create');\n }\n \n }\n \n }", "public function save_user()\n\t{\n $user= new Users();\n $user->setNom($_POST['nom']);\n $user->setPrenom($_POST['prenom']);\n $user->setDate_naissance($_POST['date_naiss']);\n $user->setEmail($_POST['mail']);\n $user->setPassword($_POST['pwd']); \n\n $user->Create_user();\n\t}", "function saveUser() {\n\n //datos desde el formulario\n $nombres = $this->input->post('nombres');\n $apellidos = $this->input->post('apellidos');\n $email = $this->input->post('email');\n $marca_favorita = $this->input->post('marca_favorita');\n $modelo_favorito = $this->input->post('modelo');\n $profesion = $this->input->post('profesion');\n $pais = $this->input->post('pais');\n $telefono = $this->input->post('telefono');\n\n //re-verificamos si el user existe\n $exi = $this->Secure_model->checkEmail($email);\n if ($exi == TRUE) {\n redirect(base_url() . 'index.php/site/aviso/2');\n }\n //se enviara a usuario\n //$temp_clave = \"hola\";\n $temp_clave = $this->Secure_model->generateClave($nombres);\n $clave = md5(utf8_encode($temp_clave));\n $tipo_usuario = '2';\n $estado = md5($email);\n $datos = array(\n 'nombres' => $nombres,\n 'apellidos' => $apellidos,\n 'email' => $email,\n 'pais' => $pais,\n 'clave' => $clave,\n 'tipo_usuario' => $tipo_usuario,\n 'estado' => $estado,\n 'primium' => '0',\n 'fecha_registro' => date('Y-m-d'),\n );\n //$this->session->set_userdata('temp_data',$datos);\n // GUARDAMOS QUE ACABAMOS DE CREAR Y OBTENEMOS EL ULTIMO ID\n $last_id = $this->savedata_model->guardar('cq_usuario', $datos);\n //Guardamos numero de telefono\n $dato_tel = array(\n //'id_telefono' => '',\n 'id_usuario' => $last_id,\n 'telefono' => $telefono,\n 'codigo_pais' => $pais\n );\n\n $this->savedata_model->guardar('cq_telefonos', $dato_tel);\n\n // EVIAMOS NOTIFICACION DE CORREO\n $nombre = $nombres . \" \" . $apellidos;\n\n $datos = array('tipo' => 'registro',\n 'to' => $email,\n 'clave' => $temp_clave,\n 'nombre' => $nombre);\n\n\n if ($this->function_model->enviarMail($datos)) {\n\n redirect(base_url() . 'index.php/site/aviso/1');\n } else {\n redirect(base_url() . 'index.php/site/aviso/3');\n }\n }", "public function save()\n {\n $ins = $this->valores();\n unset($ins[\"idInscription\"]);\n\n $ins['idUser'] = $this->userO->idUser;\n unset($ins[\"userO\"]);\n\n $ins['idProject'] = $this->project->idProject;\n unset($ins[\"project\"]);\n\n if (empty($this->idInscription)) {\n $this->insert($ins);\n $this->idInscription = self::$conn->lastInsertId();\n } else {\n $this->update($this->idInscription, $ins);\n }\n }", "function InsertarBD($nombre, $edad,$email){\nrequire_once 'config/conexion.php';\n$conexion->query(\"INSERT into user values (NULL,'$nombre',$edad,'$email')\");\n //validar si dato se repite, se inserta o no\n return \"Insertado\";\n \n}", "function insertar(Usuario $u) {\n $conn = $this->conn;\n \n $nombre = $u->getNombre();\n $email = $u->getEmail();\n $password = password_hash($u->getPassword(), PASSWORD_BCRYPT);\n $telefono = $u->getTelefono();\n $poblacion = $u->getPoblacion();\n $uid = $u->getUid();\n if (!$stmt = $conn->prepare(\"INSERT INTO usuarios (nombre, email, password, telefono, poblacion, uid) VALUES (?,?,?,?,?,?)\")) {\n die(\"Error al preparar la consulta: \" . $conn->error);\n }\n if (!$stmt->bind_param('ssssss', $nombre, $email, $password, $telefono, $poblacion, $uid)) {\n die(\"Error en el bind_param: \" . $stmt->error);\n }\n if (!$stmt->execute()) {\n die(\"Error en el execute: \" . $stmt->error);\n }\n return true;\n }", "function altaUsuarioProfesor($datos) {\n\n if (BDConexionSistema::getInstancia()->begin_transaction()) {\n // INSERCION PROFESOR\n //Creo objeto sin enviar ID y enviando todos los datos del formulario\n $Profesor = new Profesor(null, $datos);\n $apellido = mysqli_real_escape_string(BDConexionSistema::getInstancia(), $Profesor->getApellido());\n\n if ($this->chequearEmail($Profesor->getEmail())) {\n $this->query = \"INSERT INTO PROFESOR \"\n . \"VALUES ('{$Profesor->getId()}', '0', '{$Profesor->getNombre()}', '{$apellido}',\"\n . \"'{$Profesor->getEmail()}', '{$Profesor->getCategoria()}', '{$Profesor->getPreferencias()}', '{$Profesor->getIdDepartamento()}')\";\n\n $consulta = BDConexionSistema::getInstancia()->query($this->query);\n } else {\n throw new Exception(\"El email: <b>\" . $Profesor->getEmail() . \"</b> ya corresponde a un profesor en la Base de Datos\");\n }\n\n if (!$consulta) {\n BDConexionSistema::getInstancia()->rollback();\n throw new Exception(\"No se puedo dar de alta el profesor (Error en la Base de Datos).\");\n }\n\n // INSERCION USUARIO\n\n $query = \"INSERT INTO \" . Constantes::BD_USERS . \".usuario \"\n . \"VALUES (null,'{$datos[\"nombreUsuario\"]}','{$datos[\"email\"]}')\";\n $consulta = BDConexionSistema::getInstancia()->query($query);\n if (!$consulta) {\n BDConexionSistema::getInstancia()->rollback();\n //arrojar una excepcion\n //die(BDConexion::getInstancia()->errno);\n throw new Exception(\"No se puedo dar de alta el profesor (Error en la Base de Datos).\");\n }\n\n // recuperamos la id del usuario\n $idUsuario = BDConexionSistema::getInstancia()->insert_id;\n\n // INSERCION USUARIO_ROL\n $query = \"INSERT INTO \" . Constantes::BD_USERS . \".usuario_rol \"\n . \"VALUES ({$idUsuario}, 9)\";\n $consulta = BDConexionSistema::getInstancia()->query($query);\n if (!$consulta) {\n BDConexionSistema::getInstancia()->rollback();\n //arrojar una excepcion\n //die(BDConexion::getInstancia()->errno);\n throw new Exception(\"No se puedo dar de alta el profesor (Error en la Base de Datos).\");\n }\n\n BDConexionSistema::getInstancia()->commit();\n BDConexionSistema::getInstancia()->autocommit(true);\n\n // si no se produjeron excepciones OK insercion, retornamos VERDADERO\n return TRUE;\n } else {\n throw new Exception(\"No se puedo dar de alta el profesor (Error en la Base de Datos).\");\n }\n }", "function saveAdmin(Usuario $objeto) {\n $campos = $this->_getCampos($objeto);\n \n $id = $campos['id'];\n unset($campos['id']);\n unset($campos['falta']);\n unset($campos['activa']);\n \n if($objeto->getPassword() === null || $objeto->getPassword() === ''){\n unset($campos['password']);\n }\n return $this->db->updateParameters(self::TABLA, $campos, array('id' => $id));\n }", "public function save(){\n\t\tif($this->validateForms(Input::all()) === true){\n\t\t\t$user = new User();\n\t\t\t$user->username = Input::get('username');\n\t\t\t$user->password = Hash::make(Input::get('password'));\t\n\t\t\t$user->email = Input::get('email');\n\t\t\t$user->role_id = Input::get('rol');\n\t\t\t$user->enable = 1;\n\n\t\t\t$useradmin = new UsuarioAdmin();\n\t\t\t$useradmin->nombres = Input::get('nombres');\n\t\t\t$useradmin->apellidos = Input::get('apellidos');\n\t\t\t$useradmin->cargo = Input::get('cargo');\n\n\t\t\t$user->save();\n\t\t\t$user->usuarioadmin()->save($useradmin);\n\n\t\t\tSession::flash('message', 'Usuario Agregado');\n\t\t\treturn Redirect::back();\n\n\t\t}else{\n\t\t\treturn Redirect::back()->withErrors($this->validateForms(Input::all()))->withInput();\n\t\t}\n\t}", "public function store(Request $request){\n\n try{\n // Inicia transação com banco de dados\n \\DB::beginTransaction();\n\n //dados do usuário motorista\n $user = new User();\n $user->name = $request->nome;\n $user->email = $request->email;\n $user->password = bcrypt($request->password);\n $user->roles = \"MOTORISTA\";\n\n ///dados específicos do motorista\n $motorista = new Motorista();\n $motorista->cnh = $request->cnh;\n $motorista->tipo_cnh = $request->tipo_cnh;\n $motorista->obs = $request->obs;\n $motorista->administrador_id = auth()->user()->id;\n\n print_r($motorista->cnh);\n\n\n //se deu certo a gravação dos dados no BD\n //método save() é herdado da model User\n if($user->save()){\n $motorista->user_id = $user->id;\n if($motorista->save()){\n // Efetiva todas as operações\n \\DB::commit();\n //retorna para o index de resources/views/usuario/index.blade.php\n return redirect('motorista')->with('success', \"Motorista cadastrado com sucesso!\");\n }\n }\n else{\n return redirect ('login');\n }\n\n }catch(exception $e) {\n // Cancela todas as operações em caso de erro\n \\DB::rollback();\n return redirect('motorista')->with('error', \"Não cadastrou motorista!\");\n }\n\n }", "function ingresar_usuario($data){\n\t\t$this->db->insert('noticias_usuarios',$data);\n\t}", "public function salvar(){\n \n\t\t/*\n\t\t\tReceber dados vindos do formulario.\n\t\t*/\n\n\t\t$login = $this->post(\"login\");\n\t\t$senha = $this->post(\"senha\");\n\t\t$senha = md5($senha);\n\t\t$tipo = 2;\n\n\t\t/*\n\t\t\tInserindo dados na tabela usuário.\n\t\t*/\n\t\t$campos = \"(login,senha,tipo)\";\t\t\n\t\t$valores = \"('\".$login.\"','\".$senha.\"','\".$tipo.\"')\";\t\t\n\t\t$tabela = \"usuarios\";\n\t\t\n\t\t$this->insert( $tabela, $campos, $valores );\t\n\t\t\n\t}", "public function store(CreateUsuariosRequest $request) {\n $input = $request->all();\n// dd($input);\n $input['password'] = bcrypt($request['password']);\n if(isset($input['jor1'])){\n $input['jor1']=1;\n }else{\n $input['jor1']=0;\n }\n if(isset($input['jor2'])){\n $input['jor2']=1;\n }else{\n $input['jor2']=0;\n }\n if(isset($input['jor3'])){\n $input['jor3']=1;\n }else{\n $input['jor3']=0;\n }\n if(isset($input['jor4'])){\n $input['jor4']=1;\n }else{\n $input['jor4']=0;\n }\n \n $rules = array(\n 'email' => 'required|unique:users,email',\n );\n\n $v = Validator::make($input, $rules);\n if ($v->fails()) {\n Flash::error(\"Este Correo Electronico ya esta registrado por otro usuario\");\n return $this->create();\n } else {\n $usuarios = $this->usuariosRepository->create($input);\n $prm=DB::select(\"select * from asg_perfil_departamentos where dep_id=$input[usu_perfil]\"); \n foreach ($prm as $p){\n $this->asigna_nuevos_permisos($usuarios->id,$p);\n }\n $aud= new Auditoria();\n $data=[\"mod\"=>\"Usuarios\",\"acc\"=>\"insertar\",\"dat\"=>$usuarios,\"doc\"=>\"NA\"];\n $aud->save_adt($data); \n Flash::success('Usuarios saved successfully.');\n return redirect(route('usuarios.index'));\n }\n\n\n }", "public function store(Request $request)\n {\n $existUser = User::where('email',$request->email)->count();\n if ( $existUser )\n {\n $result['status'] = false;\n $result['message'] = 'El Usuario Ya exite';\n return response()->json($result);\n }\n try {\n DB::beginTransaction();\n $request['name'] = trim($request['name']);\n $request['fecha_activacion'] = Date( 'Y-m-d' );\n $request['email'] = trim($request->email);\n $request['password'] = bcrypt(trim($request->password));\n $user= User::create($request->all());\n $result['status'] = true;\n $result['message'] = 'Guardado Correctamente';\n DB::commit();\n } catch (Exception $e) {\n $result['status'] = false;\n $result['message'] = $e->getMessage();\n DB::rollBack();\n }\n return response()->json($result);\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'username' => $this->username,\n 'password_hash' => $this->password_hash,\n 'email' => $this->email,\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'user_type' => $this->user_type,\n 'bio' => $this->bio,\n 'creation_date' => $this->creation_date,\n 'gender' => $this->gender,\n 'color' => $this->color\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function store(EmpresaFormRequest $request)\n {\n $user = new User;\n $user->email = $request->input('mail');\n $user->password = bcrypt( $request->input('password') );\n $user->rol = \"coordinador\";\n $user->save();\n $user = User::where('email', $request->input('mail'))->first();\n\n $empresa=new Empresa;\n //'nombre' es obj creado del request\n $empresa->Nombre=$request->get('Nombre');\n $empresa->Giro=$request->get('Giro');\n $empresa->Direccion=$request->get('Direccion');\n $empresa->Telefono=$request->get('Telefono');\n $empresa->condicion='1';\n $empresa->users_id = $user->id;\n $empresa->save();\n //Después de guardar nos redireccionamos a la carpeta coordinador\n return Redirect::to('revolution/empresa'); \n }", "public function store(Request $request)\n { \n\n if($request->crear=='0')\n $user=new User;\n else \n $user = User::find($request->id_user);\n $user->name=$request->name;\n $user->email=$request->email;\n $user->password = bcrypt($request->password);\n $user->dni=$request->dni;\n $user->fecha_nacimiento=$request->fecha_nacimiento;\n $user->fecha_inscripcion=new Datetime;\n $user->direccion=$request->direccion;\n $user->telefono=$request->telefono;\n $user->tipo=$request->tipo; \n \n if($request->password==$request->password_2 && $user->save())\n {\n if($request->crear=='0')\n return 'Usuario creado correctamente';\n else return 'Usuario editado correctamente';\n }\n else\n { \n if($request->crear=='0')\n return 'No se pudo crear el Usuario';\n else return 'No se pudo editar el Usuario';\n }\n \n \n }", "public function store_user(Request $request)\n {\n //Genera user, password e email se non forniti\n if(isset($request['genera_email'])){\n $user = new User;\n $email = \"\";\n do{\n $email = str_random(20);\n $user = User::where([['email', $email.'@segresta.it'], ['username', $email]])->get();\n }while(count($user)>0);\n\n $request['email'] = $email.'@segresta.it';\n $request['username'] = $email;\n }\n\n if(isset($request['genera_password'])){\n $request['password'] = str_random(40);\n }\n\n $this->validate($request, [\n 'name' => 'required',\n 'cognome' => 'required',\n 'nato_il' => 'required|date_format:d/m/Y',\n 'nato_a' => 'required',\n 'email' =>'required|unique:users',\n 'username' => 'required|unique:users',\n 'password' => 'required'\n ]);\n $input = $request->all();\n $date = Carbon::createFromFormat('d/m/Y', $input['nato_il']);\n if(Input::hasFile('photo')){\n $file = $request->photo;\n $filename = $request->photo->store('profile', 'public');\n $path = Storage::disk('public')->getDriver()->getAdapter()->getPathPrefix().$filename;\n $image = Image::make($path);\n $image->resize(500,null, function ($constraint) {$constraint->aspectRatio();});\n $image->save($path);\n $input['photo'] = $filename;\n }\n $input['password'] = Hash::make($input['password']);\n //salvo l'utente\n $user = User::create($input);\n //salvo il link utente-oratorio\n $orat = new UserOratorio;\n $orat->id_user=$user->id;\n $orat->id_oratorio = Session::get('session_oratorio');\n $orat->save();\n\n //salvo attributi\n $i=0;\n if(isset($input['id_attributo']) && count($input['id_attributo'])>0){\n foreach($input['id_attributo'] as $id) {\n $attrib = AttributoUser::create(['id_user' => $user->id, 'id_attributo' => $id, 'valore' => $input['attributo'][$i]]);\n $i++;\n }\n }\n\n //aggiungo il ruolo\n $roles = Role::where([['name', 'user'], ['id_oratorio', Session::get('session_oratorio')]])->get();\n if(count($roles)>0){\n //creo il ruolo\n $role = new RoleUser;\n $role->user_id = $user->id;\n $role->role_id = $roles[0]->id;\n $role->save();\n }\n Session::flash('flash_message', 'Utente aggiunto!');\n return redirect()->route('user.index');\n }", "public function inserir() {\n $this->load->model('Usuario_model', 'usuario');\n\n //Recebe os dados da view de usuario\n $data['login'] = $this->input->post('login');\n $data['senha'] = md5($this->input->post('senha'));\n $data['codAluno'] = $this->input->post('codAluno');\n $data['nivel'] = 1;\n\n if ($this->usuario->inserirUsuario($data)) {\n redirect('Painel_controller/login');\n }\n }", "public function store(Request $request) // almacena los datos que son pasados por el form\n {\n $credentials = Request()->validate([ //validar los datos\n 'name' => ['required'],\n 'carnet' => ['required'],\n 'email' => ['required'],\n 'password' => ['required'],\n\n ]);\n $tipo_vendedor = $request['tipo_vendedor'];\n $tipo_visita = $request['tipo_visita'];\n $tipo_cliente = $request['tipo_cliente'];\n $tipo_administrador = $request['tipo_administrador'];\n if($tipo_vendedor==null)\n $tipo_vendedor=0;\n else\n $tipo_vendedor=1;\n if($tipo_visita==null)\n $tipo_visita=0;\n else\n $tipo_visita=1;\n if($tipo_cliente==null)\n $tipo_cliente=0;\n else\n $tipo_cliente=1;\n if($tipo_administrador==null)\n $tipo_administrador=0;\n else\n $tipo_administrador=1;\n\n $user= User::create([\n 'name'=>request('name'),\n 'carnet'=>request('carnet'),\n 'email'=>request('email'),\n 'password'=> bcrypt(request('password')),\n 'tipo_vendedor'=>$tipo_vendedor,\n 'tipo_visita'=>$tipo_visita,\n 'tipo_cliente'=>$tipo_cliente,\n 'tipo_administrador'=>$tipo_administrador,\n 'url_foto'=>null,\n 'estado'=>1,\n ]);\n BitacoraController::store($user->id);\n NotaController::store(Auth::user()->id,'El administrador creo un nuevo usuario');\n //NotaController::store($user->id,'El usuario fue creado correctamente');\n // NotaUsuario::crear($user,'Usuario creado');\n\n return redirect()->route('user.index');\n }", "public function guardar($empresa) {\n if ($this->db->insert(\"empresa\", $empresa)) {\n //id de la empresa\n $empresa_id = $this->db->insert_id();\n $this->configuracion_model->logInterno(\"Se creo la empresa \" . $empresa_id);\n //le creamos un usuario con valor de 10 para que entre al sistema\n //sacamos los datos de la empresa ya insertados para su manejo\n //hacemos el array de la persona de la empresa para su insercion\n $persona = array(\n \"nombre\" => $empresa['nombre'],\n \"apellido\" => \"Principal\",\n \"documento\" => $empresa['nit'],\n \"direccion\" => $empresa['direccion'],\n \"email\" => $empresa['email'],\n \"telefono\" => $empresa['telefono']\n );\n //hacemos el array de la sede con los datos de la empresa\n $sede = array(\n \"nombre\" => $empresa['nombre'],\n \"direccion\" => $empresa['direccion'],\n \"telefono\" => $empresa['telefono'],\n \"email\" => $empresa['email'],\n \"empresa_id\" => $empresa_id\n );\n\n //insertamos a la persona-empresa\n if ($this->db->insert(\"persona\", $persona)) {\n $persona_id = $this->db->insert_id();\n $this->configuracion_model->logInterno(\"Se creo la persona \" . $persona_id);\n } else {\n return FALSE;\n }\n //insertamos a la sede\n if ($this->db->insert(\"sede\", $sede)) {\n $sede_id = $this->db->insert_id();\n $this->configuracion_model->logInterno(\"Se creo una sede \" . $sede_id);\n } else {\n return FALSE;\n }\n\n\n\n\n //sacamos la id de la persona-empresa para agregar el usuario\n //creamos el usuario para la insercion\n $usuario = array(\n \"user\" => $empresa['email'],\n \"pass\" => sha1($empresa['nit']),\n \"persona_id\" => $persona_id,\n \"grado\" => \"3\",\n \"valor\" => \"10\",\n \"empresa_id\" => $empresa_id,\n \"sede_id\" => $sede_id\n );\n\n\n //lo insertamos\n\n if ($this->db->insert(\"usuario\", $usuario)) {\n $this->configuracion_model->logInterno(\"Se crea e usuario \" . $this->db->insert_id());\n //Creamos los archivos de configuracion\n $configuracion = array(\n \"empresa_id\" => $empresa_id\n );\n } else {\n return FALSE;\n }\n //insertamos los datos de la configuracion\n if ($this->db->insert(\"configuracion\", $configuracion)) {\n $this->configuracion_model->logInterno(\"Se crea configuracion \" . $this->db->insert_id());\n\n /* creamos las categorias Default de la empresa en categoria y egresos_categoria */\n $categoria_default = array(\n \"nombre\" => \"Default\",\n \"descripcion\" => \"Default\",\n \"empresa_id\" => $empresa_id\n );\n if ($this->db->insert(\"categoria\", $categoria_default)) {\n $this->configuracion_model->logInterno(\"Se creo la categoria default \" . $usuario['user']);\n if ($this->db->insert(\"categoria_egreso\", $categoria_default)) {\n $this->configuracion_model->logInterno(\"Se creo la categoria_egreso default \" . $usuario['user']);\n }\n }\n\n\n return TRUE;\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n }", "public function insertUser() {\n try {\n /* Check if for the empty or null parameters */\n if (isset($_POST[\"email\"]) && isset($_POST[\"username\"]) && isset($_POST[\"password\"]) && isset($_POST[\"access\"])) {\n // Get the username from POST request to check\n $check_data = array(\n ':email' => $_POST[\"email\"]\n );\n // Get the username, password and access from POST request to insert\n $form_data = array(\n ':email' => $_POST[\"email\"],\n ':username' => $_POST[\"username\"],\n ':password' => $_POST[\"password\"],\n ':access' => $_POST[\"access\"]\n );\n // Check for existent user with the same username in Database\n $query = \"\n select id \n from tb_user \n where email = :email\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter username\n $statement->execute($check_data);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n $data[] = array('result' => 'This record already exists!');\n } else {\n // Create a SQL query to insert an new user with all parameters\n $query = \"\n insert tb_user(email, username, password, access, state) values(:email, :username, :password, :access, 1);\n \";\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameters\n $statement->execute($form_data);\n // Check if any affected row\n if ($statement->rowCount()) {\n $data[] = array('result' => '1');\n } else {\n $data[] = array('result' => 'No operations performed on the database!');\n }\n }\n } else {\n // Check for missing parameters\n if (!isset($_POST[\"email\"]) && !isset($_POST[\"username\"]) && !isset($_POST[\"password\"]) && !isset($_POST[\"access\"])) {\n $data[] = array('result' => 'Missing all parameters');\n } elseif (!isset($_POST[\"email\"])) {\n $data[] = array('result' => 'Missing email parameter!');\n } elseif (!isset($_POST[\"username\"])) {\n $data[] = array('result' => 'Missing username parameter!');\n } elseif (!isset($_POST[\"password\"])) {\n $data[] = array('result' => 'Missing password parameter!');\n } else {\n $data[] = array('result' => 'Missing access parameter!');\n }\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "function modificarUsuario($usuario,$password,$idUsuario){\n \n $conex=Conexion::getInstance();\n \n $sql=\" UPDATE `usuarios` SET `usuario`='$usuario',`password`='$password' WHERE id=$idUsuario\";\n \n $conex->dbh->prepare($sql);\n $conex->dbh->exec($sql); \n \n\n}", "public function store(UserRequest $request){\n // Recuperar todos los datos del formulario en un ojbeto User\n $user=new User($request->all());\n // Usar bcrypt para encriptar password\n $user->password=bcrypt($user->password);\n // Persistir usuario\n $user->save();\n // Preparar el mensaje ha mostrar\n flash('Se ha guardado '.$user->name.' exitosamente.')->success();\n // Redireccionar al listado de usuarios\n return redirect()->route('admin.user.index');\n }", "public function register(Request $request)\n {\n\n //recoger los datos del usuario enviados por post\n $json=$request->input('json',null);\n $params=json_decode($json); //decodifica los datos en un objeto\n $params_array=json_decode($json,true); //decodifica los datos en un array\n\n //limpiar datos (quita espacios en blanco)\n $params_array=array_map('trim',$params_array);\n\n //validar datos\n if(!empty($params) && !empty($params_array)){\n\n $validate=\\Validator::make($params_array,[\n 'nombre' =>'required|alpha',\n 'apellido' =>'required|alpha',\n 'telefono' =>'required|numeric',\n 'direccion' =>'required|alpha',\n 'ciudad' =>'required|alpha',\n 'correo' =>'required|email|unique:usuario', //unique:users, verifica que sea unico en la tabla usuarios(no puede haber 2 usuarios con le mismo correo)\n 'contrasena' =>'required',\n \n ]);\n\n if($validate->fails()){\n $data=array(\n 'status' =>'error',\n 'code' =>404,\n 'message'=>'El usuario no se ha creado',\n 'errores'=>$validate->errors()\n );\n }else{\n //cifrar la contraseña\n $pwd=hash('sha256',$params->contrasena);\n \n //crear el usuario\n $user=new usuario();\n $user->nombre=$params_array['nombre'];\n $user->apellido=$params_array['apellido'];\n $user->telefono=$params_array['telefono'];\n $user->direccion=$params_array['direccion'];\n $user->ciudad=$params_array['ciudad'];\n $user->correo=$params_array['correo'];\n $user->contrasena=$pwd;\n $user->rol=$params_array['rol'];\n\n \n \n \n //guardar el usuario\n $user->save();\n\n $data=array(\n 'status' =>'success',\n 'code' =>200,\n 'message'=>'El usuario se ha creado',\n 'usuario' =>$user\n );\n }\n\n }else{\n $data=array(\n 'status' =>'error',\n 'code' =>404,\n 'message'=>'Los datos no se han ingresado correctamente',\n );\n }\n\n return response()->json($data,$data['code']);\n\n \n }", "public function saveUser($nome,$email,$senha){\n \t$id = time();\n $nome = parent::escapeString($nome);\n $senha = md5(parent::escapeString($senha));\n $email = parent::escapeString($email);\n \t//fazer uma validação para ver se o usuario já não está cad\n \t$sql = \"insert into `usuarios` ( `id`,`nome`, `email`, `senha` ) values ('$id','$nome', '$email', '$senha')\"; \n return parent::executaQuery($sql);\n }", "public function insert($usuario_has_hojaruta);", "public function store(Request $request)\n {\n $alumno = new Alumno();\n $user = new User();\n $hoy = date(\"Y-m-d\");\n $msj = \"\";\n $val = false;\n\n $objAlumno = Alumno::where(\"DNI\",$request->alumno['dni'])->get();\n if (count($objAlumno) == 0) \n {\n $alumno->DNI = $request->alumno['dni'];\n $alumno->Nombre = strtoupper($request->alumno['nombre']);\n $alumno->ApePaterno = strtoupper($request->alumno['pater']);\n $alumno->ApeMaterno = strtoupper($request->alumno['mater']);\n $alumno->Direccion = strtoupper($request->alumno['dir']);\n $alumno->fechaNac = $request->alumno['fecha'];\n $alumno->Estado = 1;\n $alumno->created_at = $hoy;\n $msj = \"ALUMNO AGREGADO CORRECTAMENTE\"; \n $val = true;\n $alumno->save();\n }else\n {\n $msj = \"ALUMNO YA SE ENCUENTRA REGISTRADO\"; \n }\n \n $objUser = user::where(\"user\",$request->alumno['dni'])->get();\n if (count($objUser) == 0) \n {\n $user->user = $request->alumno['dni'];\n $user->password = bcrypt(\"Inicio01\"); \n $user->tipo = 3;\n $user->estado = 1;\n $user->created_at = $hoy;\n $user->save();\n }else\n {\n user::where(\"user\",$request->alumno['dni'])->update([\n 'estado' => 1,\n ]);\n }\n \n \n return compact(\"val\",\"msj\");\n }", "public function store(UsuarioFormRequest $request){\n \n $usuario = new User;\n $usuario->nombre=$request->get('nombre');\n $usuario->email=$request->get('email');\n $usuario->password=bcrypt($request->get('password'));\n $usuario->estado=\"Activo\";\n $usuario->rol=$request->get('rol');\n $usuario->save();\n \n \n return Redirect::to('sispazysalvos/usuario');\n }", "function newUsuario($usuario)\n{\n\t$con = getDBConnection();\n\t$stmt = $con->prepare(\"INSERT INTO usuarios (nombre, apellidos, user_name, password, email) VALUES (:nombre, :apellidos, :user_name, :password, :email)\");\n\t$stmt->bindParam(':nombre', $usuario->nombre);\n\t$stmt->bindParam(':apellidos', $usuario->apellidos);\n\t$stmt->bindParam(':user_name', $usuario->user_name);\n\t$stmt->bindParam(':password', $usuario->password);\n\t$stmt->bindParam(':email', $usuario->email);\n\t$stmt->execute();\n}", "public function insertarUser($email,$pass,$nombre,$apellidos){\n\n if ($this->hayError()==true){\n return null;\n\n }else{\n\n $sqlInserction=\"INSERT INTO usuarios(id,usuario,nombre,apellidos,email,rol,pass) VALUES (NULL,'\".$email.\"','\".$nombre.\"','\".$apellidos.\"','\".$email.\"',NULL,'\".sha1($pass).\"')\";\n\n $this->conexion()->query($sqlInserction);\n }\n\n }", "public function RegistrarUsuarios()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"nombres\"]) or empty($_POST[\"usuario\"]) or empty($_POST[\"password\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\t$sql = \" select cedula from usuarios where cedula = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_POST[\"cedula\"]) );\n\t$num = $stmt->rowCount();\n\tif($num > 0)\n\t{\n\n\t\techo \"2\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\t$sql = \" select email from usuarios where email = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_POST[\"email\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 0)\n\t\t{\n\n\t\t\techo \"3\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \" select usuario from usuarios where usuario = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array($_POST[\"usuario\"]) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\t\t\t\t$query = \" insert into usuarios values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t\t$stmt->bindParam(1, $cedula);\n\t\t\t\t$stmt->bindParam(2, $nombres);\n\t\t\t\t$stmt->bindParam(3, $nrotelefono);\n\t\t\t\t$stmt->bindParam(4, $cargo);\n\t\t\t\t$stmt->bindParam(5, $email);\n\t\t\t\t$stmt->bindParam(6, $usuario);\n\t\t\t\t$stmt->bindParam(7, $password);\n\t\t\t\t$stmt->bindParam(8, $nivel);\n\t\t\t\t$stmt->bindParam(9, $status);\n\n\t\t\t\t$cedula = strip_tags($_POST[\"cedula\"]);\n\t\t\t\t$nombres = strip_tags($_POST[\"nombres\"]);\n\t\t\t\t$nrotelefono = strip_tags($_POST[\"nrotelefono\"]);\n\t\t\t\t$cargo = strip_tags($_POST[\"cargo\"]);\n\t\t\t\t$email = strip_tags($_POST[\"email\"]);\n\t\t\t\t$usuario = strip_tags($_POST[\"usuario\"]);\n\t\t\t\t$password = sha1(md5($_POST[\"password\"]));\n\t\t\t\t$nivel = strip_tags($_POST[\"nivel\"]);\n\t\t\t\t$status = strip_tags(strtoupper($_POST[\"status\"]));\n\t\t\t\t$stmt->execute();\n\n################## SUBIR FOTO DE USUARIOS ######################################\n//datos del arhivo \n\t\t\t\tif (isset($_FILES['imagen']['name'])) { $nombre_archivo = $_FILES['imagen']['name']; } else { $nombre_archivo =''; }\n\t\t\t\tif (isset($_FILES['imagen']['type'])) { $tipo_archivo = $_FILES['imagen']['type']; } else { $tipo_archivo =''; }\n\t\t\t\tif (isset($_FILES['imagen']['size'])) { $tamano_archivo = $_FILES['imagen']['size']; } else { $tamano_archivo =''; } \n//compruebo si las características del archivo son las que deseo \n\t\t\t\tif ((strpos($tipo_archivo,'image/jpeg')!==false)&&$tamano_archivo<50000) \n\t\t\t\t{ \n\t\t\t\t\tif (move_uploaded_file($_FILES['imagen']['tmp_name'], \"fotos/\".$nombre_archivo) && rename(\"fotos/\".$nombre_archivo,\"fotos/\".$_POST[\"cedula\"].\".jpg\"))\n\t\t\t\t\t{ \n## se puede dar un aviso\n\t\t\t\t\t} \n## se puede dar otro aviso \n\t\t\t\t}\n################## FINALIZA SUBIR FOTO DE USUARIOS ######################################\n\n\t\t\t\techo \"<div class='alert alert-success'>\";\n\t\t\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\t\t\techo \"<span class='fa fa-check-square-o'></span> EL USUARIO FUE REGISTRADO EXITOSAMENTE\";\n\t\t\t\techo \"</div>\";\t\t\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"4\";\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}\n}", "public function store(Request $request)\n {\n try {\n DB::beginTransaction();\n\n $nombre = $request->input('nombre');\n $apellido = $request->input('apellido');\n $ci = $request->input('ci');\n $ciudad = $request->input('ciudad');\n $direccion = $request->input('direccion');\n $nacimiento = $request->input('nacimiento');\n $email = $request->input('email');\n $contacto = $request->input('contacto');\n $foto = $request->input('foto');\n $usuario = $request->input('usuario');\n $password = $request->input('password');\n\n $idrol = $request->input('idrol');\n\n $value = User::where('usuario', '=', $usuario)->get();\n\n if (sizeof($value) > 0) {\n DB::rollBack();\n return response()->json([\n 'response' => -1,\n ]);\n }\n\n\n $user = new User();\n $user->nombre = $nombre;\n $user->apellido = $apellido;\n $user->email = $email;\n $user->nacimiento = $nacimiento;\n $user->usuario = $usuario;\n $user->imagen = $foto;\n $user->password = bcrypt($password);\n $user->save();\n\n $data = new Personal();\n $data->fkidusuario = $user->id;\n $data->ci = $ci;\n $data->ciudad = $ciudad;\n $data->direccion = $direccion;\n $data->contacto = $contacto;\n $data->save();\n\n $grupousuario = new GrupoUsuarioDetalle();\n $grupousuario->fkidrol = $idrol;\n $grupousuario->fkidusuario = $user->id;\n $grupousuario->estado = 'A';\n $grupousuario->save();\n\n DB::commit();\n\n return response()->json([\n 'response' => 1,\n ]);\n\n }catch(\\Exception $th) {\n DB::rollBack();\n return response()->json([\n 'response' => 0,\n 'message' => 'Error al procesar la solicitud',\n 'error' => [\n 'file' => $th->getFile(),\n 'line' => $th->getLine(),\n 'message' => $th->getMessage()\n ]\n ]);\n }\n }", "public function store(Request $request)\n {\n\n $user = new User;\n\n $user->email = $request->correo;\n $user->password = bcrypt($request->password);\n $user->name = $request->nombre;\n $user->lastname = $request->apellido;\n $user->identification = $request->cedula;\n $user->telephone = $request->telefono;\n $user->birthday = $request->fecha_nacimiento;\n $user->direction = $request->direccion;\n $user->role = 'SECRETARIA';\n\n\n $vusers = \\DB::select('SELECT * FROM users WHERE email = ?' , [$request->correo]);\n \n\n if ($vusers) {\n Alert::error('Este correo esta afiliado a un trabajador existente','¡Error en el registro!');\n \n return redirect()->route('empleados.create');\n die();\n }\n\n $vusers2 = \\DB::select('SELECT * FROM users WHERE identification = ?' , [$request->cedula]);\n \n\n if ($vusers2) {\n Alert::error('Esta cedula esta afiliada a un trabajador existente','¡Error en el registro!');\n \n return redirect()->route('empleados.create');\n die();\n }\n\n $vusers3 = \\DB::select('SELECT * FROM users WHERE telephone = ?' , [$request->telefono]);\n \n\n if ($vusers3) {\n Alert::error('Este telefono esta afiliado a un trabajador existente','¡Error en el registro!');\n\n return redirect()->route('empleados.create');\n die();\n}\n\n\n\n\n\n\n\n$bitacoras = new App\\Bitacora;\n\n$bitacoras->user = Auth::user()->name;\n$bitacoras->lastname = Auth::user()->lastname;\n$bitacoras->role = Auth::user()->role;\n$bitacoras->action = 'Ha registrado un nuevo trabajador';\n$bitacoras->save();\n\n $user->save();\n\n \n\n\n\n \n\n \n \n\n Alert::success('Operación realizada con éxito','¡Empleado registrado!');\n\n return redirect()->route('empleados.index');\n }", "function registrarUsuario(){\n\n\t require(\"Conexion.php\");\t\n\t \n if(isset($_POST['insertar'])){\n\t\n\t $nombre=$_POST[\"nombre\"];\n $apellido=$_POST[\"apellido\"];\n\t $correo=$_POST[\"correo\"];\n\t $direccion=$_POST[\"direccion\"];\n\t $username=$_POST[\"nombre\"];\n\t $password=$_POST[\"password\"];\n\n\t $db=new Conexion();\n\t\n\t\t /* evitar duplicaciones*/\t\t\n $sql = \"select count(*) from datos_usuario where nombre ='$nombre'\";\n\t\t\n if ($resultado = $db->connect()-> query($sql)) {\n\n /* Comprobar el número de filas que coinciden con la sentencia SELECT */\n if ($resultado->fetchColumn() > 0) {\n\n /* Ejecutar la sentencia SELECT para mostrar el nombre duplicado*/\n $sql = \"select nombre from datos_usuario where nombre = '$nombre'\";\n foreach ($db->connect()->query($sql) as $fila) {\n \n\t\t $duplicado=$nombre;\n }\t\n\n\t echo '<script language=\"javascript\">alert(\"Usuario duplicado: '.$duplicado.' ya esta en uso.\");</script>';\n\n echo \"<script>\n setTimeout(function() {\n location.href = '../vista/registro_user.php';\n }, 0001);\n </script>\";\t\t\t \n }\n \n /* No coincide ningua fila inserta */\n else {\t\t\n\t\t\t/*no hay duplicaciones insertamos*/\n\t\n $query=$db->connect()->prepare(\"insert into datos_usuario (nombre, apellido, correo, direccion)\n\t values (:nombre, :apellido, :correo,:direccion)\");\t\t\t \n $query->execute(array(\":nombre\"=>$nombre, \":apellido\"=>$apellido,\":correo\"=>$correo,\"direccion\"=>$direccion));\n\t\n\t/*----------------segunda tabla-----------------------------*/\n\t $db=new Conexion();\n\t \n\t $sql2=\"insert into usuarios(username, password, rol_id) values (:username, :password, :rol_id)\";\n\t $query=$db->connect()->prepare($sql2);\n\t\t\t \n $query->execute(array(\":username\"=>$nombre, \":password\"=>$password, \":rol_id\"=>2));\n\t\n\t\t echo'<script type=\"text/javascript\">\n alert(\"Usuario registrado\");\n </script>';\n\t\n\t \n\t echo \"<script>\n setTimeout(function() {\n location.href = '../vista/login.php';\n }, 0001);\n </script>\";\t\n\t\t } \t\n }\n }\n }", "public function saveMod() {\n\t\t$sql_query = \"INSERT INTO usuarios(Email, Nombre, Fecha_Nacimiento, Passwd ,Rol)\n\t\tVALUES(?, ?, ?, ?, ?);\";\n\t\t$stmt = $this->connection->prepare($sql_query);\n\t\t$stmt->bind_param('sssss',$param_email, $param_name, $param_date, $hashed_psswd, $param_rol);\n\t\t$param_name = \"moderador1\";\n\t\t$param_email = \"moderador@kadede.es\";\n\t\t$param_date = \"1970-01-01\";\n\t\t$param_rol = \"mod\";\n\t\t$hashed_psswd = password_hash(\"123\", PASSWORD_DEFAULT);\n\t\t$success = $stmt->execute();\n\t\tif(!$success) {\n\t\t\techo(\"Error al intentar insertar en BD\");\n\t\t}\n\t}", "public function save($data){\n $this->db->insert(\"usuarios\",$data); //colo nombre de la tabla\n }", "public function registrarUsuario()\n {\n $datos = array();\n\n //guardamos los datos del formulario en un array \n foreach ($_POST as $clave => $valor) {\n $datos[$clave] = $valor;\n }\n\n //añadimos una clave por defecto y generamos el ciu\n $datos['clave'] = hash('sha512', \"12345678\");\n $datos['ciu'] = self::generarCiu($datos['nombre'], $datos['apellidos'], $datos['fecha_nacimiento']);\n\n //insertamos los datos y mostramos un error en funcion de si ha habido error o no\n echo $this->Usuarios_model->registrarUsuario($datos) ? 1 : 0;\n }", "public function saveAction() {\n $logger = $this->get('logger');\n if (!$this->get('request')->isXmlHttpRequest()) { // Is the request an ajax one?\n return new Response(\"<b>Not an ajax call!!!\" . \"</b>\");\n }\n\n try {\n //Get parameters\n $request = $this->get('request');\n $id = $request->get('id');\n $name = $request->get('name');\n $lastname = $request->get('lastname');\n $username = $request->get('username');\n $email = $request->get('email');\n $cellPhone = $request->get('cellPhone');\n $isActive = $request->get('isActive');\n $isCreating = false;\n\n $translator = $this->get(\"translator\");\n\n if( isset($id) && isset($name) && trim($name) != \"\"\n && isset($lastname) && trim($lastname) != \"\"\n && isset($username) && trim($username) != \"\") {\n $em = $this->getDoctrine()->getManager();\n $entity = new User();\n if($id != 0) { //It's updating, find the user\n $entity = $em->getRepository('TecnotekAsiloBundle:User')->find($id);\n }\n if( isset($entity) ) {\n $entity->setName($name);\n $entity->setLastname($lastname);\n $entity->setUsername($username);\n $entity->setCellPhone($cellPhone);\n $entity->setEmail($email);\n $entity->setIsActive( ($isActive==\"true\")? 1:0);\n $rawPassword = $this->generateStrongPassword();\n if($id == 0) { // If it's new must generates a new password\n $encoder = $this->container->get('security.encoder_factory')->getEncoder($entity);\n $entity->setPassword($encoder->encodePassword($rawPassword, $entity->getSalt()));\n $isCreating = true;\n }\n\n if($em->getRepository(\"TecnotekAsiloBundle:User\")\n ->checkUniqueUsernameAndEmail($username, $email, $id) ) {\n\n $em->persist($entity);\n $em->flush();\n if($isCreating) { // If it's new must email the new account email including the password\n $roleEmployee = $em->getRepository('TecnotekAsiloBundle:Role')->findOneByRole(\"ROLE_EMPLOYEE\");\n $entity->getUserRoles()->add($roleEmployee);\n $em->persist($entity);\n $em->flush();\n $logger->info(\"Send Email for new Account with password: \" . $rawPassword);\n $this->sendEmailForNewAccount($entity, $rawPassword);\n }\n return new Response(json_encode(array(\n 'error' => false,\n 'msg' => $translator->trans('catalog.save.success'))));\n } else {\n return new Response(json_encode(array(\n 'error' => true,\n 'msg' => $translator->trans('user.username.and.email.must.be.uniques'))));\n }\n } else {\n return new Response(json_encode(array('error' => true, 'msg' => \"Missing Parameters 2\")));\n }\n } else {\n return new Response(json_encode(array('error' => true, 'msg' => \"Missing Parameters 1\")));\n }\n } catch (Exception $e) {\n $info = toString($e);\n $logger->err('User::saveAction [' . $info . \"]\");\n return new Response(json_encode(array('error' => true, 'msg' => $info)));\n }\n }", "static public function mdlIngresarUsuario($tabla, $datos){\n\n $stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(nombres,apellidos,tipo_documento,documento,celular,email,profesion,tipo_vinculacion,cvlac,cargo,ficha,fecha_vinculacion,fecha_desvinculacion,estado_vinculacion,contrasena,id_programa,id_rol ) VALUES (:nombres,:apellidos,:tipo_documento,:documento,:celular,:email,:profesion,:tipo_vinculacion,:cvlac,:cargo,:ficha,:fecha_vinculacion,:fecha_desvinculacion,:estado_vinculacion,:contrasena,:id_programa,:id_rol)\");\n\n $p=null;\n if($datos[\"id_programa\"]==\"NULL\"){\n $p=null;\n }else{\n $p=$datos[\"id_programa\"];\n }\n\n $stmt->bindParam(\":nombres\", $datos[\"nombres\"], PDO::PARAM_STR);\n $stmt->bindParam(\":apellidos\", $datos[\"apellidos\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipo_documento\", $datos[\"tipo_documento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":documento\", $datos[\"documento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":celular\", $datos[\"celular\"], PDO::PARAM_STR);\n $stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n $stmt->bindParam(\":profesion\", $datos[\"profesion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipo_vinculacion\", $datos[\"tipo_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cvlac\", $datos[\"cvlac\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cargo\", $datos[\"cargo\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ficha\", $datos[\"ficha\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fecha_vinculacion\", $datos[\"fecha_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fecha_desvinculacion\", $datos[\"fecha_desvinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estado_vinculacion\", $datos[\"estado_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"], PDO::PARAM_STR);\n $stmt->bindParam(\":id_programa\", $p, PDO::PARAM_STR);\n $stmt->bindParam(\":id_rol\", $datos[\"id_rol\"], PDO::PARAM_STR);\n \n if($stmt->execute()){\n\n return \"ok\";\n\n }else{\n\n return \"error\";\n\n }\n\n $stmt->close();\n\n $stmt = null;\n\n }", "public function store(Request $request)\n {\n $user = new User;\n $user->id = $request->input('id');\n $user->name = $request->input('nombre');\n $user->apellido = $request->input('apellido');\n $user->email = $request->input('email');\n $user->usuario = ucwords($user->name) . \"\". ucwords($user->apellido[0]);\n $user->password = Hash::make($request->input('password'));\n $user->rol = $request->input('rol');\n $user->save();\n\n $correo = new newusuario($user);\n Mail::to('exitoacademico2021@gmail.com')->send($correo);\n \n if($user->rol == 0){\n $superAdministrador = new super_administrador();\n $superAdministrador->id = $user->id;\n $superAdministrador->save();\n }\n if($user->rol == 1){\n $administrador = new administrador;\n $administrador->id = $user->id;\n $administrador->save();\n }\n if($user->rol == 2){\n $asesor = new asesor;\n $asesor->id = $user->id;\n $asesor->save();\n }\n if($user->rol == 3){\n $tutor = new tutor;\n $tutor->id = $user->id;\n $tutor->save();\n }\n\n \n return redirect('logged_in');\n /*\n if (isset($_POST[\"usu\"])) {\n echo \"LLEGO\";\n $array = json_decode($_POST[\"usu\"]);\n echo \"LLEGO\";\n $usuario = new User;\n $usuario->usuario = $array->user;\n $usuario->rol = $array->rol;\n $usuario->password = $array->contrasena;\n $usuario->id = $array->id;\n $usuario->name = $array->name;\n $usuario->apellido = $array->apellido;\n $usuario->email = $array->email;\n $usuario->save();\n\n if ($usuario->rol == 0) {\n $superAdministrador = new super_administrador();\n $superAdministrador->id = $usuario->id;\n $superAdministrador->save();\n }\n if ($usuario->rol == 1) {\n $administrador = new administrador;\n $administrador->id = $usuario->id;\n $administrador->save();\n }\n if ($usuario->rol == 2) {\n $asesor = new asesor;\n $asesor->id = $usuario->id;\n $asesor->save();\n }\n if ($usuario->rol == 3) {\n $tutor = new tutor;\n $tutor->id = $usuario->id;\n $tutor->save();\n }\n\n\n if ($usuario->id != \"\") {\n $message = \"No Funciono\";\n redirect('logged_in');\n return response()->json([\n 'status' => 'Error',\n 'message' => $message,\n ]);\n }\n } else {\n echo \"something went wrong\";\n }\n return redirect('logged_in');\n */\n }", "function actualizarUsuario($parametros) {\n $sql = \"UPDATE usuarios SET nombre=:nombre, apellidos=:apellidos, email=:email, \n pass=:pass, telefono=:telefono, administrador=:administrador WHERE dni=:dni\";\n\n //Preparamos la consulta\n $actualizar_usuario = $this->conexionBBDD->prepare($sql,array());\n\n //Ejecutamos la consulta y actualizamos los datos del usuario\n $actualizar_usuario->execute($parametros);\n }", "public function saveUser() {\n\n try {\n\n $this->save();\n\n }catch (Exception $e) {\n\n throw new Exception($e->getMessage());\n\n }\n }", "function guardarClientes($firstname,$lastname,$email,$phone,$commentary,$usuario,$password){\n\t\t\t\n\t\t\t$password = sha1($password);\n\t\t\t//SQL\n\t\t\t$query = \"INSERT INTO users (firstname,lastname,email,phone,commentary,rol,user,password) \n\t\t\tVALUES (\n\t\t\t\t'\".$firstname.\"',\n\t\t\t\t'\".$lastname.\"',\n\t\t\t\t'\".$email.\"',\n\t\t\t\t'\".$phone.\"',\n\t\t\t\t'\".$commentary.\"',\n\t\t\t\t'Usuario',\n\t\t\t\t'\".$usuario.\"',\n\t\t\t\t'\".$password.\"'\n\t\t\t\t);\";\n\t\t\t$rst = $this->db->enviarQuery($query,'CUD');\n\t\t\treturn $rst;\n\t\t}", "static public function mdlIngresarUsuario($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(nombre, usuario, password, perfil, foto, email, telefono) VALUES (:nombre, :usuario, :password, :perfil, :foto, :email, :telefono)\");\n\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":password\", $datos[\"password\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":perfil\", $datos[\"perfil\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":foto\", $datos[\"foto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":telefono\", $datos[\"telefono\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\t\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t\n\t\t$stmt = null;\n\n\t}", "public function guardar($actividadId,$usuarioId,$nivelEducativoId){\n $actividadUsuario = $this->newEntity();\n $actividadUsuario->usuario_id = $usuarioId;\n $actividadUsuario->actividad_id = $actividadId;\n $actividadUsuario->niv_edu_id = $nivelEducativoId;\n $guardado = $this->connection()->transactional(\n function() use($actividadUsuario){\n if(!$this->save($actividadUsuario)){\n return false;\n }\n return true;\n }\n );\n return $guardado;\n\n }", "public function store(CreateUsuarioRequest $request)\n {\n $empresa_id = $request->EMPRESA_ID;\n $codigoProveedorSap = $request->codigoProveedorSap;\n //dd($request->all());\n\n $usuario = new User();\n\n $usuario->nombre = $request->nombre;\n $usuario->email = $request->email;\n $usuario->password = bcrypt($request->password);\n $usuario->tel_codpais = $request->tel_codpais;\n $usuario->telefono = $request->telefono;\n //$usuario->usersap_id = $request->usersap_id;\n $usuario->activo = $request->activo;\n $usuario->anulado = $request->anulado;\n\n if ($usuario->anulado === null) {\n $usuario->anulado = 0;\n }\n\n $usuario->save();\n\n /** Esto debe ser reubicado queda pendiete\n UsuarioEmpresa::insert( ['USER_ID' => $usuario->id, 'EMPRESA_ID' => $empresa_id, 'CODIGO_PROVEEDOR_SAP' => $codigoProveedorSap, 'ANULADO' => 0] );\n **/\n\n return redirect::to('usuarios');\n\n }", "public function store(Request $request)\n {\n $login = new Login;\n $Objusuario = new Usuario;\n $nombre = $request->input('nombre', 'default');\n $apellido = $request->input('apellido', 'default');\n $usuario = $request->input('usuario', 'default');\n $pass1 = $request->input('pass1', 'default');\n $pass2 = $request->input('pass2', 'default');\n\n $login->usuario = $usuario;\n $login->pass = $pass1; \n \n \n if ($pass1 == $pass2) {\n\n\n if ($login->save()) {\n \n $id = $login->id; \n $Objusuario->nombre = $nombre;\n $Objusuario->apellido = $apellido;\n $Objusuario->id_login = $id;\n \n if ($Objusuario->save()) {\n \n return redirect('/')->with('success','Usuario registrado correctamente');\n \n }\n } \n \n }else{\n\n return back()->with('error','Las contraseñas no coinciden');\n\n\n }\n\n \n\n }", "public function registrar_usuario($nombre,$apellido,$genero,$fecha_nacimiento,$correo,$imagen,$contraseña, $type){\n \n \n $nodo_usuario = new Usuario();\n $mysql = new Conexion();\n\n $nodo_usuario->nombre = $nombre;\n $nodo_usuario->apellido = $apellido; \n $nodo_usuario->genero = $genero;\n $nodo_usuario->fecha_nacimiento = $fecha_nacimiento;\n $nodo_usuario->correo = $correo; \n $nodo_usuario->imagen = $imagen; \n $nodo_usuario->contraseña = $contraseña;\n $nodo_usuario->type = $type;\n \n /* aun no esta funcionando esto\n\t $nodo_usuario->nick = $nik;\n\t $nodo_usuario->ciudad_origen = $orig;\n\t $nodo_usuario->lugar_recidencia = $reci; \n\t $nodo_usuario->sitio_web = $web; \n\t $nodo_usuario->facebook = $face;\n\t $nodo_usuario->twitter = $twit;\n\t $nodo_usuario->youtube = $you;\n */ \n \n ModelUsuarios::crearNodoUsuario($nodo_usuario); //crea el nodo del Usuario \n\n $idneo4j = $nodo_usuario->id; //obtengo el id del nodo creado\n \n\n /*\n * Registro de usuario en Mysql\n * \"la url de facebook es importante y no se esta capturando\"\n */\n \n $sql = \"INSERT INTO usuario (\n email,\n idfacebook,\n idneo4j,\n password\n )VALUES(\n '\".$correo.\"',\n '12345678',\n '\".$idneo4j.\"',\n '\".$contraseña.\"'\n );\";\n \n return $mysql->ejecutar_query($sql); \n \n \n \n \n }", "function setUsuario($usuario, $contraseña, $nombre, $apellidos, $telefono, $movil){\n\t\t\n\t\t$resultado = conectar()->query( \"SELECT * FROM usuarios WHERE usuario LIKE '$usuario'\");\n\t\tif($resultado->num_rows == 0){\n\t\t\tconectar()->query(\"INSERT INTO usuarios (usuario, contrasenia, nombre, apellidos, telefono, movil) VALUES ('\" . $usuario . \"','\" . $contraseña . \"','\" . $nombre . \"','\" . $apellidos .\"','\" . $telefono . \"','\" . $movil .\"')\");\n\t\t\techo \"<script>alert('Te has registrado correctamente!');document.location.reload();\";\t\n\t\t}else{\n\t\t\techo \"<script>alert('Ya existe ese nombre de usuario!');</script>\";\n\t\t}\n\t}", "public function save()\n {\n $this->validate();\n if(empty($this->errors)) {\n $qb = new QB;\n $qb->conn = static::getDB();\n $columns = ['name', 'email', 'password_hash'];\n $password_hash = password_hash($this->password, PASSWORD_BCRYPT);\n $values = [\n $this->name,\n $this->email,\n $password_hash\n ];\n $qb->insert('users', $columns, $values);\n return true;\n }else{\n return false;\n }\n }", "public function store(Request $request)\n {\n $user = new User;\n\n $this->validate($request, [\n 'nama' => 'required|unique:users,name,'.$user['id'],\n 'email' => 'required|unique:users,email,'.$user['id'],\n // 'telepon' => 'numeric|min:11',\n 'password' => 'required|min:6'\n // 'password' => 'required|min:6|same:konfirmasiPassword'\n ]);\n\n $user->name = $request->nama;\n $user->email = $request->email;\n $user->password = bcrypt($request->password);\n $user->level = \"Admin Desa\";\n $user->activation_token = str_random(255);\n\n $user->nama_desa = $request->nama_desa;\n $user->kode_desa = $request->kode_desa;\n $user->kode_pos = $request->kode_pos;\n $user->nama_kades = $request->nama_kades;\n $user->nip_kades = $request->nip_kades;\n $user->alamat_kantor = $request->alamat_kantor;\n $user->telepon = $request->telepon;\n\n if($request->hasFile('foto')) {\n $user->foto = $this->UploadFoto($request, $user->name);\n }\n\n if($request->hasFile('logo_desa')) {\n $user->logo_desa = $this->UploadLogo($request, $user->nama_desa);\n }\n\n $user->save();\n\n // dd(\"tes\");\n\n Session::flash('pesan_sukses', 'Registrasi Berhasil!!');\n\n return redirect('login');\n }", "public function save(){\n $statement =\"INSERT INTO conf_usuario(email,username,pass,estado,id_rol,id_persona,id_main)\n values(:Email,:Username,:Pass,:Estado,:IdRol,:IdPersona,:IdMain)\";\n $sql= MainModel::getConection()->prepare($statement);\n $sql->bindParam(\":Email\",$this->getEmail());\n $sql->bindParam(\":Username\",$this->getUsername());\n $sql->bindParam(\":Pass\",$this->getPass());\n $sql->bindParam(\":Estado\",$this->getEstado());\n $sql->bindParam(\":IdRol\",$this->getId_rol());\n $sql->bindParam(\":IdPersona\",$this->getId_persona());\n $sql->bindParam(\":IdMain\",$this->getId_main());\n $sql->execute();\n return $sql;\n }", "public function save()\n {\n if ($this->id)\n {\n $query = sprintf('UPDATE USERS SET USERNAME = \"%s\", ' .\n 'PASSWORD = \"%s\", EMAIL_ADDR = \"%s\", FIRST_NAME = \"%s\", LAST_NAME = \"%s\", IS_ACTIVE = %d ' .\n 'WHERE USER_ID = %d',\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n mysql_real_escape_string($this->firstName, $GLOBALS['DB']),\n mysql_real_escape_string($this->lastName, $GLOBALS['DB']),\n $this->isActive,\n $this->id);\n mysql_query($query, $GLOBALS['DB']);\n }\n else\n {\n $query = sprintf('INSERT INTO USERS (USERNAME, PASSWORD, ' .\n 'EMAIL_ADDR, FIRST_NAME, LAST_NAME, IS_ACTIVE) VALUES (\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", %d)',\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n mysql_real_escape_string($this->firstName, $GLOBALS['DB']),\n mysql_real_escape_string($this->lastName, $GLOBALS['DB']),\n $this->isActive);\n mysql_query($query, $GLOBALS['DB']);\n\n $this->id = mysql_insert_id($GLOBALS['DB']);\n }\n }", "public function agregarUsuario(){\n \n }", "public function guardarDatosUsuario(){\n\t \t$nombre = $this->input->post('nombre');\n\t $ap_paterno = $this->input->post('ap_paterno');\n\t\t$ap_materno = $this->input->post('ap_materno');\n\t\t$cargo = $this->input->post('cargo');\n\t\t$num_empleado = $this->input->post('num_empleado');\n\t\t$id_direccion_ejecutiva = $this->input->post('id_direccion_ejecutiva');\n\t\t$id_tipo_usuario = $this->input->post('id_tipo_usuario');\n\t\t$email = $this->input->post('email');\n\t\t$contrasenia = $this->input->post('contrasenia');\n\t\t//$estatus = $this->input->post('estatus');\n\t\t//echo $nombre.'-app'.$ap_paterno.'-apm'.$ap_materno.'-cargo'.$cargo.'-numem'.$num_empleado.'-\n\t\t//'.'-ide'.$id_direccion_ejecutiva.'-dtu'.$id_tipo_usuario.'-email'.$email.'-pass'.$contrasenia.'-est'.$estatus;\n\t\t$resultado=$this->altaUsuario_m->guardarDatosUsuario($nombre, $ap_paterno, $ap_materno, $cargo, $num_empleado, $id_direccion_ejecutiva, $id_tipo_usuario, $email, $contrasenia);\t \n\t\tif($resultado){\n\t\t\tif($this->agent->mobile() && !$this->agent->is_browser()){\n\t\t \t$respuesta_json= array(\n\t\t \t\t'code' => 200,\n\t\t \t\t'message' => 'Usuario registrado',\n\t\t \t\t'data' => 'No aplica' \n\t\t \t );\n\t\t\techo json_encode($respuesta_json);\n\t\t \n\t\t\t}else{\n\t\t\t\tredirect(base_url().'consultar_usuario_c');\n\t\t\t}\n\t\t}else{\n\t\t\tif($this->agent->mobile() && !$this->agent->is_browser()){\n\t\t\t$respuesta_json= array(\n\t\t \t\t'code' => 600,\n\t\t \t\t'message' => 'Usuario no registrado',\n\t\t \t\t'data' => 'No aplica' \n\t\t \t );\n\t\t\techo json_encode($respuesta_json);\n\t\t\t}else{\n\t\t\techo \"El usuario no ha sido registrado\";\n\t\t\t}\n\t\t}//if principal\n}", "function insUser($username,$password,$perfil,$activo){\n\t\t\t\n\t\t\t$conn = conectar(); //funcion que conecta con bd\n\t\t\ttry{\t\t\n\t\t\t\t\t$stmt = $conn->prepare(\"INSERT INTO usuario (id, username,password, id_perfil, activo ) VALUES ('',?,?,?,?)\");\n\t\t\t\t\t$stmt->bindParam(1,$username);\n\t\t\t\t\t$stmt->bindParam(2,$password);\n\t\t\t\t\t$stmt->bindParam(3,$perfil);\n\t\t\t\t\t$stmt->bindParam(4,$activo);\n\t\t\t}\n\t\t\tcatch(PDOException $e){\n\t\t\t\techo \"ERROR: \" . $e->getMessage();\n\t\t\t}\t\t\n\t\t\t$stmt->execute();\n\t\t\t$result = true;\n\t\t\tdesconectar($conn);\n\t\t\treturn $result; \n\t\t}", "function save_user($data){ \n global $database;\n if (!$data) {\n return false;\n }else{\n $query = '';\n if ( isset ( $_GET['id'] ) ){\n // UPDATE\n $query .= \"UPDATE \" . TABLE_PREFIX . \"users SET \";\n\n foreach ( $data as $key => $field ) {\n if ( 'save_user' != $key ){\n $fields[] = $key . \"='\" . $field . \"'\";\n }\n }\n $query .= implode(',', $fields);\n $query .= \" WHERE ID='\". $_GET['id'] .\"'\";\n \n }else{\n // INSERT\n $fields = $values = array();\n $query .= \"INSERT INTO \" . TABLE_PREFIX . \"users (\";\n foreach ( $data as $key => $field ) {\n if ( 'save_user' != $key ){\n $fields[] = $key;\n }\n }\n $query .= implode(',', $fields);\n $query .= \") VALUES (\";\n foreach ( $data as $key => $field ) {\n if ( 'save_user' != $key ){\n $values[] = \"'\" . $field . \"'\";\n }\n }\n $query .= implode(',', $values);\n $query .= \")\";\n \n }\n \n $database->query($query);\n if( !$database->error ){\n $_SESSION['message'] .= 'Los cambios se han guardado con éxito.';\n return true;\n }\n return $database->error;\n \n }\n}", "public function register(Request $request){\n $namad = $request->input('fname');\n $namab = $request->input('lname');\n $email = $request->input('email');\n $pwd = $request->input('password');\n $repwd = $request->input('repassword');\n $affect = DB::table('logins')->where('email', $email)->get()->count();\n\n if($affect!=0){\n echo \"<script>\n alert('Email has registered!');\n window.location.href='/';\n </script>\";\n }else {\n\n if($pwd == $repwd){\n DB::table('info_users')->insert(\n [\n 'nama_depan' => $namad,\n 'nama_belakang' => $namab,\n ]\n );\n $posts = DB::select('select id_info_user from Info_users order by id_info_user desc limit 1');\n foreach ($posts as $post) {\n $id = $post->id_info_user;\n }\n DB::table('logins')->insert(\n [\n 'id_info_user' => $id,\n 'email' => $email,\n 'password'=>$pwd,\n 'hak_akses'=>2\n ]\n );\n echo \"<script>\n alert('Register Succesfull!!');\n window.location.href='/';\n </script>\";\n }else{\n echo \"<script>\n alert('Register Failed!!');\n window.location.href='/';\n </script>\";\n }\n }\n\n\n }", "public function store(){\n \n // comprueba que llegue el formulario con los datos\n if(empty($_POST['guardar']))\n throw new Exception('No se recibieron datos');\n \n $mascota = new Mascotas(); //crear el nuevo usuario\n \n $mascota->nombre = DB::escape($_POST['nombre']);\n $mascota->sexo = DB::escape($_POST['sexo']);\n $mascota->biografia = DB::escape($_POST['biografia']);\n $mascota->fechanacimiento = DB::escape($_POST['fechanacimiento']);\n $mascota->fechafallecimiento = DB::escape($_POST['fechafallecimiento']);\n $mascota->idusuario = Login::get()->id;\n $mascota->idraza = intval($_POST['raza']);\n \n \n \n if(!$mascota->guardar())\n throw new Exception(\"No se pudo guardar $mascota->nombre\");\n \n $mensaje=\"Guardado la mascota $mascota->nombre\";\n include 'views/exito.php'; //mostrar éxito\n }", "private function registrarLocalmente()\n\t{\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$conexionBd->Sentencia = sprintf(\"INSERT UsuarioFacebook (IdFacebook, DatosFacebook, ValidadoPor, FbAccessToken) VALUES (%s, %s, NULL, %s)\",\n\t\t$conexionBd->Escapar($this->IdFacebook),\n\t\t$conexionBd->Escapar(addslashes(serialize($this->DatosFacebook))),\n\t\t$conexionBd->Escapar($this->accessToken)\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->Desconectar();\n\t}", "function insertarUsuario($conexion,$usuario, $password, $nombre, $apellido1, $apellido2, $email,$rol){\n $resultado=$conexion->query(\"INSERT INTO usuario (usuario, password,nombre,apellido1,apellido2,email,rol)\n values ('$usuario', '$password','$nombre',' $apellido1','$apellido2',' $email','$rol')\");\n return $resultado;\n}", "function modificarUsuario(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $usuario = $data[\"usuario\"];\n $email = $data[\"email\"];\n $clave = $data[\"clave\"];\n $resultado = mysqli_query($conexion,\"UPDATE usuario SET usu_usuario='$usuario', usu_clave='$clave' WHERE usu_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "public function store(Request $request)\n {\n $usuario = new User();\n $rsp = $request->all();\n\n $usuario->cedula = $rsp['cedula'];\n $usuario->nombre = $rsp['nombre'];\n $usuario->correo = $rsp['correo'];\n $usuario->telefono = $rsp['telefono'];\n $usuario->password = Hash::make($rsp['password']);\n\n $usuario->save();\n\n return Redirect('usuarios')->with('message','Guardado Satisfactoriamente !');\n }", "public function insertarUsuario(){\r\n $sql = \"INSERT INTO usuarios(Usuario, Clave, NombreCompleto, Correo, IdRol, Estado)\r\n VALUES('{$this->usuario}','{$this->clave}','{$this->nombreCompleto}',\r\n '{$this->correo}','{$this->idRol}', '{$this->estado}');\";\r\n $res = $this->conexion->setQuery($sql);\r\n return $res;\r\n}", "public function store()\n {\n if( Session::get('level') == '1' && Session::get('fingerprint') == md5($_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR']) )\n { \n $postData = Input::All();\n\n $messages = [\n 'fullname.required' => 'กรุณากรอก', \n 'username.required' => 'กรุณากรอก', \n 'password.required' => 'กรุณากรอก', \n ];\n\n $rules = [\n 'fullname' => 'required', \n 'username' => 'required',\n 'password' => 'required',\n ];\n\n $validator = Validator::make($postData, $rules, $messages);\n if ($validator->fails()) { \n return Redirect::route('user.create')->withInput()->withErrors($validator);\n }\n else\n {\n $data = Request::all(); \n\n if($this->checkuser($data['username']) == 0){\n $user = new User();\n $user->fullname = $data['fullname'];\n $user->username = $data['username'];\n $user->password = Hash::make($data['password']);\n $user->id_dep = $data['id_dep'];\n $user->level = $data['level'];\n $user->activated = $data['activated'];\n\n DB::transaction(function() use ($user) {\n $user->save(); \n }); \n\n Session::flash( 'savedata', save_data );\n }else{\n Session::flash( 'nosavedata', \"\" );\n }\n\n return Redirect::to('user');\n }\n }\n else\n {\n return Redirect::to('/');\n }\n }", "static public function mdlRegistroUsuario($tabla, $datos){\n\n\t\t$stmt = Connect::connection()->prepare(\"INSERT INTO $tabla(nombre, email) VALUES (:nombre, :email)\");\n\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "function store($mail, $nombre, $apellido, $password,$admin)\n {\n $sentencia = $this->db->prepare('INSERT INTO usuario(mail,nombre,apellido,password,admin) VALUES(?,?,?,?,?)');\n $sentencia->execute([$mail, $nombre, $apellido, $password,$admin]);\n }", "function guardaUsuario($usuario,$nombre,$clave,$tipo)\n\t{\n\t\t//mysql_connect(servidor,usuario,contraseña);\n\t\t$conexion = mysql_connect(\"localhost\",\"root\",\"\");\n\t\t//Seleccionamos la Base de Datos\n\t\tmysql_select_db(\"bd2163\");\n\t\t$consulta = \"insert into usuarios values('\".$usuario.\"','\".$nombre.\"','\".$clave.\"','\".$tipo.\"')\";\n\t\t//Ejecutamos la consulta\n\t\tmysql_query($consulta);\n\t\t//Preguntamos si hubo inserción\n\t\tif(mysql_affected_rows() > 0)\n\t\t{\t\t\n\t\t\tprint \"Registro guardado<br>\";\t\n\t\t\tprint \"<a href='ejemplo.php'>Regresar</a>\";\n\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprint \"No se pudo guardar el registro\";\n\t\t}\n\t}", "public function GuardarEstado()\n\t{\n\t\t$query=\"INSERT INTO estado (idpais,estado,descripcion) VALUES ($this->id_pais,'$this->estado','$this->descripcion')\";\n\t\t$resp=$this->db->consulta($query);\n\t\t$this->id_estado = $this->db->id_ultimo();\n\t\t\n\t\t\n\t\t\n\t}", "public function cadastro(){\n\n $query = \"insert into usuario\n set\n email=:e,\n senha=:s,\n nome=:n,\n telefone=:t,\n cpf=:c,\n foto=:f\";\n \n $stmt = $this->conn->prepare($query);\n\n \n //vamos usar uma função para retirar \n //todos os caracteres especiais vindos de \n //uma pagina html\n //isso fará com que você evite a execução \n //de comandos maliciosos no banco de dados\n //comandos de sqlinject\n\n $this->email = htmlspecialchars(strip_tags($this->email));\n $this->senha = htmlspecialchars(strip_tags($this->senha));\n $this->nome = htmlspecialchars(strip_tags($this->nome));\n $this->telefone = htmlspecialchars(strip_tags($this->telefone));\n $this->cpf = htmlspecialchars(strip_tags($this->cpf));\n $this->foto = htmlspecialchars(strip_tags($this->foto));\n\n //Vamos fazer i, bindParam(ligação de parametros) entre os dados\n //enviado pelo usuario no navegador ou smartphone para o banco \n //da dados\n\n $stmt->bindParam(\":e\",$this->email);\n $stmt->bindParam(\":s\",md5($this->senha));\n $stmt->bindParam(\":n\",$this->nome);\n $stmt->bindParam(\":c\",$this->cpf);\n $stmt->bindParam(\":t\",$this->telefone);\n $stmt->bindParam(\":f\",$this->foto);\n\n //executar a comsulta e verificar se cadastrou \n if ($stmt->execute()){\n return true;\n\n }\n return false;\n\n}" ]
[ "0.74915224", "0.7327701", "0.72919166", "0.724135", "0.7165804", "0.7161576", "0.7115248", "0.70271844", "0.70048517", "0.6979637", "0.68727773", "0.68461454", "0.6832066", "0.6800477", "0.6799584", "0.67525625", "0.6684039", "0.6682941", "0.66689014", "0.66553175", "0.65934813", "0.6587867", "0.658185", "0.65817046", "0.65813154", "0.6578365", "0.6576002", "0.6567482", "0.65456617", "0.6544825", "0.65344924", "0.6523006", "0.6522702", "0.6522695", "0.6518787", "0.6511618", "0.6507965", "0.6502502", "0.6493868", "0.6485455", "0.64779425", "0.6471546", "0.6469175", "0.64663917", "0.64563215", "0.64547926", "0.6451305", "0.64387393", "0.6430159", "0.6424789", "0.6421012", "0.6420027", "0.6419246", "0.64148694", "0.64109033", "0.64034337", "0.64022684", "0.6396392", "0.6392357", "0.6391372", "0.63911486", "0.6388365", "0.63870233", "0.6386233", "0.63635933", "0.63605493", "0.63513744", "0.6347753", "0.6347586", "0.63469976", "0.6342737", "0.6328156", "0.6319771", "0.6297124", "0.6290815", "0.6272989", "0.6263234", "0.6261315", "0.6256132", "0.62554735", "0.62543666", "0.62477887", "0.6244635", "0.62392837", "0.62354887", "0.62334085", "0.6230572", "0.6229923", "0.6225136", "0.6224281", "0.6218805", "0.62186617", "0.6217836", "0.6215507", "0.62138134", "0.62093925", "0.62089753", "0.6208328", "0.6206356", "0.6204462", "0.620328" ]
0.0
-1
Load vars from .json extension files, and return associative array.
public static function load(string $application_path,array $exclude_list = []): ?array { $exclude_list = array_merge($exclude_list,['..','.']); $scandir_application = array_diff(scandir($application_path),$exclude_list); $load_var = []; if (!empty($scandir_application)) { foreach ($scandir_application as $file) { $spl_file_info = new \SplFileInfo($file); if ($spl_file_info->getExtension() == 'json') { $key = $spl_file_info->getBasename('.json'); try { $load_var[$key] = json_decode(file_get_contents(vsprintf('%s/%s',[$application_path,$file])),true); } catch (\Error $error) { throw $error; } } } } return $load_var; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_input_file_into_php_array() {\n#This shows the file the directory of the data info\n$file_string = file_get_contents(\"data/input.json\");\n#Adding true will ensure objects are changed to associative arrays\n$file_array = json_decode($file_string, true);\n #Prints out a message to the command line when function is excecuted\nprint \"Loading...\\n\";\n#Returning the variable will prevent a value of \"null\" showing up\n return $file_array;\n}", "public static function Load(): array{\n if(file_exists(path(\"env.json\"))){\n $JsonContent = file_get_contents(path(\"env.json\"),true);\n $envData = json_decode($JsonContent, true) ;\n if (!$envData == null){\n return $envData;\n } else {\n throw new Exception(\"Invalid JSON format at file 'env.json'\"); \n }\n }else{\n throw new Exception('Target file \"env.json\" dosen\\'t exist. '); \n }\n }", "function settings_load_json($paths)\n {\n }", "private function getJson(string $filename): array\n {\n TestCase::assertFileExists($filename);\n\n $json = json_decode(file_get_contents($filename), true);\n\n if ($json === null) {\n TestCase::fail(json_last_error_msg());\n }\n\n return $json;\n }", "private function loadJson(){\n if(file_exists($this->fullPath.$this->jsonFile)) {\n $arCfg = get_object_vars(json_decode(file_get_contents($this->fullPath.$this->jsonFile)));\n $this->loadConfigs($arCfg);\n }\n }", "function getJson($fileName){\n $file = __DIR__ . \"/settings/$fileName.json\";\n if(file_exists($file)){\n return json_decode(file_get_contents($file), true);\n }else{\n return array();\n }\n}", "function getArrayByName($fileName){\n $file = $fileName.\".json\";\n global $filePath;\n $path = $filePath.$file;\n $string = file_get_contents($path);\n $arrays = json_decode($string,true);\n return $arrays;\n}", "public static function getArrayByJsonFile(string $filename): array {\n return json_decode(file_get_contents($filename), true);\n }", "function load($filename){\n\n\t\t//Check if the input is valid\n\t\tif(!\\lib_validation\\validate($filename, LV_STRING))\n\t\t\treturn null;\n\t\t\n\t\t//Escape characters just to be safe \n\t\t$filename = addslashes($filename);\n\t\t\n\t\t//Convert namespace to a file path\n\t\t$filename = \"configs/\" . $filename . \".json\";\n\t\t\n\t\t//Checks if the file exists\n\t\tif(!file_exists($filename))\n\t\t\treturn null;\n\t\t\n\t\t//Load the file\n\t\t$json = file_get_contents($filename);\n\t\t\n\t\t//Parse the file\n\t\t$data = json_decode($json, true);\n\t\t\n\t\t//Return the results (associative array)\n\t\treturn $data;\n\t}", "public static function load()\n {\n if (!is_dir(dirname(static::path()))) {\n mkdir(dirname(static::path()), 0755, true);\n }\n\n if (file_exists(static::path())) {\n return json_decode(file_get_contents(static::path()), true);\n }\n\n return [];\n }", "public function predefinedDictionaries() {\n $ret = array();\n \n // Look for json files in the dictionary directory\n $dfiles = preg_grep(\"/\\.json$/\", scandir($this->dictionaryDir));\n \n // Parse each file for the title, and if we successfully parse the document\n // add it to the return array, keyed on the file name\n \n foreach($dfiles as $d) {\n $inbound = file_get_contents($this->dictionaryDir . \"/\" . $d);\n \n if(!empty($inbound)) {\n $json = json_decode($inbound);\n \n if(!empty($json->title)) {\n $ret[ $d ] = $json->title;\n }\n }\n }\n \n return $ret;\n }", "function json_read($filename){\n return json_decode(file_get_contents($filename));\n}", "public function load(): array\n {\n $scripts = [];\n\n foreach ($this->path as $path) {\n // Get files\n foreach ($this->filetypes as $filetype) {\n $scripts[] = glob($path . \"/*.{$filetype}\");\n }\n }\n\n return array_reduce($scripts, 'array_merge', []);\n }", "function json_load($file)\n{\n $data = [];\n if (file_exists($file)) {\n $data = to_charset(file_get_contents($file));\n $data = json_decode(\n mb_convert_encoding($data, 'UTF-8', \"auto\"), true, 512,\n JSON_OBJECT_AS_ARRAY || JSON_BIGINT_AS_STRING\n );\n }\n if (null === $data) {\n return json_last_error_msg();\n }\n if (is_array($data)) {\n $data = to_charset($data);\n }\n return $data;\n}", "public static function load(): array\n {\n $data = [];\n if($storage_data = @file_get_contents(self::$path.self::$filename)) {\n $data = unserialize($storage_data);\n } \n\n return $data;\n }", "function getItemsFromFile()\n{\n return json_decode(file_get_contents(__DIR__ . '/' . JSON_DATA_FILE), true);\n}", "function readJsonFile($filename) {\n\t$json = json_decode(@file_get_contents($filename),true);\n\tif ( ! is_array($json) ) $json = array();\n\treturn $json;\n}", "public function getJsonConfigfile(){\n $json = file_get_contents( $this->config_base_path.$this->jsonFile);\n //Decode JSON\n $array = json_decode($json,true);\n return $array;\n }", "public function getJsonConfigfile(){\n $json = file_get_contents( $this->config_base_path.$this->jsonFile);\n //Decode JSON\n $array = json_decode($json,true);\n return $array;\n }", "private static function _loadModuleJSON(string $file): array {\n\t\t$raw_module_conf = file_get_contents($file);\n\t\t$extension = File::extension($file);\n\t\t$config = [];\n\n\t\ttry {\n\t\t\tParser::factory($extension, $raw_module_conf, new SettingsArray($config))->process();\n\t\t} catch (ClassNotFound $e) {\n\t\t\tthrow new ParseException('Unable to load extension {extension} for configuration file {file}', [\n\t\t\t\t'extension' => $extension, 'file' => $file,\n\t\t\t], 0, $e);\n\t\t}\n\t\treturn [$raw_module_conf, $config];\n\t}", "function getJson($file)\n {\n //saving the string from the files in the variable\n $contents = file_get_contents($file);\n \n //decoding the json string\n $arr = json_decode($contents, true);\n //returning the decoded array\n return $arr;\n }", "public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }", "public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}", "protected function readDataFile($filename)\n {\n $dataJson = file_get_contents(__DIR__ . '/../data/' . $filename);\n return [\n json_decode($dataJson, true),\n ];\n }", "function getJSON($file){\n\t$data = file_get_contents($file);\n\t\n\tif($data){\n\t\t$decode = json_decode($data, FILE_USE_INCLUDE_PATH);\n\t}\n\telse{\n\t\t$decode = NULL;\n\t}\n\treturn $decode;\n}", "public function loadJson($filename)\n {\n $result = false;\n if (file_exists($filename) && is_file($filename)) {\n $json = file_get_contents($filename);\n $data = json_decode($json, true);\n if (is_array($data)) {\n foreach ($data as $name => $value) {\n $this->__set($name, $value);\n }\n $result = true;\n }\n }\n return $result;\n }", "function readJson($filename) {\n \n $text = trim(@file_get_contents($filename));\n if($text === '') return null;\n \n $json = @json_decode($text, true);\n \n return $json;\n \n }", "function file_to_array($filename) {\n if (file_exists($filename)) {\n $encoded_string = file_get_contents($filename);\n\n if ($encoded_string !== false) {\n return json_decode($encoded_string, true);\n } \n }\n \n return false;\n}", "public static function parseJson($filename){\n \\Framework\\Logger::debug('json file \"'.$filename.'\" was called', 'jsonHandler\\parse');\n $return = array();\n if(file_exists($filename)){\n \\Framework\\Logger::debug('File \"'.$filename.'\" exists.', 'jsonHandler\\parse');\n \n $filecontent = file_get_contents($filename);\n if($filecontent===false){\n \\Framework\\Logger::error('Error loading file \"'.$filename.'\": file not readable?', 'jsonHandler\\parse');\n throw new \\Exception('Error loading file \"'.$filename.'\": file not readable?');\n } else {\n $return = json_decode($filecontent, true);\n if(!$return){\n \\Framework\\Logger::error('Error decoding json file \"'.$filename.'\": not a valid json file?', 'jsonHandler\\parse');\n throw new \\Exception('Error decoding json file \"'.$filename.'\": not a valid json file?');\n }\n }\n \n } else {\n \\Framework\\Logger::error('Error loading file \"'.$filename.'\": file does not exist?', 'jsonHandler\\parse');\n throw new \\Exception('Error loading file \"'.$filename.'\": file does not exist?');\n }\n \n return $return;\n }", "protected function load_features(){\n\t\t$content = file_get_contents( DATA_FILE_ISGI);\n\t\t\n\t\treturn json_decode($content);\n\t}", "private function loadJson($file) {\n\n $contents = File::get($file);\n\n if ( !$contents ) {\n return false;\n }\n\n $json = json_decode($contents, true);\n\n return $json;\n\n }", "function loadFromFile(string $filepath): ?array {//lolo\n $fichier = file_get_contents($filepath);\n\n if ($fichier === false) {\n return null;\n }\n\n $tab = json_decode($fichier, true);\n if ($tab === null) {\n return null;\n }\n return $tab;\n}", "private function loadFiles()\n {\n return $this->loadResourcesFiles()->mapWithKeys(function ($value, $key) {\n return [$this->removeExtension($key) => $value];\n });\n }", "public function parse(): array\n {\n $parsed = [];\n \n foreach ($this->files as $namespace => $path) {\n try {\n $parsed[$namespace] = require $path;\n } catch (\\Exception $e) {}\n }\n \n return $parsed;\n }", "public static function load($file = null)\n {\n if (self::cacheExists()) {\n //return self::getCache();\n }\n\n if (null === $file) {\n $file = static::$dataFile;\n }\n\n $file = Fluid::getBranchStorage() . '/' . $file;\n\n if (file_exists($file)) {\n return json_decode(file_get_contents($file), true);\n }\n\n return array();\n }", "public function load() \n\t{\n\t\tif (is_null ( $this->getDataFile () )) \n\t\t{\n\t\t\tthrow new Exception ( 'Data File is not set' );\n\t\t}\n\t\t\n\t\tif (!file_exists($this->getDataFile()))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn json_decode(file_get_contents($this->getDataFile()));\n\t\t}\n\t}", "protected function loadConfigurations(): array\n {\n $config = [];\n\n foreach ($this->getConfigurationFiles() as $key => $file) {\n $config[$key] = require $file;\n }\n\n return $config;\n }", "public static function load()\n {\n $configFile = self::getConfigFilePath();\n\n if (!is_file($configFile)) {\n self::save([]);\n }\n\n $config = require($configFile);\n\n if (!is_array($config))\n return array();\n\n return $config;\n }", "function jsonToArray($dir, $file){\n/** Nurodomas kelias iki jsons folderio */ /** __DIR__ - atvaizduoja visa kelia iki failo kuriame naudojamas '__DIR__' pvz:C:\\wamp\\www\\Mindaugas\\2018.09.12 */\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; \n $file = file_get_contents($path . $file , FILE_USE_INCLUDE_PATH); /** $file(kintamasis) Paims info(pagal nurodyta kelia su $path) is jsons folderio */\n $allInfo = json_decode($file, true); /** $allInfo(kintamasis) decodins .json failus i php masyvus*/\n\n return $allInfo; /** Grazinam visa info is .json failu kaip masyvą */\n}", "protected function readDataFile($filename)\n {\n $dataJson = file_get_contents(__DIR__ . '/../data/' . $filename);\n return json_decode($dataJson, true);\n }", "function load_cookie($file) {\n if (!is_file($file)) {\n return [];\n }\n return json_decode(file_get_contents($file), true);\n}", "function load_texts($file)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid language file found in language folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__LANGUAGE__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}", "private function readJson($filename)\n {\n if (!is_file($filename)) {\n throw new \\InvalidArgumentException('File not found: ' . $filename);\n }\n\n return json_decode(file_get_contents($filename), true);\n }", "private function loadArray()\n {\n return collect(config('health.resources'))->mapWithKeys(function ($value, $key) {\n return [studly_case($key) => $value];\n });\n }", "static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}", "private function loadArray(){\n if(file_exists($this->fullPath.$this->arrayFile)){\n include_once($this->fullPath.$this->arrayFile);\n if(!empty($arCfg)){\n $this->loadConfigs($arCfg);\n }\n }\n }", "public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}", "public function parse_opts() : array {\n\t\tself::$opts = (object) json_decode( @file_get_contents( __DIR__.\"/opts.json\" ) );\n\t\tself::$opts = [ self::$opts->paste, self::$opts->expire ];\n\t\treturn self::$opts;\n\t}", "public function load() {\n\t\t$this->copyFromTemplateIfNeeded();\n\t\trequire $this->filePath;\n\t\t$this->vars = $vars;\n\t}", "function readJson($fileName, $default = null) {\n if(!file_exists($fileName)) {\n return $default;\n }\n $json = file_get_contents($fileName);\n return json_decode($json, true); //(true)-return assoc array\n}", "function monk_json_load( $paths ) {\n\t\t\tunset($paths[0]);\n\t\t\t\n\t\t\t\n\t\t\t// append path\n\t\t\t$paths[] = get_stylesheet_directory() . '/acf-json';\n\t\t\t\n\t\t\t\n\t\t\t// return\n\t\t\treturn $paths;\n\t\t\t\n\t}", "function acf_get_local_json_files()\n{\n}", "public static function parse($filename)\n\t{\n\t\ttry {\n\t\t\t$loaded = parse_ini_file($filename, true);\n\t\t} catch (Exception $e) {\n\t\t\trequire_once 'Syx/Config/Exception.php';\n\t\t\tthrow new Syx_Config_Exception($e->getMessage());\n\t\t}\n\n\t\t$iniArray = array();\n\t\tforeach ($loaded as $section => $data) {\n\t\t\tif (!is_array($data)) {\n\t\t\t\t$iniArray = array_merge_recursive($iniArray, self::_processKey(array(), $section, $data));\n\t\t\t} else {\n\t\t\t\t$config = array();\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\t$config = self::_processKey($config, $key, $value);\n\t\t\t\t}\n\t\t\t\t$iniArray[$section] = $config;\n\t\t\t}\n\t\t}\n\n\t\treturn $iniArray;\n\t}", "function load_configs($file, $is_global = true)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid config file found in configs folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__CONFIG__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}", "function get_file($filename){\n\t\t$string=file_get_contents($filename);\n\t\t$json=json_decode($string, true);\n\t\treturn $json;\n\t}", "final public static function load_array($from) {\n if ( ! is_file($from)) {\n return FALSE;\n }\n\n\n ob_start();\n $out = include $from;\n ob_end_clean();\n\n if ( ! empty($lang)) {\n $out = $lang;\n }\n\n return (array) $out;\n }", "public static function loadJSONFile(string $filepath) {\n $basepath = dirname(__FILE__);\n\n $fullpath = $basepath . $filepath;\n $filedata = file_get_contents($fullpath);\n\n return json_decode($filedata, true);\n }", "public static function getConfigFile($file): array\n {\n $file = addslashes($file);\n if (is_file($file)) {\n $data = str_replace(\"\\\\\", \"\\\\\\\\\", file_get_contents($file));\n $json = json_decode($data, true);\n\n if (empty($json)) {\n throw new \\Exception(\"Config file has a json parse error, $file\");\n }\n\n } else {\n throw new \\Exception(\"Config file not found, $file\");\n }\n\n return $json;\n }", "public function load(string $path): array;", "function json_get_contents( $path ){\n $result = json_file_to_array( $path );\n \n if( is_array( $result ) ){\n \n return $result;\n \n } else {\n \n // Try something else\n \n }\n}", "protected function _load()\n {\n return array();\n }", "public static function setImportKeys( $keys ) {\n if( is_array($keys) ) {\n self::$keys = $keys;\n } elseif( file_exists($keys) ) {\n $file = file_get_contents( $keys );\n $keys = json_decode( $file, true );\n self::$keys = $keys;\n }\n return $keys;\n }", "protected function loadMockData($filename)\n {\n $data = file_get_contents($filename);\n $json = json_decode($data);\n return $json->events;\n }", "private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "protected function loadConfig() {\n $json = new JSON();\n $viewConfig = $json->readFile(__SITE_PATH . \"\\\\config\\\\view.json\");\n $this->meta_info = $viewConfig['meta'];\n $this->js_files = $viewConfig['javascript'];\n $this->css_files = $viewConfig['css'];\n }", "public function toArray(){\n\t\treturn parse_ini_file($this->path, true);\n\t}", "protected function loadFromFile($file)\n {\n if (is_file($file)) {\n return require $file;\n } else {\n return [];\n }\n }", "private static function toAssoc($filename)\n {\n self::$rootDir = dirname(__FILE__).'/json';\n\n return json_decode(file_get_contents(self::$rootDir.'/'.$filename) ,true);\n }", "public static function importJson() {\n\t if(self::isJson()) {\n\t foreach (self::getJson() as $name => $value) {\n\t $_REQUEST[$name] = $value;\n\t }\n\t }\n\t}", "private function loadData(): void\n {\n if (null !== $this->data) {\n // Data is already loaded.\n return;\n }\n\n $json = file_get_contents($this->filePath);\n $data = (new JsonEncoder())->decode($json, JsonEncoder::FORMAT);\n\n $this->data = [];\n\n foreach ($data['quotes'] as $quote) {\n $this->data[$this->slugifier->slugify($quote['author'])][] = $quote['quote'];\n }\n }", "public function read(): array\n {\n $state = is_readable($this->path)\n ? json_decode(file_get_contents($this->path), true)\n : [];\n\n return [\n 'masterProcessId' => $state['masterProcessId'] ?? null,\n 'state' => $state['state'] ?? [],\n ];\n }", "function getSettings()\n{\n $settings = appDir(\"settings.json\");\n $settingsArray = json_decode(file_get_contents($settings), true);\n return $settingsArray;\n}", "private function readRecipeData() {\n $data = file_get_contents(__DIR__ . '/../../../src/app/Recipe/data.json'); \n $arr_data = json_decode($data);\n\n return $arr_data; \n }", "public static function readFromFile()\n {\n $jsonResult = file_get_contents('../data/solutions.json');\n $solutions = json_decode($jsonResult);\n return $solutions;\n }", "public function loadManifest()\n {\n $path = $this->manifestPath.'/collections.json';\n\n if ($this->files->exists($path))\n {\n return json_decode($this->files->get($path), true);\n }\n }", "public function process_json() {\n $file_location = variable_get('sz_test_songs_api_location', NULL); // this is set @ admin/config/sz_test/settings/\n // Check to see if this data is already cached. If is it return it.\n $cache = cache_get('sz_external_data');\n if (isset($cache->data)) {\n return $cache->data;\n }\n\n $file = file_get_contents($file_location);\n\n if (!$file) {\n drupal_set_message(t('Unable to get remote file. ' . $file_location), 'error');\n\n watchdog('Steve Zipfel Test Module',\n 'Unable to get remote file: @file Check settings at: admin/config/sz_test/settings - date: @then',\n array(\n '@then' => date('c', time()),\n '@file' => $file,\n ),\n WATCHDOG_ERROR);\n\n return FALSE;\n }\n\n $data = array();\n $file_data = json_decode($file, true);\n /* covert all keys to be lowercase in case data changes case we don't get anything we don't expect.\n * Change the structure to use the band name as the key in order to make it easier to parse the\n * associated songs\n */\n if(!empty($file_data)) {\n foreach ($file_data as $value) {\n $data[$value['name']] = array_change_key_case($value['songs'], CASE_LOWER);\n }\n } else {\n return FALSE;\n }\n cache_set('sz_external_data', $data); // cache the results.\n return $data;\n }", "public function readFile() {\n $content = $this->getFileContents();\n return json_decode($content, 1);\n }", "private function loadJSON(array $params = null) : array\n {\n $aeJSON = \\MarkNotes\\JSON::getInstance($this->getFolderAppRoot());\n $aeFiles = \\MarkNotes\\Files::getInstance();\n\n $json = array();\n\n // 1. Get the settings.json.dist global file,\n // shipped with each releases of MarkNotes\n\n // From the application folder (special case when\n // using symbolic paths)\n $noteJSON = $this->getFolderAppRoot().'settings.json.dist';\n\n if ($aeFiles->exists($noteJSON)) {\n $json = $aeJSON->json_decode($noteJSON, true);\n }\n\n /*<!-- build:debug -->*/\n self::enableDebugMode($json['debug']??array(), $noteJSON);\n /*<!-- endbuild -->*/\n\n // From the root folder of the web application\n $noteJSON = $this->getFolderWebRoot().'settings.json.dist';\n if ($aeFiles->exists($noteJSON)) {\n $arr = $aeJSON->json_decode($noteJSON, true);\n\n /*<!-- build:debug -->*/\n self::enableDebugMode($arr['debug']??array(), $noteJSON);\n /*<!-- endbuild -->*/\n\n if (count($arr) > 0) {\n $json = array_replace_recursive($json, $arr);\n }\n }\n\n // 2. Get the settings.json user's file\n $noteJSON = $this->getFolderWebRoot().'settings.json';\n\n if ($aeFiles->exists($noteJSON)) {\n $arr = $aeJSON->json_decode($noteJSON, true);\n\n /*<!-- build:debug -->*/\n self::enableDebugMode($arr['debug']??array(), $noteJSON);\n /*<!-- endbuild -->*/\n\n if (count($arr) > 0) {\n $json = array_replace_recursive($json, $arr);\n }\n }\n\n // 3. The filename shouldn't mention the docs folders,\n // just the filename. So, $filename should not be\n // docs/markdown.md but only markdown.md because the folder\n // name will be added later on\n\n $noteFileName = $params['filename']??'';\n\n if ($noteFileName!=='') {\n $docRoot = $json['folder'].DS;\n\n $aeFunctions = \\MarkNotes\\Functions::getInstance();\n if ($aeFunctions->startsWith($noteFileName, $docRoot)) {\n $noteFileName = substr($noteFileName, strlen($docRoot));\n }\n\n // 3. Get the settings.json file that is, perhaps,\n // present in the folder of the note\n if (dirname($noteFileName)!=='.') {\n // Only when the file isn't directly under the root\n // First, be sure that the doc folder has been set\n\n $this->setFolderDocs($json['folder'] ?? DOC_FOLDER);\n $noteFolder = $this->getFolderDocs(true).str_replace('/', DS, dirname($noteFileName));\n\n // $noteFolder is perhaps\n // C:\\notes\\docs\\Folder\\Sub1\\Sub-Sub1\\Sub-Sub-Sub1\\\n // Process from C:\\notes\\docs\\ till that (so from\n // the top to the deepest)\n // and check if there is a settings.json file\n\n $folder = $this->getFolderWebRoot();\n $noteFolder = rtrim($noteFolder, DS);\n\n do {\n // $tree will be equal to\n // docs\\Folder\\Sub1\\Sub-Sub1\\Sub-Sub-Sub1\\\n $tree = str_replace($folder, '', $noteFolder);\n\n // Process docs, then Folder, then Sub1, ...\n $subFolder = strrev(basename(strrev($tree)));\n\n $folder = rtrim($folder, DS).DS.$subFolder;\n\n $noteJSON = rtrim($folder, DS).DS.'settings.json';\n\n if ($aeFiles->exists($noteJSON)) {\n /*<!-- build:debug -->*/\n $aeDebug = \\MarkNotes\\Debug::getInstance();\n $aeDebug->log($noteJSON, \"debug\");\n /*<!-- endbuild -->*/\n\n // Read the settings.json file and merge\n $arr = $aeJSON->json_decode($noteJSON, true);\n\n $json = array_replace_recursive($json, $arr);\n\n /*<!-- build:debug -->*/\n self::enableDebugMode($json['debug']??array(), $noteJSON);\n /*<!-- endbuild -->*/\n }\n } while ($folder !== $noteFolder);\n }\n\n // 4. Get the note_name.json file that is, perhaps,\n // present in the folder of the note.\n // note_name is the note filename with the .json\n // extension of .md\n\n // if $noteFileName is equal to\n // /marknotes/userguide.md\n\n // $dir will be \"marknotes/\"\n $dir = dirname($noteFileName);\n $dir = ($dir=='.'?'':$dir.DS);\n\n // $fname will be \"userguide.json\"\n $aeFiles = \\MarkNotes\\Files::getInstance();\n\n $fname = $aeFiles->removeExtension(basename($noteFileName)).'.json';\n\n // $noteJSON will be\n // c:/sites/notes/docs/marknotes/userguide.json f.i.\n $noteJSON = $this->getFolderDocs(true).$dir.$fname;\n\n if ($aeFiles->exists($noteJSON)) {\n $arr = $aeJSON->json_decode($noteJSON, true);\n $json = array_replace_recursive($json, $arr);\n\n /*<!-- build:debug -->*/\n self::enableDebugMode($json['debug']??array(), $noteJSON);\n /*<!-- endbuild -->*/\n }\n } // if (isset($params['filename']))\n\n return $json;\n }", "public function getConfig(string $fileName): array;", "protected function loadAllJoomlaFileIntoGiganticArray()\n\t{\n\t\treturn $this->loadFilesIntoArray(\n\t\t\tJFolder::files(JPATH_BASE, '.*\\.(php|xml)', true, true)\n\t\t);\n\t}", "public function loadFromFile()\n {\n $this->getLogger()->debug('Reading metadata from ' . $this->defFile);\n $fields = Yaml::parse($this->defFile);\n if (!is_array($fields)) {\n $fields = array();\n $this->getLogger()->warning('No definition found in metadata file.');\n }\n $res = array();\n foreach ($fields as $field_data) {\n $res[$field_data['id']] = $field_data;\n }\n ksort($res);\n return $res;\n }", "public function read($filename)\n {\n $file = fopen($filename, 'r');\n $json = fread($file, filesize($filename));\n fclose($file);\n $array = (array)json_decode($json);\n foreach ($array as $key => $value) {\n $this[$key] = $value;\n }\n unset($file);\n unset($json);\n unset($array);\n }", "protected function getFromStorage()\n {\n try {\n if ($data = $this->parseJson(file_get_contents($this->getStoragePath()))) {\n return $data;\n }\n } catch (ErrorException $e) {\n // File does not exist or could not be opened.\n }\n\n // Fall back to the list provided by the package.\n return $this->parseJson(file_get_contents(__DIR__.'/../domains.json'));\n }", "function getTestFromJson($file = \"ressources/views/all_test.json\"){\n //$file = $_SERVER['STORAGE_BASE'] . \"/json_files/all_test.json\";\n \t $jsondata = file_get_contents($file);\n \t // converts json data into array\n \t $arr_data = json_decode($jsondata);\n $alltest = array();\n foreach ($arr_data as $test) {\n # code...\n $alltest [$test->id_test] = [\n \"id_test\" => $test->id_test,\n \"id_theme\" => $test->id_theme,\n \"id_rubrique\" => $test->id_rubrique,\n \"statut\" => $test->statut,\n \"titre_test\" => stripslashes((string)$test->titre_test),\n \"unique_result\" => $test->unique_result,\n \"url_image_test\" => $test->url_image_test,\n \"codes_countries\" => $test->codes_countries\n ];\n }\n\n return $alltest;\n }", "public function parse(): array\n {\n $parsed = [];\n $iterator = $this->getIterator();\n\n foreach ($iterator as $fileInfo) {\n if ($fileInfo->isDot() || $fileInfo->isDir()) {\n continue;\n }\n\n [$pathname, $filename] = $this->getPathAndFileName($fileInfo);\n\n $parsed[$filename] = require $pathname;\n }\n\n return $parsed;\n }", "protected function parseConfigFileContent($json_content) {\n // decode json file as array\n $conf_entries = json_decode($json_content, true);\n // display error if decoding has error message\n if (json_last_error()) {\n $this->info(\"Importing Voyager configuration failed!\");\n $this->error(\n 'JSON Decoding error: ' . json_last_error_msg()\n );\n\n // return empty array\n return [];\n }\n\n // return parsed content\n return $conf_entries;\n }", "function json_read($opt){\n\n if(($raw_json = file_get_contents($opt->in_filename)) === false){\n err(\"Could not read file\",2);\n }\n if (($json_data = json_decode($raw_json,false)) === NULL) {\n err(\"While reading input data\",4);\n }\n if (is_object($json_data) && empty($json_data)) {\n err(\"Could not read file\",2);\n }\n return $json_data;\n }", "public static function load(?string $path = null, ?string $filename = null): ?array\n {\n if ($path === null) {\n $path = option('kirby-extended.env.path', kirby()->roots()->base());\n }\n\n if ($filename === null) {\n $filename = option('kirby-extended.env.filename', '.env');\n }\n\n static::$loaded = true;\n\n $repository = Env::getRepository();\n return Dotenv::create($repository, $path, $filename)->load();\n }", "protected function loadTranslations()\n {\n if (!isset($this->translations[$this->language])) {\n $file = $this->getTranslationFile($this->language);\n $content = file_get_contents($file);\n $translations = json_decode($content, true);\n if (!is_array($translations)) {\n throw new \\InvalidArgumentException(\"Could not parse JSON translation file: \" . $file);\n }\n\n $this->translations[$this->language] = $translations;\n }\n\n return $this->translations[$this->language];\n }", "public static function json($path)\n {\n $array = [];\n if(File::exists(base_path('vendor/ajifatur/faturhelper/json/'.$path))) {\n $array = json_decode(File::get(base_path('vendor/ajifatur/faturhelper/json/'.$path)), true);\n }\n return $array;\n }", "protected function loadFilesIntoArray($files)\n\t{\n\t\t$data = array();\n\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\t$data[$file] = file_get_contents($file);\n\t\t}\n\n\t\treturn $data;\n\t}", "private function loadMediaTypes()\n {\n return json_decode(file_get_contents(__DIR__ . '/mediatypes.json'), true);\n }", "function automap_load_object_ids() {\n global $automap_object_id_file, $automap_object_ids;\n if(!isset($automap_object_ids[0]))\n if(GlobalCore::getInstance()->checkExisting($automap_object_id_file, false))\n $automap_object_ids = json_decode(file_get_contents($automap_object_id_file), true);\n else\n $automap_object_ids = array();\n\n return $automap_object_ids;\n}", "function pegaCadastrosJson(){\n $arquivo = file_get_contents('json/cadastros.json');//arquivo Json que será pego\n $GLOBALS['cadastros'] = json_decode($arquivo);//salva no array global cadastros os cadastros\n $cadastrosLocal = $GLOBALS['cadastros'];\n }", "protected function loadJsonPaths(string $locale): array\n {\n return collect(array_merge($this->jsonPaths, [$this->path]))\n ->reduce(function ($output, $path) use ($locale) {\n if ($this->files->exists($full = $path.DIRECTORY_SEPARATOR.$locale.'.json')) {\n $decoded = json_decode($this->files->get($full), true);\n\n if (is_null($decoded) || json_last_error() !== JSON_ERROR_NONE) {\n throw new \\RuntimeException('Errors file ['.$full.'] contains an invalid JSON structure.');\n }\n\n $output = array_merge($output, $decoded);\n }\n\n return $output;\n }, []);\n }", "public function parser($file_name)\n {\n $str = file_get_contents(public_path('sample-files/' . $file_name));\n $data = json_decode($str, true);\n\n return $data;\n }", "private function readIngredientsData() {\n $data = file_get_contents(__DIR__ . '/../../../src/app/Ingredient/data.json'); \n $arr_data = json_decode($data);\n\n return $arr_data; \n }", "private static function importVariables(Request $request, $exp_id, $access_token)\n {\n $vars_to_send = [];\n foreach ($request->getParsedBody()['variables'] as $var) {\n $body = [\n 'name' => $var['name'],\n 'code' => $var['code'],\n ];\n $rsp = DataApi::post('experiments/'.$exp_id.'/variables', json_encode($body), $access_token);\n $vars_to_send[$var['name_in_file']] = $rsp['id'];\n }\n\n return $vars_to_send;\n\n }", "protected function initFileIncluded() {\n\t\treturn [\n\t\t\t'JQUERY' => env_checker()['JQUERY'],\n\t\t\t'POPPER' => env_checker()['POPPER'],\n\t\t\t'TWBS_CSS' => env_checker()['TWBS_CSS'],\n\t\t\t'TWBS_JS' => env_checker()['TWBS_JS'],\n\t\t\t'title' => 'Sistem Informasi'\n\t\t];\n\t}", "protected static function getSettingData()\r\n\t{\r\n\t\t$return = [];\r\n\t\tif(file_exists(__DIR__ . '/settings.json'))\r\n\t\t{\r\n\t\t\t$return = static::expandData(file_get_contents(__DIR__ . '/settings.json'));\r\n\t\t\tif(defined(\"C_REST_CLIENT_ID\") && !empty(C_REST_CLIENT_ID))\r\n\t\t\t{\r\n\t\t\t\t$return['C_REST_CLIENT_ID'] = C_REST_CLIENT_ID;\r\n\t\t\t}\r\n\t\t\tif(defined(\"C_REST_CLIENT_SECRET\") && !empty(C_REST_CLIENT_SECRET))\r\n\t\t\t{\r\n\t\t\t\t$return['C_REST_CLIENT_SECRET'] = C_REST_CLIENT_SECRET;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $return;\r\n\t}" ]
[ "0.6516568", "0.64967227", "0.6476257", "0.6385496", "0.6356042", "0.630046", "0.62997603", "0.62500805", "0.6228253", "0.62149954", "0.6162812", "0.61428607", "0.60578704", "0.6043957", "0.603992", "0.6039753", "0.60259295", "0.60059357", "0.60059357", "0.599676", "0.5956237", "0.5932394", "0.59133714", "0.5893032", "0.5889699", "0.58870775", "0.5886457", "0.5863043", "0.5821224", "0.5810396", "0.5770537", "0.5744971", "0.5723139", "0.57180905", "0.56910783", "0.5689767", "0.5673589", "0.5662586", "0.56573826", "0.563778", "0.56043273", "0.56018686", "0.5599627", "0.55797523", "0.5579374", "0.5561997", "0.555828", "0.55529046", "0.554384", "0.55406666", "0.55351335", "0.55309594", "0.55181503", "0.5514312", "0.5497863", "0.54949284", "0.5494656", "0.5488386", "0.54741716", "0.5465682", "0.54631954", "0.54593253", "0.5458716", "0.5453181", "0.5435973", "0.5435654", "0.5425382", "0.5414209", "0.5413801", "0.5409728", "0.5390871", "0.5374869", "0.53579646", "0.53510803", "0.5350433", "0.53494525", "0.53454036", "0.53439015", "0.5339036", "0.5315497", "0.5312558", "0.53024036", "0.5301844", "0.5296822", "0.52947104", "0.5290059", "0.5287291", "0.5284604", "0.5284102", "0.52836096", "0.52803075", "0.5275089", "0.5274357", "0.52722394", "0.5272205", "0.52716064", "0.5266171", "0.52635914", "0.526211", "0.5261648", "0.52470726" ]
0.0
-1
Return the coordinates for this Geometry object.
public function getCoordinates(): array { return $this->coordinates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCoordinates()\n {\n return $this->coordinates;\n }", "public function getCoords()\n\t{\n\t\treturn $this->coords;\n\t}", "public function getCoordinates();", "public function getGeometry()\n {\n return $this->geometry;\n }", "public function getCoordinates()\n\t{\n\t\tif (!empty($this->_coordinates)) {\n\t\t\treturn $this->_coordinates;\n\t\t} else {\n\t\t\t$errorMsg = 'getCoordinates called before coordinates values have been set';\n\t\t\tthrow new Exception($errorMsg);\n\t\t}\n\t}", "public function getCoord(){\n return $this->coord;\n }", "abstract public function coordinates();", "public function getCoordinate()\n {\n return $this->coordinate;\n }", "public function getCoordinate() {\n return $this->coordinate;\n }", "public function getCoordinate() {\n\n return $this->coordinate;\n }", "public function getXCoordinate()\n {\n return $this->getValueOfN() * cos(\\deg2rad($this->latitude)) * cos(deg2rad($this->longitude));\n }", "private function _getTicketsCoordinates()\n {\n /** @var Ticket[] $tickets */\n $tickets = $this->Tickets->find('all')\n ->select(['latitude', 'longitude'])\n ->where([\n 'latitude IS NOT' => null,\n 'longitude IS NOT' => null\n ])\n ->toArray();\n\n $coordinates = [];\n\n /** @var Ticket $ticket */\n foreach ($tickets as $id => $ticket) {\n $coordinates[] = [\n 'latitude' => $ticket->latitude,\n 'longitude' => $ticket->longitude,\n ];\n }\n\n return $coordinates;\n }", "protected function point()\n {\n if (null !== $this->dimension) {\n return $this->coordinates(2 + strlen($this->dimension));\n }\n\n $values = $this->coordinates(2);\n\n for ($i = 3; $i <= 4 && $this->lexer->isNextTokenAny(array(Lexer::T_FLOAT, Lexer::T_INTEGER)); $i++) {\n $values[] = $this->coordinate();\n }\n\n switch (count($values)) {\n case 2:\n $this->dimension = '';\n break;\n case 3:\n $this->dimension = 'Z';\n break;\n case 4:\n $this->dimension = 'ZM';\n break;\n }\n\n return $values;\n }", "public function getPositions()\n {\n return $this->positions;\n }", "function value() { return $this->geom; }", "public function x() {\n return $this->coords[0];\n }", "public function getPositions()\n {\n return $this->positions;\n }", "public function getXandY(): array {\n return [$this->x, $this->y];\n }", "public static function positions() {\n\t\t\treturn self::get(self::position_index());\n\t\t}", "public function getLatLng() {\n return $point = $this->getLat().','.$this->getLng();\n }", "public function jsonSerialize(): mixed\n {\n $position = [$this->getLng(), $this->getLat()];\n if ($this->is3d()) $position[] = $this->getAlt();\n return new \\GeoJson\\Geometry\\Point($position);\n }", "public function getSpGeometryArray() {\n if ($this->getSpGeometry()) {\n $json['type'] = $this->getSpGeometry()->getType();\n $json['coordinates'] = $this->getSpGeometry()->toArray();\n\n return $json;\n }\n\n return NULL;\n }", "public function getPoints() {\n return $this->points;\n }", "public function getGeoCoordinateX()\n {\n return $this->geo_coordinate_x;\n }", "function get_position( )\n\t{\n\t\treturn $this->latdeg.\";\".$this->londeg;\n\t}", "public function getPoints() {\n\t\treturn $this->points;\n\t}", "public function jsonSerialize()\n {\n return [\n 'x' => $this->x,\n 'y' => $this->y,\n ];\n }", "public function getPoints()\n {\n return $this->points;\n }", "public function getPoints()\n {\n return $this->points;\n }", "public function getPoints()\n {\n return $this->points;\n }", "public function getPoints()\n {\n return $this->points;\n }", "protected function geometry()\n {\n $type = $this->type();\n $this->type = $type;\n\n if ($this->lexer->isNextTokenAny(array(Lexer::T_Z, Lexer::T_M, Lexer::T_ZM))) {\n $this->match($this->lexer->lookahead['type']);\n\n $this->dimension = $this->lexer->value();\n }\n\n $this->match(Lexer::T_OPEN_PARENTHESIS);\n\n $value = $this->$type();\n\n $this->match(Lexer::T_CLOSE_PARENTHESIS);\n\n return array(\n 'type' => $type,\n 'value' => $value\n );\n }", "public function getPoints()\n\t{\n\t\treturn $this->points;\n\t}", "public function positions()\n {\n \treturn $this->positions;\n }", "public function getPosition()\n {\n return $this->getData(self::POSITION);\n }", "public function getLatLngTopLeft(): LatLng\n {\n return $this->latLngTopLeft;\n }", "public function getPosition()\n {\n return $this->get(self::POSITION);\n }", "public function toArray()\n {\n return array($this->x, $this->y);\n }", "public function points()\n {\n return $this->points;\n }", "public function getVertices ()\n\t{\n\t\treturn $this->vertices;\n\t}", "protected function coordinate()\n {\n $this->match(($this->lexer->isNextToken(Lexer::T_FLOAT) ? Lexer::T_FLOAT : Lexer::T_INTEGER));\n\n return $this->lexer->value();\n }", "private function readXY()\n {\n return [\n 'x' => $this->readDoubleL(Shapefile::FILE_SHP),\n 'y' => $this->readDoubleL(Shapefile::FILE_SHP),\n ];\n }", "public function getPositionUnits() {\r\n return $this->positionUnits;\r\n }", "public function getGeo() {\n return $this->get(self::GEO);\n }", "public function getPositionVector()\n {\n return new Point($this->b->getX() - $this->a->getX(), $this->b->getY() - $this->a->getY());\n }", "function getPoints() {\n return $this->points;\n }", "private function getXposition()\n {\n return $this->getPositionInstance()->getXposition();\n }", "public function getPosition() {\r\n return $this->posAxis;\r\n }", "function getCoords(){\n\tglobal $conn;\n\t$numargs = func_num_args();\n\t/* all foi */\n\tif ($numargs == 0){\n\t\t$result= pg_query($conn,\"SELECT ST_X(geom), ST_Y(geom) FROM feature_of_interest\");\n\t\treturn pg_fetch_all($result);\n\t}\n\t/* one foi */\n\telse\n\t{\n\t\t$foi_id = func_get_arg(0);\n\t\t$result = pg_query($conn,\"SELECT ST_X(geom), ST_Y(geom) \n\t\t\t\tFROM feature_of_interest \n\t\t\t\tWHERE feature_of_interest_id = '$foi_id' \");\n\t\treturn pg_fetch_all($result);\n\t}\n}", "public function getCoordAmigavelAttribute()\n {\n return \"(\".$this->x.\")|(\".$this->y.\")\";\n }", "public function getX()\n {\n return $this->x;\n }", "function getNodePositions() {\n if (!$this->prepared) {\n $this->__prepare($this->struct[0], true);\n $this->prepared = true;\n }\n \n $data = $this->__nodePosition($this->struct[0]['childs'][0], 0, 0, $this->struct[0]['childs'][0]['attrib']['NODEHEIGHT']);\n return $data;\n }", "public function getLatitude()\n {\n return $this->get('Latitude');\n }", "public function serialize() {\n return array( \n 'lat' => $this->getLat(),\n 'lon' => $this->getLong()\n );\n }", "public function provideValidCoordinates() {\n return [\n ['39.7392° N, 104.9903° W'],\n ['-39.7392° N, 104.9903° W'],\n ['39.7392° N, -104.9903° W'],\n ['-39.7392° N, -104.9903° W'],\n ];\n }", "public function getLocationX()\n {\n return $this->locationX;\n }", "public function getX() {\n\t\t\treturn $this->_x;\n\t\t}", "public function getVertices()\n {\n // return the amount\n return $this->vertices;\n }", "public function getPoints()\n {\n return $this->table->points;\n }", "public function getX() { return $this->_x; }", "public function getYCoordinate()\n {\n return $this->getValueOfN() * cos(\\deg2rad($this->latitude)) * sin(deg2rad($this->longitude));\n }", "public function getZCoordinate()\n {\n return $this->getValueOfN() * (1 - pow($this->getValueOfSquareEccentricity(), 2)) * sin(\\deg2rad($this->latitude));\n }", "public function getPos()\n {\n return $this->pos;\n }", "public static function get_regions_coordinates() {\r\n\r\n\t\treturn array(\r\n\t\t\tSimpleEmailService::AWS_US_EAST_1 => array(\r\n\t\t\t\t'lat' => 38.837392,\r\n\t\t\t\t'lon' => - 77.447313,\r\n\t\t\t),\r\n\t\t\tSimpleEmailService::AWS_US_WEST_2 => array(\r\n\t\t\t\t'lat' => 45.3573,\r\n\t\t\t\t'lon' => - 122.6068,\r\n\t\t\t),\r\n\t\t\tSimpleEmailService::AWS_EU_WEST1 => array(\r\n\t\t\t\t'lat' => 53.305494,\r\n\t\t\t\t'lon' => - 7.737649,\r\n\t\t\t),\r\n\t\t\tSimpleEmailService::AWS_EU_CENTRAL_1 => array(\r\n\t\t\t\t'lat' => 50.1109,\r\n\t\t\t\t'lon' => 8.6821,\r\n\t\t\t),\r\n\t\t\tSimpleEmailService::AWS_AP_SOUTH_1 => array(\r\n\t\t\t\t'lat' => 19.0760,\r\n\t\t\t\t'lon' => 72.8777,\r\n\t\t\t),\r\n\t\t\tSimpleEmailService::AWS_AP_SOUTHEAST_1 => array(\r\n\t\t\t\t'lat' => 33.8688,\r\n\t\t\t\t'lon' => 151.2093,\r\n\t\t\t),\r\n\t\t);\r\n\t}", "public function position()\n\t{\n\t\treturn $this->getField('position');\n\t}", "public function getX()\n\t{\n\t\treturn $this->x;\n\t}", "public function getX()\n\t{\n\t\treturn $this->x;\n\t}", "public function toXYZ()\n {\n return $this->toRGB()->toXYZ();\n }", "public function getGeo()\n {\n return $this->geo;\n }", "public function get_coords($city_only = true) {\r\n if (!$this->city) {\r\n return false;\r\n }\r\n if($this->lat && $this->lng) {\r\n return [\r\n \"lat\" => $this->lat,\r\n \"lng\" => $this->lng\r\n ];\r\n } else {\r\n return $this->gen_coords($city_only);\r\n }\r\n }", "public function getShape(): object {\n return (object) ['m' => $this->row, 'n' => $this->col];\n }", "public function getLatitude()\n {\n return $this->Latitude;\n }", "public function getPositions() {\n\t\tif (class_exists(\"PositionTenure\") && class_exists(\"Position\"))\n\t\t\treturn PositionQuery::create()\n\t\t\t\t\t\t\t\t\t\t\t->joinPositionTenure()\n\t\t\t\t\t\t\t\t\t\t\t->where('PositionTenure', 'PositionTenure.PositionCode = ?', 'Position.Code')\n\t\t\t\t\t\t\t\t\t\t\t->filterByObjecttype('User', Criteria::EQUAL)\n\t\t\t\t\t\t\t\t\t\t\t->filterByObjectid($this->getId(), Criteria::EQUAL)\n\t\t\t\t\t\t\t\t\t\t\t->find();\n\t\telse\n\t\t\treturn;\n\t}", "function getX() {\n return $this->x;\n }", "public function y() {\n return $this->coords[1];\n }", "public function getGeographyData()\n {\n return $this->geography_data;\n }", "public function getPosition() {\n return $this->getValue('position');\n }", "function getFloat()\r\n\t{\r\n\t\treturn array('lat' => $this->nLat, 'lon' => $this->nLon);\r\n\t}", "public function getPositions() {\n $positions = Positions::all();\n return $positions->toJson();\n }", "public function GetLatitude()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_search_center_lat;\n }", "public function getCoordinatesAttribute($coordinates)\n {\n return $coordinates != null ? unserialize($coordinates) : null;\n }", "function getCoordsForSQL4($strict = false) {\n\t\tif (is_null($this->x)) {\n\t\t\t$pos = $this->getPosition();\n\t\t\tif (!$strict) return \"`x`=$pos->x AND `y`=$pos->y AND `local_x`=$pos->lx AND `local_y`=$pos->ly\";\n\t\t\treturn \"`x`=NULL AND `y`=NULL\";\n\t\t}\n\t\treturn \"`x`=$this->x AND `y`=$this->y AND `local_x`=$this->localx AND `local_y`=$this->localy\";\n\t}", "public function getPos();", "public function getPos();", "public function getPosition() {\n\t\treturn $this->position;\n\t}", "public function getPosition() {\n\t\treturn $this->position;\n\t}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function position() {\n\t\treturn $this->position;\n\t}", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }" ]
[ "0.804975", "0.7879167", "0.75754046", "0.68552154", "0.6820198", "0.6710877", "0.6663362", "0.6645179", "0.6643373", "0.663915", "0.64297724", "0.6275405", "0.62349534", "0.6190971", "0.6146493", "0.6139675", "0.61173755", "0.6095514", "0.5962769", "0.5958409", "0.5941617", "0.5882179", "0.58719534", "0.5864235", "0.5862834", "0.5835358", "0.58290297", "0.58274883", "0.58274883", "0.58274883", "0.58274883", "0.58218795", "0.58120006", "0.58087826", "0.575474", "0.57359296", "0.568367", "0.5672337", "0.5670606", "0.5660543", "0.56554973", "0.5652529", "0.563162", "0.563156", "0.5567349", "0.5540683", "0.55358255", "0.553528", "0.55249375", "0.551985", "0.55105126", "0.55053157", "0.5504502", "0.5474587", "0.5461876", "0.5449609", "0.5440878", "0.54395944", "0.54291356", "0.5425529", "0.5424065", "0.5423473", "0.5419638", "0.53975844", "0.5394461", "0.5393706", "0.5393706", "0.5390512", "0.5386217", "0.53515995", "0.53509665", "0.53489923", "0.53137124", "0.5310161", "0.52936757", "0.52815735", "0.5274983", "0.5273585", "0.5261456", "0.52314186", "0.5221891", "0.52119696", "0.5204944", "0.5204944", "0.51971227", "0.51971227", "0.5195841", "0.5195841", "0.5195841", "0.5195841", "0.5195841", "0.51939833", "0.5192492", "0.5192492", "0.5192492", "0.5192492", "0.5192492", "0.5192492", "0.5192492", "0.5192492" ]
0.7389754
3
Check, whether the search filter params are exists.
public function isSearchFilterExists(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function HasSearchFilters(): bool\n {\n return false;\n }", "protected function _needsSearch( array $params ) {\n\t\t\t$Controller = $this->_Collection->getController();\n\t\t\treturn !empty( $Controller->request->data );\n\t\t}", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "function CheckSearchParms() {\r\n\r\n\t\t// Check basic search\r\n\t\tif ($this->BasicSearch->IssetSession())\r\n\t\t\treturn TRUE;\r\n\t\treturn FALSE;\r\n\t}", "public function filtersExist();", "public function isFiltered()\n {\n $globalFiltering = (isset($this->requestParams['search']) && '' !== $this->requestParams['search']['value']);\n $individualFiltering = false;\n foreach ($this->columns as $key => $column) {\n if (true === $this->isSearchableColumn($column)) {\n if (true === array_key_exists($key, $this->requestParams['columns'])) {\n $searchValue = $this->requestParams['columns'][$key]['search']['value'];\n\n if ('' !== $searchValue && 'null' !== $searchValue) {\n $individualFiltering = true;\n break;\n }\n }\n }\n }\n\n return $globalFiltering || $individualFiltering;\n }", "protected function hasFilter()\n {\n return ! empty($this->filter);\n }", "protected function _validateSearchParams($params)\n {\n if (empty($params) || !is_array($params) || empty($params['search'])) {\n $this->messageManager->addNotice(__('Please enter correct search options.'));\n return false;\n }\n\n switch ($params['search']) {\n case 'type':\n if (empty($params['firstname']) || strlen($params['firstname']) < 2) {\n $this->messageManager->addNotice(__('Please enter at least 2 letters of the first name.'));\n return false;\n }\n if (empty($params['lastname']) || strlen($params['lastname']) < 2) {\n $this->messageManager->addNotice(__('Please enter at least 2 letters of the last name.'));\n return false;\n }\n break;\n\n case 'email':\n if (empty($params['email']) || !\\Zend_Validate::is($params['email'], 'EmailAddress')) {\n $this->messageManager->addNotice(__('Please enter a valid email address.'));\n return false;\n }\n break;\n\n case 'id':\n if (empty($params['id'])) {\n $this->messageManager->addNotice(__('Please enter a gift registry ID.'));\n return false;\n }\n break;\n\n default:\n $this->messageManager->addNotice(__('Please enter correct search options.'));\n return false;\n }\n return true;\n }", "private function hasFilters()\n {\n return (count($this->filters) > 0);\n }", "public static function isFiltered(): bool\n {\n return !empty(self::$filters['act']) && self::$filters['act'] === 'search';\n }", "public function hasQueryVals($filter = null)\n {\n // This should only work for GET request\n if (!$this->isGet()) {\n return false;\n }\n\n if ($filter !== null && $this->hasQuery($filter)) {\n $data = $this->getQuery($filter);\n } else {\n $data = $this->getQuery();\n }\n\n foreach ($data as $key => $value) {\n // If it's positive-like, then stop returning true\n if ($value == '0' || $value) {\n return true;\n }\n }\n\n // By default\n return false;\n }", "public function hasExcludeSearchFilter()\n {\n return $this->exclude_search_filter !== null;\n }", "protected function isSearchParamHasHandler($param)\n {\n return in_array($param, $this->getHandlingSearchParams());\n }", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->nombre_contacto->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->name->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->lastname->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->_email->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->address->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->phone->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->cell->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->created_at->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_sucursal->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tipoinmueble->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_ciudad_inmueble->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_provincia_inmueble->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tipovehiculo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_ciudad_vehiculo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_provincia_vehiculo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tipomaquinaria->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_ciudad_maquinaria->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_provincia_maquinaria->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tipomercaderia->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->documento_mercaderia->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tipoespecial->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->email_contacto->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "public function hasFilters()\n {\n return count($this->getFilters()) > 0;\n }", "public function hasParams()\r\n\t{\r\n\t\treturn (is_array($this->pathParameters) && !empty($this->pathParameters));\r\n\t}", "public function has_filters()\n {\n }", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tanggal->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->auc_number->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->start_bid->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->close_bid->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->lot_number->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->chop->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->grade->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->estate->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->sack->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->netto->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->open_bid->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->last_bid->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->highest_bid->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->enter_bid->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->auction_status->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->gross->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->row_id->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "public function paramExists (string $key)\n {\n if (array_key_exists($key, $this->getParams()))\n return true;\n\n return false;\n }", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->name->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->_email->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->companyname->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->servicetime->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->country->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->phone->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->skype->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->website->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->linkedin->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->facebook->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->twitter->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->active_code->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->identification->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->link_expired->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isactive->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->pio->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->google->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->instagram->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->account_type->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->logo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->profilepic->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->mailref->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->deleted->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->deletefeedback->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->account_id->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->start_date->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->end_date->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->year_moth->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->registerdate->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->login_type->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->accountstatus->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->ispay->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->profilelink->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->source->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->agree->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->balance->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->job_title->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->projects->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->opportunities->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isconsaltant->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isagent->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isinvestor->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isbusinessman->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isprovider->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isproductowner->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->states->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->cities->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->offers->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "private function isSearch() {\n\t\tif (!is_null($this->search))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function hasFilters()\n {\n return !$this->getFilters()->isEmpty();\n }", "public function valid()\n {\n return key($this->_filters) !== null;\n }", "public function hasParameters()\n {\n return !empty($this->params);\n }", "public function hasFilter() {\n return $this->_has(1);\n }", "public function hasFilter(): bool;", "function isTheseParametersAvailable($params){\n\t\t\n\t\t//traversing through all the parameters \n\t\tforeach($params as $param){\n\t\t\t//if the paramter is not available\n\t\t\tif(!isset($_POST[$param])){\n\t\t\t\t//return false \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\t//return true if every param is available \n\t\treturn true; \n\t}", "function exist_param($fieldname){\n return array_key_exists($fieldname, $_REQUEST);\n }", "protected function _isSearchRequest(Model $model){\n $isSearchRequest = false;\n foreach($model->searchable as $param){\n if (in_array($param, $this->request_names)) {\n $isSearchRequest = true;\n }\n if (in_array($param.'_like', $this->request_names)) {\n $isSearchRequest = true;\n }\n }\n if(!empty($this->request['meta']))\n $isSearchRequest = true;\n return $isSearchRequest;\n }", "function CheckSearchParms() {\n\t\tif ($this->id->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->fecha_tamizaje->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_centro->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->apellidopaterno->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->apellidomaterno->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->nombre->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->ci->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->fecha_nacimiento->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->dias->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->semanas->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->meses->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->sexo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->discapacidad->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_tipodiscapacidad->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->resultado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->resultadotamizaje->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tapon->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tipo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->repetirprueba->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->observaciones->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_apoderado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_referencia->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "function CheckFilter()\n{\n\tglobal $FilterArr, $lAdmin;\n\tforeach ($FilterArr as $f) global $$f;\n\t\n\treturn count($lAdmin->arFilterErrors) == 0; //if some errors took place, return false;\n}", "private function validate_params( & $params )\n {\n if (!isset($params['search'])) {\n throw new \\Exception('search field isnt defined');\n } else {\n $this->search = $params['search'];\n }\n\n if (isset($params['default_display'])) {\n if (false === is_bool($params['default_display'])) {\n throw new \\Exception('default_display isnt from type boolean');\n }\n }\n\n if (isset($params['no_transform_attributes'])) {\n if (false === is_bool($params['no_transform_attributes'])) {\n throw new \\Exception('no_transform_attributes isnt from type boolean');\n }\n }\n\n\n }", "protected function checkFilterPasses()\n {\n $filter = $this->getFilter();\n if (! $filter) {\n return true;\n }\n\n if (is_callable($filter)) {\n return call_user_func($filter, $this->request);\n }\n if (! $this->request->is($this->filter)) {\n return false;\n }\n\n return true;\n }", "public function hasFilters() {\n\t\treturn count($this->filters) ? true : false;\n\t}", "function _checkParams($controller){\n \tif (empty($controller->params['named'])){\n \t\t$filter = array();\n \t}\n \t\n App::import('Sanitize');\n $sanit = new Sanitize();\n $controller->params['named'] = $sanit->clean($controller->params['named']);\n\n \n \tforeach($controller->params['named'] as $field => $value){\n \t\t\n \t\tif(!in_array($field, $this->paginatorParams)){\n\t\t\t\t$fields = explode('.',$field);\n\t\t\t\tif (sizeof($fields) == 1)\n\t \t\t\t$filter[$controller->modelClass][$field] = $value;\n\t \t\telse\n\t \t\t\t$filter[$fields[0]][$fields[1]] = $value; \t\t\t\n \t\t}\n \t}\n \t\t\n \tif (!empty($filter))\n \t\treturn $filter;\n \telse\n \t\treturn array(); \t\n }", "public static function searchQueriesExist(){\n \n if (empty($_GET['lookfor']))\n return false;\n \n if ($_GET['lookfor'] === 'qa')\n $arr = ['query', 'fromuser', 'touser', 'timeanswered'];\n else $arr = ['username', 'realname'];\n \n foreach($arr as $curr)\n if (isset($_GET[$curr]) and trim($_GET[$curr]))\n return true;\n \n return false;\n }", "public function hasEnableSearch()\n {\n return $this->enable_search !== null;\n }", "public function key_exists($key) {\n return in_array($key, array_keys($this->params));\n }", "private function _requestHasParam(string $key, array $request)\n {\n return array_key_exists($key, $request);\n }", "function is_filtered() {\n\t\tglobal $_chosen_attributes;\n\n\t\treturn ( sizeof( $_chosen_attributes ) > 0 || ( isset( $_GET['max_price'] ) && isset( $_GET['min_price'] ) ) ) ? true : false;\n\t}", "public function IsSearchResults(): bool\n {\n return $this->HasSearchFilter();\n }", "function CheckFilter() {\n\t\tglobal $deals_details;\n\n\t\t// Check dealer extended filter\n\t\tif ($this->NonTextFilterApplied($deals_details->dealer))\n\t\t\treturn TRUE;\n\n\t\t// Check date_start extended filter\n\t\tif ($this->NonTextFilterApplied($deals_details->date_start))\n\t\t\treturn TRUE;\n\n\t\t// Check status extended filter\n\t\tif ($this->NonTextFilterApplied($deals_details->status))\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "private function isFilteredByJoinTable()\n {\n $globalFiltering = (isset($this->requestParams['search']) && '' !== $this->requestParams['search']['value']);\n\n $individualFiltering = false;\n foreach ($this->columns as $key => $column) {\n if (true === $this->isSearchableColumn($column)) {\n if (true === array_key_exists($key, $this->requestParams['columns'])) {\n $searchEntity = explode('.', $this->searchColumns[$key])[0];\n if ($searchEntity !== $this->entityShortName) {\n $searchValue = $this->requestParams['columns'][$key]['search']['value'];\n\n if ('' !== $searchValue && 'null' !== $searchValue) {\n $individualFiltering = true;\n break;\n }\n }\n }\n }\n }\n\n return $globalFiltering || $individualFiltering;\n }", "public function hasParams(){\n return $this->_has(8);\n }", "public function is_filtered() {\n\n\t\t$is_filtered = false;\n\n\t\tif (\n\t\t\t$this->get_filtered_search_parts() !== false ||\n\t\t\t$this->get_filtered_dates() !== false ||\n\t\t\t$this->get_filtered_status() !== false\n\t\t) {\n\t\t\t$is_filtered = true;\n\t\t}\n\n\t\treturn $is_filtered;\n\t}", "public function hasParameters()\n {\n return isset($this->parameters) && count($this->parameters) > 0;\n }", "protected function _isSearch()\n {\n\n return in_array($this->_getFullActionName(), self::PRODUCTSEARCHITEM_HANDLES);\n }", "public function hasParameters()\n {\n return preg_match('/\\{/', $this->pattern) === 1;\n }", "public function hasParameters()\n {\n return isset($this->parameters);\n }", "public function hasParameters()\n {\n return count($this->parameters) > 0;\n }", "private static function exist_required_vars() : bool\n\t{\n\t\tif(count(self::$RouteURI['VARS']['QUERY']['REQUIRED']) > 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public static function searchable()\n {\n return ! empty(static::$search);\n }", "public function hasParameters(){\n return $this->_has(2);\n }", "function has_filters() {\n //default to true, since almost all reports will have some filtering options\n return true;\n }", "public function getIsSearchable()\n {\n return (!is_null($this->searchDialog) && $this->searchMemberExpression != '');\n }", "public function hasAdditionalFilter($dataProvider = null);", "public function has_param($key)\n {\n }", "private function verify_parameters(){\n if( empty( $_GET['email'] ) || empty( $_GET['pms_key'] ) || empty( $_GET['subscription_id'] ) )\n return false;\n\n return true;\n }", "public function hasWhere()\n\t\t{\n\t\t\treturn !is_null($this->where);\n\t\t}", "public function existFilter() {\n\t\t$query = $this->db->query( \"SHOW TABLES LIKE '\".DB_PREFIX.\"filter'\" );\n\t\t$exist_table_filter = ($query->num_rows > 0);\n\t\t$query = $this->db->query( \"SHOW TABLES LIKE '\".DB_PREFIX.\"filter_group'\" );\n\t\t$exist_table_filter_group = ($query->num_rows > 0);\n\t\t$query = $this->db->query( \"SHOW TABLES LIKE '\".DB_PREFIX.\"instrument_filter'\" );\n\t\t$exist_table_instrument_filter = ($query->num_rows > 0);\n\t\t$query = $this->db->query( \"SHOW TABLES LIKE '\".DB_PREFIX.\"category_filter'\" );\n\t\t$exist_table_category_filter = ($query->num_rows > 0);\n\n\t\tif (!$exist_table_filter) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$exist_table_filter_group) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$exist_table_instrument_filter) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$exist_table_category_filter) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private function _hasSearchValue($key, $value)\n {\n if (in_array($key, array_keys($this->searchParams))) {\n return ($this->searchParams[$key] == $value);\n } else if ($key == (\"orderBy\" || $this->getSearchPrefix() . \"orderBy\")) {\n return ($this->getOrderBy() == $value);\n } else if ($key == (\"pageSize\" || $this->getSearchPrefix() . \"pageSize\")) {\n return ($this->getPageSize() == $value);\n }\n return false;\n }", "public function has($key): bool\n {\n return array_key_exists($key, $this->params);\n }", "function cpay_CheckGet($params) {\r\n $result = true;\r\n if (!empty($params)) {\r\n foreach ($params as $eachparam) {\r\n if (isset($_GET[$eachparam])) {\r\n if (empty($_GET[$eachparam])) {\r\n $result = false;\r\n }\r\n } else {\r\n $result = false;\r\n }\r\n }\r\n }\r\n return ($result);\r\n}", "function filter( $params)\n\t{\n\t\treturn true;\n\t}", "function shouldredirecttofilter() {\n if (!$this->has_filters()) {\n return false;\n }\n\n if ($data = data_submitted()) {\n //a forum submit action happened, so render the report\n return false;\n }\n\n if (!empty($_GET)) {\n //determine how many URL parameters were passed in\n $array_get = (array)$_GET;\n $num_elements = count($array_get);\n\n if (isset($array_get['report'])) {\n //don't count the report shortname\n $num_elements--;\n }\n\n if ($num_elements > 0) {\n //a non-innocuous URL parameter was passed in,\n //so render the report\n return false;\n }\n }\n\n return true;\n }", "public function is_search()\n {\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function isEmpty()\n {\n return (!is_array($this->params) || count($this->params) == 0);\n }", "public function has_parameters() {\r\n\t\treturn (sizeof($this->parameters) > 0);\r\n\t}", "public function HasFilters(): bool\n {\n return $this->FilterLinks()->count() > 1;\n }", "function HasSessionFilterValues($parm) {\n\t\treturn ((@$_SESSION['sv_' . $parm] <> \"\" && @$_SESSION['sv_' . $parm] <> EWRPT_INIT_VALUE) ||\n\t\t\t(@$_SESSION['sv1_' . $parm] <> \"\" && @$_SESSION['sv1_' . $parm] <> EWRPT_INIT_VALUE) ||\n\t\t\t(@$_SESSION['sv2_' . $parm] <> \"\" && @$_SESSION['sv2_' . $parm] <> EWRPT_INIT_VALUE));\n\t}", "function HasSessionFilterValues($parm) {\n\t\treturn ((@$_SESSION['sv_' . $parm] <> \"\" && @$_SESSION['sv_' . $parm] <> EWRPT_INIT_VALUE) ||\n\t\t\t(@$_SESSION['sv1_' . $parm] <> \"\" && @$_SESSION['sv1_' . $parm] <> EWRPT_INIT_VALUE) ||\n\t\t\t(@$_SESSION['sv2_' . $parm] <> \"\" && @$_SESSION['sv2_' . $parm] <> EWRPT_INIT_VALUE));\n\t}", "public function hasFilteredQuery() {\n return $this->_has(3);\n }", "function get_exists($parameter){\n return key_exists($parameter, $_GET) && strlen(trim($_GET[$parameter])) > 0;\n}", "protected function parseFilterParams(): void\n {\n\n $this->parseFilters();\n\n $where = $this->uriParser->whereParameters();\n\n if (empty($where)) {\n return;\n }\n\n /** @scrutinizer ignore-call */\n $tableColumns = $this->getTableColumns();\n $table = $this->getModel()->getTable();\n\n foreach ($where as $whr) {\n if (strpos($whr['key'], '.') > 0) {\n $this->/** @scrutinizer ignore-call */setWhereHasClause($whr);\n continue;\n } elseif (! in_array($whr['key'], $tableColumns)) {\n continue;\n }\n $this->/** @scrutinizer ignore-call */setQueryBuilderWhereStatement($this->getBuilder(), $table . '.' . $whr['key'], $whr);\n }\n }", "public function parameterExists($key);", "function nvp_CheckGet($params) {\r\n $result=true;\r\n if (!empty ($params)) {\r\n foreach ($params as $eachparam) {\r\n if (isset($_GET[$eachparam])) {\r\n if (empty ($_GET[$eachparam])) {\r\n $result=false; \r\n }\r\n } else {\r\n $result=false;\r\n }\r\n }\r\n }\r\n return ($result);\r\n }", "public function hasParameter($param)\n {\n return array_key_exists($param, $this->params);\n }", "public function hasFilters($type = NULL)\n\t{\n\t\treturn count($type == NULL ? $this->getFilters() : $this->getFilters($type)) > 0;\n\t}", "private function defineFilters() {\n\n // init local filters variable as empty array\n $filters = [];\n\n // parse each filter to apply\n // and add the valid once to filters\n\n // filters by name\n if (isset($_GET['s'])) {\n\n $filters['name'] = $_GET['s'];\n\n }\n\n // filter by categories\n if (isset($_GET['c'])) {\n\n $categories = explode(\"_\", $_GET['c']);\n foreach ($categories as $key => $value) {\n if (is_numeric($value)) {\n $filters['categories'][] = $value;\n }\n }\n\n }\n\n // filter by areas\n if (isset($_GET['a'])) {\n\n $areas = explode(\"_\", $_GET['a']);\n foreach ($areas as $key => $value) {\n if (is_numeric($value)) {\n $filters['areas'][] = $value;\n }\n }\n\n }\n\n // Check if any filter has been set\n\n if (count($filters)>0) {\n\n $this->filters = $filters;\n return true;\n\n }\n\n\n return false;\n\n }", "private function canSearch(array $config = [])\n {\n \tif (isset($config['global_search']) && isset($config['global_search']['search_objects']) === true)\n \t{\n \t\tif (is_array($config['global_search']['search_objects']) && count($config['global_search']['search_objects'] == 0))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t}\n \treturn false;\n }", "function is_where( )\n {\n return !empty($this->_sWhere);\n }", "protected function filterParams()\n {\n }", "public function hasFilter(){\n return $this->_has(5);\n }", "public function has_url_get_parameters() {\r\n\t\treturn (strlen($this->url_get_parameters) > 3);\r\n\t}", "public function hasQuery()\n {\n if (func_num_args() == 0) {\n return !empty($this->query);\n }\n\n foreach (func_get_args() as $key) {\n if (!$this->hasParam($this->query, $key)) {\n return false;\n }\n }\n\n return true;\n }", "public function hasFilter(string $name): bool;", "public function hasParameters() {\n $count = count($this->getParameters());\n \n return ($count > 0) ? $count : FALSE;\n }", "private function hasFiltroReputacao()\n {\n return !empty($this->filtros['reputacao']);\n }", "private function allowsFilter()\n {\n return config('dingoquerymapper.allowFilters');\n }", "private function hasParam(array $array, $key = null)\n {\n if ($key !== null) {\n return array_key_exists($key, $array);\n } else {\n return !empty($array);\n }\n }", "public function searchQuery($searchParams=false){\t\t\n\t\t//$searchParams=array(array(\"lg_name\",'text'), array(\"lg_country\",'text'), array(\"lg_desc\",'text'));\n\t\t//var_dump($searchParams);\n\t\tif(count($searchParams) > 1){\n\t\t\tforeach ($searchParams as $key => $row) { \n\t \t$fieldName=$searchParams[$key][0];\n\t \t$fieldValue=$this->input->post(\"\".$fieldName.\"\");\n\t \t//var_dump($fieldValue);\n\t \tif(isset($fieldValue) && !empty($fieldValue)){\n\t \t\t$this->db->where(\"\".$fieldName.\" LIKE '%$fieldValue%'\");\n\t\t\t\t\t//$this->db->where(\"\".$fieldName.\"\", $fieldValue);\n\t\t\t\t}\n\t \t}\n\t\t}\n\t}", "public function isSetFilters()\n {\n if (empty($this->filters)) {\n return false;\n }\n\n return true;\n }", "public function search(Request $request)\n {\n // if($request->get(\"\"))\n }" ]
[ "0.72867036", "0.72540617", "0.72018206", "0.72018206", "0.72018206", "0.7113306", "0.70870703", "0.6865303", "0.6669598", "0.6602687", "0.6571594", "0.6496465", "0.6440687", "0.6436734", "0.6416974", "0.64160854", "0.63895404", "0.63716054", "0.6363339", "0.6355559", "0.63518554", "0.6331738", "0.6326688", "0.6308152", "0.62767553", "0.627134", "0.62244374", "0.6187375", "0.6164605", "0.6163436", "0.6163314", "0.6123262", "0.6119039", "0.61106986", "0.6092917", "0.60886264", "0.60639143", "0.60623026", "0.605704", "0.60074", "0.6004041", "0.6002559", "0.59948444", "0.59845054", "0.5979572", "0.5978863", "0.5948794", "0.59261", "0.59244007", "0.59219986", "0.5919821", "0.5902698", "0.5895083", "0.5894037", "0.58892864", "0.58868134", "0.5872044", "0.58534986", "0.5850957", "0.58456194", "0.58398294", "0.5830389", "0.5829303", "0.5829286", "0.580236", "0.5794199", "0.57854325", "0.57848305", "0.5781779", "0.5781779", "0.5781779", "0.5781779", "0.5781779", "0.57780915", "0.57774705", "0.577722", "0.57763535", "0.57763535", "0.57757103", "0.577151", "0.57595867", "0.5743533", "0.57421345", "0.5739522", "0.5725435", "0.5707022", "0.5694985", "0.5689942", "0.568838", "0.56804127", "0.56802714", "0.5664897", "0.56555015", "0.5645596", "0.56421363", "0.5617756", "0.5611764", "0.5601652", "0.5594366", "0.5579671" ]
0.7943272
0
Get the search user email.
public function getEmail(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserEmail () {\n\t\treturn ($this->userEmail);\n\t}", "public function getUserEmail() {\n\t\treturn ($this->userEmail);\n\t}", "public function getEmail() {\n return $this->get('email', 'user');\n }", "public function getUserEmail()\n {\n return $this->user_email;\n }", "public function getUserEmail()\n {\n return $this->user_email;\n }", "public function getUserEmail() {\n\t\treturn $this->userEmail;\n\t}", "public function getUserEmail() {\n\t\treturn $this->userEmail;\n\t}", "public function getEmail_user()\r\n {\r\n return $this->email_user;\r\n }", "public function get_email()\n\t{\n\t\tif (empty($this->user))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->user[static::_column('email')];\n\t}", "protected function getUserEmail()\r\n {\r\n // TODO: this should probably be offloaded\r\n if (isset($_SESSION['user']['useremail'])) {\r\n return $_SESSION['user']['useremail'];\r\n }\r\n }", "public function getEmail()\n {\n return isset($this->user['email']) ? $this->user['email'] : $this->user['id'].'@mail.com';\n }", "public function getEmail()\n {\n // Look for value only if not already set\n if (!isset($this->email)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $user = $us->getUser($this->id);\n $this->email = $user['email'];\n }\n return $this->email;\n }", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getuserEmail()\n {\n return $this->userEmail;\n }", "public function getEmailAddress()\n {\n return $this->_getVar('user_email');\n }", "public function getUserEmail()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_EMAIL);\n }", "public function getEmail() {\r\n\t\t\t$email = null;\r\n\t\t\tif( $user != null ) {\r\n\t\t\t\t$email = $user->getEmail();\r\n\t\t\t}\r\n\t\t\treturn $email;\r\n\t\t}", "public function getEmail()\n {\n return $this->getParam(self::EMAIL);\n }", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {\n return $this->getValue('email');\n }", "public function getEmail()\n {\n return $this->get(self::EMAIL);\n }", "public static function getEmail() {\n return $_SESSION['user']['email'];\n }", "public function getEmail()\n {\n return $this->__get(\"email\");\n }", "public function get_email() {\r\n return $this->email;\r\n }", "function getEmail() {\n\t\treturn $this->getData('email');\n\t}", "public function getEmail()\n {\n return $this->get('Email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getCurrentUserEmail() {\n $userId = $this->getLoggedInUserId();\n return $this->makeCall($id, $this->base . 'api/public/current_user_email/' . $userId, false);\n }", "public function getEmail()\r\n\t{\r\n\t\treturn $this['email'];\r\n\t}", "public function get_email() \n {\n return $this->email;\n }", "public function getEmail() {\n\t\treturn $this->response['email'] ?: NULL;\n\t}", "public function getEmail() {\n return($this->email);\n }", "public function getEmail()\n {\n \treturn $this->email;\n }", "public function getEmail()\r\n {\r\n return $this->email;\r\n }", "public function getEmail()\r\n {\r\n return $this->email;\r\n }", "public function getEmail()\r\n {\r\n return $this->email;\r\n }", "public function getEmail() {\n\t\treturn($this->email);\n\t}", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }" ]
[ "0.77050966", "0.7644742", "0.76334304", "0.76016134", "0.76016134", "0.7578235", "0.7578235", "0.7574965", "0.7553932", "0.7553454", "0.75452733", "0.7517258", "0.74983466", "0.74983466", "0.74983466", "0.74983466", "0.74983466", "0.74983466", "0.74983466", "0.74983466", "0.74983466", "0.74983466", "0.74983466", "0.74886006", "0.7461475", "0.74132043", "0.739284", "0.7357641", "0.7348491", "0.7348491", "0.7348491", "0.7348163", "0.7348163", "0.72987115", "0.72839093", "0.72610533", "0.7235616", "0.71992826", "0.7172547", "0.7150925", "0.71470034", "0.71470034", "0.71470034", "0.71470034", "0.71470034", "0.71468705", "0.70959175", "0.7094899", "0.70470595", "0.70451975", "0.70382124", "0.7012088", "0.701012", "0.701012", "0.70089024", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477", "0.70014477" ]
0.0
-1
Get the search user first name.
public function getFirstName(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserFirstName() :string {\n\t\treturn($this->userFirstName);\n\t}", "public function getuserFirstName()\n {\n return $this->userFirstName;\n }", "public function getUserFirstName () {\n\t\treturn ($this->userFirstName);\n\t}", "function getFirst_Name() {\n $user = $this->loadUser(Yii::app()->user->id);\n return $user->first_name;\n }", "public function getFirstNameOrUsername() {\n return $this->first_name ? : $this->username;\n }", "public function getFirstName()\n {\n return $this->first_name ?? $this->nickname ?? $this->name;\n }", "public function getFirstname() {\n return $this->getValue('firstname');\n }", "public function getFirstName() {\n\t\treturn $this->getCustomField( 'first_name' );\n\t}", "public function getFirstName()\n {\n return $this->get('FirstName');\n }", "public function getFirstUserName() {\n\t\treturn $this->firstUserName;\n\t}", "public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }", "function getFirst_Name(){\n $user = $this->loadUser(Yii::app()->user->id);\n\treturn $user->firstname;\n }", "public function getHonoreeFirstName();", "public function getUserProfileFirstName(): string {\n\t\treturn ($this->userProfileFirstName);\n\t}", "public function getUserFirstName($user_id)\n\t{\n\t\t$user = $this->find($user_id);\n\t\treturn $user->first_name;\n\t}", "public function getFirst_name()\r\n {\r\n return $this->first_name;\r\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstName()\n {\n if(isset($this->facebookData['first_name'])) {\n return $this->facebookData['first_name'];\n } else {\n return $this->getName();\n }\n }", "public function getFirstName() {\n\t\treturn $this->first_name;\n\t}", "public function getFirstname()\n\t\t{\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstname() {\n\t\treturn $this->firstname;\n\t}", "public function getFirstName()\n {\n return $this->getProfile() ? $this->getProfile()->getFirstName() : null;\n }", "function getFirstName() {\n\t\treturn $this->getInfo('FirstName');\n\t}", "public function getFirstname() {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstName()\n\t{\n\t\treturn $this->first_name;\n\t}", "public function getFirstNameAttribute(): string\n {\n if ($this->user !== null) {\n return $this->user->first_name;\n }\n return '';\n }", "public function getFirstname()\n\t{\n\t\treturn $this->firstname;\n\t}", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function diviroids_user_firstname($atts)\n {\n return DiviRoids_Security::get_current_user('user_firstname');\n }", "public function getFirstName() {\n return $this->f_name;\n }", "public function getFirstName()\n {\n //Parse the name and set it\n $namePieces = preg_split(\"/\\s/\", $this->name);\n return $namePieces[0];\n }", "public function getFirstName()\n {\n $name = explode(' ', $this->getName());\n return $name[0];\n }", "public function getFirstName();", "public function getFirstName()\n {\n return parent::getFirstName();\n }", "public function getFirstname()\n {\n return $this->firstName;\n }", "public function GetFirstName()\n {\n return $this->firstname;\n }", "public function getFirstname(): string\n {\n return $this->_firstname;\n }", "public function getFirstName(): ?string\n {\n return $this->getClaimSafe(SSODataClaimsInterface::CLAIM_USER_FIRST_NAME);\n }", "public function getFirstName(): ?string\n {\n return $this->getParam(self::FIRST_NAME);\n }", "public function name(): string {\n return (string) $this->user?->first_name;\n }", "public function getFirstName() {}", "public function getFirstName() {}", "public function getFirstName()\n {\n return $this->firstname;\n }", "public function getFirstName() {\n return $this->firstname;\n }", "public function getFirstName(){\n\t\t\treturn $this->firstname;\n\t\t}", "function getFirstName() {\n\t$COMMON = new Common($debug);\n\t$uID = $_SESSION[\"userID\"];\n\n\t$sql = \"select * from Proj2Advisors where `id` = '$uID'\";\n\t$rs = $COMMON->executeQuery($sql, $_SERVER[\"SCRIPT_NAME\"]);\n\t$row = mysql_fetch_row($rs);\n\n\t$name = $row[1];\n\treturn $name;\n}", "public function getFirstname() {}", "public function getSpotifyFirstName()\n {\n return $this->spotifyFirstName;\n }", "public function getFirstName() {\n return($this->firstName);\n }", "public function getFirstName() {\n return($this->firstName);\n }", "public function firstName()\n {\n $name = explode(' ', $this->name);\n\n return $name[0];\n }", "public function getFirstName(): string\n {\n return $this->firstName;\n }", "public function getFirstName(): string\n {\n return $this->firstName;\n }", "public function getFirstName(): string\n {\n return $this->firstName;\n }", "public function requestFirstname();", "public function getFirstName()\n {\n return $this->response['first_name'] ?: null;\n }", "public function get_first_name( $user_id ) {\n\t\t// sanitize the data\n\t\t$user_id = intval( sanitize_text_field( $user_id ));\n\n\t\t$nickname = get_user_meta( $user_id, \"nickname\", true ) ;\n\t\t$first_name = get_user_meta( $user_id, \"first_name\", true ) ;\n\n\t\t// if first name empty then use nickname\n\t\t$first_name = ( $first_name ) ? $first_name : $nickname ;\n\n\t\treturn $first_name;\n\t}", "public function getFullName()\n {\n if (! $this->_getVar('user_name')) {\n $name = ltrim($this->_getVar('user_first_name') . ' ') .\n ltrim($this->_getVar('user_surname_prefix') . ' ') .\n $this->_getVar('user_last_name');\n\n if (! $name) {\n // Use obfuscated login name\n $name = $this->getLoginName();\n $name = substr($name, 0, 3) . str_repeat('*', max(5, strlen($name) - 2));\n }\n\n $this->_setVar('user_name', $name);\n\n // \\MUtil_Echo::track($name);\n }\n\n return $this->_getVar('user_name');\n }", "public function getCustomerFirstname();", "public function getReqFirstName()\n\t{\n\t\treturn $this->req_first_name;\n\t}", "public function getFirstname(): string\n {\n return $this->export('Firstname');\n }", "public function getFirstName(){\n \n return $this->first_name;\n \n }", "public function firstName()\n\t{\n\t\t$namePieces = explode(' ', $this->entity->name);\n\n\t\tif (is_array($namePieces)) return trim($namePieces[0]);\n\t}", "public function getName()\n {\n $firstName = $this->getFieldValue(self::FIELD_FIRST_NAME);\n $lastName = $this->getFieldValue(self::FIELD_LAST_NAME);\n // User does not exist.\n if (!$firstName && !$lastName) {\n $name = 'Unknown&nbsp;User';\n } else {\n $name = \"{$firstName} {$lastName}\";\n }\n\n return $name;\n }", "public function getFirstName()\n {\n if (is_null($this->firstName)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_FIRST_NAME);\n if (is_null($data)) {\n return null;\n }\n $this->firstName = (string) $data;\n }\n\n return $this->firstName;\n }", "function getPersonFirstName()\n {\n return $this->getValueByFieldName('person_fname');\n }", "public function getFirstName()\n {\n if (isset($this->response['name']) && isset($this->response['name']['givenName']))\n {\n return $this->response['name']['givenName'];\n }\n\n return null;\n }", "public function getFirstName()\n {\n return $this->getValue('nb_icontact_prospect_first_name');\n }", "public function getAutoCompleteUserName() {\n// $retVal = $this->username;\n// if (!empty($this->last_name)) {\n// $retVal .= ' - ' . $this->last_name;\n// }\n// if (!empty($this->first_name)) {\n// $retVal .= ' ' . $this->first_name;\n// }\n $arr = array(\n $this->getFullName(),\n $this->getRoleName(),\n $this->getAgentName(),\n );\n $retVal = implode(' - ', $arr);\n\n return $retVal;\n }", "public function getFirstName() :string {\n\t\treturn (string)$this->first_name;\n\t}", "public function getUserName() {\n if (isset($this->rUser)) {\n return $this->rUser->getFullName();\n }\n return '';\n }", "public function getFirstName():string\n {\n return $this->firstName;\n }", "Public Function getUserName()\n\t{\n\t\treturn $this->firstName . ' ' . $this->lastName;\n\t}", "public function getUserFullName() {\n return $this->first_name . ' ' . $this->last_name;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }" ]
[ "0.80996877", "0.7986346", "0.7953561", "0.7926677", "0.7829339", "0.7761207", "0.7727795", "0.76379377", "0.7626539", "0.7623999", "0.7565764", "0.7560739", "0.7539212", "0.75332004", "0.7517599", "0.750793", "0.7498294", "0.74941516", "0.7492857", "0.7492652", "0.7484562", "0.7476117", "0.7475422", "0.7472232", "0.746783", "0.74627566", "0.7462462", "0.74570274", "0.74551404", "0.74551404", "0.74551404", "0.74551404", "0.74551404", "0.74551404", "0.74551404", "0.74551404", "0.74551404", "0.74521923", "0.74521923", "0.74521923", "0.74521923", "0.74521923", "0.745203", "0.7439032", "0.74279284", "0.7418077", "0.7415448", "0.7412251", "0.74102", "0.7409194", "0.74072564", "0.7388223", "0.7382122", "0.7377728", "0.7356628", "0.7356628", "0.7355622", "0.735204", "0.73422647", "0.7339795", "0.7337966", "0.7335661", "0.732672", "0.732672", "0.73255056", "0.7324991", "0.7324991", "0.7324991", "0.7324465", "0.730929", "0.73021257", "0.7284013", "0.72823256", "0.7281543", "0.7268085", "0.7261132", "0.7251282", "0.7251007", "0.7247612", "0.7241258", "0.72316015", "0.72280174", "0.72273314", "0.7225636", "0.72234607", "0.7213446", "0.7203255", "0.72020537", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553", "0.71804553" ]
0.0
-1
Get the search user last name.
public function getLastName(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserLastName () {\n\t\treturn ($this->userLastName);\n\t}", "public function getLastName() {\n\t\treturn $this->getCustomField( 'last_name' );\n\t}", "public function getuserLastName()\n {\n return $this->userLastName;\n }", "public function getUserLastName() :string {\n\t\treturn($this->userFirstName);\n\t}", "public function getLastname() {\n return $this->getValue('lastname');\n }", "public function getLastName() {\n\t\treturn $this->last_name;\n\t}", "public function getLastName(){\n \n return $this->last_name;\n \n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName() {\n\n return $this->last_name;\n\n }", "public function getLastName()\n\t{\n\t\treturn $this->last_name;\n\t}", "public function getLastName()\n {\n return $this->get('LastName');\n }", "public function getUserProfileLastName(): string {\n\t\treturn ($this->userProfileLastName);\n\t}", "public function getLastName();", "public function getLastUserName() {\n\t\treturn $this->lastUserName;\n\t}", "public function getLastName()\n {\n return $this->response['last_name'] ?: null;\n }", "public function getLastNameAttribute(): string\n {\n if ($this->user !== null) {\n return $this->user->last_name;\n }\n return '';\n }", "public function getLastname() {}", "public function getLastName()\n {\n return $this->getProfile() ? $this->getProfile()->getLastName() : null;\n }", "public function getLastName() {}", "public function getLastName() {}", "public function getLastName() {\n return($this->lastName);\n }", "public function getLastName() {\n return($this->lastName);\n }", "public function getLastname() {\n\t\treturn $this->lastname;\n\t}", "public function getLastname(): string;", "public function getLastname() {\n return $this->lastname;\n }", "function getRHUL_LastName() {\n return getRHUL_LDAP_FieldValue(\"last_name\");\n}", "public function getHonoreeLastName();", "public function getUserLastName($user_id)\n\t{\n\t\t$user = $this->find($user_id);\n\t\treturn $user->last_name;\n\t}", "public function getLastName() {\n return $this->lastName;\n }", "public function getLastname()\r\n\t{\r\n\t\treturn $this->lastname;\r\n\t}", "public function getLastname(): string\n {\n return $this->_lastname;\n }", "public function getLastName(): string\n {\n return $this->lastName;\n }", "public function getLastName(): string\n {\n return $this->lastName;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function get_last_name ( $user_id ) {\n\t\t// sanitize the data\n\t\t$user_id = intval( sanitize_text_field( $user_id ));\n\n\t\t$nickname = get_user_meta( $user_id, \"nickname\", true ) ;\n\t\t$last_name = get_user_meta( $user_id, \"last_name\", true ) ;\n\n\t\t// if last name empty thne use nickname\n\t\t$last_name = ( $last_name ) ? $last_name : $nickname ;\n\n\t\treturn $last_name;\n\t}", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastname()\r\n {\r\n return $this->lastname;\r\n }", "public function getLastName() {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastName(){\n\t\t\treturn $this->lastname;\n\t\t}", "public function getLastName()\n {\n return App_Formatting::emptyToNull($this->lastName->getValue());\n }", "public function getLastName() { return $this->lastName; }", "public function getLastName()\n {\n return $this->last_name ?? $this->surname ?? $this->lastName;\n\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastName()\n {\n $name = $this->getAttribute('name');\n if (isset($name)) {\n return $name['lastName'];\n }\n return null;\n }", "public function getLastName()\n {\n if (is_null($this->lastName)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_LAST_NAME);\n if (is_null($data)) {\n return null;\n }\n $this->lastName = (string) $data;\n }\n\n return $this->lastName;\n }", "public function getLastName() :string {\n\t\treturn (string)$this->last_name;\n\t}", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName():string\n {\n return $this->lastName;\n }", "public function getSpotifyLastName()\n {\n return $this->spotifyLastName;\n }", "public function getLastName()\n {\n $name = explode(' ', $this->getName());\n return $name[1];\n }", "public function getLastname()\n {\n return $this->lastname;\n\n }", "public function getLastName(): ?string\n {\n return $this->getClaimSafe(SSODataClaimsInterface::CLAIM_USER_LAST_NAME);\n }", "public function getUser_lname()\n {\n return $this->user_lname;\n }", "public function getCustomerLastname();", "public function getLastName()\n {\n return $this->getValue('nb_icontact_prospect_last_name');\n }", "public function GetLastName()\n {\n return $this->lastname;\n }", "public function diviroids_user_lastname($atts)\n {\n return DiviRoids_Security::get_current_user('user_lastname');\n }", "public function getLastName()\n {\n return parent::getLastName();\n }", "public function getPayerLastName() {\n\t\treturn $this->_getField(self::$PAYER_LAST_NAME);\n\t}", "public function getReqLastName()\n\t{\n\t\treturn $this->req_last_name;\n\t}", "public function getName()\n {\n $result = null;\n if (isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'] . ' ' . $this->userInfo['last_name'];\n } elseif (isset($this->userInfo['first_name']) && !isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'];\n } elseif (!isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['last_name'];\n }\n return $result;\n }", "function getLastName()\r\n\t{\r\n\t\treturn $this->LastName;\r\n\t}", "public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }", "public function getAutoCompleteUserName() {\n// $retVal = $this->username;\n// if (!empty($this->last_name)) {\n// $retVal .= ' - ' . $this->last_name;\n// }\n// if (!empty($this->first_name)) {\n// $retVal .= ' ' . $this->first_name;\n// }\n $arr = array(\n $this->getFullName(),\n $this->getRoleName(),\n $this->getAgentName(),\n );\n $retVal = implode(' - ', $arr);\n\n return $retVal;\n }", "public function getFullName()\n {\n if (! $this->_getVar('user_name')) {\n $name = ltrim($this->_getVar('user_first_name') . ' ') .\n ltrim($this->_getVar('user_surname_prefix') . ' ') .\n $this->_getVar('user_last_name');\n\n if (! $name) {\n // Use obfuscated login name\n $name = $this->getLoginName();\n $name = substr($name, 0, 3) . str_repeat('*', max(5, strlen($name) - 2));\n }\n\n $this->_setVar('user_name', $name);\n\n // \\MUtil_Echo::track($name);\n }\n\n return $this->_getVar('user_name');\n }", "function getLastname()\n {\n return $this->lastname;\n }", "public function getTitleLastName() {\r\n $titleLastName = $this->getTitleString() .' '. $this->lastName;\r\n return $titleLastName;\r\n }", "public function getLastName(): ?string\n {\n return $this->getParam(self::LAST_NAME);\n }", "function getPersonLastName()\n {\n return $this->getValueByFieldName('person_lname');\n }", "public function getLastName()\n {\n return $this->getXml()->getElementsByTagName('LastName')->item(0)->nodeValue;\n }", "public function getLastName()\n {\n return $this->getBillingLastName();\n }", "public function getLastName()\n {\n //Parse the name and set it\n $namePieces = preg_split(\"/\\s/\", $this->name);\n if (count($namePieces) == 2) {\n return $namePieces[1];\n } elseif (count($namePieces) == 3) {\n return $namePieces[2];\n }\n return null;\n }", "public function getUserFullName() {\n return $this->first_name . ' ' . $this->last_name;\n }" ]
[ "0.80527645", "0.80292004", "0.791208", "0.7885438", "0.78004634", "0.77888864", "0.77749574", "0.77388465", "0.77388465", "0.77388465", "0.77388465", "0.77388465", "0.77152294", "0.7704023", "0.7695563", "0.7667129", "0.7664892", "0.76310474", "0.7623841", "0.7607124", "0.7590748", "0.7552295", "0.7530243", "0.7530243", "0.75169677", "0.75169677", "0.74860525", "0.74718", "0.7465423", "0.7459989", "0.7448923", "0.741814", "0.74132186", "0.74129546", "0.7409355", "0.7406629", "0.7406629", "0.73980296", "0.73980296", "0.73980296", "0.73980296", "0.73980296", "0.73980296", "0.73980296", "0.73980296", "0.7393313", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73830044", "0.73812103", "0.7377374", "0.7375621", "0.73732656", "0.7363091", "0.7359858", "0.73478407", "0.73448086", "0.73425543", "0.73372424", "0.7335649", "0.7331708", "0.73294127", "0.732287", "0.7322832", "0.7320985", "0.7312482", "0.7286955", "0.72636586", "0.7238856", "0.72207165", "0.7213255", "0.7209398", "0.7207377", "0.71928376", "0.71725553", "0.71521133", "0.71444136", "0.71274847", "0.7126068", "0.70592415", "0.70554173", "0.7050346", "0.704921", "0.7043237", "0.7038112", "0.702695", "0.702087" ]
0.7372019
66
Check, whether the query params "first name" and "last name" are identical.
public function areNamesParamsIdentical(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function matchQueryString(Request $first, Request $second)\n {\n if (null !== $first->getQuery(true) && $first->getQuery(true) != $second->getQuery(true)) {\n return false;\n }\n return true;\n }", "function urlHasDuplicateParameters($queryString){\n //Segment the query string by breaking up each parameter into key value pairs delimited by '&'\n\t\t$parts = explode('&', $queryString);\n\t\t$parameters = array();\n\t\t\n //Loop through each parameter and push into an array, checking if its already been added\n\t\tforeach($parts as $part){\n\t\t\t$key = substr($part, 0, strpos($part, '='));\n\t\t\tif (in_array($key, $parameters)){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tarray_push($parameters, $key);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function ValidRequiredQueryString($name) {\n return isset($_GET[$name]) && $_GET[$name] != \"\";\n}", "private function verify_parameters(){\n if( empty( $_GET['email'] ) || empty( $_GET['pms_key'] ) || empty( $_GET['subscription_id'] ) )\n return false;\n\n return true;\n }", "private function verifyParams( Array $params ) {\r\n $slot_count = substr_count( $this -> query_string, '?' );\r\n $param_count = count( $params );\r\n return ($slot_count == $param_count) ? true : false;\r\n }", "private function query_arg_check() {\n\t\t//Set some variables\n\t\t$query_arg_count = 0;\n\t\t$arg_count = 0;\n\t\t$arg_match = False;\t\n\n\t\t//Check number of arguments in the query\n\t\tif ($this->QUERY) {\n\t\t\t$query_arg_count = substr_count($this->QUERY, '?');\n\t\t}\n\t\t\n\t\t//Check number of arguments passes to the class\n\t\tif ($this->QUERY_ARGS) {\n\t\t\tforeach($this->QUERY_ARGS as $arg_count_value) {\n\t\t\t\tif ($arg_count_value) {\n\t\t\t\t\t$arg_count += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Match up argument counts\n\t\tif ( $query_arg_count == $arg_count ) {\n\t\t\t$arg_match = True;\n\t\t} else {\n\t\t\t$arg_match = False;\n\t\t}\n\t\treturn $arg_match;\n\t}", "public static function matchPostFields(Request $first, Request $second)\n {\n if (null !== $first->getPostFields()->toArray()\n && $first->getPostFields()->toArray() != $second->getPostFields()->toArray() ) {\n return false;\n }\n\n return true;\n }", "function checkPOST() : bool\n {\n if (!(isset($_POST['firstName']) && isset($_POST['secondName'])))\n {\n return false; // not set\n }\n if (trim($_POST['firstName']) == '' && trim($_POST['secondName']) == '')\n {\n return false; // empty\n }\n return true;\n }", "public function checkValidName($firstname,$lastname) {\n\t\t$existing = $this->checkUserExists($firstname,$lastname);\n\t\tif($existing == TRUE) return FALSE; // This OpenSim User is already existing\n\t\telse return $this->allowedName($firstname,$lastname);\n\t}", "public function validateName()\n {\n if (strlen(trim($_POST[$this->key])) < $this->minLength) {\n self::$errors[] = $this->convertUnderscores() . \" field requires at least $this->minLength characters\";\n }\n\n //check for profanity.\n if ($this->noProfanity) {\n $this->checkProfanity();\n }\n\n //lastly, check for valid first name patterns.\n\n if (!preg_match(\"/^[a-zA-Z]+[ -\\/\\\\'\\\"]*[a-zA-Z]+[ \\\"]{0,2}[a-zA-Z]*$/\", trim($_POST[$this->key]))) {\n self::$errors[] = \"Not a valid \" . $this->convertUnderscores();\n }\n\n return self::$errors ? false : true;\n }", "public function validateFirstName()\n {\n $first_name = filter_var(\n $this->_sanitized_data['first_name'],\n FILTER_SANITIZE_STRING,\n array('flags' => FILTER_FLAG_STRIP_HIGH)\n );\n $validation_response = true;\n\n if ($first_name == '') {\n $this->_addErrorMessage('First name cannot be blank');\n $validation_response = false;\n }\n\n if (strlen($first_name) > 255) {\n $this->_addErrorMessage('First name cannot exceed 255 characters');\n $validation_response = false;\n }\n\n if ($first_name !== $this->_data['first_name']) {\n $this->_addErrorMessage('First name contains unwanted characters');\n $validation_response = false;\n }\n\n return $validation_response;\n }", "public function is_duplicate() {\n\n\t\t$post = $this->input->post();\n\n\t\t// Filter by name.\n\t\t$this->db->where( 'name', trim( $post['name'] ) );\n\n\t\t// Filter by church.\n\t\t$this->db->where( 'church', (int) $post['church'] );\n\n\t\t// Filter by age.\n\t\tif ( ! empty( $post['age'] ) ) {\n\t\t\t$this->db->where( 'age', (int) $post['age'] );\n\t\t}\n\n\t\t// Filter by gender.\n\t\tif ( ! empty( $post['gender'] ) ) {\n\t\t\t$this->db->where( 'gender', $post['gender'] );\n\t\t}\n\n\t\t$query = $this->db->get( 'registration' );\n\n\t\treturn $query->num_rows() > 0;\n\n\t}", "public static function searchQueriesExist(){\n \n if (empty($_GET['lookfor']))\n return false;\n \n if ($_GET['lookfor'] === 'qa')\n $arr = ['query', 'fromuser', 'touser', 'timeanswered'];\n else $arr = ['username', 'realname'];\n \n foreach($arr as $curr)\n if (isset($_GET[$curr]) and trim($_GET[$curr]))\n return true;\n \n return false;\n }", "function _isMatch()\n {\n if (isset($_POST['login'])) {\n if ($this->name_post == $this->name_db && password_verify($this->pass_post, $this->pass_db)) {\n return true;\n }\n $this->mismatch = true;\n }\n return false;\n }", "private function requestIsValid() : bool\n {\n $queryParams = $this->request->getQueryParams();\n\n return array_has($queryParams,self::OPENID_ASSOC_HANDLE)\n && array_has($queryParams,self::OPENID_SIGNED)\n && array_has($queryParams,self::OPENID_SIG);\n }", "public function chkEditUsernameDuplicate() {\r\n\r\n if ($this->input->post('user_name') == $this->input->post('user_name_old')) {\r\n echo 'true';\r\n } else {\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_name');\r\n $condition_to_pass = array(\"user_email\" => $this->input->post('user_name'));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'false';\r\n } else {\r\n echo 'true';\r\n }\r\n }\r\n }", "function compareAlphabeticalByLastFirstName($a,$b) {\n $a[\"birthname\"] =\"\"; $b[\"birthname\"]=\"\";\n return compareAlphabetical($a, $b);\n}", "protected static function GET_checkName(array $params) {\n\t\tif($name = trim(array_shift($params))) {\n\t\t\t$id = isset($_GET['id']) && is_numeric($_GET['id']) ? +$_GET['id'] : 0;\n\t\t\t$db = self::RequireLatestDatabase();\n\t\t\tif($chk = $db->prepare('select id from recipe where name=? and not id=? limit 1'))\n\t\t\t\tif($chk->bind_param('si', $name, $id))\n\t\t\t\t\tif($chk->execute())\n\t\t\t\t\t\tif($chk->bind_result($dupe))\n\t\t\t\t\t\t\tif($chk->fetch())\n\t\t\t\t\t\t\t\tself::Success(['status' => 'invalid', 'message' => \"Already in use by recipe $dupe\"]);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tself::Success(['status' => 'valid', 'message' => 'Available']);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tself::DatabaseError('Error binding result from duplicate name check', $chk);\n\t\t\t\t\telse\n\t\t\t\t\t\tself::DatabaseError('Error checking for duplicate name', $chk);\n\t\t\t\telse\n\t\t\t\t\tself::DatabaseError('Error binding parameters to check for duplicate name', $chk);\n\t\t\telse\n\t\t\t\tself::DatabaseError('Error preparing to check for duplicate name', $db);\n\t\t}\n\t\telse\n\t\t\tself::Success(['status' => 'invalid', 'message' => 'Cannot be blank']);\n\t}", "private static function check_query_uri(&$request_uri, &$route_uri) : bool\n\t{\n\t\t$request = explode('&', $request_uri);\n\t\t$route = self::$RouteURI['VARS']['QUERY'];\n\n\t\tforeach($request as $key => $value)\n\t\t{\n\t\t\t$request[$key] = preg_replace('/=.*$/', '', $value);\n\t\t}\n\n\t\t$_count = 0;\n\t\tforeach($request as $key => $value)\n\t\t{\n\t\t\tforeach($route['REQUIRED'] as $v)\n\t\t\t{\n\t\t\t\tif($value === $v)\n\t\t\t\t{\n\t\t\t\t\tunset($request[$key]);\n\t\t\t\t\t$_count++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($_count !== count($route['REQUIRED']))\n\t\t\treturn false;\n\n\t\tforeach($request as $key => $value)\n\t\t{\n\t\t\tif(array_search($value, $route['OPTIONAL']) === false)\n\t\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "public function allowedName($firstname,$lastname) {\n\t\t$jopensimsettings = $this->getSettings();\n\n\t\tif(\t\t\tis_array($jopensimsettings) &&\n\t\t\t\t\tarray_key_exists(\"lastnametype\",$jopensimsettings) &&\n\t\t\t\t\tarray_key_exists(\"lastnames\",$jopensimsettings) &&\n\t\t\t\t\t$jopensimsettings['lastnametype'] != 0 &&\n\t\t\t\t\tis_array($jopensimsettings['lastnames']) && \n\t\t\t\t\tcount($jopensimsettings['lastnames']) > 0) {\n\t\t\tif($jopensimsettings['lastnametype'] == \"-1\" && in_array($lastname,$jopensimsettings['lastnames'])) {\n\t\t\t\t$message = JText::_(PLG_JOPENSIMREGISTER_ERROR_MESSAGE_DENIED);\n\t\t\t\t$this->returnError($message);\n\t\t\t\t$retval = FALSE;\n\t\t\t} elseif ($jopensimsettings['lastnametype'] == \"1\" && !in_array($lastname,$jopensimsettings['lastnames'])) {\n\t\t\t\t$message = JText::_(PLG_JOPENSIMREGISTER_ERROR_MESSAGE_ALLOWED);\n\t\t\t\t$this->returnError($message);\n\t\t\t\t$retval = FALSE;\n\t\t\t} else {\n\t\t\t\t$retval = TRUE;\n\t\t\t}\n\t\t} else {\n\t\t\t$retval = TRUE;\n\t\t}\n\t\treturn $retval;\n\t}", "public function validateLastName()\n {\n $last_name = $this->_sanitized_data['last_name'];\n\n if (empty($last_name)) {\n $this->_addErrorMessage(\"Last name was blank or contained unwanted characters\");\n return false;\n }\n\n if (strlen($last_name) > 255) {\n $this->_addErrorMessage(\"Last name cannot be longer than 255 characters\");\n return false;\n }\n\n if ($last_name !== $this->_data['last_name']) {\n $this->_addErrorMessage(\"Last name data did not match after sanitizing\");\n return false;\n }\n\n return true;\n }", "public function trustQueryParams() {\n\t\treturn !in_array($this->code, [self::AUTHORIZATION_APPROVAL_REQUEST_INVALID_HASH, self::AUTHORIZATION_APPROVAL_REQUEST_MISSING_HASH]);\n\t}", "function CheckSearchParms() {\r\n\r\n\t\t// Check basic search\r\n\t\tif ($this->BasicSearch->IssetSession())\r\n\t\t\treturn TRUE;\r\n\t\treturn FALSE;\r\n\t}", "function ag_rcp_require_first_and_last_names( $posted ) {\n\tif ( is_user_logged_in() ) {\n\t\treturn;\n\t}\n\t\n\tif ( empty( $posted['rcp_user_first'] ) ) {\n\t\trcp_errors()->add( 'first_name_required', __( 'Please enter your first name', 'christatimmer' ), 'register' );\n\t}\n\n\tif ( empty( $posted['rcp_user_last'] ) ) {\n\t\trcp_errors()->add( 'last_name_required', __( 'Please enter your last name', 'christatimmer' ), 'register' );\n\t}\n}", "public function requestFirstname();", "private function hasParams($request)\n {\n preg_match_all($this->regex, $this->uri, $uri_);\n\n if (count($uri_[0]) !== 0) {\n return $this->setParams($request);\n }\n return false;\n }", "private function isValidInput ($input){\n foreach ($input as $key => $value) {\n $$key = $value;\n }\n $isValid = false;\n if ($this->isValidString($firstName) && $this->isValidString($lastName) && $this->isValidPassword($password)\n && $this->isValidEmail($email) && $this->isValidAge($age)){\n $isValid = true;\n }\n return $isValid;\n }", "public function validateSignature(array $request)\n {\n $this->assertRequestParamIsNotNull(\n $request, 'hmac', 'Expected signature in query params'\n );\n\n $hmac = $request['hmac'];\n\n return $this->generateSignature($request, '&') === $hmac;\n }", "public function hasQuery()\n {\n if (func_num_args() == 0) {\n return !empty($this->query);\n }\n\n foreach (func_get_args() as $key) {\n if (!$this->hasParam($this->query, $key)) {\n return false;\n }\n }\n\n return true;\n }", "protected function verifyParams() {\n\t\t\treturn true;\n\t\t}", "public static function nameIsValid($name) {\r\n return ( is_string($name) && !empty($name) && strlen($name) >=2 ); \r\n }", "public function matchesRequest()\n {\n return $this->event->get('AccountSid') && !(is_null($this->event->get('Latitude')) || is_null($this->event->get('Longitude')));\n }", "function isEmpty($name, $username, $email, $password, $confirm_password)\n{\n if (empty($username) || empty($password) || empty($password) || empty($confirm_password) || empty($name)) {\n $result = true;\n } else {\n $result = false;\n }\n return $result;\n}", "function compairUserLink($d1,$d2) {\n if (isset($d1[\"lastname\"]) && isset($d2[\"lastname\"]) && isset($d1[\"firstname\"]) && isset($d2[\"firstname\"])) {\n return getPersonLink($d1[\"lastname\"],$d1[\"firstname\"])==getPersonLink($d2[\"lastname\"],$d2[\"firstname\"]);\n }\n else\n return false;\n}", "function check_if_set(){\r\n if(!(isset($_POST['first_name']) && isset($_POST['last_name']) && isset($_POST['email']) && isset($_POST['headline']) && isset($_POST['summary']))){\r\n\treturn false;\r\n }\r\n else{\r\n\treturn true;\r\n }\r\n}", "public function checkName() {\r\n // Params\r\n $this->lastName = $this->uri->params['lastName'];\r\n // Class call\r\n $checkClass = new LastNameOrigin($this->lastName);\r\n $res = $checkClass->Call();\r\n // Return result\r\n $this->returnJson($res['code'], $res['message']);\r\n }", "function validate_name($name)\r\n\t{\r\n\t\t$trim = trim($name);\r\n\t\tif(strlen($trim) > 1)\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "function checkMultiple($name)\n\t{\n\t\t$name1 = strlen($name);\n\t\t$name2 = mb_strlen($name);\n\t\tif ($name1!=$name2)\n\t\t{\n\t\t\techo \"True\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"False\";\n\t\t}\n\t}", "public function testTripleName()\n {\n $filter = new Name();\n\n $this->assertSame([\n 'forename' => 'Ian',\n 'surname' => 'Charles Chadwick'\n ], $filter->filter('Ian Charles Chadwick'));\n\n $this->assertSame([\n 'forename' => 'Dave',\n 'surname' => 'Harry Jones'\n ], $filter->filter('dave harry jones'));\n }", "private function areEqual()\n {\n $this->compareHeader();\n\n return empty($this->diffHeader);\n }", "function verifyRequiredParams($required_fields)\n{\n\n\t//get request params\n\t$request_params = $_REQUEST;\n\t\n\t//Loop through all parameters\n\tforeach ($required_fields as $field) {\n\t\t//if any required parameter is missing\n\t\tif (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n\t\t\n\t\t\t//return true\n\t\t\treturn true;\n\t\t}\n\t}\n\t//otherwise, return false\n\treturn false;\n}", "public function nameIsClean()\n {\n return ($this->getName() != '' && $this->getName() == $this->getCleanName());\n }", "public static function IsQueryString (& $queryStr);", "public function isValid()\n {\n $params = array_filter(\n [\n $this->host,\n $this->name,\n $this->user,\n $this->password,\n $this->port\n ],\n function($item) {\n return ! empty($item);\n }\n );\n\n return count($params) === 5;\n }", "public function has_url_get_parameters() {\r\n\t\treturn (strlen($this->url_get_parameters) > 3);\r\n\t}", "public function canSetQueryName();", "protected function check_1_parameters(Request $request, Response $response, array &$args)\n {\n return true;\n }", "function isTheseParametersAvailable($required_fields)\n{\n $error = false;\n $error_fields = \"\";\n $request_params = $_REQUEST;\n\n foreach ($required_fields as $field) {\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n $error = true;\n $error_fields .= $field . ', ';\n }\n }\n\n if ($error) {\n $response = array();\n $response[\"error\"] = true;\n $response[\"message\"] = 'Required field(s) ' . substr($error_fields, 0, -2) . ' is missing or empty';\n echo json_encode($response);\n return false;\n }\n return true;\n}", "function give_donation_form_validate_name_fields( $post_data ) {\n\n\t$is_alpha_first_name = ( ! is_email( $post_data['give_first'] ) && ! preg_match( '~[0-9]~', $post_data['give_first'] ) );\n\t$is_alpha_last_name = ( ! is_email( $post_data['give_last'] ) && ! preg_match( '~[0-9]~', $post_data['give_last'] ) );\n\n\tif ( ! $is_alpha_first_name || ( ! empty( $post_data['give_last'] ) && ! $is_alpha_last_name ) ) {\n\t\tgive_set_error( 'invalid_name', esc_html__( 'The First Name and Last Name fields cannot contain an email address or numbers.', 'give' ) );\n\t}\n}", "function validate_first_last_name(){\n\n global $bp;\n\n $firstName = $_POST['field_11'];\n $lastName = $_POST['field_12'];\n\n if ( (strlen($firstName) <= 2) && (strlen($lastName) <= 2) ){\n\n //$tld_index = strrpos($email,'.');\n //$tld = substr($email,$tld_index);\n\n //if ($tld != '.edu'){\n\t\n\n $bp->signup->errors['field_11'] = $firstName . ', ' . $lastName . ': Sorry, your first and last names cannot both be 2 characters or less';\n //}\n\n }\n\n}", "function nameValidator() {\n\t\tglobal $firstname;\n\t\treturn ctype_alpha($firstname);\n\t}", "private function is_duplicate () {\n $email = $this->payload['email'];\n $facebook_id = '0';\n if (!empty($this->payload['facebook_id'])) {\n $facebook_id = $this->payload['facebook_id'];\n }\n $sql = \"SELECT id FROM users WHERE email='$email' OR facebook_id='$facebook_id'\";\n $sql = $this->conn->query($sql);\n\n return $sql->num_rows > 0;\n }", "private function checkingApiCanFetchProfileUsingSearch($first_name_search_term)\n {\n $params=array('search'=>$first_name_search_term,'items_per_page'=>1,'offset'=>0);\n $api_profile=$this->api_request->get(\"profile\",\"search\",$params);\n\n return ($api_profile[0]['first_name']==$first_name_search_term);\n }", "function emptyInputRegister($fname,$lname,$contact,$uname,$pass,$pass2){\n $result = true;\n if(empty($fname) || empty($lname) || empty($contact) || empty($uname) || empty($pass) || empty($pass2)){\n $result = true;\n }else{\n $result = false;\n }\n return $result;\n}", "public static function isTokenValid($name)\n {\n return $_POST[$name] === $_SESSION[$name];\n }", "function hasParam($name)\n {\n return isset($_REQUEST[$name]);\n }", "private function checkParams($params){\n\n if(count($params) == 3)\n return true;\n else\n return false;\n }", "protected function fields_match(string $first_field, string $second_field, string $error_message)\n {\n if ($_POST[$first_field] === $_POST[$second_field])\n {\n $this->write_status($second_field, $this->valid_message);\n return (true);\n }\n else\n {\n $this->write_status($second_field, $error_message);\n return (false);\n }\n }", "public function validate_name() {\n $errors = array();\n \n if ($this->name == '' || $this->name == null) {\n $errors[] = 'Nimi ei saa olla tyhjä.';\n }\n \n if (strlen($this->name) < 2 || strlen($this->name) > 50) {\n $errors[] = 'Nimen pituuden tulee olla vähintään 2 ja enintaan 50 merkkiä.';\n }\n \n $other_departments = $this->other_departments();\n\n foreach ($other_departments as $d) {\n if (strcasecmp($d->name, $this->name) == 0) {\n $errors[] = 'Olet jo lisännyt samannimisen osaston.';\n }\n }\n \n return $errors;\n }", "public function name_valid($name) {\n if (!preg_match(\"/^[a-z0-9]+$/i\", $name)) {\n /* name contains invalid characters */\n return false;\n }\n\n if (strlen($name) >= 100) {\n /* name is too long */\n return false;\n }\n\n /* name already exists? */\n $stmt = get_pdo()->prepare('select * from user where name = :name');\n $stmt->bindValue(':name', $name);\n $stmt->execute();\n return count($stmt->fetchAll()) == 0;\n }", "public static function checkName($name)\n {\n if (strlen($name) >= 2) {\n return true;\n }\n return false;\n }", "protected function checkParameters()\n\t{\n\t\t$this->dbResult['REQUEST'] = array(\n\t\t\t'GET' => $this->request->getQueryList()->toArray(),\n\t\t\t'POST' => $this->request->getPostList()->toArray(),\n\t\t);\n\n\t\t$this->arParams['PATH_TO_LOCATIONS_LIST'] = CrmCheckPath('PATH_TO_LOCATIONS_LIST', $this->arParams['PATH_TO_LOCATIONS_LIST'], '');\n\t\t$this->arParams['PATH_TO_LOCATIONS_EDIT'] = CrmCheckPath('PATH_TO_LOCATIONS_EDIT', $this->arParams['PATH_TO_LOCATIONS_EDIT'], '?loc_id=#loc_id#&edit');\n\t\t//$this->arParams['PATH_TO_LOCATIONS_ADD'] = CrmCheckPath('PATH_TO_LOCATIONS_ADD', $this->arParams['PATH_TO_LOCATIONS_ADD'], '?add');\n\t\t\n\t\t$this->componentData['LOCATION_ID'] = isset($this->arParams['LOC_ID']) ? intval($this->arParams['LOC_ID']) : 0;\n\n\t\tif($this->componentData['LOCATION_ID'] <= 0)\n\t\t{\n\t\t\t$locIDParName = isset($this->arParams['LOC_ID_PAR_NAME']) ? intval($this->arParams['LOC_ID_PAR_NAME']) : 0;\n\n\t\t\tif($locIDParName <= 0)\n\t\t\t\t$locIDParName = 'loc_id';\n\n\t\t\t$this->componentData['LOCATION_ID'] = isset($this->dbResult['REQUEST']['GET'][$locIDParName]) ? intval($this->dbResult['REQUEST']['GET'][$locIDParName]) : 0;\n\t\t}\n\n\t\treturn true;\n\t}", "function has_keep_parameters()\n{\n static $answer = null;\n if ($answer !== null) {\n return $answer;\n }\n\n foreach (array_keys($_GET) as $key) {\n if (\n isset($key[0]) &&\n $key[0] == 'k' &&\n substr($key, 0, 5) == 'keep_'\n //&& $key != 'keep_devtest' && $key != 'keep_show_loading'/*If testing memory use we don't want this to trigger it as it breaks the test*/\n ) {\n $answer = true;\n return $answer;\n }\n }\n $answer = false;\n return $answer;\n}", "function __checkDuplicateName()\n {\n $result = $this->find('first', array('conditions' => array('name' => $this->data[$this->name]['name'])));\n if ($result) {\n $this->errorMessage='Duplicate name found. Please change the name.';\n return false;\n }\n\n return true;\n }", "function findName($last, $first, $pdo)\n {\n if($last === \"Unknown\")\n {\n return 1;\n }\n if(($last != NULL || \"\") && ($first != NULL || \"\"))//if searching with both first and last names\n {\n $stmt = $pdo->prepare(\"SELECT PersonId FROM Person WHERE LastName=? AND (FirstName=? or NickName=?)\");\n $stmt->execute(array($last, $first,$first));\n $results = $stmt->fetchColumn();\n return $results;\n }\n \n if($first==NULL || \"\")//if only searching with last name\n {\n $stmt = $pdo->prepare(\"SELECT PersonId FROM Person WHERE LastName=? AND Firstname='' \");\n $stmt->execute(array($last));\n $results = $stmt->fetchColumn(); ////needs to use fetchAll(PDO::FETCH_ASSOC) eventually\n return $results;\n }\n }", "public function validateFirstname($firstname){\n if(preg_match(\"/^([a-zA-Z' ]+)$/\",$firstname)){\n return true;\n }else{\n return false;\n }\n }", "function exist_param($fieldname){\n return array_key_exists($fieldname, $_REQUEST);\n }", "public function __isset($name)\n {\n return array_key_exists($name, $this->userParams);\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "function empty_field_check() {\n $all_full =\n isset($_POST['email']) &&\n isset($_POST['username']) &&\n isset($_POST['password']) &&\n isset($_POST['name']) &&\n isset($_POST['surname']);\n \n if(!$all_full)\n launch_error(\"Some fields are empty.\");\n}", "private function validateFirstName($first)\n {\n if (strlen($first) > 25 || strlen($first) < 2) {\n array_push($this->errorArray, \"Your first name must be between 25 & 2 characters\");\n return;\n }\n }", "public function validateUserParam($p){\n\t\t\treturn (preg_match(\"/^user_id=[0-9]+$/\", $p) || preg_match(\"/^screen_name=[0-9a-zA-Z_]+$/\", $p));\n\t\t}", "function testPasswordsAreEqual($password, $password_one) {\n if (empty($password_one)) {\n $passwordErr = 'Password required';\n } elseif (strlen($password) > 0 && strlen($password_one) > 0 && $password == $password_one) {\n //QUERY FOR DATABASE CONNECTION HERE\n if (!filter_var($password, FILTER_VALIDATE_REGEXP, array(\"options\" => array(\"regexp\" => \"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{4,10})\")))) {\n //da 4 a 10 caratteri, deve contenere maiuscole, minuscole e numeri\n $passwordErr = \"Invalid Password format\";\n } else\n $passwordErr = \"*\";\n }else {\n $passwordErr = 'Passwords do not match!';\n }\n return $passwordErr;\n }", "function parse_string_is_once_param($string) {\n if (\n substr($string, 0, strlen($this->parse['before'])) == $this->parse['before'] &&\n substr($string, -strlen($this->parse['after']), strlen($this->parse['after'])) == $this->parse['after']) {\n return\n substr_count($string, $this->parse['before']) == 1 &&\n substr_count($string, $this->parse['after']) == 1;\n }\n\n return false;\n }", "public function _pwdntmatch($input, $input2) {\n\t\tif($_POST[$input] != $_POST[$input2]) {\n\t\t\treturn true;\n\t\t}\n\t}", "function emptyInputSignup($email, $firstName, $lastName, $pwd, $pwdrepeat, $phone\n) {\n $result;\n if (empty($email) ||empty($firstName) ||empty($lastName) ||empty($pwd) ||empty($pwdrepeat)) {\n $result = true;\n } else {\n $result = false;\n }\n return $result;\n }", "public function testDoubleName()\n {\n $filter = new Name();\n\n $this->assertSame([\n 'forename' => 'Ian',\n 'surname' => 'Chadwick'\n ], $filter->filter('Ian Chadwick'));\n\n $this->assertSame([\n 'forename' => 'Dave',\n 'surname' => 'Jones'\n ], $filter->filter('dave jones'));\n }", "function nvp_CheckGet($params) {\r\n $result=true;\r\n if (!empty ($params)) {\r\n foreach ($params as $eachparam) {\r\n if (isset($_GET[$eachparam])) {\r\n if (empty ($_GET[$eachparam])) {\r\n $result=false; \r\n }\r\n } else {\r\n $result=false;\r\n }\r\n }\r\n }\r\n return ($result);\r\n }", "function valid_name($name) {\r\n\tif (empty($name)) \r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n }", "private function is_exact_match( $url, $params ) {\n\t\t// No parsed query params but we have query params on the URL - some parsing error with wp_parse_str\n\t\tif ( count( $params ) === 0 && $this->has_query_params( $url ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function get_duplicates($lastname, $firstname, $middlename)\r\n {\r\n \r\n $this->db->from($this->table);\r\n $this->db->where('lastname',$lastname);\r\n $this->db->where('firstname',$firstname);\r\n $this->db->where('middlename',$middlename);\r\n\r\n $query = $this->db->get();\r\n\r\n return $query;\r\n }", "static function checkValiPass($request)\n {\n if (isset($request->password_new) && isset($request->password_vali)) {\n return ($request->password_new == $request->password_vali) ? true : false;\n }\n return 'NO_PASS';\n }", "public function validateLastname($lastname){\n if(preg_match(\"/^([a-zA-Z' ]+)$/\",$lastname)){\n return true;\n }else{\n return false;\n }\n }", "function verify_name($name) // Colorize: green\n { // Colorize: green\n return isset($name) // Colorize: green\n && // Colorize: green\n is_string($name) // Colorize: green\n && // Colorize: green\n $name != \"\"; // Colorize: green\n }", "public static function matchHeaders(Request $first, Request $second)\n {\n $firstHeaders = $first->getHeaders();\n foreach ($second->getHeaders() as $key => $pattern) {\n if (!isset($firstHeaders[$key])\n || !preg_match('#'.str_replace('#', '\\\\#', $pattern[0]).'#', $firstHeaders[$key][0])) {\n return false;\n }\n }\n\n return true;\n }", "function _verify_user_values(&$values)\r\n\t{\r\n\t\tif ($this->_dumb_mode)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\tforeach($values as $field => $value)\r\n\t\t{\r\n\t\t\tif (!isset($this->_params[$field]))\r\n\t\t\t{\n\t \tdebug :: write_error(NESE_ERROR_WRONG_MPARAM,\r\n\t \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \n\t \t\t array('param' => $field)\r\n\t \t);\r\n\t\t\t\tunset($values[$field]);\r\n\t\t\t} \r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (in_array($this->_params[$field], $this->_required_params))\r\n\t\t\t\t{\n\t\t \tdebug :: write_error(NESE_ERROR_WRONG_MPARAM,\r\n\t\t \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \n\t \t\t array('param is autogenerated and can\\'t be passed' => $field)\r\n\t\t \t);\r\n\r\n\t\t\t\t\tunset($values[$field]);\r\n\t\t\t\t} \r\n\t\t\t} \r\n\t\t} \r\n\t}", "function haveEmptyParameters($required_params, $request, $response){\n //initialization false\n $error = false; \n //to get the empty params\n $error_params = '';\n //get all the request params with the current request\n // $request_params = $_REQUEST;\n $request_params = $request->getParsedBody();\n\n // loop through params\n foreach($required_params as $param){\n // check the parameter is empty or parameter length is zero\n // !isset checks whether the parameter is empty\n if (!isset($request_params[$param]) || strlen($request_params[$param]) <= 0){\n # code...\n $error = true;\n // concatenate the parameter in error_params\n $error_params .= $param . ', ';\n }\n }\n\n if ($error) {\n # code...\n $error_detail = array();\n $error_detail['error'] = true;\n $error_detail['message'] = 'Required parameters ' . substr($error_params, 0, -2) . ' are missing or empty';\n // use the $response object to return the response\n // encode the error_detail in json format\n $response->write(json_encode($error_detail));\n }\n return $error;\n}", "function cpay_CheckGet($params) {\r\n $result = true;\r\n if (!empty($params)) {\r\n foreach ($params as $eachparam) {\r\n if (isset($_GET[$eachparam])) {\r\n if (empty($_GET[$eachparam])) {\r\n $result = false;\r\n }\r\n } else {\r\n $result = false;\r\n }\r\n }\r\n }\r\n return ($result);\r\n}", "function checkQueryParams($param_array){\n\t$cnt = 0;\n\tfor($i=0; $i < count($param_array); $i++){\n\t\tif(isset($_GET[$param_array[$i]])){\n\t\t\t$params_set[$param_array[$i]] = $_GET[$param_array[$i]];\n\t\t\t$cnt++;\n\t\t}\n\t\t$params_set[\"cnt\"] = $cnt;\n\t}\n\treturn $params_set;\n}", "private function isSameLength()\n {\n return $this->lengthA == $this->lengthB;\n }", "function compareAlphabetical($a,$b) {\n if (strpos($a[\"lastname\"],\"Dr.\")!==false)\n $a[\"lastname\"]=trim(substr($a[\"lastname\"], 2),\" .\");\n if (strpos($b[\"lastname\"],\"Dr.\")!==false)\n $b[\"lastname\"]=trim(substr($b[\"lastname\"], 2),\" .\");\n\n if (isset($a[\"birthname\"]) && $a[\"birthname\"]!=\"\")\n $aa=$a[\"birthname\"].\" \".$a[\"firstname\"];\n else\n $aa=$a[\"lastname\"].\" \".$a[\"firstname\"];\n\n if (isset($b[\"birthname\"]) && $b[\"birthname\"]!=\"\")\n $bb=$b[\"birthname\"].\" \".$b[\"firstname\"];\n else\n $bb=$b[\"lastname\"].\" \".$b[\"firstname\"];\n\n return strcmp(getNormalisedChars($aa), getNormalisedChars($bb));\n}", "public function validateProxySignature(array $request)\n {\n $this->assertRequestParamIsNotNull(\n $request, 'signature', 'Expected signature in query params'\n );\n\n $hmac = $request['signature'];\n\n return $this->generateSignature($request, '') === $hmac;\n }", "function validate_fields_match(array $filtered_input, array &$form, array $params): bool\n{\n $comparison_field_id = $params[0];\n $comparison = $filtered_input[$comparison_field_id];\n\n foreach ($params as $field_id) {\n if ($comparison != $filtered_input[$field_id]) {\n $form['error'] = 'Fields do not match';\n $form['fields'][$field_id]['error'] = strtr('This field must match \"@field\" ', [\n '@field' => $form['fields'][$comparison_field_id]['label']\n ]);\n return false;\n }\n }\n return true;\n}", "protected function _validateSearchParams($params)\n {\n if (empty($params) || !is_array($params) || empty($params['search'])) {\n $this->messageManager->addNotice(__('Please enter correct search options.'));\n return false;\n }\n\n switch ($params['search']) {\n case 'type':\n if (empty($params['firstname']) || strlen($params['firstname']) < 2) {\n $this->messageManager->addNotice(__('Please enter at least 2 letters of the first name.'));\n return false;\n }\n if (empty($params['lastname']) || strlen($params['lastname']) < 2) {\n $this->messageManager->addNotice(__('Please enter at least 2 letters of the last name.'));\n return false;\n }\n break;\n\n case 'email':\n if (empty($params['email']) || !\\Zend_Validate::is($params['email'], 'EmailAddress')) {\n $this->messageManager->addNotice(__('Please enter a valid email address.'));\n return false;\n }\n break;\n\n case 'id':\n if (empty($params['id'])) {\n $this->messageManager->addNotice(__('Please enter a gift registry ID.'));\n return false;\n }\n break;\n\n default:\n $this->messageManager->addNotice(__('Please enter correct search options.'));\n return false;\n }\n return true;\n }", "function check_required_param($param = array(),$method){\n //set up method\n if (strtolower($method) == \"post\"){\n $r = $_POST;\n }else if (strtolower($method) == \"get\"){\n $r = $_GET;\n }\n //check of required param\n foreach ($param as $par){\n if (!isset($r[$par]) || empty($r[$par])){\n return false;\n break;\n }\n }\n return true;\n}", "public function testItReturnsUsersFilteredByLastName()\n {\n $user1 = factory(User::class)->create([\n \"tenant_id\" => $this->user->tenant->id,\n ]);\n $tenant2 = factory(Tenant::class)->create();\n factory(User::class)->create([\n \"tenant_id\" => $tenant2,\n ]);\n \n $this->actingAs($this->user)\n ->getJson(\"api/v1/users?filter[lastname]={$user1->lastname}\")\n ->assertOk()\n ->assertJson([\n \"data\" => [\n [\n \"id\" => $user1->id,\n \"firstname\" => $user1->firstname,\n \"lastname\" => $user1->lastname,\n ],\n ],\n ]);\n }", "function ValidRequiredPost($name) {\n return isset($_POST[$name]) && $_POST[$name] != \"\";\n}" ]
[ "0.64471996", "0.60770375", "0.5929547", "0.5779792", "0.57541424", "0.57345605", "0.57293594", "0.5639146", "0.55671346", "0.55501646", "0.5538676", "0.55025595", "0.54587656", "0.5418919", "0.5336247", "0.5308267", "0.5262645", "0.5255441", "0.5230211", "0.52230185", "0.52230185", "0.52230185", "0.5222761", "0.520691", "0.51821595", "0.51807463", "0.51731735", "0.51031375", "0.50968605", "0.5092167", "0.5087495", "0.5038767", "0.50332797", "0.50134057", "0.50103766", "0.50009453", "0.4996688", "0.49960005", "0.49938247", "0.49871877", "0.49865258", "0.4981849", "0.49689466", "0.49557906", "0.49550983", "0.49539334", "0.49486744", "0.49438167", "0.49338886", "0.4922828", "0.49169943", "0.4913454", "0.4897958", "0.4895123", "0.48929444", "0.48804352", "0.48802403", "0.4878806", "0.48783565", "0.4876695", "0.48748496", "0.48703727", "0.48669764", "0.48640123", "0.48499492", "0.48494217", "0.4835641", "0.4831078", "0.48262843", "0.48210335", "0.4818729", "0.48176998", "0.4810623", "0.47972256", "0.4787237", "0.47822854", "0.47812626", "0.4780517", "0.47738028", "0.47733557", "0.47731647", "0.4771631", "0.47625422", "0.4758069", "0.47580543", "0.4755788", "0.47534674", "0.4748734", "0.47434163", "0.47420418", "0.47417718", "0.4738346", "0.4735754", "0.47328955", "0.47294217", "0.47277927", "0.47271731", "0.47159594", "0.47137874", "0.47122693" ]
0.6469741
0
Creates data provider instance with search query applied
public function search($params) { $query = Coupon::find(); $query->joinWith(['pos', 'merchant', 'template']); if ($this->merchant_id) { $query->where(['{{%coupon}}.merchant_id' => $this->merchant_id]); } $dataProvider = new ActiveDataProvider([ 'query' => $query, 'pagination' => [ 'pageSize' => 10, ], 'sort'=> ['defaultOrder' => ['coupon_id' => SORT_DESC]] ]); $dataProvider->sort->attributes['address'] = [ 'asc' => ['{{%pos}}.address' => SORT_ASC], 'desc' => ['{{%pos}}.address' => SORT_DESC], ]; $dataProvider->sort->attributes['templateName'] = [ 'asc' => ['{{%coupon_template}}.name' => SORT_ASC], 'desc' => ['{{%coupon_template}}.name' => SORT_DESC], ]; if ($this->load($params) && !$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere([ 'coupon_id' => $this->coupon_id, 'template_id' => $this->template_id, '{{%coupon}}.merchant_id' => $this->merchant_id, '{{%coupon}}.pos_id' => $this->pos_id, 'confirmed' => $this->confirmed, ]); $query->andFilterWhere(['like', 'client', $this->client]) ->andFilterWhere(['like', 'message', $this->message]) ->andFilterWhere(['like', '{{%coupon}}.create_date', $this->create_date]) ->andFilterWhere(['like', 'uuid', $this->uuid]) ->andFilterWhere(['like', 'major', $this->major]) ->andFilterWhere(['like', '{{%coupon}}.minor', $this->minor]) ->andFilterWhere(['like', '{{%pos}}.address', $this->address]) ->andFilterWhere(['like', 'serial_number', $this->serial_number]) ->andFilterWhere(['like', '{{%coupon_template}}.name', $this->templateName]); return $dataProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchQueryDataProvider() {}", "public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }", "public function getQueryDataProvider() {}", "public function search() {\n // Get CDbCriteria instance\n $dbCriteria = new CDbCriteria;\n // Search for client name\n $dbCriteria->compare('name', Yii::app()->request->getQuery('name', ''), true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $dbCriteria,\n 'pagination' => array(\n 'pageSize' => 10,\n ),\n ));\n }", "protected function getDataProviders()\n {\n $searchModel = $this->getSearchModel();\n $queryParams = Yii::$app->request->queryParams;\n $dataProvider = $searchModel->search($queryParams);\n return [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ];\n }", "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('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search() {\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $this->getSearchCriteria(),\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id DESC',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'client_id' => array(\n\t\t\t\t\t\t'asc' => 'client_name asc',\n\t\t\t\t\t\t'desc' => 'client_name desc',\n\t\t\t\t\t),\n\t\t\t\t\t'*',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->config->get('global.per_page'),)\n\t\t));\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id, true);\n $criteria->compare('level', $this->level);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('ip_create', $this->ip_create, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function prepareDataProvider()\n\t{\n\t $searchModel = new \\app\\models\\ClearanceSearch(); \n\t\treturn $searchModel->search(\\Yii::$app->request->queryParams);\n\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('authorname', $this->authorname, true);\n return new CActiveDataProvider($this, array('criteria' => $criteria, ));\n }", "public function getDataProvider(array $query = []);", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "protected function prepareDataProvider()\n {\n if ($this->prepareDataProvider !== null) {\n return call_user_func($this->prepareDataProvider, $this);\n }\n\n\t\t/* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\t\t$query = $modelClass::find();\n\t\t\n\t\t$filters = ActionHelpers::getFilter();\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\t$query->andFilterWhere($filter);\n\t\t}\n\t\t\n\t\tif($with = ActionHelpers::getWith()) {\n $query->with($with);\n }\n\n return new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => ActionHelpers::getLimit()\n ],\n 'sort'=> ActionHelpers::getSort()\n // 'sort'=> ['defaultOrder' => ['id'=>SORT_DESC]]\n ]);\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n $query = Hotel::find();\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n \n // grid filtering conditions\n $query->availables($this->quantity_of_guests);\n $query->andFilterWhere([\n 'hotel_id' => $this->hotel_id,\n 'price_per_guest' => $this->price_per_guest,\n ]);\n $query->andFilterWhere(['like', 'city_name', $this->city_name]);\n return $dataProvider;\n \n }", "public function search()\n\t{\n\t $criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('projection',$this->projection,true);\n\t\t$criteria->compare('username',Yii::app()->user->id);\n\t\t$criteria->compare('title',$this->title);\n\t\t$criteria->compare('url',$this->url);\n\t return new CActiveDataProvider(get_class($this), array(\n\t 'criteria'=> $criteria,\n\t 'sort'=>array(\n\t 'defaultOrder'=>'name ASC',\n\t ),\n\t 'pagination'=>array(\n\t 'pageSize'=>10\n\t ),\n\t ));\n\t}", "public function getMetadataQueryProviderWrapper();", "private function _getDataProvider($query, $params){\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'user_id' => $this->user_id,\n 'profile_id' => $this->profile_id,\n 'authentication_method_id' => $this->authentication_method_id,\n 'status' => $this->status,\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n ]);\n\n $query->andFilterWhere(['like', 'username', $this->username])\n ->andFilterWhere(['like', 'auth_key', $this->auth_key])\n ->andFilterWhere(['like', 'password_hash', $this->password_hash])\n ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])\n ->andFilterWhere(['like', 'email', $this->email]);\n\n return $dataProvider;\n }", "public function makeSearch() \n {\n $this->setSelect($this->qb);\n $this->setAssociations($this->qb);\n $this->setWhere($this->qb);\n $this->setOrderBy($this->qb);\n $this->setLimit($this->qb);\n\n return $this;\n }", "protected function prepareDataProvider()\n {\n \t$modelClass = $this->modelClass;\n\n $orderBy='id';\n if (isset($_GET['orderBy'])) $orderBy=$_GET['orderBy'];\n\n $orderByDir='DESC';\n if (isset($_GET['orderByDir'])) $orderByDir=$_GET['orderByDir'];\n\n $limit=20;\n if (isset($_GET['limit'])) $limit=$_GET['limit'];\n\n $order = \"$orderBy $orderByDir\";\n\n \t$dataProvider = new ActiveDataProvider([\n 'query' => $modelClass::find()->limit($limit)->with('supplier')->orderBy($order),\n 'pagination' => [\n 'pageSize' => $limit,\n ],\n ]);\n\n \treturn $dataProvider;\n }", "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('keywords',$this->keywords,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t//TODO: update search criteria\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('standard_intervention_exists', $this->standard_intervention_exists);\n\t\t$criteria->compare('details', $this->details);\n\t\t$criteria->compare('interventions_id', $this->interventions_id);\n\t\t$criteria->compare('description', $this->description);\n\t\t$criteria->compare('patient_factors', $this->patient_factors);\n\t\t$criteria->compare('patient_factor_details', $this->patient_factor_details);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public static function new_search_record()\n\t{\n\t\treturn new user_record_search();\n\t}", "public function search() {\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('content', $this->content, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('author', $this->author, true);\n\t\t$criteria->compare('type', $this->type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('uid', $this->uid);\n $criteria->compare('token', $this->token, true);\n $criteria->compare('created', $this->created, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n\n $this->entity = $this->name;\n $this->conditions = $this->_getSearchConditions();\n $this->joins = $this->_getSearchJoins();\n $this->orders = $this->_getSearchOrder();\n $this->limit = $this->_getSearchLimit();\n $this->maxLimit = $this->_getSearchMaxLimit();\n $this->offset = $this->_getSearchOffset();\n $this->fields = $this->_getSearchFields();\n $this->group = $this->_getSearchGroup();\n\n// $this->setVar('entity', $this->name);\n// $this->setVar('conditions', $this->_getSearchConditions());\n// $this->setVar('joins', $this->_getSearchJoins());\n// $this->setVar('orders', $this->_getSearchOrder());\n// $this->setVar('limit', $this->_getSearchLimit());\n// $this->setVar('maxLimit', $this->_getSearchMaxLimit());\n// $this->setVar('offset', $this->_getSearchOffset());\n// $this->setVar('fields', $this->_getSearchFields());\n// $this->setVar('group', $this->_getSearchGroup());\n//\n// $this->setVar('baseAdditionalElements', $this->additionalElements);\n $this->getFieldsForSearchFunction = '_extractSearchFields';\n\n return $this->baseSearch();\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('keyword_id', $this->keyword_id);\n $criteria->compare('visits', $this->visits);\n $criteria->compare('page_views', $this->page_views);\n $criteria->compare('parsing', $this->parsing);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 50),\n ));\n }", "protected function getNewSearchModel()\n {\n $searchModelName = $this->getSearchModelName();\n return new $searchModelName;\n }", "public function search()\n\t{\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function searchdatas(){\r\n\t\t// should not be searched.\r\n\t\t$conditions=array();\r\n\t\t$params=array();\r\n\t\t$page_params=array();\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$sort=new CSort();\r\n \t$sort->attributes=array();\r\n \t$sort->defaultOrder=\"t.create_time ASC\";\r\n \t$sort->params=$page_params;\r\n\t\treturn new CActiveDataProvider(get_class($this), array(\r\n\t\t\t'criteria'=>array(\r\n\t\t\t 'condition'=>'',\r\n\t\t\t 'params'=>array(),\r\n\t\t\t 'with'=>array(\"User\",\"District\"),\r\n\t\t\t),\r\n\t\t\t'pagination'=>array(\r\n 'pageSize'=>'20',\r\n 'params'=> $page_params,\r\n ),\r\n 'sort'=>$sort,\r\n\t\t));\r\n\t}", "public function search()\n {\n\n $query = Board::find()->where(['user_id' => $this->user_id]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => 10,\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'created_at' => SORT_DESC,\n\n ]\n ],\n ]);\n\n return $dataProvider;\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('post_id', $this->post_id);\n $criteria->compare('language_id', $this->language_id);\n $criteria->compare('header', $this->header, true);\n $criteria->compare('text', $this->text, true);\n\t\t$criteria->compare('rating',$this->rating);\n\t\t$criteria->compare('author_id',$this->author_id);\n\t\t$criteria->compare('date_add',$this->date_add,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('t.id', $this->id);\n $criteria->compare('who', $this->who);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('rate', $this->rate);\n $criteria->compare('knowledge', $this->knowledge);\n $criteria->compare('behavior', $this->behavior);\n $criteria->compare('motivation', $this->motivation);\n $criteria->compare('rate', $this->who_ip);\n $criteria->compare('is_checked', $this->is_checked);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => '50',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'date' => CSort::SORT_DESC,\n ),\n ),\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('name', $this->name, true);\n $criteria->compare('latitude', $this->latitude);\n $criteria->compare('longitude', $this->longitude);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('vicinity', $this->vicinity, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function parametersAndQueriesDataProvider() {}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('region_id', $this->region_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t $this->StateProcess(get_class($this).'_'.Y::app()->params['cfgName']);\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n $criteria->compare('title_adm',$this->title,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array('defaultOrder'=>'id DESC'),\n 'pagination'=>array('pageSize'=>Config::$data['base']->pageSize)\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('agreement',$this->agreement);\n\t\t$criteria->compare('date',$this->date,true);\n\t\t$criteria->compare('user',$this->user);\n\t\t$criteria->compare('new_status',$this->new_status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search($params,$query=null)\n {\n if(!$query) $query = RestClient::find();\n\n $query = $query->joinWith(['hospital']) \n ->joinWith(['hospital.sales']);\n //$query = $query->joinWith('mingrui_comments');\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n \n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n //var_dump($params);exit;\n return $dataProvider;\n }\n \n // grid filtering conditions\n $query->andFilterWhere([\n 'rest_client.id' => $this->id, \n 'age' => $this->age, \n 'hospital_id' => $this->hospital_id, \n ]);\n\n $query->andFilterWhere(['like', 'rest_client.name', $this->name])\n ->andFilterWhere(['like', 'sex', $this->sex])\n ->andFilterWhere(['like', 'birthplace', $this->birthplace])\n ->andFilterWhere(['like', 'email', $this->email])\n ->andFilterWhere(['like', 'tel', $this->tel])\n ->andFilterWhere(['like', 'school', $this->school])\n ->andFilterWhere(['like', 'education', $this->education])\n ->andFilterWhere(['like', 'experience', $this->experience])\n ->andFilterWhere(['like', 'employed', $this->employed])\n ->andFilterWhere(['like', 'department', $this->department])\n ->andFilterWhere(['like', 'worktime', $this->worktime])\n ->andFilterWhere(['like', 'position', $this->position])\n ->andFilterWhere(['like', 'speciality', $this->speciality])\n ->andFilterWhere(['like', 'hobby', $this->hobby])\n ->andFilterWhere(['like', 'notes', $this->notes])\n ->andFilterWhere(['like', 'zhuren', $this->zhuren])\n ->andFilterWhere(['like', 'pianhao', $this->pianhao]) \n ->andFilterWhere(['like', 'rest_danwei.name', $this->hospitalname])\n ->andFilterWhere(['like', 'rest_sales.name', $this->salesname])\n ;\n\n // echo $query->createCommand()->getRawSql(); exit; \n return $dataProvider;\n }", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n\n\t\t$criteria = $this->getDbCriteria();\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('subject', $this->subject, true);\n\t\t$criteria->compare('status', $this->status);\n\t\t$criteria->compare('template.name', $this->template_id, true);\n\n\t\t$sort = new CSort;\n\t\t$sort->defaultOrder = 'id DESC';\n\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t\t'sort' => $sort,\n\t\t\t\t\t'pagination' => array(\n\t\t\t\t\t\t'pageSize' => 20,\n\t\t\t\t\t),\n\t\t\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('query_id',$this->query_id,true);\n $criteria->compare('se_id',$this->se_id,true);\n $criteria->compare('se_page',$this->se_page,true);\n $criteria->compare('se_url',$this->se_url,true);\n $criteria->compare('visits',$this->visits);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 25),\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('acquisition_date_id', $this->acquisition_date_id);\n $criteria->compare('acquisition_type_id', $this->acquisition_type_id);\n $criteria->compare('location_id', $this->location_id);\n $criteria->compare('number', $this->number, true);\n $criteria->compare('annotation', $this->annotation, true);\n $criteria->compare('location_coordinates_id', $this->location_coordinates_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 1);\n $this->order = 'create_time desc';\n }", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('id_client', $this->id_client);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('date_birth', $this->date_birth, true);\n $criteria->compare('gender', $this->gender);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('domain', $this->domain, true);\n $criteria->compare('ru_domain', $this->ru_domain, true);\n $criteria->compare('page', $this->ru_domain);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function applyDefaultSearchQuery(\\yii\\data\\ActiveDataProvider &$dataProvider);", "protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 0);\n $this->order = 'create_time desc';\n }", "public static function new_search_record()\n\t{\n\t\treturn new league_record_search();\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('project_id', $this->project_id);\n $criteria->compare('num', $this->num);\n $criteria->compare('team_strength', $this->team_strength);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "private function instantiate_search_page() {\n // Build the search_types_fields and search_types_label arrays out of post_types_defs\n $search_types_fields = array();\n $search_types_label = array();\n foreach ( $this->post_type_defs as $post_type ) {\n $search_types_fields[ $post_type[ 'slug' ] ] = $post_type[ 'fields' ];\n $search_types_label[ $post_type[ 'slug' ] ] = $post_type[ 'plural_name' ];\n }\n $this->search_page = new HRHS_Search( array(\n // Using the default slug and title for now\n 'search_types_fields' => $search_types_fields,\n 'search_types_label' => $search_types_label\n ) );\n }", "public function search()\n {\n $query = Story::find()\n ->owner()\n ->globalChannel()\n ->orderBy(['_id' => SORT_ASC])\n ->active();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => false\n ]);\n\n return $dataProvider;\n }", "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search($query);", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('summ', $this->summ, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('nrs', $this->nrs, true);\n $criteria->compare('supplier_name', $this->supplier_name, true);\n $criteria->compare('npwp', $this->npwp, true);\n $criteria->compare('bank_name', $this->bank_name, true);\n $criteria->compare('bank_account_number', $this->bank_account_number, true);\n $criteria->compare('created_at', $this->created_at, true);\n $criteria->compare('created_by', $this->created_by);\n $criteria->compare('updated_at', $this->updated_at, true);\n $criteria->compare('updated_by', $this->updated_by);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'id DESC',\n ),\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('did',$this->did);\n\t\t$criteria->compare('date_prod',$this->date_prod,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('len',$this->len,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere([\n\t 'id' => $this->id,\n\t 'ord' => $this->ord,\n\t 'type' => $this->type,\n\t ])\n\t ->andFilterWhere(['like', 'code', $this->code])\n ->andFilterWhere(['like', 'name', $this->name]);\n\n return $this->dataProvider;\n }", "public function createQuery() {}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('question_id', $this->question_id);\n $criteria->compare('student_id', $this->student_id);\n $criteria->compare('answer_id', $this->answer_id);\n $criteria->compare('answer_text', $this->answer_text, true);\n $criteria->compare('answer_number', $this->answer_number, true);\n $criteria->compare('exec_time', $this->exec_time);\n $criteria->compare('result', $this->result);\n $criteria->compare('test_result', $this->test_result);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }", "protected function addSearchConfigs()\n {\n\n $this['textQueryBuilder'] = function () {\n return new TextQueryBuilder();\n };\n\n $this['searchManager'] = function ($c) {\n return new SearchManager($c['databaseAdapter'], $c['queue'], $c['request'], array(\n $c['textQueryBuilder']\n ));\n };\n\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('createDate', $this->createDate);\n $criteria->compare('lastUpdated', $this->lastUpdated);\n $criteria->compare('trackingKey', $this->trackingKey);\n $criteria->compare('email', $this->email);\n $criteria->compare('leadscore', $this->leadscore);\n\n if (!Yii::app()->user->isGuest) {\n $pageSize = Profile::getResultsPerPage();\n } else {\n $pageSize = 20;\n }\n\n return new SmartActiveDataProvider(get_class($this), array(\n 'pagination' => array(\n 'pageSize' => $pageSize,\n ),\n 'criteria' => $criteria,\n ));\n }", "public function googleSearch()\n {\n $search = new \\Hoor\\Search\\Google(get_search_query(), $this->getIndex());\n $this->data['search'] = $search;\n $this->data['results'] = $search->results;\n }", "public function search() {\n// @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('options', $this->options, true);\n $criteria->compare('autoreplys', $this->autoreplys, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('district_id', $this->district_id);\n\t\t$criteria->compare('active', $this->active);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('issue_date', $this->issue_date, true);\n\n\t\treturn new CActiveDataProvider($this, array('criteria' => $criteria,));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('hol_id', $this->hol_id);\n $criteria->compare('loc_id', $this->loc_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere(['id' => $this->id])\n\t ->andFilterWhere(['like', 'description', $this->description])\n ->andFilterWhere(['like', 'type', $this->type]);\n\n return $this->dataProvider;\n }", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria = new CDbCriteria;\r\n\r\n\t\t$criteria->compare('doc_num', $this->doc_num, true);\r\n\t\t$criteria->compare('doc_num2', $this->doc_num2);\r\n\t\t$criteria->compare('doc_date', $this->doc_date, true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n {\n $criteria = new CDbCriteria();\n\n $criteria->compare('productCategoryId', $this->productCategoryId, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('level', $this->level);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('wikilink', $this->wikilink, true);\n\t\t$criteria->compare('picture', $this->picture, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('modification_date', $this->modification_date, true);\n\t\t$criteria->compare('featured', $this->featured);\n\t\t$criteria->compare('users_found', $this->users_found);\n\t\t$criteria->compare('gpsdata', $this->gpsdata);\n\t\t$criteria->compare('category', $this->category);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function scopeSearch($query){\n if (request()->has('search_query') && !empty(request()->search_query) && request()->has('search_columns') && !empty(request()->search_columns) ) {\n \t$query = $this->getQuery($query , request()->search_columns , request()->search_query );\n }else{\n \tif (request()->has('search_query') && !empty(request()->search_query)) {\n \t\t$query = $this->getQuery($query , $this->fillable , request()->search_query );\n \t}\n }\n\n \n \n \n \n \n return $query;\n }", "public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('title',$this->title,true);\n $criteria->compare('text',$this->text,true);\n $criteria->compare('author_id',$this->author_id);\n $criteria->compare('editor_id',$this->editor_id);\n $criteria->compare('crated_at',$this->crated_at,true);\n $criteria->compare('edited_at',$this->edited_at,true);\n $criteria->compare('publish_at',$this->publich_at,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_start',$this->date_start,true);\n\t\t$criteria->compare('date_end',$this->date_end,true);\n\t\t$criteria->compare('count_attempt',$this->count_attempt);\n\t\t$criteria->compare('count_questions',$this->count_questions);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('author',$this->author,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('latitud',$this->latitud,true);\n\t\t$criteria->compare('longitud',$this->longitud,true);\n\t\t$criteria->compare('telefono',$this->telefono,true);\n\t\t$criteria->compare('direccion',$this->direccion,true);\n\t\t$criteria->compare('web',$this->web,true);\n\t\t$criteria->compare('activo',$this->activo);\n\t\t$criteria->compare('userId',$this->userId);\n\t\t$criteria->compare('ratingGeneral',$this->ratingGeneral);\n\t\t$criteria->compare('youtubeUrl',$this->youtubeUrl,true);\n\t\t$criteria->compare('esDestacado',$this->esDestacado);\n\t\t$criteria->compare('aprobado',$this->aprobado);\n $criteria->compare('regionId',$this->regionId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('id_answer',$this->id_answer);\n\t\t$criteria->compare('mark',$this->mark);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('read_mark',$this->read_mark,true);\n\t\t$criteria->compare('marked_by',$this->marked_by,true);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('sn',$this->sn,true);\n\t\t$criteria->compare('fn',$this->fn,true);\n\t\t$criteria->compare('region',$this->region);\n\t\t$criteria->compare('postal',$this->postal,true);\n\t\t$criteria->compare('inn',$this->inn,true);\n\t\t$criteria->compare('ogrn',$this->ogrn,true);\n\t\t$criteria->compare('okpo',$this->okpo,true);\n\t\t$criteria->compare('adress',$this->adress,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('okved',$this->okved,true);\n\t\t$criteria->compare('oid',$this->oid,true);\n\t\t$criteria->compare('hits',$this->hits);\n\t\t$criteria->compare('st',$this->st);\n\t\t$criteria->compare('alias',$this->alias,true);\n\t\t$criteria->compare('alias2',$this->alias2,true);\n\t\t$criteria->compare('alias3',$this->alias3,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('pid', $this->pid, true);\n $criteria->compare('userName', $this->userName, true);\n $criteria->compare('userEmail', $this->userEmail, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('userId', $this->userId, true);\n $criteria->compare('visibility', $this->visibility);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('recordId', $this->recordId, true);\n $criteria->compare('info', $this->info, true);\n $criteria->compare('new', $this->new, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('cardid', $this->cardid, true);\n $criteria->compare('subclassid', $this->subclassid, true);\n $criteria->compare('cardname', $this->cardname, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search () {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('title', $this->title, true);\n\t\t$criteria->compare('description', $this->description, true);\n\t\t$criteria->compare('type', $this->type);\n\t\t$criteria->compare('required', $this->required);\n\t\t$criteria->compare('cId', $this->cId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('user', $this->user, true);\n $criteria->compare('amount', $this->amount);\n $criteria->compare('currency', $this->currency, true);\n $criteria->compare('valid_from', $this->valid_from, true);\n $criteria->compare('valid_to', $this->valid_to, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('frequency_band',$this->frequency_band,true);\n\n\t\t$criteria->compare('date_of_issue',$this->date_of_issue,true);\n\n\t\t$criteria->compare('date_of_renewal',$this->date_of_renewal,true);\n\n\t\t$criteria->compare('emission',$this->emission,true);\n\n\t\t$criteria->compare('tolerance',$this->tolerance,true);\n\n\t\t$criteria->compare('application_vsat_id',$this->application_vsat_id,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('contact_number', $this->contact_number, true);\n $criteria->compare('city', $this->city, true);\n $criteria->compare('gender', $this->gender, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function getSearch();" ]
[ "0.7776066", "0.6740356", "0.6572312", "0.6502959", "0.6467941", "0.63889533", "0.6373999", "0.6287348", "0.6266553", "0.6248183", "0.62413794", "0.62108", "0.6197014", "0.6171104", "0.61223817", "0.6120761", "0.61149436", "0.61018425", "0.60990244", "0.6087549", "0.6080595", "0.6078222", "0.6074704", "0.6069507", "0.6039778", "0.6039715", "0.60365623", "0.6033494", "0.6031435", "0.60230434", "0.6014506", "0.5999016", "0.59753066", "0.59645975", "0.59610456", "0.5958165", "0.595489", "0.59406483", "0.5933426", "0.59026176", "0.59002066", "0.589427", "0.5893255", "0.58872557", "0.5883212", "0.5883075", "0.5875253", "0.5864123", "0.5862316", "0.5844821", "0.584412", "0.58418804", "0.58332485", "0.5825828", "0.5819984", "0.58199793", "0.58198994", "0.58147186", "0.58114725", "0.5801998", "0.57939994", "0.57851326", "0.57798207", "0.5777484", "0.57763225", "0.57751375", "0.57751375", "0.57751375", "0.57749593", "0.57729036", "0.57706547", "0.5770293", "0.5770286", "0.5770127", "0.5768635", "0.57604915", "0.5756675", "0.5745939", "0.57450557", "0.57441336", "0.57407135", "0.5736428", "0.5732396", "0.57305884", "0.5730421", "0.57271045", "0.57229435", "0.5722275", "0.5714665", "0.5712812", "0.5712619", "0.5711038", "0.5710132", "0.57099885", "0.57097095", "0.57072943", "0.5706548", "0.5704595", "0.5702867", "0.5698535", "0.5696365" ]
0.0
-1
Allow laravel to config:cache this class
public static function __set_state(array $array) { return new self(...array_values($array)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _config_cache(){\n Mapper::config(array('use_cache'=>false));\n \n}", "public function __construct()\n {\n $this->driver = \\App::make(\\App::config('cache.driver')); \n }", "public static function cache()\n {\n $cache = Cache::instance('system');\n if (!$cache->get('config-autoload')) {\n $cache->set('config-autoload', self::$data);\n }\n }", "public function setFinalCachingFrameworkCacheConfiguration() {}", "function getConfig(){\n\n return [\n\n \\Illuminate\\Contracts\\Http\\Kernel::class => LARAVELFLY_SERVICES['kernel'] ? [] : [\n\n 'middleware',\n\n /** depends\n * put new not safe properties here\n */\n // 'newProp1', 'newProp2',\n\n ],\n /* Illuminate\\Events\\EventServiceProvider::class : */\n 'events' => [\n 'listeners', 'wildcards', 'wildcardsCache', 'queueResolver',\n ],\n\n /* Illuminate\\Routing\\RoutingServiceProvider::class : */\n 'router' => [\n /** depends\n * Uncomment them if it's not same on each request. They may be changed by Route::middleware\n */\n // 'middleware','middlewareGroups','middlewarePriority',\n\n /** depends */\n // 'binders',\n\n /** depends */\n // 'patterns',\n\n\n /** not necessary to backup,\n * // 'groupStack',\n */\n\n /** not necessary to backup,\n * it will be changed during next request\n * // 'current',\n */\n\n /** not necessary to backup,\n * the ref to app('request') will be released during next request\n * //'currentRequest',\n */\n\n /* Illuminate\\Routing\\RouteCollection */\n 'obj.routes' => LARAVELFLY_SERVICES['routes'] ? [] : [\n 'routes', 'allRoutes', 'nameList', 'actionList',\n ],\n ], /* end 'router' */\n\n 'url' => [\n /* depends */\n // 'forcedRoot', 'forceScheme',\n // 'rootNamespace',\n // 'sessionResolver','keyResolver',\n // 'formatHostUsing','formatPathUsing',\n\n /** not necessary to backup,\n *\n * the ref to app('request') will be released during next request;\n * and no need set request for `url' on every request , because there is a $app->rebinding for request:\n * $app->rebinding( 'request', $this->requestRebinder() )\n *\n * // 'request',\n *\n * auto reset when request is updated ( setRequest )\n * // 'routeGenerator','cachedRoot', 'cachedSchema',\n *\n * same as 'request'\n * // 'routes'\n */\n ],\n\n\n /** nothing need to backup\n *\n * // 'redirect' => false,\n * // 'routes' => false,\n * // 'log' => false,\n */\n ];\n }", "public function configurationIsCached();", "protected static function getFacadeAccessor() { return 'cache'; }", "private function registerCache()\n {\n $this->app->singleton('firewall.cache', function () {\n return new Cache(app('cache'));\n });\n }", "public static function configurationIsCached(){\n return \\Illuminate\\Foundation\\Application::configurationIsCached();\n }", "public static function getCachedConfigPath(){\n return \\Illuminate\\Foundation\\Application::getCachedConfigPath();\n }", "public function cached()\n {\n // check cache is available else set cache and return\n return Cache::get('Klaravel\\Settings\\Setting', function () {\n $data = $this->get();\n Cache::put('Klaravel\\Settings\\Setting', $data, 60 * 24);\n\n return $data;\n });\n }", "private function registerCache()\n\t{\n\t\t$this->app->singleton('glottos.cache', function($app) {\n\t\t\treturn new Cache();\n\t\t});\n\t}", "private function saveConfig() {\n \tself::$_configInstance = (object)$this->_data; \n file_put_contents($this->_data['cache_config_file'],serialize(self::$_configInstance)); \n }", "protected function initCache()\n {\n $this->di->set('viewCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = new FrontOutput(['lifetime' => $config->get('viewCache')->lifetime]);\n\n $config = $config->get('viewCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime']);\n\n return new $backend($frontend, $config);\n });\n\n $this->di->setShared('modelsCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = '\\Phalcon\\Cache\\Frontend\\\\' . $config->get('modelsCache')->frontend;\n $frontend = new $frontend(['lifetime' => $config->get('modelsCache')->lifetime]);\n\n $config = $config->get('modelsCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime'], $config['frontend']);\n\n return new $backend($frontend, $config);\n });\n\n $this->di->setShared('dataCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = '\\Phalcon\\Cache\\Frontend\\\\' . $config->get('dataCache')->frontend;\n $frontend = new $frontend(['lifetime' => $config->get('dataCache')->lifetime]);\n\n $config = $config->get('dataCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime'], $config['frontend']);\n\n return new $backend($frontend, $config);\n });\n }", "protected function getCacheManager() {}", "protected function getCacheManager() {}", "function cacheConfig() {\n\t\tif(!isset($this->_options['configCachePath'])) {\n\t\t\tthrow new PPI_Exception('Missing path to the config cache path');\n\t\t}\n\n\t\t$path = sprintf('%s%s.%s.cache',\n\t\t\t$this->_options['configCachePath'],\n\t\t\t$this->_options['configFile'],\n\t\t\t$this->_options['configBlock']);\n\n\t\tif(file_exists($path)) {\n\t\t\treturn unserialize(file_get_contents($path));\n\t\t}\n\t\t$config = $this->parseConfig();\n\t\tfile_put_contents($path, serialize($config));\n\t\treturn $config;\n\t}", "public function getConfigClass() {\n return CachingDatasourceConfig::class;\n }", "public static function enableCaching(): void\n {\n static::$caching = true;\n }", "function cache($filename, $loader) {\n global $app;\n if (!class_exists($loader)) throw new Exception('Class doesn\\'t exist');\n if (!is_subclass_of($loader, 'Symfony\\Component\\Config\\Loader\\LoaderInterface')) throw new Exception('The loader should implement LoaderInterface');\n $cachePath = $app['cache_path'].'/'.$filename.'.cache';\n $configCache = new Symfony\\Component\\Config\\ConfigCache($cachePath, true);\n if (!$configCache->isFresh()) {\n $locator = new Symfony\\Component\\Config\\FileLocator($app['config_path']);\n $configFile = $locator->locate($filename, null, true);\n $configLoader = new $loader($locator);\n $config = $configLoader->load($configFile);\n\n $resources = array(new Symfony\\Component\\Config\\Resource\\FileResource($configFile));\n $code = '<?php return ' . var_export($config, true) . \";\\n\";\n $configCache->write($code, $resources);\n }\n return require $cachePath;\n}", "public static function getCache() {}", "protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }", "public function getCacheConfig()\n {\n $config = null;\n if (file_exists($this->options['cache_path'])) {\n $content = @file_get_contents($this->options['cache_path']);\n $config = new Config($this->app, $content);\n }\n return $config;\n }", "function __construct() {\n $this->_cache = [];\n }", "function _biurnal_conf_get_conf_cache($name) {\n ctools_include('object-cache');\n $cache = ctools_object_cache_get('biurnal_conf', $name);\n if (!$cache) {\n $cache = biurnal_conf_load($name);\n if ($cache) {\n $cache->locked = ctools_object_cache_test('biurnal_conf', $name);\n }\n }\n\n return $cache;\n}", "protected function configureCaching() {\n $_CONFIG = array();\n\n require_once ASCMS_CORE_MODULE_PATH . '/Cache/Controller/CacheLib.class.php';\n\n $isInstalled = function($cacheEngine) {\n switch ($cacheEngine) {\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC:\n return extension_loaded('apc');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE:\n return extension_loaded('opcache') || extension_loaded('Zend OPcache');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE:\n return extension_loaded('memcache') || extension_loaded('memcached');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE:\n return extension_loaded('xcache');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM:\n return true;\n }\n };\n\n $isConfigured = function($cacheEngine, $user = false) {\n switch ($cacheEngine) {\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC:\n if ($user) {\n return ini_get('apc.serializer') == 'php';\n }\n return true;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE:\n return ini_get('opcache.save_comments') && ini_get('opcache.load_comments');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE:\n return false;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE:\n if ($user) {\n return (\n ini_get('xcache.var_size') > 0 &&\n ini_get('xcache.admin.user') &&\n ini_get('xcache.admin.pass')\n );\n }\n return ini_get('xcache.size') > 0;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM:\n return is_writable(ASCMS_DOCUMENT_ROOT . '/tmp/cache');\n }\n };\n\n // configure opcaches\n $configureOPCache = function() use($isInstalled, $isConfigured, &$_CONFIG) {\n // APC\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC) && $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC)) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC;\n return;\n }\n\n // Disable zend opcache if it is enabled\n // If save_comments is set to TRUE, doctrine2 will not work properly.\n // It is not possible to set a new value for this directive with php.\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE)) {\n ini_set('opcache.save_comments', 1);\n ini_set('opcache.load_comments', 1);\n ini_set('opcache.enable', 1);\n\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE)) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE;\n return;\n }\n }\n\n // XCache\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE) &&\n $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE)\n ) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE;\n return;\n }\n return false;\n };\n\n // configure user caches\n $configureUserCache = function() use($isInstalled, $isConfigured, &$_CONFIG) {\n // APC\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC)) {\n // have to use serializer \"php\", not \"default\" due to doctrine2 gedmo tree repository\n ini_set('apc.serializer', 'php');\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC, true)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC;\n return;\n }\n }\n\n // Memcache\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE) && $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE;\n return;\n }\n\n // XCache\n if (\n $isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE) &&\n $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE, true)\n ) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE;\n return;\n }\n\n // Filesystem\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM;\n return;\n }\n return false;\n };\n\n if ($configureOPCache() === false) {\n $_CONFIG['cacheOpStatus'] = 'off';\n } else {\n $_CONFIG['cacheOpStatus'] = 'on';\n }\n\n if ($configureUserCache() === false) {\n $_CONFIG['cacheDbStatus'] = 'off';\n } else {\n $_CONFIG['cacheDbStatus'] = 'on';\n }\n\n $objDb = $this->_getDbObject($statusMsg);\n foreach ($_CONFIG as $key => $value) {\n $objDb->Execute(\"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings` SET `setvalue` = '\".$value.\"' WHERE `setname` = '\".$key.\"'\");\n }\n }", "protected function getConfigCacheFactoryService()\n {\n return $this->services['config_cache_factory'] = new \\Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory(array());\n }", "public function __invoke()\n {\n return new ConfigProvider(__DIR__ . '/../config/{{,*.}global,{,*.}local}.php');\n }", "protected function config()\n {\n return $this->make('config');\n }", "public static function initCache()\n {\n// $cache->delete('config');\n }", "abstract protected function getCacheClass();", "public function setCaching($cache);", "private function configure(): void\n {\n if (!$this->app->configurationIsCached()) {\n $this->mergeConfigFrom(__DIR__ . '/../config/paket.php', 'paket');\n }\n }", "public function loadZkConfig()\n {\n $config = $this->getCacheConfig();\n if (empty($config)) {\n $config = $this->cacheConfig();\n }\n if ($config) {\n $config->replaceLaravelConfig($this->options['mode']);\n }\n }", "function _biurnal_conf_set_conf_cache($name, $conf) {\n ctools_include('object-cache');\n $cache = ctools_object_cache_set('biurnal_conf', $name, $conf);\n}", "protected static function getCacheManager() {}", "public static function setCache($caching)\n{\nself::$caching=$caching;\n}", "protected function getCacheModule() {}", "public function getCache();", "public function __construct()\n {\n parent::__construct();\n $this->key = config('config.key', '123456');\n }", "public function initializeCachingFramework() {}", "protected function getClassInfoCache() {}", "protected function getConfigCacheFactoryService()\n {\n return $this->services['config_cache_factory'] = new \\Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory(new RewindableGenerator(function () {\n yield 0 => ${($_ = isset($this->services['dependency_injection.config.container_parameters_resource_checker']) ? $this->services['dependency_injection.config.container_parameters_resource_checker'] : $this->services['dependency_injection.config.container_parameters_resource_checker'] = new \\Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResourceChecker($this)) && false ?: '_'};\n yield 1 => ${($_ = isset($this->services['config.resource.self_checking_resource_checker']) ? $this->services['config.resource.self_checking_resource_checker'] : $this->services['config.resource.self_checking_resource_checker'] = new \\Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker()) && false ?: '_'};\n }, 2));\n }", "public function getCachedConfigPath();", "public function enableCache() :void\n {\n Settings::setCache($this->cacheAdapter->buildCache());\n }", "private function mockCache()\n {\n $this->objectManager->configure([\n 'preferences' => [\n Cache::class => DummyCache::class\n ]\n ]);\n }", "public function cache(): object\n {\n return $this->baseApp($this)->loadCache();\n }", "public function boot()\n {\n define('CACHE_ENABLED', config('destiny.cache', true));\n define('CACHE_DEFAULT', config('destiny.cache_default', false));\n define('CACHE_INDEX', config('destiny.cache_index', 60));\n define('CACHE_PLAYER', config('destiny.cache_player'));\n }", "protected function loadFromCache() {}", "public function useCache()\n {\n return false;\n }", "public function enableCaching()\n {\n $this->cache = true;\n }", "public function setUpCache();", "public function configurationCacheFilePath();", "public static function config()\n {\n return new Config_ForClass(\"AntonyThorpe\\SilverShopUnleashed\\UnleashedAPI\");\n }", "protected function getCacheService()\n {\n return $this->services['cache'] = new \\phpbb\\cache\\service(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, './../', 'php');\n }", "public function __construct()\n {\n Cache::forget('laralum_permissions');\n }", "public function GetConfigClass ();", "public function getCachedConfigPath()\n {\n return $this['path.storage'].'/framework/config.php';\n }", "protected function getConfiguration() {}", "private function cacheConfig(array $config)\n {\n if (isset($config['config_cache_enabled']) && $config['config_cache_enabled'] === true) {\n $cachedConfigFile = $this->getCachedFilePath();\n file_put_contents($cachedConfigFile, '<?php return ' . var_export($config, true) . ';');\n }\n }", "public function __construct(){\n parent::__construct();\n if(!$this->app->config('app.cache.db.connection')){\n $this->app->config(\n 'app.cache.db.connection',\n new \\PDO(\n 'mysql:' .\n 'host=' .$this->app->config('app.db.host') .';'.\n 'port=' .strval($this->app->config('app.db.port')) .';'.\n 'dbname=' .$this->app->config('app.db.name') .';'.\n 'charset=' .$this->app->config('app.db.charset'),\n $this->app->config('app.db.user'),\n $this->app->config('app.db.pwd')\n )\n );\n }\n $this->pdo = $this->app->config('app.cache.db.connection');\n }", "private function cached()\n {\n if (isset(self::$_cached)) {\n $this->_config = self::$_cached;\n return true;\n } else {\n return false;\n }\n }", "public function cacheFor()\n {\n // return now()->addMinutes(5);\n }", "public function getCacheAdapter();", "public function config()\n {\n }", "public static function getCacheControl() {}", "public static function bootCacheTrait() {\n static::saving(function (Model $model) {\n $dirty = $model->getDirtyCached();\n\n $key = Helpers::cacheKey($model);\n if (!empty($dirty))\n lRedis::hmset($key . \":properties\", $dirty);\n }, 1000);\n }", "public function getCacheOptions();", "public function generateConfigCache()\n\t{\n\t\t// Generate the class/template laoder cache file\n\t\t$objCacheFile = new \\File('system/cache/config/autoload.php', true);\n\t\t$objCacheFile->write('<?php '); // add one space to prevent the \"unexpected $end\" error\n\n\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t{\n\t\t\t$strFile = 'system/modules/' . $strModule . '/config/autoload.php';\n\n\t\t\tif (file_exists(TL_ROOT . '/' . $strFile))\n\t\t\t{\n\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile));\n\t\t\t}\n\t\t}\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the module loader cache file\n\t\t$objCacheFile = new \\File('system/cache/config/modules.php', true);\n\t\t$objCacheFile->write(\"<?php\\n\\n\");\n\n\t\t$objCacheFile->append(sprintf(\"static::\\$active = %s;\\n\", var_export(\\ModuleLoader::getActive(), true)));\n\t\t$objCacheFile->append(sprintf(\"static::\\$disabled = %s;\", var_export(\\ModuleLoader::getDisabled(), true)));\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the config cache file\n\t\t$objCacheFile = new \\File('system/cache/config/config.php', true);\n\t\t$objCacheFile->write('<?php '); // add one space to prevent the \"unexpected $end\" error\n\n\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t{\n\t\t\t$strFile = 'system/modules/' . $strModule . '/config/config.php';\n\n\t\t\tif (file_exists(TL_ROOT . '/' . $strFile))\n\t\t\t{\n\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile));\n\t\t\t}\n\t\t}\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the page mapping array\n\t\t$arrMapper = array();\n\t\t$objPages = \\PageModel::findPublishedRootPages();\n\n\t\tif ($objPages !== null)\n\t\t{\n\t\t\twhile ($objPages->next())\n\t\t\t{\n\t\t\t\t$strBase = ($objPages->dns ?: '*');\n\n\t\t\t\tif ($objPages->fallback)\n\t\t\t\t{\n\t\t\t\t\t$arrMapper[$strBase . '/empty.fallback'] = $strBase . '/empty.' . $objPages->language;\n\t\t\t\t}\n\n\t\t\t\t$arrMapper[$strBase . '/empty.' . $objPages->language] = $strBase . '/empty.' . $objPages->language;\n\t\t\t}\n\t\t}\n\n\t\t// Generate the page mapper file\n\t\t$objCacheFile = new \\File('system/cache/config/mapping.php', true);\n\t\t$objCacheFile->write(sprintf(\"<?php\\n\\nreturn %s;\\n\", var_export($arrMapper, true)));\n\t\t$objCacheFile->close();\n\n\t\t// Add a log entry\n\t\t$this->log('Generated the config cache', __METHOD__, TL_CRON);\n\t}", "protected static function createExtLocalconfCacheEntry() {}", "public function configure() {}", "public function configure() {}", "public function __construct()\n {\n parent::__construct();\n $this->config = config($this->configName);\n }", "public function __construct()\n {\n $this->init_config();//init cache config set the driver and path/key;\n if($this->driver==\"redis\") {\n $this->redis = new \\Redis();\n $this->redis->connect(\"127.0.0.1\", 6379);\n }\n if($this->driver==\"file\"){\n $this->file=new file();\n $this->path=dirname(dirname(dirname(__FILE__))).\"/$this->path/\";//set file store path\n }\n }", "protected function include_configuration() {\n $config = new tool_forcedcache_cache_config();\n return $config->include_configuration_wrapper();\n }", "public function cache($options = true);", "public function _AllowCache()\n {\n return true;\n }", "protected function getCache_DriverService()\n {\n return $this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file();\n }", "public static function cache(){\n\n if (!isset(self::$_cache)) {\n if(!GO::isInstalled()){\n self::$_cache=new \\GO\\Base\\Cache\\None();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(!isset(GO::session()->values['cacheDriver'])){\n\t\t\t\t\t\t\t\t$cachePref = array(\n\t\t\t\t\t\t\t\t\t\t\"\\\\GO\\\\Base\\\\Cache\\\\Apcu\",\n\t\t\t\t\t\t\t\t\t\t\"\\\\GO\\\\Base\\\\Cache\\\\Disk\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tforeach($cachePref as $cacheDriver){\n\t\t\t\t\t\t\t\t\t$cache = new $cacheDriver;\n\t\t\t\t\t\t\t\t\tif($cache->supported()){\n\n\t\t\t\t\t\t\t\t\t\tGO::debug(\"Using $cacheDriver cache\");\n\t\t\t\t\t\t\t\t\t\tGO::session()->values['cacheDriver'] = $cacheDriver;\n\t\t\t\t\t\t\t\t\t\tself::$_cache=$cache;\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}\n\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cacheDriver = GO::session()->values['cacheDriver'];\n\t\t\t\t\t\t\t\tGO::debug(\"Using $cacheDriver cache\");\n\t\t\t\t\t\t\t\tself::$_cache = new $cacheDriver;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n }\n return self::$_cache;\n }", "protected function getCache_AppService()\n {\n $this->services['cache.app'] = $instance = new \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter('n5NzkKREKO', 0, (__DIR__.'/pools'));\n\n if ($this->has('monolog.logger.cache')) {\n $instance->setLogger($this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }", "private function loadConfig() {\n if (file_exists($this->_data['cache_config_file'])) {\n $data = unserialize(file_get_contents($this->_data['cache_config_file']));\n \n self::$_configInstance = (object)$data; //instance of stdClass with all the properties public\n //$this->_data = (array)$data; \n return true;\n } \n return false;\n }", "public function cacheGet() {\n }", "protected function init()\n {\n if (null !== $this->config) {\n return;\n }\n\n $cache = $this->getCache();\n $cacheKey = $this->getCacheKey();\n\n if ($cache->isValid($cacheKey, $this->getTimestamp())) {\n $config = $cache->read($cacheKey);\n } else {\n $config = $this->parse();\n $cache->write($cacheKey, $config, $this->getPaths());\n }\n\n $this->config = new Config($config);\n }", "protected function initializeCache() {}", "protected function initializeCache() {}", "private function registerCacheManager()\n {\n $this->app->bind(\n 'CodeZero\\Courier\\Cache\\CacheManager',\n 'CodeZero\\Courier\\Cache\\LaravelCacheManager'\n );\n }", "public function fromCache()\n {\n try {\n $cache = $this->cache->get('config');\n\n if ($cache === false) {\n $cache = array_merge($this->_defaults, $this->getFromDb());\n $this->cache->set('config', $cache);\n }\n\n return $cache;\n }\n catch (Exception $e) {\n Log::error($e->getMessage(), null, __METHOD__);\n }\n }", "public function __construct(){\n parent::__construct();\n\t\t$this->load->library('Memcached_library');\n }", "public function __construct()\n {\n $this->_config = request('_config');\n }", "public function _initConfig() {\r\n $this->config = Yaf\\Application::app()->getConfig();\r\n Yaf\\Registry::set(\"config\", $this->config);\r\n\r\n //申明, 凡是以Foo和Local开头的类, 都是本地类\r\n $this->loader = Yaf\\Loader::getInstance();\r\n $this->loader->registerLocalNamespace([\"fly\"]);\r\n }", "public function model()\n {\n return Config::class;\n }", "private function load_config() {\n $this->config = new Config();\n }", "public function cacheSetup()\n\t{\n\t\t// Generate the name\n\t\t$time = $this->modified;\n\t\t$extension = $this->type;\n\t\t$fileName = pathinfo($this->name, PATHINFO_FILENAME) . \".\" . md5($this->name . '.' . $time);\n\t\t$name = $fileName . \".\" . $extension;\n\n\t\t// Generate the cache file path\n\t\t$this->cacheFilePath = realpath(public_path() . '/' . $this->app['assets::config']['cache_path']) . '/' . $name;\n\n\t\t// Generate the cache file URL\n\t\t$this->cacheFileUrl = $this->app['assets::config']['cache_url'] . $name;\n\n\t\treturn $this->cacheFile = $name;\n\t}", "public function configure();", "public function boot()\n {\n// TKfjhTemp::saved(function($info){\n// $class = new KfjhTempManager();\n//\n// $class_name = substr(explode('\\\\', get_class($class))[count(explode('\\\\', get_class($class))) - 1],0, -7);\n//\n// $cacheKey = \"$class_name:$info->id\";\n//\n// $cacheData = Cache::get($cacheKey);\n//\n// if(!$cacheData){\n// Cache::add($cacheKey, $info,60*24*7);\n// }else{\n// Cache::put($cacheKey, $info,60*24*7);\n// }\n// });\n//\n// TKfjhTemp::deleted(function($info){\n// $class = new KfjhTempManager();\n//\n// $class_name = substr(explode('\\\\', get_class($class))[count(explode('\\\\', get_class($class))) - 1],0, -7);\n//\n// $cacheKey = \"$class_name:$info->id\";\n//\n// $cacheData = Cache::get($cacheKey);\n//\n// if($cacheData){\n// Cache::forget($cacheKey);\n// }\n// });\n }", "public function configure()\n {\n //\n }", "function App_Cache() {\n\t\t\treturn App_Cache::instance()->getAdapter();\n\t\t}", "public function __construct()\n {\n $this->params['config'] = config('app');\n }", "static public function getCache(){\n return static::$cache;\n }", "public function getCacheDirectory() {}", "private function storeCacheSetting()\n {\n Cache::forever('setting', $this->setting->getKeyValueToStoreCache());\n }" ]
[ "0.7338302", "0.7077709", "0.6930809", "0.65155566", "0.6467068", "0.6457315", "0.64368266", "0.6371262", "0.63487214", "0.63246024", "0.6293968", "0.6244461", "0.62275124", "0.6181532", "0.6131005", "0.6130252", "0.60688025", "0.6067575", "0.6030964", "0.6030473", "0.60210943", "0.5996109", "0.59954184", "0.59933704", "0.59711564", "0.5967586", "0.59413546", "0.59344554", "0.5922015", "0.5921375", "0.5918498", "0.5913895", "0.59109634", "0.5889632", "0.588042", "0.586855", "0.5864712", "0.5843947", "0.5842739", "0.5841176", "0.583539", "0.5826179", "0.5821862", "0.5809155", "0.58085835", "0.5797949", "0.5796428", "0.578326", "0.5781444", "0.5773107", "0.5771542", "0.5770673", "0.57685614", "0.5766505", "0.5759064", "0.5726912", "0.5724593", "0.5715089", "0.5707463", "0.5699508", "0.569488", "0.5694414", "0.56843597", "0.56803954", "0.5672569", "0.5669128", "0.5665227", "0.5657874", "0.5657772", "0.56570107", "0.56427324", "0.56427324", "0.5627517", "0.5618282", "0.5615437", "0.560441", "0.5599306", "0.5583284", "0.5581759", "0.55640405", "0.55638915", "0.55604655", "0.55514675", "0.5543184", "0.5536404", "0.55353403", "0.55316", "0.55307007", "0.5525184", "0.5521562", "0.55213696", "0.5499033", "0.54973245", "0.5495837", "0.54884744", "0.5480896", "0.5473161", "0.54726523", "0.5468742", "0.54635286", "0.54615754" ]
0.0
-1
function devolver ultimo id
private function devolverUltimoId() { $rta = 0; if(!empty($_SESSION['Producto'])) { $rta=end($_SESSION['Producto'])->getId(); } return $rta + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generarId (){\n $usuarios = traerTodos();\n\n if (count($usuarios) == 0) {\n return 1;\n }\n $elUltimo = array_pop($usuarios);\n $id = $elUltimo['id'];\n return $id + 1;\n}", "abstract public function get_id();", "public function get_id();", "public function get_id();", "function waktudunia_createid( $tbl_waktudunia ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_waktudunia ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "function buscarPorId($id) {\r\n \r\n }", "function id_articulo($id){\n return (int)limpiarDatos($id);\n}", "function getID();", "function getId();", "function recupererid(){\n\t\t$sql=\"select max(idres) maximum from reservation \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\t foreach($liste as $row){$id=$row['maximum'] ;}\n\t\t return $id;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function id_tarjeta();", "public function obtenerID();", "function buatID($tabel, $inisial){ \n $struktur = mysql_query(\"select * from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $field = mysql_field_name($struktur,0); \n $panjang = mysql_field_len($struktur,0); \n $row = mysql_num_rows($struktur); \n \n $panjanginisial = strlen($inisial); \n $awal = $panjanginisial + 1; \n $bnyk = $panjang-$panjanginisial; \n \n if ($row >= 1){ \n $query = mysql_query(\"select max(substring($field,$awal,$bnyk)) as max from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $hasil = mysql_fetch_assoc($query); \n $angka = intval($hasil['max']); \n } \n else{ \n $angka = 0; \n } \n \n $angka++; \n $tmp= \"\"; \n for ($i=0; $i < ($panjang-$panjanginisial-strlen($angka)) ; $i++){ \n $tmp = $tmp.\"0\"; \n } \n //return hasil generate ID \n return strval($inisial.$tmp.$angka); \n }", "function buatID($tabel, $inisial){ \n $struktur = mysql_query(\"select * from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $field = mysql_field_name($struktur,0); \n $panjang = mysql_field_len($struktur,0); \n $row = mysql_num_rows($struktur); \n \n $panjanginisial = strlen($inisial); \n $awal = $panjanginisial + 1; \n $bnyk = $panjang-$panjanginisial; \n \n if ($row >= 1){ \n $query = mysql_query(\"select max(substring($field,$awal,$bnyk)) as max from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $hasil = mysql_fetch_assoc($query); \n $angka = intval($hasil['max']); \n } \n else{ \n $angka = 0; \n } \n \n $angka++; \n $tmp= \"\"; \n for ($i=0; $i < ($panjang-$panjanginisial-strlen($angka)) ; $i++){ \n $tmp = $tmp.\"0\"; \n } \n //return hasil generate ID \n return strval($inisial.$tmp.$angka); \n }", "function gen_id()\n{\ninclude('../../conexion.php');\n$cod1=mysql_query(\"SELECT IFNULL(max(NRO_FACTURA+1),1) AS ID FROM BOLETA WHERE PROCESO='2'\",$conexion);\n$r2=mysql_fetch_array($cod1);\nreturn $r2['ID'];\n}", "public function getID();", "public function getID();", "public function getID();", "public function determineId() {}", "function ler_id($id) {\n $x = (int)$id;\n if($x >= $this->bd[0][0] || $x <= 0) {return false;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\n return true;\n }", "function getNewId();", "public function getIdfa();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "function idData($table){\n $array=get($table,'id');\n $id=max($array)+1;\n return $id;\n }", "function new_main_user_id() {\n global $db;\n global $config;\n\n // sprawdz ilosc produktow w bazie\n\t$maxid=1;\n\n\t$query=\"SELECT max(id) AS maxid FROM main\";\n\t$result=$db->Query($query);\n\tif ($result!=0) {\n\t $num_rows=$db->NumberOfRows($result);\n\t if ($num_rows>0) {\t\t\n\t\t$maxid=$db->FetchResult($result,0,\"maxid\");\n\t\t$maxid++;\n\t }\n\t} else die ($db->Error());\n \n\treturn $maxid;\n }", "public function obtenerId() {}", "function modeling_publicusershistoriakses_createid( $tbl_publicusers_historiakses ){\n$sql = mysql_query(\"SELECT * FROM $tbl_publicusers_historiakses ORDER BY id DESC\");\n$result = mysql_fetch_object($sql);\n$id = $result->id + 1;\nreturn $id;\n}", "public function buscarID()\n {\n $sentencia = \"SELECT id, cl FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n foreach ($registros as $r) {\n $id = $r->id;\n }\n return $id;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "protected function cargaIdUbicacion() {\n $dao = new PGDAO();\n $strSql = $this->COLECCIONMAPEOUBICA . $this->propiedad->getId_ubica();\n $arrayDatos = $this->leeDBArray($dao->execSql($strSql));\n $id = $arrayDatos[0]['zpubica'];\n return $id;\n }", "function crea_id_imm(){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$q_crea_id_imm = \"SELECT * FROM ultimo_id_imm LIMIT 1\";\n\t$r_crea_id_imm = $db->query($q_crea_id_imm);\n\t$ro_crea_id_imm = mysql_fetch_array($r_crea_id_imm);\n\t$id_imm = $ro_crea_id_imm['id_imm'];\n\t$q_agg=\"update ultimo_id_imm set id_imm = id_imm+1\";\n\t$r_agg=$db->query($q_agg);\n\t\n\treturn $id_imm;\n}", "public function VerUltimoID()\r\n {\r\n\t\r\n\t$reg=mysql_query(\"select max($this->ID) as maxID from $this->tabla\", $this->con) or die('no se pudo encontrar el ultimo ID en VerUltimoID: ' . mysql_error());\r\n\t$reg=mysql_fetch_array($reg);\t\r\n\t\r\n\treturn($reg[\"maxID\"]);\r\n\t\r\n\t}", "abstract function getId();", "public function ultimoID()\n {\n $sentencia = \"SELECT id, clNumReporte FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n\n return $registros;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function getdernierid(){ \n $req=\"SELECT id FROM contrat WHERE id = (SELECT MAX(id) FROM contrat)\";\n //print_r($req);\n $resultat = $this->pdo->query($req);\n $ligne = $resultat->fetch();\n $donnees = $ligne['id'];\n return intval($donnees);\n }", "function getUltimaID() {\n // Conectarse a la base de datos\n $dbc = mysqli_connect(DB_HOST2, DB_USER2, DB_PASSWORD2, DB_NAME2) \n or die(\"ERROR!\" . mysqli_error($dbc));\n\n $query = \"SELECT ID FROM NotificacionVoluntario ORDER BY ID DESC LIMIT 1\";\n $data = mysqli_query($dbc, $query) or die (\"Error\" . mysqli_error($dbc));\n mysqli_close($dbc);\n return mysqli_fetch_array($data)['ID'];\n }", "public function getUltimoId() { \n return $this->ultimoId;\n }", "function get_id($id){\n\t\t$this->id = $id;\n\t}", "abstract public function getId();", "function getIDTabelRiwayatPangkat(){\n\t$query = mysql_query(\"SELECT MAX(id_data) as 'Max' FROM tbl_riwayat_pangkat\") or die(mysql_error());\n\t$row = mysql_fetch_array($query);\n\t$maks = $row['Max'];\n\t$ID = \"\";\n\t\n\tif($maks > 0){\n\t\t$ID = $maks + 1;\n\t}else{\n\t\t$ID = 1;\n\t}\n\t\n\treturn $ID;\n}", "public function get_id()\n {\n }", "public function ID(): int;", "public function suprimerId($id)\n {\n }", "public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "function last_id(){\n\t\treturn(-1);\n\t}", "function id();", "public function id_alternatif()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_alternatif,5)) as id_max from tbl_alternatif\");\n $id = \"\";\n if ($q->num_rows() > 0) {\n foreach ($q->result() as $k) {\n $tmp = ((int) $k->id_max) + 1;\n $id = sprintf(\"%05s\", $tmp);\n }\n } else {\n $id = \"00001\";\n }\n return \"AL-\" . $id;\n }", "static public function mdlObtenerUltimoId() {\r\n\r\n $sql = \"SELECT * FROM compras ORDER BY id DESC Limit 1\";\r\n\r\n $stmt = Conexion::conectar()->prepare($sql);\r\n\r\n $stmt -> execute();\r\n\r\n return $stmt -> fetch();\r\n\r\n }", "private function id($i) {\n\n $tb = \"registered_members\";\n\n $id = ($i == 1) ? \"MIN(id)\" : \"MAX(id)\";\n\n $rst = mysql_query(\"SELECT $id FROM $tb\");\n\n return mysql_fetch_row($rst)[0];\n\n }", "function get_id() {\n\t\treturn $this->id;\n\t}", "public function fetch_the_id() {}", "function get_id(){\n\t\t$new_id;\n\t\tglobal $con;\n\n\t\t$result=mysqli_fetch_array(mysqli_query($con,\"SELECT * FROM spip_forum ORDER BY id_forum DESC LIMIT 1\"));\n\t\t$id=(int)$result[0];\n\t\t$new_id=$id+1;\n\t\treturn $new_id;\n\t}", "function get_id() {\n\t\treturn $this->id;\n\n\t}", "public function GetId () ;", "function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "function get_id(){\n return $this -> id;\n }", "function get_id(){\n return $this -> id;\n }", "function setID(){\n // $result = mysqli_query($connecttable,$sql); \n //result\n mysqli_query($connect,\"delete FROM book\") ; \n \n // $row = mysqli_fetch_assoc($maxid);\n // return ($maxid + 1);\n }", "public function idDefinitivo($tipo,$id){\n $iddef=0;\n $objA=new admonDAO(); //direcionador =1 mandar a admon\n $objM=new medicoDAO(); //direcionar=2 mandar a medico\n $objP=new pacienteDAO(); //direccionar=3 mandar a paciente\n $resul1=$objA->readOneById($id); //error en datos\n $resul2=$objM->readOneById($id);\n $resul3=$objP->readOneById($id);\n \n if($tipo==1){\n for($i=0;$i<count($resul1);$i++){\n $iddef=$resul1[$i]['id_admon'];\n }\n }\n if($tipo==2){\n for($i=0;$i<count($resul2);$i++){\n $iddef=$resul2[$i]['id_medico'];\n }\n }\n if($tipo==3){\n for($i=0;$i<count($resul3);$i++){\n $iddef=$resul3[$i]['id_paciente'];\n }\n }\n \n return $iddef;\n }", "public function generatenewidBarang()\n {\n // mengambil seluruh isi tabel\n $temp = $this->findAll();\n // mengambil row terakhir \n \t$last = end($temp); \n\n // jika $last kosong (jika tabel masih kosong)\n if ($last == Null){\n // mengenerate id baru dengan nilai 1\n $new_id = 1;\n }else{\n // mengenerate id baru dengan nilai id terakhir + 1\n $new_id = $last['id_barang']+1;\n }\n\n // mengembalikan nilai \n return $new_id;\n }", "public function id_nilai_alternatif()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_nilai_alternatif,5)) as id_max from tbl_nilai_alternatif\");\n $id = \"\";\n if ($q->num_rows() > 0) {\n foreach ($q->result() as $k) {\n $tmp = ((int) $k->id_max) + 1;\n $id = sprintf(\"%05s\", $tmp);\n }\n } else {\n $id = \"00001\";\n }\n return \"NAL-\" . $id;\n }", "public function obtenerUltimoId(){\n $usuarios = file_get_contents('usuarios.json');\n $arrUsuariosJSON = explode(PHP_EOL,$usuarios);\n $arrUsuarioPHP = [];\n array_pop($arrUsuariosJSON);\n foreach ($arrUsuariosJSON as $key => $usuario) {\n $arrUsuarioPHP[] = json_decode($usuario,true);\n }\n $ultimo = array_pop($arrUsuarioPHP);\n $id = $ultimo['id'];\n return $id;\n }", "public function datumAddFromId($id){\n $sql = \"select persnr,datum from dzeitsoll where id='$id'\";\n $res = $this->db->query($sql);\n $rows = $res->fetchAll();\n $row = $rows[0];\n $datum = $row['datum'];\n $persnr = $row['persnr'];\n $sqlinsert = \"insert into dzeitsoll (persnr,datum,oe) values('$persnr','$datum','-')\";\n $this->db->query($sqlinsert);\n return $this->db->insertId();\n }", "public function getId(): int;", "function get_id()\r\n {\r\n return $this->id;\r\n }", "function seuraavaID(){\n $kysely = haeYhteys()->prepare(\"SELECT MAX(sanaid) as suurin FROM sana\");\n $kysely->execute();\n $suurin = $kysely->fetchObject()->suurin;\n return $suurin + 1 ;\n }", "public function getID() : string;", "public function ID();", "public function getid(){\r\n\t\tif($this::isLoggedIn()){\r\n\t\t\t$id2=$this->id;\r\n\t\t\treturn $id2;}\r\n\t\telse {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\t//throw new Exception('Nessun utente loggato!');}\r\n\t}", "public static function BuscarUltimaID() {\n try {\n $sql = \"SELECT max(id) as id FROM tb_consultorio\";\n $op = Conexao::getInstance()->prepare($sql);\n $op->execute();\n return (object) $op->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n print \"Ocorreu um erro ao tentar executar esta ação, tente novamente mais tarde.\";\n print_r ($e);\n }\n }", "public static function ObtenerPorID($id) {\n }", "public function get_id(){\n\t\treturn $this->id;\n\t}", "public function getID(): string;", "public function ultimo_id (){\n\t\t$id= mysqli_insert_id($this->descriptor);\n\t\treturn $id;\n\t}", "function bookingstatus_createid( $tbl_bookingstatus ){ /* Fungsi buat id booking status */\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_bookingstatus ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n}", "function next_id($id=\"\") {\n if (ereg(\"^[0-9]+$\",$id)) {\n $id++;\n return $id;\n }\n $id2=1; \n if(ereg(\"[0-9]+$\",$id)==true){\n $id1=ereg_replace(\"[0-9]+$\",\"\",$id);\n preg_match(\"/([0-9]+)$/\",$id,$matches);\n $id2=$matches[1];\n $id2++;\n return $id2;\n } else { \n if (empty($liczba)) $liczba='';\n return $id.$liczba; \n }\n }", "public function getId() ;", "function Atv_getLastIdPresensi(): int\n{\n return PresensiGroup::orderByDesc('id')->first('id')->id;\n}", "function id_unico(){\n\t//echo \"<br>:\".uniqid();\n\t//echo \"<br>:\".strtoupper(uniqid('',true));\n\t//echo \"<br>:\".strtoupper(uniqid('',true));\n\t$cad=strtoupper(uniqid('',true));\n\t$cad=str_replace(\".\", \"\",$cad);\n\t$cad=substr($cad, 0,20);\n\treturn $cad;\n}", "private function queryMaxId(){\r\n $this->conexion->conectar();\r\n $consultaMaxId =\"SELECT (max(id_perfil)+1) AS id FROM perfil\";\r\n $queryId = $this->conexion->ejecutar($consultaMaxId);\r\n while(OCIFetch($queryId)){\r\n $id = ociresult($queryId, \"ID\");\r\n }\r\n $this->conexion->desconectar();\r\n return $id;\r\n }", "abstract public function getId();", "abstract public function getId();", "abstract public function getId();", "function get_id()\n {\n return $this->id;\n }", "protected function IdUserListReproduction ()\n {\n $lista = Model_listas::find('all', array\n (\n 'where' => array\n (\n array('id_usuario'=>$this->userID()),\n array('titulo'=>'reproducidas')\n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n } \n return $id; \n }\n }", "public function getIdVit(){\n\t\treturn ($this->id);\n\t}", "abstract public function objId();", "private function get_id()\n\t{\n\t\treturn $this->m_id;\n\t}", "private function get_id()\n\t{\n\t\treturn $this->m_id;\n\t}", "private function get_id()\n\t{\n\t\treturn $this->m_id;\n\t}", "function get_entrada_pr_pedido_id($id){\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, prf.monto_total as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatuse, e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and prf.pr_pedido_id='$id'\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id,e.lote_id, cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc\";\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function divorced() \n { \n $this->marsta_id=\"D\";\n $this->marsta_name=\"Divorced\";\n return($this->marsta_id);\n }", "private static function _id($id)\n {\n return ($id == Null)?Null:' id=\"'.$id.'\"';\n }" ]
[ "0.72490925", "0.7244267", "0.7226961", "0.7226961", "0.72198176", "0.7165965", "0.7142672", "0.7140708", "0.7134105", "0.7131922", "0.71190435", "0.7111443", "0.70976925", "0.70976925", "0.7075406", "0.7065612", "0.7065612", "0.7065612", "0.70616543", "0.7051914", "0.7004046", "0.69886684", "0.6982707", "0.6982707", "0.6982707", "0.6982707", "0.6982707", "0.6982707", "0.6982707", "0.6982707", "0.6982707", "0.69819", "0.69601774", "0.69601154", "0.69403917", "0.6938856", "0.691785", "0.6908267", "0.6899143", "0.6881819", "0.6877189", "0.68759334", "0.684982", "0.6836695", "0.6817818", "0.68173224", "0.67976534", "0.67838573", "0.67798054", "0.6777735", "0.67696387", "0.67494434", "0.6745228", "0.6733245", "0.67140657", "0.6711905", "0.6708578", "0.6702051", "0.6698926", "0.6697949", "0.667809", "0.66685194", "0.66570675", "0.66570675", "0.6648637", "0.6647709", "0.66296107", "0.661803", "0.6613287", "0.65996563", "0.6599575", "0.65909797", "0.65909106", "0.658565", "0.6583754", "0.65794176", "0.65783787", "0.6576668", "0.6574616", "0.6570556", "0.6570336", "0.6565029", "0.65606827", "0.6554078", "0.6552574", "0.65507996", "0.6546826", "0.6545394", "0.6545394", "0.6545394", "0.6544446", "0.6541092", "0.65384144", "0.65359944", "0.6535317", "0.6535317", "0.6535317", "0.65337414", "0.6530537", "0.65266883" ]
0.7108955
12
Adds a new item to sitemap.
function addItem(SitemapItem $item) { $this->items[] = $item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItem(SitemapItem $item){\r\n $this->items[] = $item;\r\n }", "public function add(string $name, Sitemap $sitemap);", "public function addSitemap( $sitemap )\n {\n $this->sitemaps[] = $sitemap;\n }", "protected function addSitemap()\n {\n $sitemapHeader = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'\n . ($this->includeGeneratorInfo ? $this::$generatorInfo : '')\n . '<urlset xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"'\n . ' xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9'\n . ' http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\"'\n . ' xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"></urlset>';\n $this->sitemaps[] = [\n 'xml' => new \\SimpleXMLElement($sitemapHeader),\n 'filename' => '',\n ];\n }", "public function add($item);", "public function add($item);", "public function addItem($item)\n {\n if (!($item instanceof sfSitemapItem))\n {\n // the object is of the wrong class\n $error = 'Parameter of addItem() is not of class sfSitemapItem';\n\n throw new Exception($error);\n }\n $item->setSitemap($this);\n $this->items[] = $item;\n \n return $this;\n }", "public function add($item) {\n $this->items[$item->id()] = $item;\n }", "public function try_to_add_item( $item ) {\n\t\t_deprecated_function(\n\t\t\t'Jetpack_Sitemap_Buffer::try_to_add_item',\n\t\t\t'5.3.0',\n\t\t\t'Jetpack_Sitemap_Buffer::append'\n\t\t);\n\t\t$this->append( $item );\n\t}", "public function addItemFromArray($item_array)\n {\n $this->items[] = new sfSitemapItem($item_array);\n \n return $this;\n }", "public function addItem($item){\n $this->items[] = $item;\n }", "public function dynamicItems(Sitemap $sitemap): void;", "public function add($item, $url = '')\n {\n $this->validateItemClassType($item);\n $this->createSitemapFile();\n\n $xmlData = $item->build();\n if (false === $this->isNewFileIsRequired() && false === $this->isSurpassingFileSizeLimit($xmlData)) {\n $this->appendToFile($xmlData);\n ++$this->totalItems;\n\n return $this;\n }\n\n $this->createAdditionalSitemapFile($item);\n\n return $this;\n }", "function add($item);", "abstract public function add_item();", "function addItem(&$item) {\n\t\tglobal $CONF ; \n\t\t$this->items [$item->alias] = $item;\n\t\t$item->menu = $this ;\n\t}", "public function add($item, $id = null);", "public function addChild(SitemapInterface $sitemap): bool;", "public function add_item($zajlib_feed_item){\n\t\t$this->items[] = $zajlib_feed_item; \n\t}", "protected function trackAdd($item, $key) {\n\t\t/** @var RepeaterPage $item */\n\t\t$item->traversalPages($this);\n\t\tparent::trackAdd($item, $key);\n\t}", "public function addItem($item)\n\t{\n\t\t$this->_items[] = $item;\n\t}", "public function AddItem($item)\n {\n $this->_items[] = $item;\n }", "public function push($item)\n {\n $this->items[] = $item;\n }", "public function add($item)\n {\n $this->addArray('content', $item, 'Element');\n }", "public function addItem($loc, $priority = self::DEFAULT_PRIORITY, $changefreq = NULL, $lastmod = NULL)\n {\n // First file\n if ($this->getCurrentItem() == 0) {\n $this->startSitemap();\n // End file because of limit size\n } else if (($this->getCurrentItem() % self::ITEM_PER_SITEMAP) == 0) {\n $this->endSitemap();\n $this->incCurrentSitemap();\n $this->startSitemap();\n }\n $this->incCurrentItem();\n\n // URL element\n $this->getWriter()->startElement('url');\n $this->getWriter()->writeElement('loc', $loc);\n $this->getWriter()->writeElement('priority', $priority);\n if ($changefreq) {\n $this->getWriter()->writeElement('changefreq', $changefreq);\n }\n if ($lastmod) {\n $this->getWriter()->writeElement('lastmod', $this->getLastModifiedDate($lastmod));\n }\n $this->getWriter()->endElement();\n\n return $this;\n }", "protected function add($item)\n {\n if ($item instanceof Item) {\n $this->breadcrumb[] = (object) [\n 'url' => $item->getUrl(),\n 'title' => $item->getTitle(),\n ];\n }\n }", "public function add( $item )\n\t\t{\n\t\t\tarray_push( $this->items, $item );\n\t\t}", "function add( $url, $extensions = array() )\n {\n if ( trim( $url ) == \"\" )\n {\n return;\n }\n\n $node = $this->dom->createElement( constant( get_class( $this ) . '::ITEMNAME' ) );\n $subNode = $this->dom->createElement( 'loc' );\n $subNode->appendChild( $this->dom->createTextNode( $url ) );\n $node->appendChild( $subNode );\n\n if ( is_array( $extensions ) )\n {\n foreach ( $extensions as $extension )\n {\n if ( $extension instanceof xrowSitemapItem )\n {\n $node->appendChild( $extension->DOMElement( $this ) );\n }\n }\n }\n\n // mobile stuff\n $m = $this->dom->createElement( 'mobile:mobile' );\n $node->appendChild( $m );\n\n // append to root node\n $this->root->appendChild( $node );\n }", "public function push($item)\n {\n $this->list[] = $item;\n }", "public function addItem($key, $value);", "public function add_to_route($title,$item) {\n\t\tif (is_string($item)) $item = array('url' => $item);\n\t\t$this->route_extra[] = array($title,$item);\n\t}", "public function push($item): void;", "public function add(string $key, Link $item)\n {\n $this->links[$key] = $item;\n }", "public function addSitemapIndexEntry($url) {\n \n $xml = '<sitemap>';\n\t$xml .= ' <loc>'.$url.'</loc>';\n $xml .= ' <lastmod>'.date('Y-m-d',mktime()).'</lastmod>';\n $xml .= '</sitemap>';\t\n \n return $xml;\n }", "public function staticItems(Sitemap $sitemap): void;", "function addItemForUpdate($item) {\n $this->_update[$item->getId()] = $item;\n }", "public function addRoute(Route $route, RoumenSitemap $sitemap)\n {\n // See if we can do it simple or not\n $uri = $route->uri();\n if (preg_match('#\\{(\\w+)\\}#', $uri, $matches)) {\n $model = 'App\\\\'.ucfirst($matches[1]);\n $this->addModels($uri, $model, $sitemap);\n } else {\n $sitemap->add(URL::to($uri));\n }\n }", "function add($item) {\n\t\t\tif(!$this->contains($items)) {\n\t\t\t\tarray_push($this->items, $item);\n\t\t\t}\n\t\t}", "public function addItem($item)\n {\n // Push item into list of array\n array_push($this->items, $item);\n }", "public function addModel($uri, Model $model, RoumenSitemap $sitemap)\n {\n $sitemap->add(\n $this->makeUrl($uri, $model),\n $this->makeDate($model));\n }", "public function addItem(SagepayItem $item)\r\n {\r\n $this->_items[] = $item;\r\n }", "protected function _push($item)\n { \n $node = new Tree_Node($item);\n \n if ($tree = $this->_traverse($this->getRootNode(), $node)) {\n $tree->attach($node);\n }\n }", "public function register_sitemaps()\n {\n }", "public function push($item): void\n {\n $this->elements[] = $item;\n }", "public function addElement($item)\n {\n $this->items[$this->itemsCount] = $item;\n $this->itemsCount++;\n }", "private function addSitemapFile($fileName)\n {\n $this->sitemapFiles[] = $fileName;\n }", "public function add($item)\n {\n $this->manuallyAddedData[] = $item;\n }", "function addItem($title,$link,$description,$optional=\"\"){\r\n\t\t\t$item = array(\r\n\t\t\t\t\t\t\t\"title\"\t\t\t=> \t$title,\r\n\t\t\t\t\t\t\t\"link\"\t\t\t=>\t$link,\r\n\t\t\t\t\t\t\t\"description\"\t=>\t$description\r\n\t\t\t\t\t\t);\r\n\t\t\t\r\n\t\t\t//RSS2.0 upgrade if needed\t\t\t\t\t\t\r\n\t\t\tif(is_array($optional)){\r\n\t\t\t\t$item = array_merge($item,$optional);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->items[] = $item;\r\n\t\t}", "public function addItem($item, $key=null)\r\n\t{\r\n\t\tif (isset($item))\r\n\t\t{\r\n\t\t\tif (isset($key)) {\r\n\t\t\t\t$this->_items[$key] = $item;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->_items[] = $item;\r\n\t\t\t}\r\n\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public static function addLink($loc, $options = array())\n\t{\n\t\t$link = new SitemapURL($loc, $options);\n\t\tarray_push(static::$links, $link);\n\t}", "public function createSitemap()\n {\n if (count($this->urls) < 1) {\n throw new \\BadMethodCallException(\n 'To create a sitemap, first add URLs with the addUrl()'\n . ' or addUrls() functions.'\n );\n }\n foreach ($this->urls as $url) {\n $this->pushUrl($url);\n }\n $postfix = $this->gzipSitemaps ? '.gz' : '';\n if (count($this->sitemaps) > 1) {\n $sitemapCounter = 1;\n foreach ($this->sitemaps as &$sitemap) {\n $filename = str_replace(\n '.xml',\n $sitemapCounter++ . '.xml',\n $this->sitemapFilename\n );\n $sitemap['filename'] = $filename . $postfix;\n }\n unset($sitemap);\n $this->createIndex();\n } else {\n $this->sitemaps[0]['filename'] = $this->sitemapFilename . $postfix;\n }\n }", "public function add(Route $route)\n {\n // Don't act if the sitemap is cached\n if (app('sitemap')->isCached()) return;\n\n // Open a closure that will capture logic to generate sitemap items from\n $this->routes[] = function(RoumenSitemap $sitemap) use ($route) {\n $this->addRoute($route, $sitemap);\n };\n }", "public function attachSitemap($loc, $lastMod);", "public function KemiSitemap_add_menu_page()\n {\n add_options_page(\n 'Kemi Creative Sitemap',\n 'Kemi Sitemap',\n 'manage_options',\n KEMISITEMAP_SLUG,\n array( $this, 'KemiSitemap_options_page' )\n );\n }", "public function addItem($item) {\n\t\t$this->result .= '<li>' . $item . '</li>' . PHP_EOL;\n\t}", "public function put(Item $item)\n {\n $this->items->push($item);\n }", "public function addItem($name, \\Nne\\Core\\Menu\\MenuItem $item){\n $this->items[$name] = $item;\n }", "public function insert($item): void;", "public function addItem(Varien_Object $item)\n {\n $itemId = $this->_getItemId($item);\n if (!is_null($itemId) && isset($this->_items[$itemId])) \n {\n $this->_items[$itemId] = $item;\n return $this;\n }\n return parent::addItem($item);\n }", "public function addItem($feedItem)\n {\n $this->items[] = $feedItem;\n }", "function wp_register_sitemap_provider($name, \\WP_Sitemaps_Provider $provider)\n {\n }", "public function addItem(ItemInterface $item);", "public function addItem(ItemInterface $item);", "public function addAction() {\t\t\n\t\t$arUser = $this->authenticate();\n\t\tif( !$this->_request->isPost()) {\n\t\t\t$this->view->channel_id = $this->_getParam('channel_id');\n\t\t\t$this->view->formAction = $this->getRequest()->getBaseUrl().'/item/add';\n\t\t} else {\n\t\t\t$channelID = (int)$this->_getParam('channel_id');\n\t\t\t$item = new Items();\t\t\t\n\t\t\t$item->addItem($channelID, $this->_getParam('title'), $arUser['id']);\n\t\t\t$this->_helper->redirector->goto('add', 'item', null, array('channel_id'=>$channelID));\n\t\t}\t\t\n\t}", "public function add(string $key, mixed $item): self;", "public function insertItem($item){\n\t\t$hour = date ( 'H', strtotime ( $item->list_time ) );\n\t\t$this->hours[$hour][DayShelfStrategy::HOUR_FIELD_ITEMLIST][] = $item;\n\t}", "public function add(Path $item): void\n {\n $path = $item->getPath();\n $value = $item->getValue();\n $index = array_pop($path);\n $array = [];\n\n if (count($path) > 0) {\n if (false === is_int($index) && false === is_string($index)) {\n $index = (string) $index;\n }\n\n $this->insertIntoArray($array, $path, [$index => $value]);\n } elseif (null === $index) {\n $array = [$value];\n } else {\n $array = [$index => $value];\n }\n\n $this->data = array_replace_recursive($this->data, $array);\n }", "public function insert($item)\n {\n $this->insertItem($item, $this->root);\n }", "function register($item)\n {\n if (is_a($item, 'DVD') || is_a($item, 'Magazine') || is_a($item, 'Book')) {\n $item->setID(sizeof($this->collection) + 1);\n array_push($this->collection, $item);\n }\n }", "public function addPathwayItem($name, $link='', $bItemid = false)\r\n {\r\n global $mainframe;\r\n $jinput = JFactory::getApplication()->input; \r\n $itemid = $jinput->getInt('Itemid', 0);\r\n \r\n if($itemid == 0 || $bItemid)\r\n {\r\n $pathway = &$mainframe->getPathway();\r\n return $pathway->addItem($name, $link);\r\n }\r\n \r\n return false;\r\n }", "private function incCurrentSitemap()\n {\n $this->current_sitemap = $this->current_sitemap + 1;\n }", "public function addItem()\n {\n $oConfig = \\OxidEsales\\Eshop\\Core\\Registry::getConfig();\n $aArticles = $this->_getActionIds('oxarticles.oxid');\n $sProjectId = $oConfig->getRequestParameter('projectid');\n $sArticleTable = $this->_getViewName('oxarticles');\n\n if (1 === intval(\\OxidEsales\\Eshop\\Core\\Registry::getConfig()->getRequestParameter('all'))) {\n $aArticles = $this->_getAll($this->_addFilter(\"SELECT $sArticleTable.OXID \" . $this->_getQuery()));\n }\n\n foreach ($aArticles as $sArticleID) {\n $oProjectToCMS = oxNew('\\Eurotext\\Translationmanager\\Model\\ProjectToArticle');\n $oProjectToCMS->assign(\n array(\n 'ettm_project2article__project_id' => $sProjectId,\n 'ettm_project2article__oxarticleid' => $sArticleID,\n )\n );\n $oProjectToCMS->save();\n }\n return;\n }", "function addItem ($userId, $item)\n\t{\n\t\t$now = date (\"Y-m-d H:i:s\");\n\t\t$query = sprintf ($this->queries['addItem'],\n\t\t\t$userId,\n\t\t\taddslashes ($item->parentId),\n\t\t\taddslashes ($item->isParent),\n\t\t\taddslashes ($item->name),\n\t\t\taddslashes ($item->description),\n\t\t\taddslashes ($item->visibility),\n\t\t\taddslashes ($item->category),\n\t\t\t$now,\n\t\t\taddslashes ($item->login),\n\t\t\taddslashes ($item->password),\n\t\t\taddslashes ($item->url));\n\t\t$result = $this->db->Execute($query)\n\t\t\tor die(\"AddItem: \" . $this->db->ErrorMsg() . \" \" . $query);\n\t}", "public static function addRoute($route, $params = array(), $options = array())\n\t{\n\t\t$link = new SitemapURL(route($route, $params), $options);\n\t\tarray_push(static::$links, $link);\n\t}", "public function add($title,$item) {\n\t\tif (!Core_Types::is_iterable($item)) $item = array('uri' => $item, 'url' => $item);\n\t\tif (isset($item['title'])) {\n\t\t\t$title = $item['title'];\n\t\t}\n\t\t$title = CMS::lang($title);\n\t\t\n\t\t\n\t\t\n\t\t//Events::dispatch('cms.navigation.add', $ev = Events::Event(array('title' => $title, 'data' => $item, 'url' => $item['url'])));\n\t\t//$title = $ev['title'];\n\t\t//$item = $ev['data'];\n\t\t//$item['url'] = $ev['url'];\n\t\t\n\t\t$url = $item['url'];\n\t\tEvents::call('cms.navigation.add',$title,$item,$url);\n\t\t$item['url'] = $url;\n\t\t\n\t\t$access = isset($item['access'])?trim($item['access']):'';\n\t\tif ($access!=''&&!CMS::check_globals_or($access)) return $this;\n\n\t\tif (isset($item['disabled'])) if (CMS::check_yes($item['disabled'])) return $this;\n\t\t\n\t\t$uri = '';\n\t\tif (isset($item['uri'])) $uri = $item['uri'];\n\t\tif (isset($item['url'])) $uri = $item['url'];\n\t\t$id = isset($item['id'])? $item['id'] : md5($title.$uri);\n\t\tif (isset($item['navigation_id'])) $id = trim($item['navigation_id']);\n\t\t$selected = false;\n\t\t$disabled = false;\n\t\tif (isset($item['match'])) {\n\t\t\tif (preg_match($item['match'],CMS_Navigation3::$uri)) {\n\t\t\t\t$selected = true;\n\t\t\t}\t\n\t\t}\n\t\tif (isset($item['flag'])) {\n\t\t\tif (CMS::$navigation->is_flag($item['flag'])) $selected = true;\n\t\t}\n\t\tif ($uri==CMS_Navigation3::$uri) $selected = true;\n\t\t$item['selected'] = $selected;\n\t\t$item['disabled'] = $disabled;\n\t\t\n\t\t$sub = isset($item['sub'])?$item['sub']:null;\n\t\t\n\t\tif (is_string($sub)) {\n\t\t\t$sub = trim($sub);\n\t\t\t$_component = $sub;\n\t\t\t$_parms = $uri;\n\t\t\tif ($m = Core_Regexps::match_with_results('{^([^\\s]+)\\s+(.+)$}',$sub)) {\n\t\t\t\t$_component = trim($m[1]);\n\t\t\t\t$_parms = trim($m[2]);\n\t\t\t}\n\t\t\tif (CMS::component_exists($_component)) {\n\t\t\t\t$_class = CMS::$component_names[$_component];\n\t\t\t\t$_classref = Core_Types::reflection_for($_class);\n\t\t\t\t$sub = $_classref->hasMethod('navigation_tree')? $_classref->getMethod('navigation_tree')->invokeArgs(NULL,array($_parms,$item)) : false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Core_Types::is_iterable($sub)) {\n\t\t\t$set = new CMS_Navigation3_LinkSet();\n\t\t\t$set->level_num = $this->level_num+1;\n\t\t\t$set->process($sub);\n\t\t\t$this->link($id,$uri,$title,$item,$set);\n\t\t}\n\t\telse {\n\t\t\t$this->link($id,$uri,$title,$item);\n\t\t}\t\n\t\t\n\t\treturn $this;\n\t}", "public function add($item, $id){\n $storedItem = ['qty' => 0,\n 'price'=>$item->price,\n 'item' => $item]; //servirá para os grupos, para nao tar a adicionar 2 da mesma coisa\n\n if($this->items){ //verificar se ja ha items no array\n if (array_key_exists($id, $this->items)){ //verificar se ja existe o item que eu quero adicionar\n $storedItem = $this->items[$id];\n }\n }\n\n $storedItem['qty']++;\n $storedItem['price'] = $item->price * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n $this->totalQty++;\n $this->totalPrice += $item->price;\n\n }", "public function add(WebPage $page);", "public function add_menu_item() {\n\t\t$screen_hook = add_options_page(\n\t\t\t__( 'SatisPress', 'satispress' ),\n\t\t\t__( 'SatisPress', 'satispress' ),\n\t\t\t'manage_options',\n\t\t\t'satispress',\n\t\t\tarray( $this, 'render_screen' )\n\t\t);\n\n\t\tadd_action( 'load-' . $screen_hook, array( $this, 'setup_screen' ) );\n\t}", "public function add($key, $name, $url, $sort = 0, $icon = null, $rolePerms = null)\n {\n if ($this->in_array_r($key, $this->items)) {\n return;\n }\n\n $item = array(\n 'key' => $key,\n 'name' => $name,\n 'url' => $url,\n 'sort' => $sort,\n 'icon' => $icon,\n 'rolePerms' => $rolePerms,\n 'children' => array()\n );\n\n $children = str_replace('.', '.children.', $key);\n array_set($this->items, $children, $item);\n\n if($url == $this->current) {\n $this->currentKey = $key;\n }\n }", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增轮播图';\n $this->global['pageName'] = 'carousel_add';\n $data = '';\n\n $this->loadViews(\"carousel_add\", $this->global, $data, NULL);\n }\n }", "protected function addURLInfo($pURL)\n {\n $this->mNumURLs++;\n if ( count($this->mCurrentSitemap) >= self::MAX_URLS_PER_SITEMAP)\n {\n $this->writeSitemap();\n $this->mCurrentSitemap = array();\n }\n $this->mCurrentSitemap[] = $pURL;\n }", "public function addNewContentItem(ContentItem $contentItem)\n {\n $this->contentItems->addContentItemToCollection($contentItem);\n }", "function addLocatorItems()\n\t{\n\t\tglobal $ilLocator;\n\t\t\n\t\tif (is_object($this->object))\n\t\t{\n\t\t\t$ilLocator->addItem($this->object->getTitle(),\n\t\t\t\t$this->getGotoLink($this->object->getRefId()), \"\", $_GET[\"ref_id\"]);\n\t\t}\n\t}", "public function add($item)\n {\n $this->queueItems[] = $item;\n }", "public function addItem(Cart $cart, CartItem $item);", "protected function addLocation($remote_id, $item)\n {\n if(!empty($item['latitude']) && !empty($item['longitude']) && !empty($item['address']))\n {\n $pointObj = new Point($item['latitude'], $item['longitude']);\n $point = [\n 'location' => DB::raw(sprintf(\"ST_GeogFromText('%s')\", $pointObj->toWKT())),\n 'address' => $item['address'],\n ];\n $this->locations[$remote_id] = $point;\n }\n }", "public function add($item)\n {\n $this->addArray('content', $item, array('ButtonContainer', 'Container', 'Form', 'Heading', 'HTML', 'Image', 'Checkbox', 'Email', 'HiddenField', 'Label', 'Password', 'Phone', 'RadioButtons', 'SelectMenu', 'TextInput', 'TextArea', 'Upload', 'XList', 'Table'));\n }", "public function addItem($pageItem)\n {\n return self::$pageClosed ? null : parent::addItem($pageItem);\n }", "protected function push(Component $item)\n\t{\n\t\t$this->items[] = $item;\n\t}", "public function addItem($menuItem)\r\n\t{\r\n\t\t$this->items[$menuItem->moduleName] = $menuItem;\r\n\t}", "public function addItem($item)\n\t{\n\t\tif(is_array($item))\n\t\t{\n\t\t\t$this->items[] = $item;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function add($item)\n {\n if ($item instanceof ItemInterface) {\n $this->items[] = $item;\n } else {\n $this->items[] = new PayPalItem($item);\n }\n }", "protected function pushSitemap(array $sitemap)\n {\n $index = $this->getIndex();\n while (!$this->pushSitemapToIndex($index, $sitemap)) {\n $this->addIndex();\n $index = $this->getIndex();\n }\n }", "public static function addSiteMapElement($xml, $siteMapelementsArr){\n \n foreach ($siteMapelementsArr as $oneElement){\n //start at url node\n $url = $xml->addChild('url');\n \n //use loop to add all elements to url node\n foreach ($oneElement as $key=>$value) {\n if ($key == 'lastmod') {\n $value = date('Y-m-d', strtotime($value));\n }//force format date.\n \n $loc = $url->addChild($key, $value);\n }\n \n }\n \n }", "public function addItem($item)\n {\n if ($item instanceof \\Fastbill\\Item\\Item)\n {\n $this['ITEMS'][] = $item;\n }\n else\n {\n $itemObj = new \\Fastbill\\Item\\Item();\n $itemObj->fillFromArray($item);\n $this['ITEMS'];\n }\n\n }", "function addItemForInsert($item, $batch_id=null) {\n if($batch_id != null) {\n $this->_insert[$batch_id] = $item;\n } else {\n $this->_insert[] = $item;\n }\n }", "private function _add( $url, $position = null )\n {\n if( ! $position )\n\n $this->_modules[] = $url;\n\n else\n\n $this->_modules[ $position ] = $url;\n }", "public function add($title,$item) {\n\t\treturn $this->sets[':default']->add($title,$item);\n\t}", "public function addItem($item_id, $item_type) {\n $this->apiCall('items.json', 'POST', array('pio_iid' => $item_id, 'pio_itypes' => $item_type));\n }", "protected function pushUrlToSitemap(\\SimpleXMLElement $sitemap,\n \\SplFixedArray $url\n ) {\n if ($sitemap->count() >= static::MAX_URLS_PER_SITEMAP) {\n return false;\n }\n $row = $sitemap->addChild('url');\n $row->addChild(\n 'loc',\n htmlspecialchars(\n $url[static::URL_PARAM_LOC],\n ENT_QUOTES,\n 'UTF-8'\n )\n );\n if (\n isset($url[static::URL_PARAM_LASTMOD])\n && !is_null($url[static::URL_PARAM_LASTMOD])\n ) {\n $row->addChild('lastmod', $url[static::URL_PARAM_LASTMOD]);\n }\n if (\n isset($url[static::URL_PARAM_CHANGEFREQ])\n && !is_null($url[static::URL_PARAM_CHANGEFREQ])\n ) {\n $row->addChild('changefreq', $url[static::URL_PARAM_CHANGEFREQ]);\n }\n if (\n isset($url[static::URL_PARAM_PRIORITY])\n && !is_null($url[static::URL_PARAM_PRIORITY])\n ) {\n $row->addChild('priority', $url[static::URL_PARAM_PRIORITY]);\n }\n// if (strlen($sitemap->asXML()) > static::MAX_SITEMAP_SIZE) {\n// unset($sitemap->url[$sitemap->count() - 1]);\n// return false;\n// }\n return true;\n }" ]
[ "0.8043403", "0.7810424", "0.6954832", "0.6809744", "0.67661625", "0.67661625", "0.67432827", "0.6610635", "0.66050076", "0.65394944", "0.6379383", "0.63523346", "0.63366807", "0.6325546", "0.6288482", "0.6240453", "0.6233629", "0.62150526", "0.6213974", "0.6142748", "0.6121195", "0.61051625", "0.6093978", "0.6085844", "0.6071591", "0.607065", "0.60692376", "0.60603714", "0.6047467", "0.60337955", "0.6026493", "0.60205364", "0.6020051", "0.6012182", "0.5995385", "0.59883374", "0.59870154", "0.596384", "0.5950586", "0.5929995", "0.5906378", "0.59057766", "0.588283", "0.5853067", "0.58241266", "0.5820183", "0.5809873", "0.5785262", "0.5775052", "0.57710046", "0.57648575", "0.57641876", "0.57373774", "0.57160753", "0.5714134", "0.56938946", "0.56899387", "0.5677919", "0.5673794", "0.5672244", "0.5668916", "0.5663152", "0.5663152", "0.56532115", "0.56348926", "0.5632045", "0.561786", "0.56106585", "0.56047505", "0.5566119", "0.5563834", "0.5554413", "0.5518479", "0.5517773", "0.55125046", "0.54975307", "0.54971623", "0.54939747", "0.5474279", "0.5472836", "0.5466762", "0.54659534", "0.54509574", "0.543698", "0.54308766", "0.5429022", "0.54186296", "0.5414572", "0.5412562", "0.54058325", "0.53967756", "0.53886515", "0.53840715", "0.53682405", "0.5359723", "0.5355768", "0.5354387", "0.53528476", "0.5347454", "0.5346132" ]
0.7805971
2
Escapes sitemap entities according to spec.
private static function escapeEntites($var) { $entities = array( '&' => '&amp;', "'" => '&apos;', '"' => '&quot;', '>' => '&gt;', '<' => '&lt;' ); return str_replace(array_keys($entities), array_values($entities), $var); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _twig_escape_html_attr_callback($matches)\n{\n /*\n * While HTML supports far more named entities, the lowest common denominator\n * has become HTML5's XML Serialisation which is restricted to the those named\n * entities that XML supports. Using HTML entities would result in this error:\n * XML Parsing Error: undefined entity\n */\n static $entityMap = array(\n 34 => 'quot', /* quotation mark */\n 38 => 'amp', /* ampersand */\n 60 => 'lt', /* less-than sign */\n 62 => 'gt', /* greater-than sign */\n );\n $chr = $matches[0];\n $ord = ord($chr);\n /**\n * The following replaces characters undefined in HTML with the\n * hex entity for the Unicode replacement character.\n */\n if (($ord <= 0x1f && $chr != \"\\t\" && $chr != \"\\n\" && $chr != \"\\r\") || ($ord >= 0x7f && $ord <= 0x9f)) {\n return '&#xFFFD;';\n }\n /**\n * Check if the current character to escape has a name entity we should\n * replace it with while grabbing the hex value of the character.\n */\n if (strlen($chr) == 1) {\n $hex = strtoupper(substr('00'.bin2hex($chr), -2));\n } else {\n $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8');\n $hex = strtoupper(substr('0000'.bin2hex($chr), -4));\n }\n $int = hexdec($hex);\n if (array_key_exists($int, $entityMap)) {\n return sprintf('&%s;', $entityMap[$int]);\n }\n /**\n * Per OWASP recommendations, we'll use hex entities for any other\n * characters where a named entity does not exist.\n */\n return sprintf('&#x%s;', $hex);\n}", "private static function escapeEntites($var){\r\n $entities = array(\r\n '&' => '&amp;',\r\n \"'\" => '&apos;',\r\n '\"' => '&quot;',\r\n '>' => '&gt;',\r\n '<' => '&lt;'\r\n );\r\n return str_replace(array_keys($entities), array_values($entities), $var);\r\n }", "private static function entities($data)\n {\n return strtr($data, array(\n '<' => '&lt;',\n '>' => '&gt;',\n '\"' => '&quot;'\n ));\n }", "function escapeXML($strItem, $forDataURL) {\n\t//Common replacements\n $findStr = array(\"&\", \"<\", \">\", \"'\");\n $repStr = array(\"&amp;\", \"&lt;\", \"&gt;\", \"&apos;\");\n $strItem = str_replace($findStr, $repStr, $strItem); \n\t//We've not considered any special characters here. \n\t//You can add them as per your language and requirements.\n\t//Return\n\treturn $strItem;\n}", "function amap_ma_get_entity_description($desc) {\n $entity_description = preg_replace('/[^(\\x20-\\x7F)]*/', '', $desc);\n $entity_description = amap_ma_remove_shits($entity_description);\n\n // code below replace the &quot; with \" from href of a tag. \n // The Regular Expression filter\n $reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\n // Check if there is a url in the text\n if (preg_match($reg_exUrl, $entity_description, $url)) {\n $temp1 = preg_replace($reg_exUrl, \"mmmfffmmm\", $entity_description);\n $temp2 = str_replace('&quot;', \"\\\"\", $url[0]);\n $entity_description = str_replace('&quot;mmmfffmmm', \"\\\"{$temp2}\", $temp1);\n }\n\n return $entity_description;\n}", "function xml_entities($value) {\n\n return strtr(\n\n $value, \n\n array(\n\n \"<\" => \"&lt;\",\n\n \">\" => \"&gt;\",\n\n '\"' => \"&quot;\",\n\n \"'\" => \"&apos;\",\n\n \"&\" => \"&amp;\",\n\n )\n\n );\n\n}", "abstract protected function _escape($s);", "function xml_entities($text, $charset = 'UTF-8'){\n\t\t$xml_special_chars = array(\"&quot;\",\"&amp;\",\"&apos;\",\"&lt;\",\"&gt;\");\n $text = htmlentities($text, ENT_COMPAT, $charset, false);\n\n $xml_special_char_regex = \"(?\";\n foreach($xml_special_chars as $key => $value){\n $xml_special_char_regex .= \"(?!$value)\";\n }\n $xml_special_char_regex .= \")\";\n \n $pattern = \"/$xml_special_char_regex&([a-zA-Z0-9]+;)/\";\n return preg_replace($pattern, '&amp;${1}', $text);\n}", "function _make_safe_for_xml( $t )\n \t{\n \t\treturn str_replace( '&amp;#39;', '&#39;', htmlspecialchars( $t ) );\n \t}", "function entities($data, $strategy = 'html', $encoding = null)\n {\n return foil('escaper')->escape($data, $strategy, $encoding);\n }", "function escape($html) { return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\"); }", "function _xmlEntities($string) {\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\n }", "function replace_entities($xml, $entities)\n\t{\n\t\tforeach ($entities[0] as $key => $val)\n\t\t{\n\t\t\t$xml = str_replace('&'.$entities[0][$key].';', $entities[1][$key], $xml);\n\t\t}\n\n\t\treturn $xml;\n\t}", "function ailyak_facebook_group_feed_html_escape(&$text) {\n $text = htmlspecialchars($text);\n}", "function wp_kses_normalize_entities( $string, $context = 'html' ) {\n $string = str_replace( '&', '&amp;', $string );\n \n // Change back the allowed entities in our list of allowed entities.\n if ( 'xml' === $context ) {\n $string = preg_replace_callback( '/&amp;([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_xml_named_entities', $string );\n } else {\n $string = preg_replace_callback( '/&amp;([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string );\n }\n $string = preg_replace_callback( '/&amp;#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $string );\n $string = preg_replace_callback( '/&amp;#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string );\n \n return $string;\n}", "public static function escape($som) {}", "function xml_special_char($t_data){\n\n if(preg_match(\"/\\\"/\", $t_data)) str_replace(\"\\\"\", \"&quot\", $t_data);\n elseif(preg_match(\"/'/\", $t_data)) str_replace(\"\\'\", \"&quot\", $t_data);\n elseif(preg_match(\"/&/\", $t_data)) str_replace(\"&\", \"&amp\", $t_data);\n elseif(preg_match(\"/</\", $t_data)) str_replace(\"<\", \"&lt\", $t_data);\n elseif(preg_match(\"/>/\", $t_data)) str_replace(\">\", \"&gt\", $t_data);\n\n return $t_data;\n }", "public static function escape($s) {}", "function xmlentities($string)\n{\n return str_replace ( array ( '&', '\"', \"'\", '<', '>' ), array ( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;' ), $string );\n}", "function xmlentities ( $string ) { \n\treturn str_replace ( array ('&', '<', '>', '\"'), array ('&amp;', '&lt;', '&gt;', '&#34;' ), $string ); \n}", "protected function quote_escaped()\n {\n }", "function xml_escape($value)\n{\n return htmlspecialchars(preg_replace('#[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]+#', '',\n $value), ENT_QUOTES);\n}", "function ab_removeEnts($s){ // reformat all entities so WP won't screw with them\n\treturn preg_replace('|&([0-9a-zA-Z#]{1,5});|', '__abENT__$1;', $s);\n}", "private function _escapeXml($value) {\n $from = array( \"&\", \"<\", \">\", \"'\", \"\\\"\"); \n $to = array( \"&amp;\", \"&lt;\", \"&gt;\", \"&#039;\", \"&quot;\");\n return str_replace($from, $to, $value);\n }", "public static function xml_escape($input)\n {\n return htmlentities($input);\n }", "public function testEncodeImmuneCharsForXML()\n {\n $immune = array();\n $this->assertEquals(\n 'testTEST0123&#x2c;&#x2e;&#x2d;&#x5f;&#x20;',\n $this->_xmlEntityCodec->encode(\n $immune,\n 'testTEST0123,.-_ '\n )\n );\n }", "function html_escape($value)\n{\n return apply_filters('html_escape', $value);\n}", "function escape($html) {\n return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\");\n}", "function escape($content = null) {\n return Sanitize::stripAll($content);\n }", "public static function entities($value) {\n\t\treturn htmlentities($value, ENT_QUOTES, Config::get('application.encoding'), false);\n\t}", "public function testEscape() {\n\t\t$string = 'Tom \"&/Or\" \\'Jerry\\' <tnj@site.tld>';\n\t\t$expected = 'Tom &quot;&amp;&#x2F;Or&quot; &#x27;Jerry&#x27; &lt;tnj@site.tld&gt;';\n\t\t$result = _::escape($string);\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// test unescaping a string\n\t\t$result = _::escape($result, false);\n\t\t$this->assertEquals($string, $result);\n\t}", "function encode_special_characters(string $html, bool $double_encoding = true, ?string $encoding = null): string\n{\n $encoding = Internal\\internal_encoding($encoding);\n\n return htmlspecialchars($html, ENT_QUOTES | ENT_HTML5 | ENT_SUBSTITUTE, $encoding, $double_encoding);\n}", "function s2_htmlencode($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}", "function filterSpecials($data){\n\n if(!$this->isUTF8($data))\n $data = utf8_encode($data);\n $data = htmlspecialchars($data, ENT_QUOTES);\n\n return $data;\n }", "function convert_invalid_entities($content)\n {\n }", "function safe_slash_html_input($text) {\r\n if (get_magic_quotes_gpc()==0) \r\n {\t\t\r\n $text = addslashes(htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false));\r\n } else \r\n {\t\t\r\n\t $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false);\t\r\n }\r\n return $text;\r\n}", "public function provideSafeStrings() {\n yield ['MarkSafe() > value', 'value'];\n yield [\"MarkSafe() >\\n value\", 'value'];\n yield [\"MarkSafe() >\\nline1\\nline2\", \"line1\\nline2\"];\n }", "public function testEncodeInvalidCharsReplacedBySpace()\n {\n $this->assertEquals(\n 'a b c d e f&#x9;g',\n $this->_xmlEntityCodec->encode(\n $this->_immune_xml,\n 'a' . chr(0) . 'b' . chr(4) . 'c' . chr(128) . 'd' .\n chr(150) . 'e' . chr(159) . 'f' . chr(9) . 'g'\n )\n );\n }", "public function escapeHtml($html) {\n\t\t//[roman] da es die schöne double_encode Sache bei htmlentities erst ab der PHP 5.2.3 gibt hier ein fieser Mist...\n\t\tif (version_compare(PHP_VERSION, '5.2.3', '>=')) {\n\t\t\t$html= htmlentities($html, ENT_QUOTES, 'UTF-8', FALSE);\n\t\t} else {\n\t\t\t$html= html_entity_decode($html, ENT_QUOTES, 'UTF-8');\n\t\t\t$html= htmlentities($html, ENT_QUOTES, 'UTF-8');\n\t\t}\n\t\treturn $html;\n\t}", "function doHtmlSpecChars() {\n $this->description = htmlspecialchars($this->description);\n $this->postsHeader = htmlspecialchars($this->postsHeader);\n $this->postBody = htmlspecialchars($this->postBody);\n $this->postsFooter = htmlspecialchars($this->postsFooter);\n $this->formLogged = htmlspecialchars($this->formLogged);\n $this->form = htmlspecialchars($this->form);\n $this->navigation = htmlspecialchars($this->navigation);\n $this->name = htmlspecialchars($this->name);\n $this->nameLin = htmlspecialchars($this->nameLin);\n $this->memberName = htmlspecialchars($this->memberName);\n $this->date = htmlspecialchars($this->date);\n $this->time = htmlspecialchars($this->time); \n $this->nextPage = htmlspecialchars($this->nextPage);\n $this->previousPage =htmlspecialchars($this->previousPage);\n $this->firstPage = htmlspecialchars($this->firstPage);\n $this->lastPage = htmlspecialchars($this->lastPage);\n\t$this->gravDefault = htmlspecialchars($this->gravDefault);\n }", "function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {\n if ( $double_encode ) {\n $string = @htmlspecialchars( $string, $quote_style, $charset );\n } else {\n // Decode &amp; into &\n $string = wp_specialchars_decode( $string, $quote_style );\n\n // Guarantee every &entity; is valid or re-encode the &\n $string = kses_normalize_entities( $string );\n\n // Now re-encode everything except &entity;\n $string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE );\n\n for ( $i = 0; $i < count( $string ); $i += 2 )\n $string[$i ] = @htmlspecialchars( $string[$i], $quote_style, 'UTF-8' );\n\n $string = implode( '', $string );\n }\n\n return $string;\n\n}", "private static function _escapeTagChar($matches) {}", "public static function escape($value) {}", "public function testStringReplesentationOfEntity() {\n\t\t$a = $this->Author->newEntity([]);\n\n\t\t// 1. empty entity\n\t\t$expected = '<div class=\"AuthorEntity\"></div>';\n\t\t$this->assertEqual(strval($a), $expected);\n\n\t\t// 2. assign entity\n\t\t$a->name = 'Basuke';\n\n\t\t$expected = '<div class=\"AuthorEntity\"><strong class=\"key\">name</strong><span clas=\"value\">Basuke</span></div>';\n\t\t$this->assertEqual(strval($a), $expected);\n\n\t\t// 3. value must be html escaped\n\t\t$a->job = \"<b>Programmer</b>\";\n\n\t\t$expected = '<div class=\"AuthorEntity\"><strong class=\"key\">name</strong><span clas=\"value\">Basuke</span><strong class=\"key\">job</strong><span clas=\"value\">&lt;b&gt;Programmer&lt;/b&gt;</span></div>';\n\t\t$this->assertEqual(strval($a), $expected);\n\t}", "function twig_urlencode_filter($url, $raw = false)\n{\n if (is_array($url)) {\n return http_build_query($url, '', '&');\n }\n if ($raw) {\n return rawurlencode($url);\n }\n return urlencode($url);\n}", "function _filterurl($url) {\n return str_replace(\n array('<','>','(',')','#'),\n array('&lt;','&gt;','&#40;','&#41;','&#35;'),\n $url\n );\n }", "function safehtml($in) {\n return htmlentities($in,ENT_COMPAT,'UTF-8');\n}", "public function testEncodeForXML()\n {\n $this->assertEquals(\n '&quot;&gt;&lt;script&gt;alert&#x28;&apos;XSS&apos;&#x29;&lt;&#x2f;script&gt;&lt;foo attr&#x3d;&quot;',\n $this->_xmlEntityCodec->encode(\n $this->_immune_xml,\n '\"><script>alert(\\'XSS\\')</script><foo attr=\"'\n )\n );\n }", "function tag_escape($tag_name)\n {\n }", "function is_entity_breaker($entity) { // &#8216;&#8217;??\n return !(stripos('&#8216;&#8217;&apos;&quot;&#039;&#39;&rsquo;&lsquo;&rdquo;&ldquo;', $entity) !== FALSE);\n }", "function html_escape($var) {\n if (is_array($var)) {\n return array_map('html_escape', $var);\n }\n else {\n return htmlspecialchars($var, ENT_QUOTES, config_item('charset'));\n }\n}", "private function htmlspecialcarfy(&$value) {\r\n $value = htmlspecialchars($value);\r\n }", "private function _escape($data)\n {\n return htmlspecialchars($data, ENT_QUOTES);\n }", "function entitizeBackslash($string_IN) {\n/*\nReplace all backslashes with the entities &#92;.\nSee NOTE in loadIntoTreeNSes() which relates to this topic for explanation\nof why this function exists.\n\nNOTE: Compare to entitizeDollarNBackslash($string_IN).\n When tree nodes are going to be displayed in the browser\n directly (as opposed to going to a heredoc first)\n there is no need to convert the dollar sign character.\n*/\n $string = str_replace(\"\\\\\", \"&#92;\", $string_IN);\n return $string;\n}", "protected static function xmlentities($string) {\n return str_replace ( array ( '&', '\"', \"'\", '<', '>', '`' ), array ( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;', '&apos;' ), $string );\n }", "function escape($value) {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n}", "function testUrlEncodeQuotes2()\n\t{\n\t\t\t$input = \"This is a test with a 'single quote\";\n\t\t\t$expectedOutput = \"This is a test with a &#39;single quote\";\n\t\t\t$this->assertEqual (\n\t\t\t\t\t$expectedOutput,\n\t\t\t\t\t$this->stringUtils->urlEncodeQuotes($input)\n\t\t\t);\n\t}", "function smarty_function_escape_special_chars( $string )\r\n{\r\n if ( !is_array( $string ) )\r\n {\r\n $string = preg_replace( \"!&(#?\\\\w+);!\", \"%%%SMARTY_START%%%\\\\1%%%SMARTY_END%%%\", $string );\r\n $string = htmlspecialchars( $string );\r\n $string = str_replace( array( \"%%%SMARTY_START%%%\", \"%%%SMARTY_END%%%\" ), array( \"&\", \";\" ), $string );\r\n }\r\n return $string;\r\n}", "function entify($string) { \n /* used by /samuel/cv/, should leave tags as is and only convert chars */\n # echo \"<!-- $string -->\\n\";\n $from = array('/&/',\n '/å/', '/ä/', '/ö/',\n '/Å/', '/Ä/', '/Ö/',\n );\n $to = array('&amp;',\n '&aring;', '&auml;', '&ouml;',\n '&Aring;', '&Auml;', '&Ouml',\n );\n # echo \"<!-- $string -->\\n\";\n return preg_replace($from, $to, $string);\n }", "public static function legacyEscape( $val )\n\t{\n \t$val = str_replace( \"&\"\t\t\t, \"&amp;\" , $val );\n \t$val = str_replace( \"<!--\"\t\t, \"&#60;&#33;--\" , $val );\n \t$val = str_replace( \"-->\"\t\t, \"--&#62;\" , $val );\n \t$val = str_ireplace( \"<script\"\t, \"&#60;script\" , $val );\n \t$val = str_replace( \">\"\t\t\t, \"&gt;\" , $val );\n \t$val = str_replace( \"<\"\t\t\t, \"&lt;\" , $val );\n \t$val = str_replace( '\"'\t\t\t, \"&quot;\" , $val );\n \t$val = str_replace( \"\\n\"\t\t, \"<br />\" , $val );\n \t$val = str_replace( \"$\"\t\t\t, \"&#036;\" , $val );\n \t$val = str_replace( \"!\"\t\t\t, \"&#33;\" , $val );\n \t$val = str_replace( \"'\"\t\t\t, \"&#39;\" , $val );\n \t$val = str_replace( \"\\\\\"\t\t, \"&#092;\" , $val );\n \t\n \treturn $val;\n\t}", "function escape($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "public function testSpecialChar()\n\t{\n\t\t$special = array(\n\t\t\t'symbol' => '! @ # $ % ^ & * ( ) _ + - = [ ] \\ { } | ; \\' : \" , . / < > ? &amp; &lt; &#039;',\n\t\t\t'html' => '<body><a href=\"http://example.com\">click</a></body>',\n\t\t\t'space' => \"white \\t\\n space\", // no cdata tag for this\n\t\t\t'raw' => '<span>comm]]>ent</span>', // premature end cdata tag will be escaped\n\t\t);\n\n\t\t$xml = $this->getDataElement();\n\t\tInterspire_Xml::addArrayToXML($xml, $special);\n\t\t$out = Interspire_Xml::prettyIndent($xml);\n\n\t\t$expected = Interspire_Xml::getDeclaration();\n\t\t$expected .= '\n<data>\n <symbol><![CDATA['.$special['symbol'].']]></symbol>\n <html><![CDATA['.$special['html'].']]></html>\n <space>'.$special['space'].'</space>\n <raw><![CDATA[<span>comm]]]]><![CDATA[>ent</span>]]></raw>\n</data>\n';\n\t\t$this->assertTrue(Interspire_Xml::validateXMLString($out));\n\t\t$this->assertEquals($expected, $out);\n\n\t\t// reverse\n\t\t$xml = simplexml_load_string($out);\n\t\t$result = Interspire_Xml::xml2array($xml);\n\t\t$this->assertEquals($special, $result);\n\n\t\t// test all html entities\n\t\t$entities = array();\n\t\tforeach (get_html_translation_table(HTML_ENTITIES) as $entity => $encode) {\n\t\t\t$key = str_replace(array('&', ';'), '', $encode);\n\t\t\t$entities[$key] = $encode;\n\t\t}\n\n\t\t$xml = $this->getDataElement();\n\t\tInterspire_Xml::addArrayToXML($xml, $entities);\n\t\t$out = Interspire_Xml::prettyIndent($xml);\n\n\t\t$this->assertTrue(Interspire_Xml::validateXMLString($out));\n\t\t$xml = simplexml_load_string($out);\n\t\t$result = Interspire_Xml::xml2array($xml);\n\t\t$this->assertEquals($entities, $result);\n\t}", "function encodehtml($s, $linebreaks = true)\n{\n $s = str_replace(\"<\", \"&lt;\", str_replace(\"&\", \"&amp;\", $s));\n if ($linebreaks) {\n $s = nl2br($s);\n }\n return $s;\n}", "public static function entities($value)\n {\n return htmlentities($value, ENT_QUOTES, 'UTF-8', false);\n }", "function sysEncode( $str ){\n\treturn( addslashes( htmlspecialchars( $str ) ) );\n}", "function escape($value){//XSS attacks protection\n return htmlspecialchars($value , ENT_QUOTES,'UTF-8');\n }", "public static function entities_replace(string $html): string {\n\t\t$html = strtr($html, ['&ldquo;' => '\"', '&rdquo;' => '\"', '&lsquo;' => '\\'', '&rsquo;' => '\\'', ]);\n\t\treturn html_entity_decode($html);\n\t}", "protected static function escapeAmpersands( string $xml ) {\n\n // Initialize the result.\n $result = $xml;\n\n // Build the regex used to locate lone ampersands.\n $regex = '/ \\& /';\n\n // Look for query strings within the XML.\n if( preg_match_all($regex, $result, $matches, PREG_SET_ORDER) ) {\n\n // Escape the ampersands one by one.\n foreach( $matches as $match ) {\n\n // Escape the ampersand.\n $result = str_replace($match[0], ' &amp; ', $result);\n\n }\n\n }\n\n // Return the result.\n return $result;\n\n }", "public function htmlEncode($value)\n\t{\n\t\treturn filter_var($value, FILTER_SANITIZE_SPECIAL_CHARS);\n\t}", "public function escape($value);", "public function escape($value);", "function ha($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_QUOTES | ENT_IGNORE, 'UTF-8');\n}", "function escape($string) {\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "function _defang(&$attvalue)\n {\n if (strpos($attvalue, '&') === false && strpos($attvalue, '\\\\') === false) {\n return;\n }\n $m = false;\n do {\n $m = false;\n $m = $m || self::_deent($attvalue, '/\\&#0*(\\d+);*/s');\n $m = $m || self::_deent($attvalue, '/\\&#x0*((\\d|[a-f])+);*/si', true);\n $m = $m || self::_deent($attvalue, '/\\\\\\\\(\\d+)/s', true);\n } while ($m == true);\n $attvalue = stripslashes($attvalue);\n }", "function makeTagEntities($str, $useNamedEntities = 1) {\n // Note that we should use &apos; for the single quote, but IE doesn't like it\n $arrReplace = $useNamedEntities ? array('&#39;','&quot;','&lt;','&gt;') : array('&#39;','&#34;','&#60;','&#62;');\n return str_replace(array(\"'\",'\"','<','>'), $arrReplace, $str);\n }", "function makeTagEntities($str, $useNamedEntities = 1) {\n // Note that we should use &apos; for the single quote, but IE doesn't like it\n $arrReplace = $useNamedEntities ? array('&#39;','&quot;','&lt;','&gt;') : array('&#39;','&#34;','&#60;','&#62;');\n return str_replace(array(\"'\",'\"','<','>'), $arrReplace, $str);\n }", "function mysql_entities_fix_string($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 $data = trim($data);\n $data = stripslashes($data);\n $data=htmlspecialchars($data);\n return $data;\n }", "function attribute_escape($text)\n {\n }", "static function xmlEncode($v)\n {\n \t// Encode array\n if (is_array($v))\n return self::xmlEncodeArray($v);\n\n // Ignore empty string and object\n if ($v == null || is_object($v))\n return null;\n\n // Decode all entities\n $v = html_entity_decode($v, ENT_COMPAT, 'UTF-8');\n\n return htmlspecialchars($v, ENT_COMPAT, 'UTF-8');\n }", "protected static function escapeHTML( string $xml, array $escape ) {\n\n // Initialize the result.\n $result = $xml;\n\n // Look for HTML within the XML.\n foreach( $escape as $tag ) {\n\n // Build the regex used to locate the HTML.\n $regex = \"/\\<{$tag}\\>([\\S\\s]*?)\\<\\/{$tag}\\>/\";\n\n // Find any HTML that should be escaped.\n if( preg_match_all($regex, $result, $matches, PREG_SET_ORDER) ) {\n\n // Escape the HTML one by one.\n foreach( $matches as $match ) {\n\n // Escape the HTML.\n $result = str_replace($match[0], \"<{$tag}>\".htmlspecialchars($match[1]).\"</{$tag}>\", $result);\n\n // If result contains a .xml file extension, strip it.\n if (strpos($result, '.xml') !== false) {\n \n // Strip '.xml' extensions from hyperlinks.\n $result = str_replace('.xml','',$result);\n\n }\n\n }\n\n }\n\n }\n\n // Return the result.\n return $result;\n\n }", "function encode(string $html, bool $double_encoding = true, ?string $encoding = null): string\n{\n $encoding = Internal\\internal_encoding($encoding);\n\n return htmlentities($html, ENT_QUOTES, $encoding, $double_encoding);\n}", "function _htmlentities($str) \n {\n $transtab=get_html_translation_table (HTML_ENTITIES,ENT_QUOTES);\n $transtab[chr(38)] = '&';\n return preg_replace(\"/&(?![A-Za-z]{0,4}\\w{2,3};|#[0-9]{2,5};)/\",\"&amp;\" , strtr($str, $transtab));\n }", "function _htmlEntities($message) {\n return nl2br(htmlentities($message, ENT_COMPAT, $this->_character_set));\n }", "public function testEscapesHtml()\n {\n $this->assertEquals(\n '&lt;script&gt;Hello&lt;/script&gt;',\n $this->outputHelper->escape('<script>Hello</script>')\n );\n }", "function escape($string) {\n\n return htmlentities($string, ENT_QUOTES, 'ISO-8859-15');\n}", "abstract public function escapeString($value);", "function htmlSpecialChars( $text )\n\t{\n\t\t//return preg_replace(\"/&amp;/i\", '&', htmlspecialchars($text, ENT_QUOTES));\n\t\treturn preg_replace(array(\"/&amp;/i\", \"/&nbsp;/i\"), array('&', '&amp;nbsp;'), htmlspecialchars($text, ENT_QUOTES));\n\t}", "function _sanitize_naughty_html($matches) {\n\t\t// encode opening brace\n\t\t$str = '&lt;' . $matches [1] . $matches [2] . $matches [3];\n\n\t\t// encode captured opening or closing brace to prevent recursive vectors\n\t\t$str .= str_replace(array('>', '<'), array('&gt;', '&lt;'), $matches [4]);\n\n\t\treturn $str;\n\t}", "public abstract function escapeString($value);", "function e($value)\n {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n }", "public function testTextEncode()\n {\n $text = \"<a href='test'>Test</a>\";\n $this->assertEquals(\"&lt;a href='test'&gt;Test&lt;/a&gt;\", $this->obj->textEncode($text));\n }", "public function __toStringIndexEntry(){\n return\n '<sitemap>' . \"\\n\" .\n '<loc>' . $this->url . '</loc>' . \"\\n\" .\n '<lastmod>' . $this->lastmod . '</lastmod>' . \"\\n\" .\n '</sitemap>';\n }", "function encode_desc(&$data)\n{\n $to_entities = get_html_translation_table(HTML_ENTITIES);\n\n $from_entities = array_flip($to_entities);\n\n $data = strtr($data,$from_entities);\n $data = strtr($data,$to_entities);\n\n return $data;\n}", "function esc_specialchars($value)\n{\n // Numbers and boolean values get turned into strings which can cause problems\n // with type comparisons (e.g. === or is_int() etc).\n return is_string($value) ? htmlspecialchars($value, ENT_QUOTES, sfConfig::get('sf_charset')) : $value;\n}", "protected static function filter_htmlencode($value)\n\t{\n\t\treturn filter_var($value, FILTER_SANITIZE_SPECIAL_CHARS); \n\t}", "public function testEscape() {\n $this->assertEquals('\"Double\" quotes', Sanitize::escape('\"Double\" quotes', array('flags' => ENT_NOQUOTES)));\n $this->assertEquals('&quot;Double&quot; quotes', Sanitize::escape('\"Double\" quotes', array('flags' => ENT_COMPAT)));\n $this->assertEquals('&quot;Double&quot; quotes', Sanitize::escape('\"Double\" quotes', array('flags' => ENT_QUOTES)));\n\n $this->assertEquals(\"'Single' quotes\", Sanitize::escape(\"'Single' quotes\", array('flags' => ENT_NOQUOTES)));\n $this->assertEquals(\"'Single' quotes\", Sanitize::escape(\"'Single' quotes\", array('flags' => ENT_COMPAT)));\n $this->assertEquals(\"&#039;Single&#039; quotes\", Sanitize::escape(\"'Single' quotes\", array('flags' => ENT_QUOTES)));\n\n $this->assertEquals('&lt;Html&gt; tags', Sanitize::escape('<Html> tags', array('flags' => ENT_NOQUOTES)));\n $this->assertEquals('&lt;Html&gt; tags', Sanitize::escape('<Html> tags', array('flags' => ENT_COMPAT)));\n $this->assertEquals('&lt;Html&gt; tags', Sanitize::escape('<Html> tags', array('flags' => ENT_QUOTES)));\n\n if ($this->is54) {\n $this->assertEquals('&quot;Double&quot; quotes', Sanitize::escape('\"Double\" quotes', array('flags' => ENT_QUOTES | ENT_HTML5)));\n $this->assertEquals('&quot;Double&quot; quotes', Sanitize::escape('\"Double\" quotes', array('flags' => ENT_QUOTES | ENT_XHTML)));\n $this->assertEquals(\"&apos;Single&apos; quotes\", Sanitize::escape(\"'Single' quotes\", array('flags' => ENT_QUOTES | ENT_HTML5)));\n $this->assertEquals(\"&#039;Single&#039; quotes\", Sanitize::escape(\"'Single' quotes\", array('flags' => ENT_QUOTES | ENT_XHTML)));\n $this->assertEquals('&lt;Html&gt; tags', Sanitize::escape('<Html> tags', array('flags' => ENT_QUOTES | ENT_HTML5)));\n $this->assertEquals('&lt;Html&gt; tags', Sanitize::escape('<Html> tags', array('flags' => ENT_QUOTES | ENT_XHTML)));\n }\n }", "function twig_safe_filter($string)\n{\n return $string;\n}", "function e(string $s): string\n{\n return htmlspecialchars($s, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');\n}", "public function __toString(){\n return\n '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . \"\\n\" .\n '<urlset xmlns=\"' . self::SITEMAP_SCHEMA . '\">' . \"\\n\" .\n implode($this->urls) .\n '</urlset>' . \"\\n\";\n\n }", "function filter( $str ){\r\n\t\treturn addslashes( $str );\r\n\t}" ]
[ "0.6309976", "0.60704", "0.60324293", "0.6004934", "0.58654636", "0.5846241", "0.5742828", "0.56870157", "0.5660144", "0.56552786", "0.56079394", "0.55966055", "0.55068", "0.5506728", "0.550413", "0.54969835", "0.5496094", "0.5493231", "0.5492946", "0.54906267", "0.54804415", "0.5441856", "0.54139537", "0.53648293", "0.5344804", "0.5333211", "0.53241533", "0.53193897", "0.53162795", "0.5299612", "0.52836967", "0.52750146", "0.5252552", "0.5239621", "0.5230834", "0.52184236", "0.5197614", "0.51899546", "0.5184056", "0.5180468", "0.5159527", "0.51484776", "0.5146979", "0.5140664", "0.5138535", "0.51325494", "0.51288265", "0.5128424", "0.5107347", "0.5106121", "0.5099767", "0.50931644", "0.5082323", "0.5078469", "0.5074092", "0.50661016", "0.5059496", "0.5050942", "0.50506735", "0.50321925", "0.5026283", "0.50237715", "0.50162727", "0.501385", "0.5013177", "0.49953592", "0.4989333", "0.49807602", "0.49729627", "0.49441114", "0.49441114", "0.4938484", "0.49370533", "0.49362153", "0.4930393", "0.4930393", "0.491771", "0.49166128", "0.4914138", "0.49132413", "0.49107164", "0.4907526", "0.49069893", "0.49065882", "0.49049494", "0.4896848", "0.4894396", "0.48916182", "0.4891395", "0.48890862", "0.48814172", "0.4879002", "0.4875402", "0.48616925", "0.4858834", "0.48519182", "0.4848306", "0.4842659", "0.48414734", "0.48358056" ]
0.58083963
6
Create a new coordinate object.
public function __construct(float $xPosition, float $yPosition) { $this->xPosition = $xPosition; $this->yPosition = $yPosition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create($x, $y){\n\t return new Coordinate($x, $y);\n\t}", "static public function createFromXml(\\SimpleXMLElement $xml)\n {\n $coordinate = new Coordinate();\n $coordinate->type = (string) $xml['type'];\n $coordinate->x = self::intToFloat((string) $xml['x']);\n $coordinate->y = self::intToFloat((string) $xml['y']);\n\n return $coordinate;\n }", "public function test_make_coordinates_2()\n {\n $coord = \"-120,\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], null);\n $this->assertEquals($dd[1], null);\n }", "public function test_make_coordinates_1()\n {\n $coord = \"-120\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], null);\n $this->assertEquals($dd[1], null);\n }", "public static function createWithCoordinates(Coordinates $coordinates)\n {\n return new static($coordinates);\n }", "abstract public function coordinates();", "public function setCoordinate()\n {\n $args = func_get_args();\n\n if (isset($args[0]) && ($args[0] instanceof Coordinate)) {\n $this->coordinate = $args[0];\n } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {\n if (!$this->hasCoordinate()) {\n $this->coordinate = new Coordinate();\n }\n\n $this->coordinate->setLatitude($args[0]);\n $this->coordinate->setLongitude($args[1]);\n\n if (isset($args[2]) && is_bool($args[2])) {\n $this->coordinate->setNoWrap($args[2]);\n }\n } elseif (!isset($args[0])) {\n $this->coordinate = null;\n } else {\n throw GeocodingException::invalidGeocoderRequestCoordinate();\n }\n\n return $this;\n }", "public function addCoordinate()\n {\n $args = func_get_args();\n \n if(isset($args[0]) && is_int($args[0]) && isset($args[1]) && is_int($args[1]))\n {\n if(isset($args[2]) && is_bool($args[2]))\n $this->coordinates[] = new Coordinate($args[0], $args[1], $args[2]);\n else\n $this->coordinates[] = new Coordinate($args[0], $args[1]);\n }\n else if(isset($args[0]) && ($args[0] instanceof Coordinate))\n $this->coordinates[] = $args[0];\n else\n throw new \\InvalidArgumentException();\n }", "public function test_make_coordinates_3()\n {\n $coord = \"52° 32' 25\\\" N, 89° 40' 31\\\" W\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.540277777778);\n $this->assertEquals($dd[1], -89.675277777778);\n }", "private function createPoint($data)\n {\n $Geometry = new Point();\n $Geometry->initFromArray($data);\n return $Geometry;\n }", "public function __construct( $x, $y )\n\t{\n\t\t$this->setX( $x );\n\t\t$this->setY( $y );\n\t}", "public function test_make_coordinates_0()\n {\n $coord = \"52° 32' 25\\\" N,\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], null);\n $this->assertEquals($dd[1], null);\n }", "protected function createAndPersistGISCoordinate($node, $type)\n {\n $lat = floatval($node['lat']);\n $lon = floatval($node['lon']);\n $coordinate = new GISCoordinate($lat, $lon, $type);\n $this->em->persist($coordinate);\n\n return $coordinate;\n }", "public function setPositions(int $x, int $y): Creator\n {\n $this->xPosition = $x;\n $this->yPosition = $y;\n return $this;\n }", "public function test_make_coordinates_4()\n {\n $coord = \"52° 32' 25\\\" N; 89° 40' 31\\\" W\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.540277777778);\n $this->assertEquals($dd[1], -89.675277777778);\n }", "private function newPositionObject() {\n return new PhabricatorProjectColumnPosition();\n }", "public function testCreateWithCoordinates()\n {\n $coordinates = new Coordinates(40.0, 50.0);\n\n $options = Search::coordinates($coordinates);\n\n $this->assertInstanceOf(Search::class, $options);\n $this->assertCount(1, $options->parametrise());\n $this->assertSame($coordinates, $options->parametrise()['ll']);\n }", "public static function from_userid($userid)\n {\n $point = new point;\n $point->userid = $userid;\n return $point;\n }", "public function newCoordinateForOrientation(Orientation $orientation): Coordinate\n {\n return new Coordinate($this->x + $orientation->getStepSizeX(), $this->y + $orientation->getStepSizeY());\n }", "public function setCoordinates(int $x1, int $y1, int $x2, int $y2) {\n try {\n $this->attributes()->setAttribute('coords', \"$x1,$y1,$x2,$y2\");\n } catch (\\Exception $ex) {\n throw new CoordinateException('A coordinate must be a positive integer', $ex->getCode(), $ex);\n }\n return $this;\n }", "function __construct($x = 0, $y = 0/*, $z = 0*/) {\n $this->x = $x;\n $this->y = $y;\n //$this->z = $z;\n return $this; \n }", "private function setPositionInstance($x, $y = null)\n {\n if (is_array($x) && $y === null) {\n $this->position = new Position($x[0], $y[1]);\n } else {\n $this->position = new Position($x, $y);\n }\n\n }", "public function __construct($x = 0, $y = 0){\n\t\t$this->x = is_numeric($x) ? $x : 0;\n\t\t$this->y = is_numeric($y) ? $y : 0;\n\t}", "public function generateNew() {\n return new Position($this->oTableGateway->getAdapter());\n }", "public function getCoordinates();", "public function createAddress()\n {\n $class = $this->getClass();\n\n return new $class;\n }", "public function xy($x, $y)\n {\n $this->x($x);\n $this->y($y);\n return $this;\n }", "public function __construct(\n public int $x,\n public int $y,\n public int $value = 0,\n ) {\n $this->id = Str::orderedUuid();\n }", "public function __construct($x = 0, $y = 0) {\n $this->x = $x;\n $this->y = $y;\n $this->body = \"\";\n }", "protected function createPointFrom($description)\n {\n return new Point($description);\n }", "public function __construct($dx,$dy)\r\n {\r\n //On indique que x devient $dx et $dy \r\n //On autorise la modification\r\n $this ->x=$dx;\r\n $this ->y=$dy;\r\n }", "public function create() {\n return GeolocationsModel::create($this->creationDate,$this->userAgent,$this->sellerId,$this->saleId ? $this->saleId: null,$this->latitude,$this->longitude);\n }", "public function test_make_coordinates_5()\n {\n $coord = \"52.5\\t-89.0\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.5);\n $this->assertEquals($dd[1], -89.0);\n }", "public function fromRadiansToDegrees(): Point {\n return new Point(\n rad2deg($this->x),\n rad2deg($this->y)\n );\n }", "static function test_new() {\n $multipoint = Geometry::fromWkt('MULTIPOINT (153042 6799129,153043 6799174,153063 6799199)');\n echo \"multipoint=$multipoint\\n\";\n echo \"wkt=\",$multipoint->wkt(),\"\\n\";\n\n foreach ([\n 'MULTIPOINT(30 30,200 200)',\n //'MULTIPOINTxx(30 30,200 200)',\n [[10,10],[20,20]],\n [[10,10],[20,20,60]],\n //[[10,10],[20,20,60,80]],\n [new Point([0,0]), new Point([5,10])],\n ] as $param) {\n $mp = new MultiPoint($param);\n if (is_array($param)) {\n echo \"new MultiPoint(\"; print_r($param); echo \" -> $mp\\n\";\n //print_r($ls);\n }\n else\n echo \"new MultiPoint($param) -> $mp\\n\";\n echo \"wkt:\",$mp->wkt(),\"\\n\";\n echo \"GeoJSON:\",json_encode($mp->geojson()),\"\\n\";\n }\n }", "public function new_address() {\n\t\t$address = new Address();\n\n\t\t/*\n\t\t * Twinfield requires one default address:\n\t\t * \"There has to be one default address.\"\n\t\t */\n\t\tif ( empty( $this->addresses ) ) {\n\t\t\t$address->set_default( true );\n\t\t}\n\n\t\t$this->addresses[] = $address;\n\n\t\treturn $address;\n\t}", "static function fromCoords(float $lat, float $lon): Locator\n {\n\n $lat = Convertor::roundUp($lat, Convertor::ROUND_PRECISION);\n $lon = Convertor::roundUp($lon, Convertor::ROUND_PRECISION);\n\n if ($lat < -90.0 || $lat > 90.0) {\n throw new \\InvalidArgumentException(\"The value of variable '\\$lat' must be in the range from -90.0 to 90.0\");\n }\n\n if ($lon < -180.0 || $lon > 180.0) {\n throw new \\InvalidArgumentException(\"The value of variable '\\$lon' must be in the range from -180.0 to 180.0\");\n }\n\n $instance = new static(new Convertor());\n $instance->setCoords($lat, $lon);\n $instance->setQth($instance->convertor->coordsToQth($lat, $lon));\n\n return $instance;\n }", "public static function invalidMarkerShapePolyCoordinates()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s',\n 'The coordinates setter arguments is invalid if the marker shape type is poly.',\n 'The available prototype is : function setCoordinates('.\n 'array(double $x1, double $y1, '.\n '..., '.\n 'double $xn, double $yn'.\n ')'\n ));\n }", "public function __construct()\n {\n $args = func_get_args();\n if (count($args) == 2) {\n if (is_numeric($args[0]) && is_numeric($args[1])) {\n $this->SWEREF99Position($args[0], $args[1]);\n } elseif ($args[0] instanceof WGS84Position && is_int($args[1])) {\n $this->SWEREF99PositionPositionProjection($args[0], $args[1]);\n }\n } elseif (count($args) == 3) {\n $this->SWEREF99PositionProjection($args[0], $args[1], $args[2]);\n }\n }", "private function newObjectFromValue(AbstractSpatialType $type, $value)\n {\n $typeFamily = $type->getTypeFamily();\n $typeName = mb_strtoupper($value['type']);\n\n $constName = sprintf('%s::%s', GeometryInterface::class, $typeName);\n\n if (!defined($constName)) {\n throw new InvalidValueException(sprintf('Unsupported %s type \"%s\".', $typeFamily, $typeName));\n }\n\n $class = sprintf('LongitudeOne\\Spatial\\PHP\\Types\\%s\\%s', $typeFamily, constant($constName));\n\n return new $class($value['value'], $value['srid']);\n }", "public function getCoord(){\n return $this->coord;\n }", "public function testCPoint() {\n\t\t$cpoint = new CPoint();\n\t\t$cpoint->set(300, 400, 500);\n\t\t$this->assertTrue($cpoint->x===300);\n\t\t$this->assertTrue($cpoint->y===400);\n\t\t$this->assertTrue($cpoint->z===500);\n\t\t\n\t\t$cpoint->translate(5, 5, 5);\n\t\t$this->assertTrue($cpoint->x===305);\n\t\t$this->assertTrue($cpoint->y===405);\n\t\t$this->assertTrue($cpoint->z===505);\t\n\t}", "public function getCoordinate()\n {\n return $this->coordinate;\n }", "public function fromDegreesToRadians(): Point {\n return new Point(\n rad2deg($this->x),\n rad2deg($this->y)\n );\n }", "public static function invalidPolygonCoordinate()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s',\n 'The coordinate adder arguments is invalid.',\n 'The available prototypes are :',\n ' - function addCoordinate(Fungio\\GoogleMap\\Base\\Coordinate $coordinate)',\n ' - function addCoordinate(double $latitude, double $longitude, boolean $noWrap = true)'\n ));\n }", "private function makeCoord( array $hit ): Coord {\n\t\t$lat = $hit['coord']['lat'];\n\t\t$lon = $hit['coord']['lon'];\n\t\t$coord = new Coord( $lat, $lon );\n\t\tforeach ( Coord::FIELD_MAPPING as $field => $_ ) {\n\t\t\tif ( isset( $hit[$field] ) ) {\n\t\t\t\t$coord->$field = $hit[$field];\n\t\t\t}\n\t\t}\n\t\t$coord->distance = $this->coord->distanceTo( $coord );\n\t\treturn $coord;\n\t}", "public function createPosition($Position){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_PositionDAO->createPosition($Position);\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in PositionDAO.createPosition()\");\t\t\n\n\t\treturn $Result;\n\n\t\n\t}", "public function __construct($x, $y, $z) {\n\t\t\t$this->x = $x;\n\t\t\t$this->y = $y;\n\t\t\t$this->z = $z;\n\t\t}", "public function getCoordinate() {\n return $this->coordinate;\n }", "public abstract function getOrigin(): Point;", "function position( $x, $y )\n\t{\n\t\t$this->x = $x;\n\t\t$this->y = $y;\n\t}", "public function __construct(array $kwargs)\n\t{\n\t\tif (!array_key_exists('x', $kwargs))\n\t\t\texit(\"Error Vertex.class : missing X.\");\n\t\t$this->setX((double)$kwargs['x']);\n\t\tif (!array_key_exists('y', $kwargs))\n\t\t\texit(\"Error Vertex.class : missing Y.\");\n\t\t$this->setY((double)$kwargs['y']);\n\t\tif (!array_key_exists('z', $kwargs))\n\t\t\texit(\"Error Vertex.class : missing Z.\");\n\t\t$this->setZ((double)$kwargs['z']);\n\t\tif (array_key_exists('w', $kwargs))\n\t\t\t$this->setW((double)$kwargs['w']);\n\t\tif (array_key_exists('color', $kwargs))\n\t\t\t$this->setColor(clone $kwargs['color']);\n\t\telse\n\t\t\t$this->setColor(new Color(array('rgb' => 0xffffff)));\n\t\tif (self::$verbose)\n\t\t\techo $this.' constructed'.PHP_EOL;\n\t\treturn ;\n\t}", "public static function create($rectangle) {}", "public function actionCreate()\n\t{\n\t\t$model=new Coordocs;\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['Coordocs']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Coordocs'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function __construct($x, $y, $z, $dx, $dy, $dz)\r\n {\r\n $this->x = $x;\r\n $this->y = $y;\r\n $this->z = $z;\r\n $this->dx = $dx;\r\n $this->dy = $dy;\r\n $this->dz = $dz;\r\n }", "public function create($data) {\n $data = array(\n 'username' => $data['username'],\n 'longitude' => $data['longitude'],\n 'latitude' => $data['latitude']\n );\n\n // INSERT INTO point(\"username\", \"longitude\", \"latitude\") VALUES(?, ?, ?);\n return $this->db->insert('point', $data);\n }", "function setCoords($a_coords)\n\t{\n\t\t$this->coords = $a_coords;\n\t}", "public static function invalidPolylineCoordinate()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s',\n 'The coordinate adder arguments is invalid.',\n 'The available prototypes are :',\n ' - function addCoordinate(Fungio\\GoogleMap\\Base\\Coordinate $coordinate)',\n ' - function addCoordinate(double $latitude, double $longitude, boolean $noWrap = true)'\n ));\n }", "public function setCoordinates(array $coords) {\n $count = count($coords);\n if ($count % 2 !== 0) {\n throw new \\Sphp\\Exceptions\\InvalidArgumentException(\"The sum of coordinates must divisible by 2\");\n }\n $coordsString = implode(',', $coords);\n $this->attrs()->set('coords', $coordsString);\n return $this;\n }", "public static function invalidMarkerShapeCoordinates()\n {\n return new static('A marker shape must have coordinates.');\n }", "public function __construct($coordinates, \\League\\Geotools\\Coordinate\\Ellipsoid $ellipsoid = null, $height = 0)\n {\n $this->setHeight($height);\n return parent::__construct($coordinates, $ellipsoid);\n }", "public function toXY($x, $y)\n\t{\n\t\t$this->setMethod('to_XY');\n\t\t$this->setX($x);\n\t\t$this->setY($y);\n\t\treturn $this;\n\t}", "public function setCoordinates($coordinates)\n {\n $this->coordinates = $coordinates;\n }", "public function getCoordinate() {\n\n return $this->coordinate;\n }", "private function newObjectFromValue(AbstractSpatialType $type, $value)\n {\n $typeFamily = $type->getTypeFamily();\n $typeName = strtoupper($value['type']);\n $constName = sprintf('CrEOF\\Spatial\\PHP\\Types\\Geometry\\GeometryInterface::%s', $typeName);\n if (! defined($constName)) {\n throw new \\RuntimeException(sprintf('Unsupported %s type \"%s\".', $typeFamily, $typeName));\n }\n $class = sprintf('CrEOF\\Spatial\\PHP\\Types\\%s\\%s', $typeFamily, constant($constName));\n return new $class($value['value'], $value['srid']);\n }", "private function readPoint()\n {\n return $this->createPoint($this->readXY());\n }", "public static function createFromType($type)\n\t{\n\t\tswitch ($type)\n\t\t{\n\t\t\tcase self::POINT: $obj = new SpatialPoint(); break;\n\t\t\tcase self::LINE_STRING: $obj = new SpatialLineString(); break;\n\t\t\tcase self::POLYGON: $obj = new SpatialPolygon(); break;\n\t\t\tcase self::MULTI_POINT: $obj = new SpatialMultiPoint(); break;\n\t\t\tcase self::MULTI_LINE_STRING: $obj = new SpatialMultiLineString(); break;\n\t\t\tcase self::MULTI_POLYGON: $obj = new SpatialMultiPolygon(); break;\n\t\t\tcase self::GEOMETRY_COLLECTION: $obj = new SpatialGeometryCollection(); break;\n\t\t\tdefault: throw new Exception(\"Spatial type {$type} was not found\");\n\t\t}\n\n\t\treturn $obj;\n\t}", "public function testSetAndGetCoordinates()\n {\n $latitude = \"test\";\n $longitude = \"test2\";\n\n $this->getWeather->setCoordinates($latitude, $longitude);\n $coordinates = $this->getWeather->getCoordinates();\n $expectedLatitude = $coordinates['latitude'];\n $expectedLongitude = $coordinates['longitude'];\n\n $this->assertEquals($latitude, $expectedLatitude);\n $this->assertEquals($longitude, $expectedLongitude);\n }", "public static function invalidMarkerShapeAddPolyCoordinateCall()\n {\n return new static(sprintf(\n 'The %s method can only be use with a marker shape which has type poly.',\n 'MarkerShape::addPolyCoordinate($x, $y)'\n ));\n }", "public function toXYZ()\n {\n $tmp_r = $this->red / 255;\n $tmp_g = $this->green / 255;\n $tmp_b = $this->blue / 255;\n if ($tmp_r > 0.04045) {\n $tmp_r = pow((($tmp_r + 0.055) / 1.055), 2.4);\n } else {\n $tmp_r = $tmp_r / 12.92;\n }\n if ($tmp_g > 0.04045) {\n $tmp_g = pow((($tmp_g + 0.055) / 1.055), 2.4);\n } else {\n $tmp_g = $tmp_g / 12.92;\n }\n if ($tmp_b > 0.04045) {\n $tmp_b = pow((($tmp_b + 0.055) / 1.055), 2.4);\n } else {\n $tmp_b = $tmp_b / 12.92;\n }\n $tmp_r = $tmp_r * 100;\n $tmp_g = $tmp_g * 100;\n $tmp_b = $tmp_b * 100;\n $new_x = $tmp_r * 0.4124 + $tmp_g * 0.3576 + $tmp_b * 0.1805;\n $new_y = $tmp_r * 0.2126 + $tmp_g * 0.7152 + $tmp_b * 0.0722;\n $new_z = $tmp_r * 0.0193 + $tmp_g * 0.1192 + $tmp_b * 0.9505;\n return new XYZ($new_x, $new_y, $new_z);\n }", "static function createPlacemark($latlng, $address = '')\n {\n $obj = new self($latlng, $address);\n return $obj;\n }", "public function setCoordinatesAttribute($coordinates)\n {\n $this->attributes['coordinates'] = serialize($coordinates);\n }", "public function fromString($point_str){\n\t\tif(is_string($point_str) && preg_match(\"/\\([0-9]+,[0-9]+\\)/\", $point_str)){\n\t\t\t$proc_str = substr($point_str, 1, -1); //This should remove the brackets\n\t\t\t$values = explode(',', $proc_str); //Explode into two parts based no comma\n\t\t\t$this->x = $values[0];\n\t\t\t$this->y = $values[1];\n\t\t}else\n\t\t\tthrow IllegalArgumentException();\n\n\t\t//To allow chaining of calls\n\t\treturn $this;\n\t}", "abstract public function addCoord(array $coord);", "public function jsonSerialize(): mixed\n {\n $position = [$this->getLng(), $this->getLat()];\n if ($this->is3d()) $position[] = $this->getAlt();\n return new \\GeoJson\\Geometry\\Point($position);\n }", "public function actionCreate() {\n $model = new InternshipPosition;\n $user = Users::model()->findByPk(Yii::app()->user->id);\n $department = Department::model()->findByAttributes(array('type_admin' => $user->type));\n\n if ($department != NULL) {\n $model->department_id = $department->id;\n }\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['InternshipPosition'])) {\n $model->attributes = $_POST['InternshipPosition'];\n //var_dump($model);die();\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "private static function toPoint($coordinates)\n {\n return '(' . join(' ', $coordinates) . ')';\n }", "function addPoint($x, $y = false, $ID = false)\n {\n }", "public function __construct($id,$credentials)\n\t{\n\t\t// Set the person id\n\t\t\n\t\t$this->id = $id;\n\t\t$this->birthPlace = new Place(0, \"-999\", -999, -999,$credentials,\"\");\n\t\t$this->deathPlace = new Place(0, \"-999\", -999, -999,$credentials,\"\");\n\t\treturn $this;\n\t}", "public function setCoordinates(array $coordinates)\n\t{\n\t\tif (!array_key_exists('lat', $coordinates) \n\t\t\t|| !array_key_exists('lng', $coordinates)) {\n\t\t\t$errorMsg = 'array passed to setCoordinates method is missing lng and lat keys';\n\t\t\tthrow new Exception($errorMsg);\n\t\t}\n\n\t\t//don't want to copy any other extraneous array elements\n\t\t$this->_coordinates['lat'] = $coordinates['lat'];\n\t\t$this->_coordinates['lng'] = $coordinates['lng'];\n\t\treturn $this;\n\t}", "public function setCoordinates(Coordinates $coordinates)\n {\n $this->coordinates = $coordinates;\n }", "public function create()\n {\n\n createLog(Coordonee::class);\n return view('backEnd.admin.coordonees.create');\n }", "public static function point();", "public function definition()\n {\n $coordinates = [\n [\n 'x' => $this->faker->numberBetween($min = 20, $max = 620),\n 'y' => $this->faker->numberBetween($min = 20, $max = 460)\n ], [\n 'x' => $this->faker->numberBetween($min = 20, $max = 620),\n 'y' => $this->faker->numberBetween($min = 20, $max = 460)\n ], [\n 'x' => $this->faker->numberBetween($min = 20, $max = 620),\n 'y' => $this->faker->numberBetween($min = 20, $max = 460)\n ], [\n 'x' => $this->faker->numberBetween($min = 20, $max = 620),\n 'y' => $this->faker->numberBetween($min = 20, $max = 460)\n ]\n ];\n\n return [\n 'size' => $this->faker->numberBetween($min = 15, $max = 40),\n 'price_square_foot' => $this->faker->numberBetween($min = 1, $max = 5) * 1000,\n 'name' => 'Room',\n 'coordinates' => json_encode($coordinates)\n ];\n }", "public function __construct($lat, $lon)\n {\n $this->currentLat = deg2rad($lat);\n $this->currentLon = deg2rad($lon);\n }", "abstract protected function createObject();", "public static function invalidMarkerShapePolyCoordinate()\n {\n return new static('The x & y coordinates of a poly marker shape must be numeric values.');\n }", "public function setPointCoordinates($latA, $lonA, $latB, $lonB);", "public function init($x1, $y1, $x2, $y2) {}", "public function testSetLocationPoint()\n { \n $point = new Point(52.5234051, 13.4113999, 4326);\n $user = $this->getMockForAbstractClass('TB\\Bundle\\FrontendBundle\\Entity\\User');\n $user->setlocation($point);\n $this->assertEquals($point, $user->getLocation(), \n 'The set Point object is returned');\n }", "public function __construct()\r\n {\r\n $this->spaceShip = new Ship(\r\n rand(-$this->universeRadius, $this->universeRadius),\r\n rand(-$this->universeRadius, $this->universeRadius),\r\n rand(-$this->universeRadius, $this->universeRadius),\r\n $this\r\n );\r\n // decide where we're going to!\r\n $this->destination = array('x' => rand(-$this->universeRadius, $this->universeRadius), 'y' => rand(-$this->universeRadius, $this->universeRadius), 'z' => rand(-$this->universeRadius, $this->universeRadius));\r\n // generate the initial asteroids\r\n $this->generateAsteroids();\r\n // generate the wormholes\r\n $this->generateWormholes();\r\n }", "public function actionCreate()\n {\n $model = new Point();\n $model->create_at = time();\n $model->user_id = User::getCurrentId();\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 }", "public function setCoordinate(Coordinate $coordinate)\n {\n $this->BoxCoordinateObject = $coordinate;\n\n return $this;\n }", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->circle = func_get_arg(0);\n $this->polygon = func_get_arg(1);\n }\n }", "public function __construct(array $coords = [], string $href = null, string $alt = null) {\n parent::__construct('poly', $href, $alt);\n $this->setCoordinates($coords);\n }", "public function getPosition()\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->load->library('position');\t\t\n\t\t\t\t\t\t\n\t\t$position = new Position($this->position_id);\n\n\t\treturn $position;\n\t}", "public static function invalidMarkerShapeCircleCoordinates()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s',\n 'The coordinates setter arguments is invalid if the marker shape type is circle.',\n 'The available prototype is : function setCoordinates(array(double $x, double $y, double $r))'\n ));\n }", "public function testSetLocationString()\n { \n $user = $this->getMockForAbstractClass('TB\\Bundle\\FrontendBundle\\Entity\\User');\n $user->setlocation('(52.5234051, 13.4113999)');\n $this->assertInstanceOf('CrEOF\\Spatial\\PHP\\Types\\Geometry\\Point', $user->getLocation(),\n 'A Point Object was created');\n $user->setlocation('(-34.92862119999999, 138.5999594)');\n $this->assertInstanceOf('CrEOF\\Spatial\\PHP\\Types\\Geometry\\Point', $user->getLocation(),\n 'A Point Object was created');\n }", "public function newInstance(): object;", "private function createProperty($address)\n {\n \t$address_line_1 = $address;\n \t$area_id = 1;\n \t$greater_area_id = 1;\n \t$portion_number = 1;\n \t$erf_number = 10;\n \t$size = 50;\n \t$lookup_property_type_id = 1;\n \t$created_by_id = 1;\n \n \t$property = new Property();\n \t$property->address_line_1 = $address_line_1;\n \t$property->area_id = $area_id;\n \t$property->greater_area_id = $greater_area_id;\n \t$property->portion_number = $portion_number;\n \t$property->erf_number = $erf_number;\n \t$property->size = $size;\n \t$property->lookup_property_type_id = $lookup_property_type_id;\n \t$property->created_by_id = $created_by_id;\n \t$property->save();\n \treturn $property->id;\n }" ]
[ "0.7667212", "0.6634033", "0.6339859", "0.6326798", "0.6228051", "0.6144516", "0.61152905", "0.60723484", "0.5960529", "0.5959618", "0.5946701", "0.5935383", "0.592786", "0.59216875", "0.58947295", "0.5780878", "0.57511365", "0.56929445", "0.5688768", "0.5674846", "0.5670574", "0.56616235", "0.56554055", "0.5616528", "0.5589034", "0.555818", "0.5532277", "0.5487151", "0.54682153", "0.54501647", "0.54494417", "0.5420016", "0.54123425", "0.53870857", "0.53609955", "0.5351852", "0.53470284", "0.5345883", "0.53206027", "0.53065586", "0.5304221", "0.5303442", "0.5290202", "0.52872074", "0.5278199", "0.52741003", "0.5258182", "0.5226229", "0.5211129", "0.52019614", "0.5196952", "0.51606923", "0.51418245", "0.514037", "0.51375496", "0.5137303", "0.5134254", "0.51291966", "0.51281464", "0.5122442", "0.5107592", "0.51034546", "0.5101773", "0.50932246", "0.5092148", "0.50703263", "0.50571805", "0.5051516", "0.5034642", "0.5025493", "0.501874", "0.5005228", "0.50027144", "0.4996618", "0.49952647", "0.4984863", "0.4971224", "0.4970074", "0.49687234", "0.49664682", "0.49582386", "0.49482387", "0.49481305", "0.49385837", "0.49307072", "0.49271005", "0.49061435", "0.4894879", "0.48867008", "0.4880227", "0.48568824", "0.48494393", "0.48357743", "0.4826302", "0.48063678", "0.4805389", "0.4801096", "0.47984502", "0.47862744", "0.47801465" ]
0.5857184
15
setup PayPal api context
public function __construct(){ $paypal_conf = config('paypal'); $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret'])); $this->_api_context->setConfig($paypal_conf['settings']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n// $paypal_conf = \\Config::get('paypal');\n// $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n// $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n $paypal_conf = config('paypal');\n \n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n \n }", "public function __construct() {\n $paypal_conf = Config::get('paypal_payment');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\r\n {\r\n $paypal_conf = Config::get('paypal');\r\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\r\n $this->_api_context->setConfig($paypal_conf['settings']);\r\n }", "public function __construct()\n {\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n /*if(config('paypal.settings.mode') == 'live'){\n $this->client_id = config('paypal.live_client_id');\n $this->secret = config('paypal.live_secret');\n } else {\n $this->client_id = config('paypal.sandbox_client_id');\n $this->secret = config('paypal.sandbox_secret');\n }\n\n // Set the Paypal API Context/Credentials\n $this->apiContext = new ApiContext(new OAuthTokenCredential($this->client_id, $this->secret));\n $this->apiContext->setConfig(config('paypal.settings'));\n */\n //parent::__construct();\n\n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->apiContext = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->apiContext->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n \n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n \n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n\n /** PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential(\n $paypal_conf['client_id'],\n $paypal_conf['secret'])\n );\n $this->_api_context->setConfig($paypal_conf['settings']);\n\n }", "function apiContext(){\r\n\t$apiContext = new PayPal\\Rest\\ApiContext(new PayPal\\Auth\\OAuthTokenCredential(CLIENT_ID, CLIENT_SECRET));\r\n\treturn $apiContext;\r\n}", "public function __construct()\n {\n if(config('paypal.settings.mode') == 'live'){\n $this->client_id = config('paypal.live_client_id');\n $this->secret = config('paypal.live_secret');\n //$this->plan_id = env('PAYPAL_LIVE_PLAN_ID', '');\n } else {\n $this->client_id = config('paypal.sandbox_client_id');\n $this->secret = config('paypal.sandbox_secret');\n //$this->plan_id = env('PAYPAL_SANDBOX_PLAN_ID', '');\n }\n \n // Set the Paypal API Context/Credentials\n $this->apiContext = new ApiContext(new OAuthTokenCredential($this->client_id, $this->secret));\n $this->apiContext->setConfig(config('paypal.settings'));\n }", "protected function setContext()\n {\n $gateway = Omnipay::create('PayPal_Rest');\n $gateway->setClientId(Config::get('services.paypal.client_id'));\n $gateway->setSecret(Config::get('services.paypal.secret'));\n $gateway->setTestMode(Config::get('services.paypal.sandbox'));\n\n $this->apiContext = $gateway;\n }", "public function __construct()\n {\n // parent::__construct();\n \n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n\t\t//print_r($paypal_conf);exit;\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n $this->middleware('referer');\n if (App::getLocale() == \"it\") {\n Moment::setLocale('it_IT');\n }\n\n\n $this->_apiContext = PayPal::ApiContext(\n config('services.paypal.client_id'),\n config('services.paypal.secret'));\n\n\n $this->_apiContext->setConfig(array(\n 'mode' => (getenv('APP_ENV') == \"local\") ? 'sandbox' : 'live',\n 'service.EndPoint' => (getenv('APP_ENV') == \"local\") ? 'https://api.sandbox.paypal.com' : 'https://api.paypal.com',\n 'http.ConnectionTimeOut' => 30,\n 'log.LogEnabled' => false,\n 'log.FileName' => storage_path('logs/paypal.log'),\n 'log.LogLevel' => 'FINE'\n ));\n\n\n }", "public function __construct()\n {\n if ( config('services.paypal.settings.mode') === 'live' ) {\n $this->paypalClientId = config('services.paypal.live_client_id');\n $this->paypalSecret = config('services.paypal.live_secret');\n } else {\n $this->paypalClientId = config('services.paypal.sandbox_client_id');\n $this->paypalSecret = config('services.paypal.sandbox_secret');\n }\n \n // Set the Paypal API Context/Credentials\n $this->paypalApiContext = new \\PayPal\\Rest\\ApiContext(new \\PayPal\\Auth\\OAuthTokenCredential($this->paypalClientId, $this->paypalSecret));\n $this->paypalApiContext->setConfig(config('services.paypal.settings'));\n }", "private function init()\n {\n if (!is_null($this->apiContext)) {\n return;\n }\n\n $this->apiContext = new ApiContext(\n new OAuthTokenCredential(\n $this->payPalCountryConfigurator->getPayPalId(),\n $this->payPalCountryConfigurator->getPayPalSecret()\n ),\n \\uniqid()\n );\n $this->apiContext->setConfig(\n array(\n 'mode' => (string)$this->payPalCountryConfigurator->getPayPalMode(),\n )\n );\n\n /**\n * При переполнении списка хранимых web-профилей\n * новые не создаются и страницы оплаты не локализуются\n */\n $this->cleanUpWebProfiles();\n }", "function getApiContext() {\n\t\n\t// ### Api context\n\t// Use an ApiContext object to authenticate \n\t// API calls. The clientId and clientSecret for the \n\t// OAuthTokenCredential class can be retrieved from \n\t// developer.paypal.com\n\n\t$oModuleModel = &getModel('module');\n\t$oPaypalModuleConfig = $oModuleModel->getModuleConfig('paypal');\n\tdebugprint($oPaypalModuleConfig);\n\t$apiContext = new ApiContext(\n\t\tnew OAuthTokenCredential($oPaypalModuleConfig->client_id,\n\t\t\t$oPaypalModuleConfig->api_secret));\n\n\t$apiContext->setConfig(\n\t\tarray(\n\t\t\t'mode' => $oPaypalModuleConfig->endpoint,\n\t\t\t'http.ConnectionTimeOut' => 30,\n\t\t\t'log.LogEnabled' => true,\n\t\t\t'log.FileName' => '../PayPal.log',\n\t\t\t'log.LogLevel' => 'FINE'\n\t\t)\n\t);\n\t\n\t/*\n\t// Register the sdk_config.ini file in current directory\n\t// as the configuration source.\n\tif(!defined(\"PP_CONFIG_PATH\")) {\n\t\tdefine(\"PP_CONFIG_PATH\", __DIR__);\n\t}\n\t*/\n\n\treturn $apiContext;\n}", "public function paypal(Request $request)\n {\nrequire 'vendor/autoload.php';\n\n$apiContext = new \\PayPal\\Rest\\ApiContext(\n new \\PayPal\\Auth\\OAuthTokenCredential(\n 'AedIVbiADiRsvL3jFM6Z6Kcx5wSgwyBIMJFFQq0UFcBfrew-mhHGMZVpqWJhvQGbn-HkUpt5F023HH4n',\n 'EIs32ISB07N21Ey0z2a4Qthy5Obo173s1wD9Yx9hhiYJoC2bxdnNJVLpb2MvnT5QTYK74RBMg84FvPd4'\n )\n);\n\n return response()->json([\n 'message' => 'paypal route hit',\n 'request' => $request->all()\n ]);\n }", "private function setupApplicationEnvironment(){\n\n // TODO: MAKE MORE EFFICENT WITH CACHING\n if($this->version == null)\n $this->version = env('PAYPAL_VERSION', 'dev-2.0-beta');\n\n if($this->endpoint == null)\n $this->endpoint = env('PAYPAL_ENDPOINT');\n \n if($this->username == null)\n $this->username = env('PAYPAL_USERNAME');\n\n if($this->password == null)\n $this->password = env('PAYPAL_PASSWORD');\n\n if($this->signature == null)\n $this->signature = env('PAYPAL_SIGNATURE');\n\n if($this->isDirect == null)\n $this->isDirect = env('PAYPAL_DIRECT', true);\n\n if($this->payment_method == null) \n $this->payment_method = ($this->isDirect) ? Objects::CREDIT_CARD : env('PAYMENT_METHOD');\n\n // Set our enviornment based on production or development\n $this->environment = (!$this->isDevelopment) ? new ProductionEnvironment() : new SandboxEnvironment();\n\n $this->client = new PayPalHttpClient($this->environment);\n\n }", "public function setUp()\n {\n $this->_paypal = new Paypal();\n\n $this->_payment = new Payment($this->_paypal);\n }", "public function __construct()\n {\n // initialization constructor. Called when class is created.\n\n\t\tif (basket_plus::getBasketVar(PAYPAL_TEST_MODE)){\n\t\t\t// sandbox paypal\n\t\t\t$this->paypal_url = \"https://www.sandbox.paypal.com/cgi-bin/webscr\";\n\t\t\t$this->secure_url = \"ssl://www.sandbox.paypal.com\";\n\t\t}\n\t\telse{\n // normal paypal\n\t\t\t$this->paypal_url = \"https://www.paypal.com/cgi-bin/webscr\";\n\t\t\t$this->secure_url = \"ssl://www.paypal.com\";\n\t\t}\n\n $this->last_error = '';\n\n //$this->ipn_log_file = Kohana::log_directory().Kohana::config('paypal.ipn_logfile');\n //$this->ipn_log = true;\n $this->ipn_response = '';\n\n // populate $fields array with a few default values. See the paypal\n // documentation for a list of fields and their data types. These default\n // values can be overwritten by the calling script.\n\n }", "public function setUpContext()\n {\n return $this->context = (new \\NetLicensing\\Context())\n ->setBaseUrl(self::BASE_URL)\n ->setSecurityMode(self::SECURITY_MODE)\n ->setUsername(self::USERNAME)\n ->setPassword(self::PASSWORD);\n }", "function __construct($properties = null) {\n\t\t$this->info = parent::getGateway();\n\n\t\t/**\n\t\t# API user: The user that is identified as making the call. you can\n\t\t# also use your own API username that you created on PayPal�s sandbox\n\t\t# or the PayPal live site\n\t\t*/\n\t\t$this->API_UserName=$this->info['merchant']['api_username'];\n\n\n\t\t/**\n\t\t# API_password: The password associated with the API user\n\t\t# If you are using your own API username, enter the API password that\n\t\t# was generated by PayPal below\n\t\t# IMPORTANT - HAVING YOUR API PASSWORD INCLUDED IN THE MANNER IS NOT\n\t\t# SECURE, AND ITS ONLY BEING SHOWN THIS WAY FOR TESTING PURPOSES\n\t\t*/\n\t\t$this->API_Password=$this->info['merchant']['api_password'];\n\n\t\t/**\n\t\t# API_Signature:The Signature associated with the API user. which is generated by paypal.\n\t\t*/\n\t\t$this->API_Signature=$this->info['merchant']['api_signature'];\n\n\t\t/**\n\t\t# Version: this is the API version in the request.\n\t\t# It is a mandatory parameter for each API request.\n\t\t# The only supported value at this time is 2.3\n\t\t*/\n\t\t$this->version=2.3;\n\n\t\t$this->subject = '';\n\n\t\t// below three are needed if used permissioning\n\t\t$this->AUTH_token='';\n\n\t\t$this->AUTH_signature='';\n\n\t\t$this->AUTH_timestamp='';\n\n\t\t$this->USE_PROXY = FALSE;\n\n\t\t/**\n\t\t# PROXY_HOST and PROXY_PORT will be read only if USE_PROXY is set to TRUE\n\n\t\t$this->PROXY_HOST = 127.0.0.1;\n\t\t$this->PROXY_PORT = 808;\n\t\t*/\n\n\t\t/* Define the PayPal URL. This is the URL that the buyer is\n\t\t first sent to to authorize payment with their paypal account\n\t\t change the URL depending if you are testing on the sandbox\n\t\t or going to the live PayPal site\n\t\t For the sandbox, the URL is\n\t\t https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=\n\t\t For the live site, the URL is\n\t\t https://www.paypal.com/webscr&cmd=_express-checkout&token=\n\t\t */\n\t\tif ($this->info['merchant']['type'] == 0) {\n\t\t\t$this->PAYPAL_URL = 'https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=';\n\n\t\t\t/**\n\t\t\t# Endpoint: this is the server URL which you have to connect for submitting your API request.\n\t\t\t*/\n\t\t\t$this->API_Endpoint ='https://api-3t.sandbox.paypal.com/nvp';\n\t\t} else {\n\t\t\t$this->PAYPAL_URL = 'https://www.paypal.com/webscr&cmd=_express-checkout&token=';\n\n\t\t\t/**\n\t\t\t# Endpoint: this is the server URL which you have to connect for submitting your API request.\n\t\t\t*/\n\t\t\t$this->API_Endpoint ='https://api-3t.paypal.com/nvp';\n\t\t}\n\n\t\t// Ack related constants\n\t\t$this->ACK_SUCCESS = 'SUCCESS';\n\t\t$this->ACK_SUCCESS_WITH_WARNING = 'SUCCESSWITHWARNING';\n\n\t\tparent::__construct($properties);\n\t}", "public function __construct($config=\"\"){\r\n\r\n\t//default settings\r\n\t$settings = array(\r\n\t\t'business' => 'jeremy@acs.com', //paypal email address\r\n\t\t'currency' => 'GBP', //paypal currency\r\n\t\t'cursymbol'=> '&pound;', //currency symbol\r\n\t\t'location' => 'GB', //location code (ex GB)\r\n\t\t'returnurl'=> 'http://mysite/myreturnpage',//where to go back when the transaction is done.\r\n\t\t'returntxt'=> 'Return to My Site', //What is written on the return button in paypal\r\n\t\t'cancelurl'=> 'http://mysite/mycancelpage',//Where to go if the user cancels.\r\n\t\t'shipping' => 0, //Shipping Cost\r\n\t\t'custom' => '' //Custom attribute\r\n\t);\r\n\r\n\t//overrride default settings\r\n\tif(!empty($config)){foreach($config as $key=>$val){\r\n\t\tif(!empty($val)){ $settings[$key] = $val; }\r\n\t}}\r\n\t\r\n\t//Set the class attributes\r\n\t$this->business = $settings['business'];\r\n\t$this->currency = $settings['currency'];\r\n\t$this->cursymbol = $settings['cursymbol'];\r\n\t$this->location = $settings['location'];\r\n\t$this->returnurl = $settings['returnurl'];\r\n\t$this->returntxt = $settings['returntxt'];\r\n\t$this->cancelurl = $settings['cancelurl'];\r\n\t$this->shipping = $settings['shipping'];\r\n\t$this->custom = $settings['custom'];\r\n\t$this->items = array();\r\n\r\n}", "public static function init() {\n\n\t\t// Add PayPal API fields to PayPal form fields as required\n\t\tadd_action( 'woocommerce_settings_start', __CLASS__ . '::add_form_fields', 100 );\n\t\tadd_action( 'woocommerce_api_wc_gateway_paypal', __CLASS__ . '::add_form_fields', 100 );\n\n\t\t// Handle requests to check whether a PayPal account has Reference Transactions enabled\n\t\tadd_action( 'admin_init', __CLASS__ . '::maybe_check_account' );\n\n\t\t// Maybe show notice to enter PayPal API credentials\n\t\tadd_action( 'admin_notices', __CLASS__ . '::maybe_show_admin_notices' );\n\n\t\t// Add the PayPal subscription information to the billing information\n\t\tadd_action( 'woocommerce_admin_order_data_after_billing_address', __CLASS__ . '::profile_link' );\n\n\t\t// Before WC updates the PayPal settings remove credentials error flag\n\t\tadd_action( 'load-woocommerce_page_wc-settings', __CLASS__ . '::maybe_update_credentials_error_flag', 9 );\n\t}", "private function init()\n {\n $this->apiLive = false;\n\n $this->returnUrl = \"\";\n $this->cancelUrl =\"\";\n \n //Whether we are in sandbox or in live environment\n if ((bool)$this->apiLive === true) {\n //live\n $this->X_SYCA_MERCHANDID = 'C_57359E9C95103';\n $this->X_SYCA_APIKEY='pk_syca_753413334715da0c50e0a6adaf4d12abd9be1aa3';\n $this->sycapayUrlInit = \"https://secure.sycapay.com/login\";\n $this->sycapayUrl = 'https://secure.sycapay.com/checkresponsive';\n } else {\n //test\n $this->X_SYCA_MERCHANDID = 'C_56713FBF3E6A4';\n $this->X_SYCA_APIKEY='pk_syca_d49497468317152423d42aaff0d1166fc1b9522d';\n $this->sycapayUrlInit = \"https://secure.sycapay.net/login\";\n $this->sycapayUrl = \"https://secure.sycapay.net/checkresponsive\";\n }\n }", "protected function setup()\r\n {\r\n if (!defined('APNS_SSL_CERTIFICATE_FILE_PATH')\r\n || !file_exists(APNS_SSL_CERTIFICATE_FILE_PATH)\r\n ) {\r\n $this->markTestSuiteSkipped('Credentials missing in config.php');\r\n }\r\n \r\n $this->clientHandler = new Services_Apns_Client_Feedback();\r\n $this->clientHandler->setSslCertificateFilePath(APNS_SSL_CERTIFICATE_FILE_PATH);\r\n \r\n if (defined('APNS_CERTIFICATE_PASSWORD_PHRASE')) {\r\n $this->clientHandler->setPasswordPhrase(APNS_CERTIFICATE_PASSWORD_PHRASE);\r\n }\r\n \r\n if (defined('APNS_ENV')) {\r\n $this->clientHandler->setDefaultEnvironment(APNS_ENV);\r\n }\r\n }", "function paypal_class() {\n \n // initialization constructor. Called when class is created.\n \n $this->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n //$this->paypal_url = 'https://www.paypal.com/cgi-bin/webscr';\n \n $this->last_error = '';\n \n $this->ipn_log_file = '.ipn_results.log';\n $this->ipn_log = true; \n $this->ipn_response = '';\n \n // populate $fields array with a few default values. See the paypal\n // documentation for a list of fields and their data types. These defaul\n // values can be overwritten by the calling script.\n\n $this->add_field('rm','2'); // Return method = POST\n $this->add_field('cmd','_xclick'); \n \n }", "public function __construct($config = array())\r\n {\r\n $config = Arr::merge((array) Kohana::config('paypal'), $config);\r\n\r\n // Save the config in the object\r\n $this->config = $config;\r\n\r\n $this->paypal_url = isset($config['url']) ? $config['url'] : 'https://www.paypal.com/cgi-bin/webscr';\r\n }", "function photo_shop_paypal_class () {\r\n\r\n // initialization constructor. Called when class is created.\r\n\t global $CONFIG;\r\n $this->last_error = '';\r\n $this->ipn_log = $CONFIG['photo_shop_paypal_ipn_log'];\r\n $this->ipn_log_file = $CONFIG['photo_shop_paypal_ipn_logfile'];\r\n $this->ipn_response = '';\r\n }", "public function __construct()\r\n {\r\n $this->PROXY_HOST = '127.0.0.1';\r\n $this->PROXY_PORT = '808';\r\n $this->Env = \"sandbox\";\r\n $this->API_UserName = \"music2_1298365294_biz_api1.yahoo.com\";\r\n $this->API_Password = \"1298365304\";\r\n $this->API_Signature = \"AGvofgFr5KfTPLmgHXGvSxdUjiipALiplxLdQuq.GsgTLEvE0yswKLFb\";\r\n $this->API_AppID = \"APP-80W284485P519543T\";\r\n $this->API_Endpoint = \"\";\r\n $this->USE_PROXY = false;\r\n $this->preapprovalKey = \"\";\r\n }", "private function _init() {\n\n global $admin_settings;\n global $payment_list;\n\n new KP_Korapay_Shortcode;\n\n $admin_settings = KP_Korapay_Admin_Settings::get_instance();\n $payment_list = KP_Korapay_Payment_List::get_instance();\n\n if ( is_admin() ) {\n KP_Tinymce_Plugin::get_instance();\n }\n\n if ($admin_settings->get_option_value( 'go_live' ) === 'yes' ) {\n $this->api_base_url = 'https://api.korapay.com/merchant';\n }\n\n }", "public function create(){\n $payer = new Payer();\n $payer->setPaymentMethod(\"paypal\");\n\n // Set redirect URLs\n $redirectUrls = new RedirectUrls();\n\n if (App::environment() == 'production') {\n $app_url = \"https://doomus.com.br/public\";\n } else {\n $app_url = \"http://localhost:8000\";\n }\n\n $redirectUrls->setReturnUrl(\"$app_url/execute-payment\")\n ->setCancelUrl(\"$app_url/cancel-payment\");\n\n // Set payment amount\n if(session('cupom') !== null && session('valorFrete') !== null){\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(round(Cart::total(), 2) + str_replace(',','.', session('valorFrete')));\n }elseif(session('valorFrete') !== null){\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(Cart::total() + str_replace(',','.', session('valorFrete')));\n }else{\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(Cart::total());\n }\n\n // Set transaction object\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setDescription(\"Payment description\");\n\n // Create the full payment object\n $payment = new Payment();\n $payment->setIntent('sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirectUrls)\n ->setTransactions(array($transaction));\n\n // Create payment with valid API context\n try {\n $payment->create($this->_apiContext);\n \n // Get PayPal redirect URL and redirect the customer\n return redirect($payment->getApprovalLink());\n \n // Redirect the customer to $approvalUrl\n } catch (PayPalConnectionException $ex) {\n echo $ex->getCode();\n echo $ex->getData();\n die($ex);\n } catch (Exception $ex) {\n die($ex);\n }\n }", "public function init()\r\n { \r\n\t\ttry\r\n\t\t{ \r\n $orderNumber = addslashes( $_GET['order_number'] ) ? : null;\r\n if ( is_null( $orderNumber) ) { return; }\r\n \r\n $table = new Application_Subscription_Checkout_Order();\r\n if( ! $orderInfo = $table->selectOne( null, array( 'order_id' => $orderNumber ) ) )\r\n {\r\n return false;\r\n }\r\n //var_export( $orderInfo );\r\n if( ! is_array( $orderInfo['order'] ) )\r\n {\r\n //\tcompatibility\r\n $orderInfo['order'] = unserialize( $orderInfo['order'] );\r\n }\r\n //$orderInfo['order'] = unserialize( $orderInfo['order'] );\r\n $orderInfo['total'] = 0;\r\n\r\n foreach( $orderInfo['order']['cart'] as $name => $value )\r\n {\r\n if( ! isset( $value['price'] ) )\r\n {\r\n $value = array_merge( self::getPriceInfo( $value['price_id'] ), $value );\r\n }\r\n $orderInfo['total'] += $value['price'] * $value['multiple'];\r\n //$counter++;\r\n }\r\n\r\n $secretKey = Paypal_Settings::retrieve( 'secret_key' );\r\n\r\n // var_Export( $secretKey );\r\n\r\n $result = array();\r\n\r\n //The parameter after verify/ is the transaction reference to be verified\r\n $url = 'https://api.sandbox.paypal.com/v2/checkout/orders/' . $_REQUEST['ref'];\r\n echo $url;\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt(\r\n $ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']\r\n );\r\n curl_setopt(\r\n $ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $secretKey ]\r\n );\r\n $request = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n if ( $request ) {\r\n $result = json_decode($request, true);\r\n }\r\n\r\n //Use the $result array\r\n var_export( $request );\r\n \r\n //\tconfirm status\r\n /* var_export( ! empty( $result['Error'] ) );\r\n var_export( @$result['StatusCode'] !== '00' );\r\n var_export( @$result['Amount'] != @$orderInfo['total'] );\r\n var_export( @$result['Amount'] );\r\n var_export( @$orderInfo['total'] );\r\n var_export( @$result['AmountIntegrityCode'] !== '00' );\r\n */\t\t\r\n if( empty( $result['status'] ) )\r\n {\r\n //\tPayment was not successful.\r\n $orderInfo['order_status'] = 'Payment Failed';\r\n }\r\n else\r\n {\r\n $orderInfo['order_status'] = 'Payment Successful';\r\n }\r\n\r\n //var_export( $orderInfo );\r\n $orderInfo['order_random_code'] = $_REQUEST['ref'];\r\n $orderInfo['gateway_response'] = $result;\r\n\r\n //var_export( $orderNumber );\r\n\r\n self::changeStatus( $orderInfo );\r\n //$table->update( $orderInfo, array( 'order_id' => $orderNumber ) );\r\n\r\n //$response = new SimpleXMLElement(file_get_contents($url));\r\n\r\n //var_export( $orderInfo );\r\n //var_export( $result );\r\n\r\n //\tCode to change check status goes heres\r\n //\tif( )\r\n return $orderInfo;\r\n\t\t} \r\n\t\tcatch( Exception $e )\r\n { \r\n // Alert! Clear the all other content and display whats below.\r\n // $this->setViewContent( '<p class=\"badnews\">' . $e->getMessage() . '</p>' ); \r\n // $this->setViewContent( '<p class=\"badnews\">Theres an error in the code</p>' ); \r\n // return false; \r\n }\r\n\t}", "abstract protected function prepareContext(): void;", "function create_payment_with_paypal()\n\t{\n\t\t$this->_api_context->setConfig($this->config->item('settings'));\n\n\n\t\t// ### Payer\n\t\t// A resource representing a Payer that funds a payment\n\t\t// For direct credit card payments, set payment method\n\t\t// to 'credit_card' and add an array of funding instruments.\n\n\t\t$payer = new \\PayPal\\Api\\Payer();\n\t\t$payer->setPaymentMethod('paypal');\n\n\t\t// ### Itemized information\n\t\t// (Optional) Lets you specify item wise\n\t\t// information\n\n\n\t\t$ListItemes = array();\n\n\t\tif (is_null(get_cookie(\"cart\")))\n\t\t\tredirect(\"cart\");\n\n\n\t\t$arr = json_decode(get_cookie(\"cart\"), TRUE);\n\n\t\t$ids = array();\n\n\t\tforeach ($arr as $a) {\n\t\t\t$ids[] = $a['id'];\n\t\t}\n\n\t\tif (count($ids) > 0)\n\t\t\t$info = $this->m_p->s_cart(\"products\", $ids, FALSE);\n\t\telse\n\t\t\tredirect(\"cart\");\n\n\n\t\t$products = array();\n\n\t\t$tprice = 0;\n\t\t$ship = get_info(\"shipping\", $this->input->post(\"shipping\"), \"price\") ?? 0;\n\n\t\t$i = 0;\n\n\t\tforeach ($info as $key) {\n\t\t\t$infoa[$key->id] = $key;\n\t\t}\n\n\t\tforeach ($arr as $idk => $k) {\n\t\t\t$key = $infoa[$k['id']];\n\n\t\t\t$options = isset($k['op']) ? json_decode($k['op']) : array();\n\n\t\t\t$products[] = array(\"q\" => $k[\"q\"], \"id\" => $k['id'], \"op\" => $options);\n\n\t\t\t$pr = number_format($key->price - ($key->price * $key->discount / 100), 2);\n\t\t\t$tpr = isset($k['q']) ? number_format($pr * $k['q'], 2) : $pr;\n\n\t\t\t$tprice = $tprice + $tpr;\n\n\t\t\t$ListItemes[$i] = array(\n\t\t\t\t\"name\" \t\t\t=> get_info(\"products\", $key->id, \"title\"),\n\t\t\t\t\"sku\" \t\t\t=> $key->id,\n\t\t\t\t\"currency\" => \"USD\",\n\t\t\t\t\"quantity\" \t\t=> isset($k['q']) ? $k['q'] : 1,\n\t\t\t\t\"price\" \t\t=> $pr\n\t\t\t);\n\n\t\t\t$i++;\n\t\t}\n\n\t\t$date = \"Y-m-d\";\n\n\t\t// if(!empty($coupon))\n\t\t// {\n\t\t// \t$c = $this->m_p->s_a(\"discounts\", array(\"coupon\" => $coupon, \"date >=\" => $date));\n\n\t\t// \tif(count($c) != 0)\n\t\t// \t{\n\t\t// \t\tforeach($c as $k)\n\t\t// \t\t\t$num = $k->num;\n\n\t\t// \t\t$tprice = $tprice - $num * $tprice / 100;\n\t\t// \t}\n\t\t// }\n\n\t\t$ip = $this->input->ip_address();\n\n\t\t$date = date(\"Y-m-d\");\n\n\t\t$results = $this->db->query(\"SELECT * FROM account where dateat like '$date%' \")->row();\n\t\tif ($results) {\n\t\t\t$target = $results->target;\n\t\t} else {\n\t\t\t$target = '00';\n\t\t}\n\t\t$bill_no = '#OR' . strtoupper(substr(md5(uniqid(mt_rand(), true)), 0, 4));\n\t\t$currency_type = $this->input->post(\"currency_type\");\n\t\t$arrInsert = array(\n\t\t\t\"name\" => $this->input->post(\"fullname\"),\n\t\t\t\"tele\" => $this->input->post(\"phone\"),\n\t\t\t\"email\" => $this->input->post(\"email\"),\n\t\t\t\"address\" => $this->input->post(\"address\"),\n\t\t\t\"address2\" => $this->input->post(\"address2\"),\n\t\t\t\"city\" => $this->input->post(\"city\"),\n\t\t\t\"state\" => $this->input->post(\"state\"),\n\t\t\t\"zipcode\" => $this->input->post(\"zipcode\"),\n\t\t\t\"country\" => $this->input->post(\"country\"),\n\t\t\t\"note\" => $this->input->post(\"note\"),\n\t\t\t\"ip\" => $ip,\n\t\t\t\"pay\" => \"paypal\",\n\t\t\t\"totalPrice\" => $tprice + $ship,\n\t\t\t\"products\" => json_encode($products),\n\t\t\t\"date\" => time(),\n\t\t\t\"target\" => $target,\n\t\t\t\"order_id\" => $bill_no,\n\t\t\t\"datetime\" => date('Y-m-d\\TH:i:s'),\n\t\t\t'currency_type' => $currency_type\n\t\t);\n\n\t\t$orderId = $this->m_p->ins(\"orders\", $arrInsert);\n\t\t\n\t\t$itemList = new ItemList();\n\t\t$itemList->setItems($ListItemes);\n\n\t\t// ### Additional payment details\n\t\t// Use this optional field to set additional\n\t\t// payment information such as tax, shipping\n\t\t// charges etc.\n\t\t$details['tax'] = number_format($ship, 2);\n\t\t$details['subtotal'] = number_format($tprice, 2);\n\t\t// ### Amount\n\t\t// Lets you specify a payment amount.\n\t\t// You can also specify additional details\n\t\t// such as shipping, tax.\n\t\t$amount['currency'] = \"USD\";\n\t\t$amount['total'] = number_format($details['tax'] + $details['subtotal'], 2);\n\t\t$amount['details'] = $details;\n\t\t// ### Transaction\n\t\t// A transaction defines the contract of a\n\t\t// payment - what is the payment for and who\n\t\t// is fulfilling it.\n\n\t\t//exit();\n\n\t\t$transaction['description'] = 'Payment';\n\t\t$transaction['amount'] = $amount;\n\t\t$transaction['invoice_number'] = uniqid();\n\t\t$transaction['item_list'] = $itemList;\n\t\t$transaction['custom'] = $orderId;\n\n\t\t// ### Redirect urls\n\t\t// Set the urls that the buyer must be redirected to after\n\t\t// payment approval/ cancellation.\n\t\t$baseUrl = base_url();\n\t\t$redirectUrls = new RedirectUrls();\n\t\t$redirectUrls->setReturnUrl($baseUrl . \"paypal/getPaymentStatus\")\n\t\t\t->setCancelUrl($baseUrl . \"paypal/getPaymentStatus\");\n\n\t\t// ### Payment\n\t\t// A Payment Resource; create one using\n\t\t// the above types and intent set to sale 'sale'\n\t\t$payment = new Payment();\n\t\t$payment->setIntent(\"sale\")\n\t\t\t->setPayer($payer)\n\t\t\t->setRedirectUrls($redirectUrls)\n\t\t\t->setTransactions(array($transaction));\n\n\t\ttry {\n\t\t\t$payment->create($this->_api_context);\n\t\t} catch (Exception $ex) {\n\t\t\t// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n\t\t\tprint_r($ex);\n\t\t\texit(1);\n\t\t}\n\t\tforeach ($payment->getLinks() as $link) {\n\t\t\tif ($link->getRel() == 'approval_url') {\n\t\t\t\t$redirect_url = $link->getHref();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (isset($redirect_url)) {\n\t\t\t/** redirect to paypal **/\n\t\t\tredirect($redirect_url);\n\t\t}\n\n\t\t$this->session->set_flashdata('success_msg', 'Unknown error occurred');\n\t\tredirect('home/checkout');\n\t}", "public function __construct()\n {\n $this->id = 'paypal_payment';\n $this->method_title = 'Paypal Payment';\n $this->title = 'Paypal Payment';\n $this->has_fields = false;\n $this->invoiceUrl = \"https://api.sandbox.paypal.com/v1/invoicing/invoices/\";\n\n $this->init_form_fields();\n $this->init_settings();\n\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n }", "public static function client()\n {\n return new PayPalHttpClient(self::environment());\n }", "function __construct()\n\t{\n\t\t//$this->PaypalAdaptivePayments = Paypaladaptive::initialize();\n\t\t$this->paypal_transaction = Paypaladaptive::initializePaypalTransaction();\n\t\t$this->shop_order_obj = Webshoporder::initialize();\n\t\t$this->invoice_obj = Webshoporder::initializeInvoice();\n\t\t$this->product_obj = Products::initialize();\n\t\t$this->common_invoice_obj = Products::initializeCommonInvoice();\n\t\t$this->manage_credits_obj = Products::initializeManageCredits();\n\t}", "public function setUp(): void\n {\n parent::setUp();\n $this->api = new PaymentSecupayCreditcardsApi();\n }", "public function expressSetup() {\r\n\t\tif ((!$this->cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {\r\n\t\t\t$json = array();\r\n\t\t\t$json['error'] = true;\r\n\t\t\t$json['url'] = $this->url->link('checkout/cart');\r\n\r\n\t\t\t$this->response->addHeader('Content-Type: application/json');\r\n\t\t\t$this->response->setOutput(json_encode($json));\r\n\t\t}\r\n\r\n\t\t// if user not logged in check that the guest checkout is allowed\r\n\t\tif (!$this->customer->isLogged() && (!$this->config->get('config_checkout_guest') || $this->config->get('config_customer_price') || $this->cart->hasDownload() || $this->cart->hasRecurringProducts())) {\r\n\t\t\t$json = array();\r\n\t\t\t$json['error'] = true;\r\n\t\t\t$json['url'] = $this->url->link('checkout/checkout');\r\n\r\n\t\t\t$this->response->addHeader('Content-Type: application/json');\r\n\t\t\t$this->response->setOutput(json_encode($json));\r\n\t\t} else {\r\n\t\t\tunset($this->session->data['guest']);\r\n\t\t}\r\n\r\n\t\tunset($this->session->data['shipping_method']);\r\n\t\tunset($this->session->data['shipping_methods']);\r\n\t\tunset($this->session->data['payment_method']);\r\n\t\tunset($this->session->data['payment_methods']);\r\n\r\n\t\tif (!$this->customer->isLogged()) {\r\n\t\t\t$this->session->data['paypal_braintree']['guest'] = true;\r\n\r\n\t\t\t$this->session->data['guest']['customer_group_id'] = $this->config->get('config_customer_group_id');\r\n\t\t\t$this->session->data['guest']['firstname'] = $this->request->post['details']['firstName'];\r\n\t\t\t$this->session->data['guest']['lastname'] = $this->request->post['details']['lastName'];\r\n\t\t\t$this->session->data['guest']['email'] = $this->request->post['details']['email'];\r\n\r\n\t\t\tif (isset($this->request->post['details']['phone'])) {\r\n\t\t\t\t$this->session->data['guest']['telephone'] = $this->request->post['details']['phone'];\r\n\t\t\t} else {\r\n\t\t\t\t$this->session->data['guest']['telephone'] = '';\r\n\t\t\t}\r\n\r\n\t\t\t$this->session->data['guest']['payment']['company'] = '';\r\n\r\n\t\t\t$this->session->data['guest']['payment']['firstname'] = $this->request->post['details']['firstName'];\r\n\t\t\t$this->session->data['guest']['payment']['lastname'] = $this->request->post['details']['lastName'];\r\n\r\n\t\t\t$this->session->data['guest']['payment']['company_id'] = '';\r\n\t\t\t$this->session->data['guest']['payment']['tax_id'] = '';\r\n\r\n\t\t\tif ($this->cart->hasShipping()) {\r\n\t\t\t\t$shipping_name = explode(' ', $this->request->post['details']['shippingAddress']['recipientName']);\r\n\t\t\t\t$shipping_first_name = $shipping_name[0];\r\n\t\t\t\tunset($shipping_name[0]);\r\n\t\t\t\t$shipping_last_name = implode(' ', $shipping_name);\r\n\r\n\t\t\t\t$this->session->data['guest']['payment']['address_1'] = $this->request->post['details']['shippingAddress']['line1'];\r\n\t\t\t\tif (isset($this->request->post['details']['shippingAddress']['line2'])) {\r\n\t\t\t\t\t$this->session->data['guest']['payment']['address_2'] = $this->request->post['details']['shippingAddress']['line2'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->session->data['guest']['payment']['address_2'] = '';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->session->data['guest']['payment']['postcode'] = $this->request->post['details']['shippingAddress']['postalCode'];\r\n\t\t\t\t$this->session->data['guest']['payment']['city'] = $this->request->post['details']['shippingAddress']['city'];\r\n\r\n\t\t\t\t$this->session->data['guest']['shipping']['firstname'] = $shipping_first_name;\r\n\t\t\t\t$this->session->data['guest']['shipping']['lastname'] = $shipping_last_name;\r\n\t\t\t\t$this->session->data['guest']['shipping']['company'] = '';\r\n\t\t\t\t$this->session->data['guest']['shipping']['address_1'] = $this->request->post['details']['shippingAddress']['line1'];\r\n\r\n\t\t\t\tif (isset($this->request->post['details']['shippingAddress']['line2'])) {\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['address_2'] =$this->request->post['details']['shippingAddress']['line2'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['address_2'] = '';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->session->data['guest']['shipping']['postcode'] = $this->request->post['details']['shippingAddress']['postalCode'];\r\n\t\t\t\t$this->session->data['guest']['shipping']['city'] = $this->request->post['details']['shippingAddress']['city'];\r\n\r\n\t\t\t\t$this->session->data['shipping_postcode'] = $this->request->post['details']['shippingAddress']['postalCode'];\r\n\r\n\t\t\t\t$country_info = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"country` WHERE `iso_code_2` = '\" . $this->db->escape($this->request->post['details']['shippingAddress']['countryCode']) . \"' AND `status` = '1' LIMIT 1\")->row;\r\n\r\n\t\t\t\tif ($country_info) {\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['country_id'] = $country_info['country_id'];\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['country'] = $country_info['name'];\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['iso_code_2'] = $country_info['iso_code_2'];\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['iso_code_3'] = $country_info['iso_code_3'];\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['address_format'] = $country_info['address_format'];\r\n\t\t\t\t\t$this->session->data['guest']['payment']['country_id'] = $country_info['country_id'];\r\n\t\t\t\t\t$this->session->data['guest']['payment']['country'] = $country_info['name'];\r\n\t\t\t\t\t$this->session->data['guest']['payment']['iso_code_2'] = $country_info['iso_code_2'];\r\n\t\t\t\t\t$this->session->data['guest']['payment']['iso_code_3'] = $country_info['iso_code_3'];\r\n\t\t\t\t\t$this->session->data['guest']['payment']['address_format'] = $country_info['address_format'];\r\n\t\t\t\t\t$this->session->data['shipping_country_id'] = $country_info['country_id'];\r\n\r\n\t\t\t\t\tif (isset($this->request->post['details']['shippingAddress']['state'])) {\r\n\t\t\t\t\t\t$returned_shipping_zone = $this->request->post['details']['shippingAddress']['state'];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$returned_shipping_zone = '';\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$zone_info = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"zone` WHERE (`name` = '\" . $this->db->escape($returned_shipping_zone) . \"' OR `code` = '\" . $this->db->escape($returned_shipping_zone) . \"') AND `status` = '1' AND `country_id` = '\" . (int)$country_info['country_id'] . \"' LIMIT 1\")->row;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['country_id'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['country'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['iso_code_2'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['iso_code_3'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['address_format'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['payment']['country_id'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['payment']['country'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['payment']['iso_code_2'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['payment']['iso_code_3'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['payment']['address_format'] = '';\r\n\t\t\t\t\t$this->session->data['shipping_country_id'] = '';\r\n\r\n\t\t\t\t\t$zone_info = array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($zone_info) {\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['zone'] = $zone_info['name'];\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['zone_code'] = $zone_info['code'];\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['zone_id'] = $zone_info['zone_id'];\r\n\t\t\t\t\t$this->session->data['guest']['payment']['zone'] = $zone_info['name'];\r\n\t\t\t\t\t$this->session->data['guest']['payment']['zone_code'] = $zone_info['code'];\r\n\t\t\t\t\t$this->session->data['guest']['payment']['zone_id'] = $zone_info['zone_id'];\r\n\t\t\t\t\t$this->session->data['shipping_zone_id'] = $zone_info['zone_id'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['zone'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['zone_code'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['shipping']['zone_id'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['payment']['zone'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['payment']['zone_code'] = '';\r\n\t\t\t\t\t$this->session->data['guest']['payment']['zone_id'] = '';\r\n\t\t\t\t\t$this->session->data['shipping_zone_id'] = '';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->session->data['guest']['shipping_address'] = true;\r\n\t\t\t} else {\r\n\t\t\t\t$this->session->data['guest']['payment']['address_1'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['address_2'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['postcode'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['city'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['country_id'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['country'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['iso_code_2'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['iso_code_3'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['address_format'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['zone'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['zone_code'] = '';\r\n\t\t\t\t$this->session->data['guest']['payment']['zone_id'] = '';\r\n\t\t\t\t$this->session->data['guest']['shipping_address'] = false;\r\n\t\t\t}\r\n\r\n\t\t\t$this->session->data['account'] = 'guest';\r\n\r\n\t\t\tunset($this->session->data['shipping_method']);\r\n\t\t\tunset($this->session->data['shipping_methods']);\r\n\t\t\tunset($this->session->data['payment_method']);\r\n\t\t\tunset($this->session->data['payment_methods']);\r\n\t\t} else {\r\n\t\t\t$this->session->data['paypal_braintree']['guest'] = false;\r\n\r\n\t\t\tunset($this->session->data['guest']);\r\n\t\t\t/**\r\n\t\t\t * if the user is logged in, add the address to the account and set the ID.\r\n\t\t\t */\r\n\r\n\t\t\tif ($this->cart->hasShipping()) {\r\n\t\t\t\t$this->load->model('account/address');\r\n\r\n\t\t\t\t$addresses = $this->model_account_address->getAddresses();\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Compare all of the user addresses and see if there is a match\r\n\t\t\t\t */\r\n\t\t\t\t$match = false;\r\n\t\t\t\tforeach($addresses as $address) {\r\n\t\t\t\t\tif (trim(strtolower($address['address_1'])) == trim(strtolower($this->request->post['details']['shippingAddress']['line1'])) && trim(strtolower($address['postcode'])) == trim(strtolower($this->request->post['details']['shippingAddress']['postalCode']))) {\r\n\t\t\t\t\t\t$match = true;\r\n\r\n\t\t\t\t\t\t$this->session->data['payment_address_id'] = $address['address_id'];\r\n\t\t\t\t\t\t$this->session->data['payment_country_id'] = $address['country_id'];\r\n\t\t\t\t\t\t$this->session->data['payment_zone_id'] = $address['zone_id'];\r\n\r\n\t\t\t\t\t\t$this->session->data['shipping_address_id'] = $address['address_id'];\r\n\t\t\t\t\t\t$this->session->data['shipping_country_id'] = $address['country_id'];\r\n\t\t\t\t\t\t$this->session->data['shipping_zone_id'] = $address['zone_id'];\r\n\t\t\t\t\t\t$this->session->data['shipping_postcode'] = $address['postcode'];\r\n\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\t/**\r\n\t\t\t\t * If there is no address match add the address and set the info.\r\n\t\t\t\t */\r\n\t\t\t\tif ($match == false) {\r\n\t\t\t\t\t$shipping_name = explode(' ', trim($this->request->post['details']['shippingAddress']['recipientName']));\r\n\t\t\t\t\t$shipping_first_name = $shipping_name[0];\r\n\t\t\t\t\tunset($shipping_name[0]);\r\n\t\t\t\t\t$shipping_last_name = implode(' ', $shipping_name);\r\n\r\n\t\t\t\t\t$country_info = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"country` WHERE `iso_code_2` = '\" . $this->db->escape($this->request->post['details']['shippingAddress']['countryCode']) . \"' AND `status` = '1' LIMIT 1\")->row;\r\n\t\t\t\t\t$zone_info = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"zone` WHERE (`name` = '\" . $this->db->escape($this->request->post['details']['shippingAddress']['state']) . \"' OR `code` = '\" . $this->db->escape($this->request->post['details']['shippingAddress']['state']) . \"') AND `status` = '1' AND `country_id` = '\" . (int)$country_info['country_id'] . \"'\")->row;\r\n\r\n\t\t\t\t\t$address_data = array(\r\n\t\t\t\t\t\t'firstname' => $shipping_first_name,\r\n\t\t\t\t\t\t'lastname' => $shipping_last_name,\r\n\t\t\t\t\t\t'company' => '',\r\n\t\t\t\t\t\t'company_id' => '',\r\n\t\t\t\t\t\t'tax_id' => '',\r\n\t\t\t\t\t\t'address_1' => $this->request->post['details']['shippingAddress']['line1'],\r\n\t\t\t\t\t\t'address_2' => (isset($this->request->post['details']['shippingAddress']['line2']) ? $this->request->post['details']['shippingAddress']['line2'] : ''),\r\n\t\t\t\t\t\t'postcode' => $this->request->post['details']['shippingAddress']['postalCode'],\r\n\t\t\t\t\t\t'city' => $this->request->post['details']['shippingAddress']['city'],\r\n\t\t\t\t\t\t'zone_id' => (isset($zone_info['zone_id']) ? $zone_info['zone_id'] : 0),\r\n\t\t\t\t\t\t'country_id' => (isset($country_info['country_id']) ? $country_info['country_id'] : 0)\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\t$address_id = $this->model_account_address->addAddress($this->customer->getId(), $address_data);\r\n\r\n\t\t\t\t\t$this->session->data['payment_address_id'] = $address_id;\r\n\t\t\t\t\t$this->session->data['payment_country_id'] = $address_data['country_id'];\r\n\t\t\t\t\t$this->session->data['payment_zone_id'] = $address_data['zone_id'];\r\n\r\n\t\t\t\t\t$this->session->data['shipping_address_id'] = $address_id;\r\n\t\t\t\t\t$this->session->data['shipping_country_id'] = $address_data['country_id'];\r\n\t\t\t\t\t$this->session->data['shipping_zone_id'] = $address_data['zone_id'];\r\n\t\t\t\t\t$this->session->data['shipping_postcode'] = $address_data['postcode'];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->session->data['payment_address_id'] = '';\r\n\t\t\t\t$this->session->data['payment_country_id'] = '';\r\n\t\t\t\t$this->session->data['payment_zone_id'] = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->session->data['paypal_braintree'] = $this->request->post;\r\n\r\n\t\t$json = array(\r\n\t\t\t'error' => false,\r\n\t\t\t'url' => ''\r\n\t\t);\r\n\r\n\t\t$this->response->addHeader('Content-Type: application/json');\r\n\t\t$this->response->setOutput(json_encode($json));\r\n\t}", "public static function client() {\n return new PayPalHttpClient(self::environment());\n }", "public function _construct()\n {\n parent::_construct();\n\n $app = Mage::app();\n $locale = $app->getLocale();\n\n $this->_coreHelper = $this->helper('core');\n $this->_paymentHelper = Mage::helper('payment');\n $this->_helper = Mage::helper('radial_paypal');\n $this->_config = $this->_helper->getConfigModel();\n $this->_localeCode = $locale->getLocaleCode();\n $url = $this->_config->shortcutExpressCheckoutButton ?: self::DEFAULT_IMAGE_URL;\n $this->_payPalImageUrl = str_replace(array('{locale_code}'), array($this->_localeCode), $url);\n $this->_htmlId = $this->_coreHelper->uniqHash(self::HTML_ID_PREFIX);\n }", "private function _saveSettingsBasic()\r\n\t{\r\n\t\tif (!isset($_POST['paypal_usa_account']) || !$_POST['paypal_usa_account'])\r\n\t\t\t$this->_error[] = $this->l('Your Paypal Business Account is required.');\r\n\t\tif (!isset($_POST['paypal_usa_api_username']) || !$_POST['paypal_usa_api_username'])\r\n\t\t\t$this->_error[] = $this->l('Your Paypal API Username is required.');\r\n\t\tif (!isset($_POST['paypal_usa_api_password']) || !$_POST['paypal_usa_api_password'])\r\n\t\t\t$this->_error[] = $this->l('Your Paypal API Password is required.');\r\n\t\tif (!isset($_POST['paypal_usa_api_signature']) || !$_POST['paypal_usa_api_signature'])\r\n\t\t\t$this->_error[] = $this->l('Your Paypal API Signature is required.');\r\n\r\n\t\tConfiguration::updateValue('PAYPAL_USA_ACCOUNT', pSQL(Tools::getValue('paypal_usa_account')));\r\n\t\tConfiguration::updateValue('PAYPAL_USA_API_USERNAME', pSQL(Tools::getValue('paypal_usa_api_username')));\r\n\t\tConfiguration::updateValue('PAYPAL_USA_API_PASSWORD', pSQL(Tools::getValue('paypal_usa_api_password')));\r\n\t\tConfiguration::updateValue('PAYPAL_USA_API_SIGNATURE', pSQL(Tools::getValue('paypal_usa_api_signature')));\r\n\t\tConfiguration::updateValue('PAYPAL_USA_SANDBOX', (bool)Tools::getValue('paypal_usa_sandbox'));\r\n\r\n\t\t/* PayPal Express Checkout options */\r\n\t\tif (Configuration::get('PAYPAL_USA_EXPRESS_CHECKOUT') && !isset($_POST['paypal_usa_checkbox_shopping_cart']) && !isset($_POST['paypal_usa_checkbox_product']))\r\n\t\t\t$this->_error[] = $this->l('As PayPal Express Checkout is enabled, please select where it should be displayed.');\r\n\t\telse\r\n\t\t{\r\n\t\t\tConfiguration::updateValue('PAYPAL_USA_EXP_CHK_PRODUCT', isset($_POST['paypal_usa_checkbox_product']));\r\n\t\t\tConfiguration::updateValue('PAYPAL_USA_EXP_CHK_SHOPPING_CART', isset($_POST['paypal_usa_checkbox_shopping_cart']));\r\n\t\t\tConfiguration::updateValue('PAYPAL_USA_EXP_CHK_BORDER_COLOR', pSQL(Tools::getValue('paypal_usa_checkbox_border_color')));\r\n\t\t}\r\n\r\n\t\t/* Automated check to verify the API credentials configured by the merchant */\r\n\t\tif (Configuration::get('PAYPAL_USA_API_USERNAME') && Configuration::get('PAYPAL_USA_API_PASSWORD') && Configuration::get('PAYPAL_USA_API_SIGNATURE'))\r\n\t\t{\r\n\t\t\t$result = $this->postToPayPal('GetBalance', '');\r\n\t\t\tif (strtoupper($result['ACK']) != 'SUCCESS' && strtoupper($result['ACK']) != 'SUCCESSWITHWARNING')\r\n\t\t\t\t$this->_error[] = $this->l('Your Paypal API crendentials are not valid, please double-check their values or contact PayPal.');\r\n\t\t}\r\n\r\n\t\tif (!count($this->_error))\r\n\t\t\t$this->_validation[] = $this->l('Congratulations, your configuration was updated successfully');\r\n\t}", "function ciniki_sapos_web_paypalExpressCheckoutGet(&$ciniki, $tnid, $args) {\n\n //\n // Load paypal settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_sapos_settings', 'tnid', $tnid, 'ciniki.sapos', 'settings', 'paypal');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['settings']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.181', 'msg'=>'Paypal processing not configured'));\n }\n $paypal_settings = $rc['settings'];\n\n if( isset($paypal_settings['paypal-ec-site']) && $paypal_settings['paypal-ec-site'] == 'live' ) {\n $paypal_endpoint = \"https://api-3t.paypal.com/nvp\";\n $paypal_redirect_url = \"https://www.paypal.com/webscr?cmd=_express-checkout\";\n } elseif( isset($paypal_settings['paypal-ec-site']) && $paypal_settings['paypal-ec-site'] == 'sandbox' ) {\n $paypal_endpoint = \"https://api-3t.sandbox.paypal.com/nvp\";\n $paypal_redirect_url = \"https://www.sandbox.paypal.com/webscr?cmd=_express-checkout\";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.182', 'msg'=>'Paypal processing not configured'));\n }\n\n if( !isset($paypal_settings['paypal-ec-clientid']) || $paypal_settings['paypal-ec-clientid'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.183', 'msg'=>'Paypal processing not configured'));\n }\n if( !isset($paypal_settings['paypal-ec-password']) || $paypal_settings['paypal-ec-password'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.184', 'msg'=>'Paypal processing not configured'));\n }\n if( !isset($paypal_settings['paypal-ec-signature']) || $paypal_settings['paypal-ec-signature'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.185', 'msg'=>'Paypal processing not configured'));\n }\n\n $paypal_clientid = $paypal_settings['paypal-ec-clientid'];\n $paypal_password = $paypal_settings['paypal-ec-password'];\n $paypal_signature = $paypal_settings['paypal-ec-signature'];\n\n //\n // Get the paypal token to start the express checkout process\n //\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $paypal_endpoint);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n //turning off the server and peer verification(TrustManager Concept).\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n curl_setopt($ch, CURLOPT_POST, 1);\n\n $nvpreq=\"METHOD=GetExpressCheckoutDetails\"\n . \"&VERSION=93\"\n . \"&PWD=\" . $paypal_password \n . \"&USER=\" . $paypal_clientid\n . \"&SIGNATURE=\" . $paypal_signature\n . \"&TOKEN=\" . urlencode($args['token'])\n . \"\";\n \n curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\n // Execute\n $response = curl_exec($ch);\n\n // Parse response\n $nvpResArray = array();\n $kvs = explode('&', $response);\n foreach($kvs as $kv) {\n list($key, $value) = explode('=', $kv);\n $nvpResArray[urldecode($key)] = urldecode($value);\n }\n\n if( curl_errno($ch)) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.186', 'msg'=>'Error processing request: ' . curl_error($ch)));\n } else {\n curl_close($ch);\n }\n if( strtolower($nvpResArray['ACK']) == 'success' || strtolower($nvpResArray['ACK']) == 'successwithwarning' ) {\n $paypal_payer_id = urldecode($nvpResArray['PAYERID']);\n $_SESSION['paypal_payer_id'] = $paypal_payer_id;\n return array('stat'=>'ok');\n } \n\n error_log(\"PAYPAL-ERR: \" . urldecode($nvpResArray['L_ERROCODE0']) . '-' . urldecode($nvpResArray['L_SHORTMESSAGE0']));\n\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.187', 'msg'=>'Oops, we seem to have an error. Please try again or contact us for help. '));\n}", "public function addBaseParams()\n {\n $oRequest = $this->getPayPalRequest();\n $oPayPalConfig = $this->getPayPalConfig();\n\n $oRequest->setParameter(\"CALLBACKVERSION\", \"84.0\");\n $oRequest->setParameter(\"LOCALECODE\", $this->getLang()->translateString(\"OEPAYPAL_LOCALE\"));\n // enabled guest buy (Buyer does not need to create a PayPal account to check out)\n $oRequest->setParameter(\"SOLUTIONTYPE\", ($oPayPalConfig->isGuestBuyEnabled() ? \"Sole\" : \"Mark\"));\n $oRequest->setParameter(\"BRANDNAME\", $oPayPalConfig->getBrandName());\n $oRequest->setParameter(\"CARTBORDERCOLOR\", $oPayPalConfig->getBorderColor());\n\n $oRequest->setParameter(\"RETURNURL\", $this->getReturnUrl());\n $oRequest->setParameter(\"CANCELURL\", $this->getCancelUrl());\n\n if ($sLogoImage = $oPayPalConfig->getLogoUrl()) {\n $oRequest->setParameter(\"LOGOIMG\", $sLogoImage);\n }\n\n $oRequest->setParameter(\"PAYMENTREQUEST_0_PAYMENTACTION\", $this->getTransactionMode());\n }", "public function action_paypal_callback()\n\t{\n $post = $this->request->post();\n\t\t$type = $this->request->param('id');\n\t\t$payment = new Model_Realexpayments; // Not actually \"Realex\"\n\t\t$data['purchase_time'] = date('Y-m-d H:i:s');\n\n\t\tIbHelpers::htmlspecialchars_array($post);\n\n\t\t$data['cart_details'] = json_encode(IbHelpers::iconv_array($post));\n\n try\n\t\t{\n $is_booking = ($type == 'booking' AND isset($post['custom']));\n\t\t\t$is_product = ($type == 'product' AND isset($post['custom']));\n\t\t\t$is_invoice = ($type == 'invoice' AND isset($post['custom']));\n\t\t\t$data['paid'] = 1;\n\t\t\t$data['payment_type'] = 'PayPal';\n\t\t\t$data['payment_amount'] = isset($post['mc_gross']) ? $post['mc_gross'] : '';\n\n\t\t\tif ($is_booking)\n\t\t\t{\n\t\t\t\t// Use contact details from the booking, which should also be the data filled out in the checkout form\n\t\t\t\t$booking = Model_CourseBookings::load(trim($post['custom'], '|'));\n $data['customer_name'] = $booking['student']['first_name'].' '.$booking['student']['last_name'];\n\t\t\t\t$data['customer_telephone'] = $booking['student']['phone'];\n\t\t\t\t$data['customer_address'] = $booking['student']['address'];\n\t\t\t\t$data['customer_email'] = $booking['student']['email'];\n\t\t\t}\n\t\t\telseif ($is_product OR $is_invoice)\n\t\t\t{\n\t\t\t\t$cart = new Model_Cart($post['custom']);\n\n\t\t\t\t// Set the cart item as paid\n\t\t\t\t$cart->set_paid(1)->save();\n\n\t\t\t\t// Send the emails\n\t\t\t\t$cart = $cart->get_instance();\n\t\t\t\t$form_data = json_decode($cart['form_data']);\n\t\t\t\t$cart_data = json_decode($cart['cart_data']);\n\t\t\t\t$cart_data = isset($cart_data->data) ? $cart_data->data : new stdClass();\n $cart_data->payment_type = 'Paypal';\n\n\t\t\t\t$data['customer_name'] = isset($form_data->ccName) ? $form_data->ccName : '';\n\t\t\t\t$data['customer_telephone'] = isset($form_data->phone) ? $form_data-> phone : '';\n\t\t\t\t$data['customer_address'] = isset($form_data->address_1) ? $form_data->address_1 : '';\n\t\t\t\t$data['customer_address'] .= isset($form_data->address_2) ? ', '.$form_data->address_2 : '';\n\t\t\t\t$data['customer_address'] .= isset($form_data->address_3) ? ', '.$form_data->address_3 : '';\n\t\t\t\t$data['customer_address'] .= isset($form_data->address_4) ? ', '.$form_data->address_4 : '';\n\t\t\t\t$data['customer_email'] = isset($form_data->email) ? $form_data->email : '';\n\t\t\t\t$data['cart_id'] = isset($cart_data->id) ? $cart_data->id : '';\n\n\t\t\t\t$payment->send_mail_seller($form_data, (array) $cart_data);\n\t\t\t\t$payment->send_mail_customer($form_data, NULL, (array) $cart_data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Use contact details from the buyer's PayPal account\n\t\t\t\t$data['customer_name'] = trim((isset($post['first_name'])?$post['first_name']:'').' '.(isset($post['last_name'])?$post['last_name']:''));\n\t\t\t\t$data['customer_telephone'] = isset($post['contact_phone']) ? $post['contact_phone'] : '';;\n\t\t\t\t$data['customer_address'] = \"\".\n\t\t\t\t\t(isset($post['address_name']) ? $post['address_name'] .\"\\n\" : '').\n\t\t\t\t\t(isset($post['address_street']) ? $post['address_street'] .\"\\n\" : '').\n\t\t\t\t\t(isset($post['address_city']) ? $post['address_city'] .\"\\n\" : '').\n\t\t\t\t\t(isset($post['address_state']) ? $post['address_state'] .\"\\n\" : '').\n\t\t\t\t\t(isset($post['address_zip']) ? $post['address_zip'] .\"\\n\" : '').\n\t\t\t\t\t(isset($post['address_country']) ? $post['address_country'].\"\\n\" : '');\n\t\t\t\t$data['customer_email'] = isset($post['payer_email']) ? $post['payer_email'] : '';\n\t\t\t}\n\n\t\t\tDB::insert('plugin_payments_log')->values($data)->execute();\n\n if ($is_booking)\n\t\t\t{\n\t\t\t\tModel_CourseBookings::paypal_handler_old($booking['id'], $post['mc_gross'], $post['txn_id']);\n\n\t\t\t\t// send success emails regarding bookings\n\t\t\t\t$payment->send_mail_seller_bookings($post);\n\t\t\t\t$payment->send_mail_customer_bookings($post);\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tLog::instance()->add(Log::ERROR, $e->getMessage().\"\\n\".$e->getTraceAsString());\n\t\t\t$data['payment_type'] = 'Test/failed payment';\n\t\t\tModel_Errorlog::save($e);\n\t\t\tDB::insert('plugin_payments_log')->values($data)->execute();\n\t\t}\n\t}", "static function init()\n\t\t{\n\t\t\t//make sure PayPal Express is a gateway option\n\t\t\tadd_filter('pmpro_gateways', array('PMProGateway_paypalexpress', 'pmpro_gateways'));\n\n\t\t\t//add fields to payment settings\n\t\t\tadd_filter('pmpro_payment_options', array('PMProGateway_paypalexpress', 'pmpro_payment_options'));\n\n\t\t\t/*\n\t\t\t\tFilter pmpro_next_payment to get actual value\n\t\t\t\tvia the PayPal API. This is disabled by default\n\t\t\t\tfor performance reasons, but you can enable it\n\t\t\t\tby copying this line into a custom plugin or\n\t\t\t\tyour active theme's functions.php and uncommenting\n\t\t\t\tit there.\n\t\t\t*/\n\t\t\t//add_filter('pmpro_next_payment', array('PMProGateway_paypalexpress', 'pmpro_next_payment'), 10, 3);\n\n\t\t\t/*\n\t\t\t\tThis code is the same for PayPal Website Payments Pro, PayPal Express, and PayPal Standard\n\t\t\t\tSo we only load it if we haven't already.\n\t\t\t*/\n\t\t\tglobal $pmpro_payment_option_fields_for_paypal;\n\t\t\tif(empty($pmpro_payment_option_fields_for_paypal))\n\t\t\t{\n\t\t\t\tadd_filter('pmpro_payment_option_fields', array('PMProGateway_paypalexpress', 'pmpro_payment_option_fields'), 10, 2);\n\t\t\t\t$pmpro_payment_option_fields_for_paypal = true;\n\t\t\t}\n\n\t\t\t//code to add at checkout\n\t\t\t$gateway = pmpro_getGateway();\n\t\t\tif($gateway == \"paypalexpress\")\n\t\t\t{\n\t\t\t\tadd_filter('pmpro_include_billing_address_fields', '__return_false');\n\t\t\t\tadd_filter('pmpro_include_payment_information_fields', '__return_false');\n\t\t\t\tadd_filter('pmpro_required_billing_fields', array('PMProGateway_paypalexpress', 'pmpro_required_billing_fields'));\n\t\t\t\tadd_filter('pmpro_checkout_new_user_array', array('PMProGateway_paypalexpress', 'pmpro_checkout_new_user_array'));\n\t\t\t\tadd_filter('pmpro_checkout_confirmed', array('PMProGateway_paypalexpress', 'pmpro_checkout_confirmed'));\n\t\t\t\tadd_action('pmpro_checkout_before_processing', array('PMProGateway_paypalexpress', 'pmpro_checkout_before_processing'));\n\t\t\t\tadd_filter('pmpro_checkout_default_submit_button', array('PMProGateway_paypalexpress', 'pmpro_checkout_default_submit_button'));\n\t\t\t\tadd_action('pmpro_checkout_after_form', array('PMProGateway_paypalexpress', 'pmpro_checkout_after_form'));\n\t\t\t\tadd_action('http_api_curl', array('PMProGateway_paypalexpress', 'http_api_curl'), 10, 3);\n\t\t\t}\n\t\t}", "public function __construct()\n {\n $this->alipay = new Alipay();\n }", "public function setUp()\n {\n $config = [\n 'host' => 'http://dev01.blogic.crcpress.local/',\n 'app_login' => 'www.crcpress.com',\n 'app_pass' => 'overlord',\n 'extra_config' => [\n 'user_agent' => 'CRC PHP Soap client 2.0',\n 'connection_timeout' => 6,\n 'cache_wsdl' => \\WSDL_CACHE_MEMORY,\n 'trace' => true,\n 'soap_version' => \\SOAP_1_1,\n 'encoding' => 'UTF-8'\n ],\n ];\n $ecommerceApi = new EcommerceAPI($config);\n $this->shopperService = $ecommerceApi->getService('Shopper');\n $this->invoiceService = $ecommerceApi->getService('InvoiceManager');\n }", "protected function init_api() {\n\t\tinclude_once dirname( __FILE__ ) . '/includes/class-coinbase-api-handler.php';\n\n\t\tCoinbase_API_Handler::$log = get_class( $this ) . '::log';\n\t\tCoinbase_API_Handler::$api_key = $this->get_option( 'api_key' );\n\t}", "public function __construct()\n {\n $this->merchant = [\n 'key' => getenv('MERCHANT_KEY'),\n 'secret' => getenv('MERCHANT_SECRET')\n ];\n }", "public function payments() {\n \n PageContext::$response->activeLeftMenu = 'Settings';\n $this->view->setLayout(\"home\");\n\n $epaypal=($this->post('p_paypal')=='on') ? 'Y' : 'N';\n $sandbox=($this->post('p_sandbox')=='on') ? 'Y' : 'N';\n\n $e_auth=($this->post('e_auth')=='on') ? 'Y' : 'N';\n $a_test=($this->post('a_test')=='on') ? 'Y' : 'N';\n\n $error = NULL;\n\n // Paypal Settings\n if($this->isPost()) {\n\n $arrUpdate = array(\"value\"=>addslashes($epaypal));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='enablepaypal'\");\n\n $arrUpdate = array(\"value\"=>addslashes($sandbox));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='enablepaypalsandbox'\");\n\n $arrUpdate = array(\"value\"=>addslashes($this->post('p_tocken')));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='paypalidentitytoken'\");\n\n $arrUpdate = array(\"value\"=>addslashes($this->post('p_email')));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='paypalemail'\");\n \n $arrUpdate = array(\"value\"=>addslashes($e_auth));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='authorize_enable'\");\n\n $arrUpdate = array(\"value\"=>addslashes($this->post('a_logid')));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='authorize_loginid'\");\n\n $arrUpdate = array(\"value\"=>addslashes($this->post('a_tkey')));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='authorize_transkey'\");\n\n $arrUpdate = array(\"value\"=>addslashes($this->post('a_email')));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='authorize_email'\");\n\n $arrUpdate = array(\"value\"=>addslashes($a_test));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='authorize_test_mode'\");\n\n\n $arrUpdate = array(\"value\"=>addslashes($this->post('currency')));\n\n $this->dbObj->updateFields(\"Settings\",$arrUpdate,\"settingfield='admin_currency'\");\n\n // Success Message\n // $this->view->message = (empty($error)) ? \"Changes Saved Successfully\" : $error;\n PageContext::$response->success_message = \"Changes Saved Successfully\" ;\n PageContext::addPostAction('successmessage');\n\n\n } // End isPost\n\n $this->view->authEnable = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='authorize_enable'\");\n\n $this->view->authLoginId = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='authorize_loginid'\");\n\n $this->view->authtransKey = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='authorize_transkey'\");\n\n $this->view->authEmail = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='authorize_email'\");\n\n $this->view->authTestMode = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='authorize_test_mode'\");\n\n\n //**************** PAYPAL\n\n\n $this->view->enablePaypal = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='enablepaypal'\");\n\n $this->view->enableSandBox = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='enablepaypalsandbox'\");\n\n $this->view->paypalTocken = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='paypalidentitytoken'\");\n\n $this->view->paypalEmail = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='paypalemail'\");\n\n $this->view->currency = $this->dbObj->selectRow(\"Settings\",\"value\",\"settingfield='admin_currency'\");\n\n }", "abstract protected function initializeContext();", "public function __construct()\n {\n $sModuleId = 'payppaypalplus';\n\n $this->setModuleData(\n array(\n 'id' => $sModuleId,\n 'title' => 'PayPal Plus',\n 'description' => 'PayPal Plus payments module for OXID eShop',\n )\n );\n\n $this->load($sModuleId);\n }", "function merchantConfigObject()\n{\n $config = new \\CyberSource\\Authentication\\Core\\MerchantConfiguration();\n $runEnv = \"api-matest.cybersource.com\";\n #OAuth related config\n $enableClientCert = true;\n $clientCertDirectory = \"Resources/\";\n $clientCertFile = \"\"; // p12 certificate\n $clientCertPassword = \"\"; // password used to encrypt p12\n $clientId = \"\";\n $clientSecret = \"\";\n\n $confiData = $config->setEnableClientCert($enableClientCert);\n $confiData = $config->setClientCertDirectory($clientCertDirectory);\n $confiData = $config->setClientCertFile($clientCertFile);\n $confiData = $config->setClientCertPassword($clientCertPassword);\n $confiData = $config->setClientId($clientId);\n $confiData = $config->setClientSecret($clientSecret);\n $confiData = $config->setRunEnvironment($runEnv);\n $config->validateMerchantData($confiData);\n return $config;\n}", "protected function setUp() {\n\t\tif (file_exists('../config.php')) {\n\t\t\tinclude ('../config.php');\n\t\t} else {\n\t\t\tinclude ('config.php');\n\t\t}\n\t\t\n\t\t$transport = getTransport($config);\t\n\t\t$mapper = new XmlMapper();\n\t\t$connector = new ApiConnector($config['clientname'], $transport, $mapper);\n\t\t$this->object = $connector->getService('InvoiceProfile');\n\t}", "public function add_payments() {\n\n global $redis;\n\n $user_id = $this->params['user_id'];\n $associate_id = !empty($this->params['associate_id']) ? $this->params['associate_id'] : 0;\n $payment_account_id = $this->params['payment_account_id'];\n $paypal_username = $this->params['paypal_username'];\n $account_dbobj = $this->params['account_dbobj'];\n\n // validate paypal username\n $paypal = new PaypalAccount($account_dbobj);\n $paypal->findOne(\"username='\".$account_dbobj->escape($paypal_username).\"'\");\n if($paypal->getId() === 0) {\n if(!$paypal->setUsername($paypal_username)) {\n $this->errnos[INVALID_PAYPAL_ACCOUNT] = 1;\n $this->status = 1;\n return;\n }\n }\n $paypal->save();\n\n $payment_account = new PaymentAccount($account_dbobj);\n if(!empty($payment_account_id)) {\n $payment_account->findOne('id='.$payment_account_id);\n }\n $payment_account->setPaypalAccountId($paypal->getId());\n $payment_account->save();\n\n $user = new User($account_dbobj);\n $user->findOne('id='.$user_id);\n BaseMapper::saveAssociation($user, $payment_account, $account_dbobj);\n\n if(!empty($associate_id) && $is_active_associate = AssociatesMapper::is_active_associate($associate_id, $account_dbobj)) {\n $associate = new Associate($account_dbobj);\n $associate->findOne('id='.$associate_id);\n $associate->setStatus(ACTIVATED);\n $associate->save();\n $redis->set(\"associate::$associate_id:status\", $associate->getStatus());\n }\n\n $this->response['paypal_account_id'] = $paypal->getId();\n $this->response['paypal_username'] = $paypal->getUsername();\n\n $this->status = 0;\n\n // warm up cache\n $redis->set(\"user:$user_id:payment_account_id\", $payment_account->getId());\n $redis->set(\"payment_account:{$payment_account->getId()}:paypal_account_id\",$paypal->getId());\n $paypal_account_id = $paypal->getId();\n $redis->set(\"paypal_account:$paypal_account_id:username\", $paypal->getUsername());\n $redis->set(\"paypal_account:$paypal_account_id:status\", $paypal->getStatus());\n $redis->set(\"paypal_account:$paypal_account_id:created\", $paypal->getCreated());\n $redis->set(\"paypal_account:$paypal_account_id:updated\", $paypal->getUpdated());\n\n\n }", "public function postPaymentWithpaypal(Request $request)\n {\n \t$plan = Package::findOrFail($request->plan_id);\n \t$currency_code = Config::first()->currency_code;\n $currency_code = strtoupper($currency_code);\n\n $payer = new Payer();\n $payer->setPaymentMethod('paypal');\n\n \t$item_1 = new Item();\n\n $item_1->setName($plan->name) /** item name **/\n ->setCurrency($currency_code)\n ->setQuantity(1)\n ->setPrice($plan->amount); /** unit price **/\n\n $item_list = new ItemList();\n $item_list->setItems(array($item_1));\n\n $amount = new Amount();\n $amount->setCurrency($currency_code)\n ->setTotal($plan->amount);\n\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($item_list)\n ->setDescription('Subscription');\n\n $redirect_urls = new RedirectUrls();\n $redirect_urls->setReturnUrl(route('getPaymentStatus')) /** Specify return URL **/\n ->setCancelUrl(route('getPaymentFailed'));\n\n $payment = new Payment();\n $payment->setIntent('Sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirect_urls)\n ->setTransactions(array($transaction));\n /** dd($payment->create($this->_api_context));exit; **/\n try {\n $payment->create($this->_api_context);\n } catch (\\PayPal\\Exception\\PPConnectionException $ex) {\n if (\\Config::get('app.debug')) {\n return back()->with('deleted', 'Connection timeout');\n /** echo \"Exception: \" . $ex->getMessage() . PHP_EOL; **/\n /** $err_data = json_decode($ex->getData(), true); **/\n /** exit; **/\n } else {\n return back()->with('deleted', 'Some error occur, sorry for inconvenient');\n /** die('Some error occur, sorry for inconvenient'); **/\n }\n }\n\n foreach($payment->getLinks() as $link) {\n if($link->getRel() == 'approval_url') {\n $redirect_url = $link->getHref();\n break;\n }\n }\n\n /** add payment ID to session **/\n Session::put('paypal_payment_id', $payment->getId());\n Session::put('plan', $plan);\n\n if(isset($redirect_url)) {\n /** redirect to paypal **/\n return redirect($redirect_url);\n }\n\n \treturn back()->with('deleted', 'Unknown error occurred');\n }", "function performPaymentInitialization() {\r\n\t\t;\r\n\t\t$request = \"\";\r\n\t\t$response = \"\";\r\n\t\t$requestbuffer;\r\n\t\t$xmlData = \"\";\r\n\t\t$hm;\r\n\t\ttry {\r\n\t\t\tif ($request != null) {\r\n\t\t\t\t$xmlData = $data;\r\n\t\t\t} else {\r\n\t\t\t\t$keyParser = new KeyStore ();\r\n\t\t\t\t$this->key = $keyParser->parseKeyStore ( $this->keystorePath );\r\n\t\t\t\t$xmlData = $this->parseResource ( $this->key, $this->resourcePath, $this->alias );\r\n\t\t\t}\r\n\t\t\tvar_dump ( $xmlData );\r\n\t\t\t\r\n\t\t\tif ($xmlData != null) {\r\n\t\t\t\t$hm = $this->parseXMLRequest ( $xmlData );\r\n\t\t\t} else {\r\n\t\t\t\t$error = \"Alias name does not exits\";\r\n\t\t\t}\r\n\t\t\tvar_dump ( $hm );\r\n\t\t\t$this->key = $hm ['resourceKey'];\r\n\t\t\t// echo $this->key;\r\n\t\t\t$requestbuffer = $this->buildHostRequest ();\r\n\t\t\t$requestbuffer .= \"id=\" . $hm [\"id\"] . \"&\";\r\n\t\t\t\r\n\t\t\t$requestbuffer .= 'password=' . $hm ['password'] . \"&\";\r\n\t\t\t$webaddr = $hm ['webaddress'];\r\n\t\t\t// echo \"<br><br><br><br>\" . $requestbuffer . \"<br><br><br>\";\r\n\t\t\t$request = $requestbuffer;\r\n\t\t\tvar_dump ( $request );\r\n\t\t\t// var_dump($request);\r\n\t\t\t// var_dump($webaddr);\r\n\t\t\t$pipe = new ipayTransactionPipe ();\r\n\t\t\t// echo \"<br/>REQUEST\" . $request;\r\n\t\t\t\r\n\t\t\t$response = $pipe->performHostedTransaction ( $request, $webaddr );\r\n\t\t\tVAR_DUMP ( $response );\r\n\t\t\t// System.out.println(\"response:::::::\" + response);\r\n\t\t\tif ($response == null) {\r\n\t\t\t\t// echo \"null\";\r\n\t\t\t\t$this->error = \"Error while connecting \" . $response;\r\n\t\t\t\treturn - 1;\r\n\t\t\t} else {\r\n\t\t\t\tif ($response != null) {\r\n\t\t\t\t\t// echo \"not null\";\r\n\t\t\t\t\t$this->setpaymentId ( $response [0] );\r\n\t\t\t\t\t$this->setpaymentPage ( $response [1] );\r\n\t\t\t\t\t// $this->paymentPage = $response[1];\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->error = \"Error while connecting \" + $response;\r\n\t\t\t\t\treturn - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\t\r\n\t\t\t$this->error = \"Error while connecting \" + $response;\r\n\t\t\treturn - 1;\r\n\t\t}\r\n\t}", "public function initContext($ctx);", "function __construct($settings=array()){\n\t\t\n\t\tOpenPayU_Configuration::setEnvironment('sandbox');\n\t\t//PayU::$apiKey \t\t= $settings['apiKey'];\n\t\t/*PayU::$apiLogin \t= $settings['apiLogin'];\n\t\tPayU::$merchantId = $settings['merchantId'];\n\t\tPayU::$language \t= $settings['language'];\n\t\tPayU::$isTest \t\t= $settings['test'];*/\n\t}", "public function setup()\n {\n $this->config = new Config($this->emailOrMobileNumber, $this->merchantKey);\n }", "public function construitUrl()\n {\n //Site de l'API Paypal\n $urlPaypal = \"https://api-3t.sandbox.paypal.com/nvp?\";\n //Version de l'API de paypal\n $version = \"204.0\";\n //Compte Utilisateur du vendeur\n $user = \"test.seller_api1.yopmail.com\";\n //Mot de passe pour acceder à l'API\n $pass = \"CMASHX59W3RDVVKE\";\n //Signature de l'API\n $signature = \"AFcWxV21C7fd0v3bYYYRCpSSRl31AD3ZWGs6j9kywv41tSL0XrUzyrSf\";\n //Concaténation pour avoir l'url de base\n $urlPaypal = $urlPaypal.'VERSION='.$version.'&USER='.$user.'&PWD='.$pass.'&SIGNATURE='.$signature;\n\n return $urlPaypal;\n }", "abstract public function initializePayment($request_body);", "private function client(){\n\t\t$activatedPaypal = DAO::getById(\\models\\ActivatedPaypal::class, 1);\n\n\t\t$sandboxmode = $activatedPaypal->getActivePaypal()->getSandboxmode();\n\t\t$clientId = $activatedPaypal->getActivePaypal()->getClientid();\n\t\t$clientSecret = $activatedPaypal->getActivePaypal()->getClientsecret();\n\n\t\tif($sandboxmode){\n\t\t\t$environment = new SandboxEnvironment($clientId, $clientSecret);\n\t\t}else{\n\t\t\t$environment = new ProductionEnvironment($clientId, $clientSecret);\n\t\t}\n\t\t$client = new PayPalHttpClient($environment);\n\t\treturn $client;\n\t}", "function init(&$context){}", "protected function setup() : void\n {\n $this->subject = new Product(\n 'ACCESS_KEY',\n 'SECRET_KEY',\n 1\n );\n }", "function __construct() {\n $this->config = array(\n $this::CHECKOUT => 'https://ws.pagseguro.uol.com.br/v2/checkout/',\n $this::PAYMENT => 'https://pagseguro.uol.com.br/v2/checkout/payment.html',\n $this::NOTIFICATION => 'https://ws.pagseguro.uol.com.br/v2/transactions/notifications/'\n );\n }", "protected function setUp()\n { \n $settings = require __DIR__ . '/../../../config/settings.php';\n $container = new \\Slim\\Container($settings);\n $container['stockconfig'] = function ($config) {\n $stockconfig =$config['settings']['stockconfig']; \n return $stockconfig;\n };\n $dependencies = new Dependencies($container);\n $dependencies->registerLogger();\n $dependencies->registerDatabase();\n $this->object = new StockResource($container);\n \n }", "private function setApiProviderConfiguration($credentials)\n {\n // Setting PayPal API Credentials\n collect($credentials[$this->mode])->map(function ($value, $key) {\n $this->config[$key] = $value;\n });\n\n // Setup PayPal API Signature value to use.\n $this->config['signature'] = empty($this->config['certificate']) ?\n $this->config['secret'] : $this->config['certificate'];\n\n $this->paymentAction = $credentials['payment_action'];\n\n $this->locale = $credentials['locale'];\n\n $this->certificate = $this->config['certificate'];\n\n $this->validateSSL = $credentials['validate_ssl'];\n\n $this->setApiProvider($credentials);\n }", "public function __construct($params, $config = array())\n {\n parent::__construct($params, $config);\n $this->mode = $params->get('paypal_mode');\n if ($this->mode)\n {\n $this->url = 'https://www.paypal.com/cgi-bin/webscr';\n }\n else\n {\n $this->url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n }\n $this->setParameter('business', $params->get('paypal_id'));\n $this->setParameter('rm', 2);\n $this->setParameter('cmd', '_xclick');\n $this->setParameter('no_shipping', 1);\n $this->setParameter('no_note', 1);\n $locale = $params->get('paypal_locale','');\n\n if ($locale == '')\n {\n if (JLanguageMultilang::isEnabled())\n {\n $locale = JFactory::getLanguage()->getTag();\n $locale = str_replace(\"-\",\"_\",$locale);\n }\n else\n {\n $locale = 'en_US';\n }\n }\n\n $this->setParameter('lc', $locale);\n $this->setParameter('charset', 'utf-8');\n }", "public function paypal_payouts($data=false)\n {\n global $environment;\n $paypal_credentials = PaymentGateway::where('site','PayPal')->get();\n $api_user = $paypal_credentials[1]->value;\n $api_pwd = $paypal_credentials[2]->value;\n $api_key = $paypal_credentials[3]->value;\n $paymode = $paypal_credentials[4]->value;\n \n $client = $paypal_credentials[6]->value;\n $secret = $paypal_credentials[7]->value;\n \n if($paymode == 'sandbox')\n $environment = 'sandbox';\n else\n $environment = '';\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, \"https://api.$environment.paypal.com/v1/oauth2/token\");\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \n curl_setopt($ch, CURLOPT_USERPWD, $client.\":\".$secret);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"grant_type=client_credentials\");\n\n $result = curl_exec($ch);\n $json = json_decode($result);\n if(!isset($json->error))\n {\n curl_setopt($ch, CURLOPT_FRESH_CONNECT, TRUE);\n curl_setopt($ch, CURLOPT_URL, \"https://api.$environment.paypal.com/v1/payments/payouts?sync_mode=true\");\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data); \n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Content-Type: application/json\",\"Authorization: Bearer \".$json->access_token,\"\"));\n\n $result = curl_exec($ch);\n\n if(empty($result))\n {\n $json =\"error\";\n }\n else\n {\n $json = json_decode($result);\n }\n curl_close($ch);\n \n }\n else\n {\n $json =\"error\";\n \n }\n\n $payout_response = $json;\n $data = array();\n\n if($payout_response != \"error\") {\n if($payout_response->batch_header->batch_status==\"SUCCESS\") {\n if($payout_response->items[0]->transaction_status == 'SUCCESS') {\n $correlation_id = $payout_response->items[0]->transaction_id;\n $data['success'] = true;\n $data['transaction_id'] = $correlation_id;\n } \n else {\n $data['success'] = false;\n $data['message'] = $payout_response->items[0]->errors->name;\n }\n \n }\n else {\n $data['success'] = false;\n $data['message'] = $payout_response->name;\n }\n }\n else {\n $data['success'] = false;\n $data['message'] = 'Unknown error';\n }\n\n return $data;\n }", "function PPHttpPost($methodName_, $nvpStr_) {\n\tglobal $environment;\n\n\tglobal $API_UserName, $API_Password, $API_Signature;\n\n\t// Set up your API credentials, PayPal end point, and API version.\n\n\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t//$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t$API_Endpoint = \"https://api-3t.sandbox.paypal.com/nvp\";\n\t}\n\t$version = urlencode('57.0');\n\n\t// Set the curl parameters.\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n\t// Turn off the server and peer verification (TrustManager Concept).\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t// Set the API operation, version, and API signature in the request.\n\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\n\t// Set the request as a POST FIELD for curl.\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\n\t// Get response from the server.\n\t$httpResponse = curl_exec($ch);\n\n\tif(!$httpResponse) {\n\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t}\n\n\t// Extract the response details.\n\t$httpResponseAr = explode(\"&\", $httpResponse);\n\n\t$httpParsedResponseAr = array();\n\tforeach ($httpResponseAr as $i => $value) {\n\t\t$tmpAr = explode(\"=\", $value);\n\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t}\n\t}\n\n\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t}\n\n\treturn $httpParsedResponseAr;\n}", "public function __construct($requester, $returnUrl, $cancelUrl, $options = array(), $useSandbox = false) {\n $this->requester = $requester;\n $this->requireUrl($returnUrl);\n $this->requireUrl($cancelUrl);\n $this->requireOptions($options, array(\"USER\", \"PWD\", \"SIGNATURE\"));\n \n //Handle sandbox/not sandbox\n $this->apiUrl = \"https://api-3t.paypal.com/nvp\";\n $this->expressCheckoutUrl = \"https://www.paypal.com/cgi-bin/webscr\";\n if($useSandbox) {\n $this->apiUrl = \"https://api-3t.sandbox.paypal.com/nvp\";\n $this->expressCheckoutUrl = \"https://www.sandbox.paypal.com/cgi-bin/webscr\";\n }\n $this->sandbox = $useSandbox;\n \n $this->returnUrl = $returnUrl;\n $this->cancelUrl = $cancelUrl;\n \n //Get options/reasonable defaults\n $this->options = array(\n \"VERSION\" => \"109.0\",\n \"SOLUTIONTYPE\" => \"Sole\",\n \"LANDINGPAGE\" => \"Billing\",\n \"PAYMENTREQUEST_0_PAYMENTACTION\" => \"Sale\",\n \"LOCALECODE\" => \"en_US\",\n \"PAYMENTREQUEST_0_CURRENCYCODE\" => \"USD\"\n );\n foreach($options as $key => $value) {\n $key = strtoupper($key);\n \n if($key == \"VERSION\" && $value != $this->options[\"VERSION\"]) {\n trigger_error(\"The PayPalAdapter is configured with a custom version '$value', but the library is only guaranteed to work with '{$this->options[\"VERSION\"]}'.\", E_USER_WARNING);\n }\n if($key == \"RETURNURL\" || $key == \"CANCELURL\") {\n throw new InvalidArgumentException(\"Cannot set $key in PayPalAdapter. It must be set as an argument in the constructor.\");\n }\n \n $this->options[$key] = $value;\n }\n }", "public function processPaypal(){\r\n\t// and redirect to thransaction details page\r\n\t}", "public function __construct() {\n global $apiConfig;\n if (! empty($apiConfig['developer_key'])) {\n $this->developerKey = $apiConfig['developer_key'];\n }\n if (! empty($apiConfig['oauth2_client_id'])) {\n $this->clientId = $apiConfig['oauth2_client_id'];\n }\n if (! empty($apiConfig['oauth2_client_secret'])) {\n $this->clientSecret = $apiConfig['oauth2_client_secret'];\n }\n if (! empty($apiConfig['oauth2_redirect_uri'])) {\n $this->redirectUri = $apiConfig['oauth2_redirect_uri'];\n }\n if (! empty($apiConfig['oauth2_access_type'])) {\n $this->accessType = $apiConfig['oauth2_access_type'];\n }\n if (! empty($apiConfig['oauth2_approval_prompt'])) {\n $this->approvalPrompt = $apiConfig['oauth2_approval_prompt'];\n }\n }", "protected function setUp()\n {\n $this->slipData = new OrangePaymentSlipData();\n }", "protected function _getApi()\n {\n return Mage::getSingleton('payments/api');\n }", "protected function setUp()\n {\n $config = array(\n \"accessToken\" => \"accessToken\",\n \"sk_url\" => \"sk_url\",\n \"redirect_url\" => \"redirect_url\",\n \"app_id\" => \"app_id\",\n \"app_secret\" => \"app_secret\"\n );\n\n $this->object = new API($config);\n }", "public function create_payment_using_paypal($param = ''){\n\t\t// This sample code demonstrates how you can process a \n\t\t// PayPal Account based Payment.\n\t\t// API used: /v1/payments/payment\n\n\t\t// ### Payer\n\t\t// A resource representing a Payer that funds a payment\n\t\t// For paypal account payments, set payment method\n\t\t// to 'paypal'.\n\n\t\t//load settings \n\t\t$this->_api_context->setConfig($this->config->item('settings'));\n\n\n\t\t$payer = new Payer();\n\t\t$payer->setPaymentMethod(\"paypal\");\n\n\t\t$items = array(array(\n\t\t\t'name'\t\t=> 'coffee cup',\n\t\t\t'currency' => 'USD',\n\t\t\t'quantity' => 1,\n\t\t\t'sku'\t\t=> \"123123\",\n\t\t\t'price'\t\t=> \"7.50\"\n\t\t\t),array(\n\t\t\t'name'\t\t=> 'coffee bars',\n\t\t\t'currency' => 'USD',\n\t\t\t'quantity' => 5,\n\t\t\t'sku'\t\t=> \"321321\",\n\t\t\t'price'\t\t=> \"2\"\n\t\t\t));\n\n\t\t// ### Itemized information\n\t\t// (Optional) Lets you specify item wise\n\t\t// information\n\n\t\t$itemList = new ItemList();\n\t\t$itemList->setItems($items);\n\n\t\t// ### Additional payment details\n\t\t// Use this optional field to set additional\n\t\t// payment information such as tax, shipping\n\t\t// charges etc.\n\n\t\t$details = array(\n\t\t\t'shipping' => \"1.20\",\n\t\t\t'tax' => \"1.30\",\n\t\t\t'subtotal' => \"17.50\"\n\t\t\t);\n\n\t\t// ### Amount\n\t\t// Lets you specify a payment amount.\n\t\t// You can also specify additional details\n\t\t// such as shipping, tax.\n\t\t$amount = array(\n\t\t\t'currency' => 'USD',\n\t\t\t'total' => \"20\",\n\t\t\t'details' => $details\n\t\t\t);\n\n\t\t// ### Transaction\n\t\t// A transaction defines the contract of a\n\t\t// payment - what is the payment for and who\n\t\t// is fulfilling it. \n\n\t\t$transaction = array(\n\t\t\t'amount'\t=> $amount,\n\t\t\t'item_list' => $itemList,\n\t\t\t'description'=> 'payment description',\n\t\t\t'invoice_number'=> uniqid()\n\t\t\t);\n\n\t\t// ### Redirect urls\n\t\t// Set the urls that the buyer must be redirected to after \n\t\t// payment approval/ cancellation.\n\t\t$baseUrl = HOMEURL;\n\t\t$redirectUrls = new RedirectUrls();\n\t\t$redirectUrls->setReturnUrl($baseUrl.\"paypal_1/statuspayment\")\n\t\t ->setCancelUrl($baseUrl.\"paypal_1/cancelpayment\");\n\n\t\t// ### Payment\n\t\t// A Payment Resource; create one using\n\t\t// the above types and intent set to 'sale'\n\t\t$payment = new Payment();\n\t\t$payment->setIntent(\"sale\")\n\t\t ->setPayer($payer)\n\t\t ->setRedirectUrls($redirectUrls)\n\t\t ->setTransactions(array($transaction));\n\n\n\t\t// For Sample Purposes Only.\n\t\t$request = clone $payment;\n\n\t\t// ### Create Payment\n\t\t// Create a payment by calling the 'create' method\n\t\t// passing it a valid apiContext.\n\t\t// (See bootstrap.php for more on `ApiContext`)\n\t\t// The return object contains the state and the\n\t\t// url to which the buyer must be redirected to\n\t\t// for payment approval\n\t\ttry {\n\t\t $payment->create($this->_api_context);\n\t\t} catch (Exception $ex) {\n\t\t // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n\t\t ResultPrinter::printError(\"Created Payment Using PayPal. Please visit the URL to Approve.\", \"Payment\", null, $request, $ex);\n\t\t exit(1);\n\t\t}\n\n\t\t// ### Get redirect url\n\t\t// The API response provides the url that you must redirect\n\t\t// the buyer to. Retrieve the url from the $payment->getApprovalLink()\n\t\t// method\n\t\t$approvalUrl = $payment->getApprovalLink();\n\n\t\t// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n\t\t//ResultPrinter::printResult(\"Created Payment Using PayPal. Please visit the URL to Approve.\", \"Payment\", \"<a href='$approvalUrl' >$approvalUrl</a>\", $request, $payment);\n\n\t\t//return $payment;\n\t\t//echo \"<pre>\";print_r($payment);die;\n\n\t\t//process payment function redirection\n\n\t\tforeach ($payment->getLinks() as $link) {\n\t\t\tif($link->getRel() == 'approval_url'){\n\t\t\t\t$redirect_url = $link->getHref();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(isset($redirect_url)){\n\t\t\tredirect($redirect_url);\n\t\t}\n\n\t\techo \"Some Error Was occured please try again...!\";\n\n\t\t\n\n\t}", "public function actionCheck($param)\n {\n\n /*$json = json_decode($data);\n echo $json->tls_version.'<br />';\n //$curl_info = curl_version();\n //echo $curl_info['ssl_version'];\n printf(\"0x%x\\n\", OPENSSL_VERSION_NUMBER);*/\n\n define(\"LOG_FILE\", __DIR__.\"/Paypal.log\");\n $raw_post_data = file_get_contents('php://input');\n $raw_post_array = explode('&', $raw_post_data);\n $myPost = array();\n foreach ($raw_post_array as $keyval) {\n $keyval = explode ('=', $keyval);\n if (count($keyval) == 2)\n $myPost[$keyval[0]] = urldecode($keyval[1]);\n }\n $req = 'cmd=_notify-validate';\n if(function_exists('get_magic_quotes_gpc')) {\n \t$get_magic_quotes_exists = true;\n }\n foreach ($myPost as $key => $value) {\n \t$value = $get_magic_quotes_exists && get_magic_quotes_gpc() == 1\n ? urlencode(stripslashes($value))\n : urlencode($value);\n $req .= \"&$key=$value\";\n }\n $paypal_url = $this->settings->paypal_demo ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';\n $ch = curl_init($paypal_url);\n if ($ch == false) {\n \tdie('no curl init');\n }\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSLVERSION, 6);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n $res = curl_exec($ch);\n if (curl_errno($ch) != 0) {\n $error = curl_error($ch);\n \t//error_log(date('[Y-m-d H:i e] '). \"Can't connect to PayPal to validate IPN message: \" . $error . PHP_EOL, 3, LOG_FILE);\n \tcurl_close($ch);\n \tdie($error);\n } else {\n\t\tif(DEBUG == true) {\n\t\t\t//error_log(date('[Y-m-d H:i e] '). \"HTTP request of validation request:\". curl_getinfo($ch, CURLINFO_HEADER_OUT) .\" for IPN payload: $req\" . PHP_EOL, 3, LOG_FILE);\n\t\t\t//error_log(date('[Y-m-d H:i e] '). \"HTTP response of validation request: $res\" . PHP_EOL, 3, LOG_FILE);\n\t\t}\n\t\tcurl_close($ch);\n }\n $tokens = explode(\"\\r\\n\\r\\n\", trim($res));\n $res = trim(end($tokens));\n if (strcmp($res, \"VERIFIED\") == 0) {\n if($param->receiver_email == '' || $param->receiver_email != $this->settings->paypal_email\n || !$param->Exists('item_number', true) || $param->mc_currency != 'USD') {\n //error_log('Error 1'.PHP_EOL, 3, LOG_FILE);\n die('error');\n }\n $this->_table->current = $param->item_number;\n if($this->_table->id != $param->item_number || $this->_table->status != 0\n || (float)$param->mc_gross != (float)$this->_table->sum) {\n //error_log('Error 2'.PHP_EOL, 3, LOG_FILE);\n die('error');\n }\n if(strtolower($param->payment_status) == 'completed') {\n $this->_table->status = 2;\n $this->_table->message = $param->txn_id;\n $this->_table->date_payed = date(\"Y-m-d H:m:i\");\n $this->_table->Save();\n //error_log(date('[Y-m-d H:i e] '). \"Verified IPN: $req \". PHP_EOL, 3, LOG_FILE);\n die('ok');\n } else {\n //error_log(date('[Y-m-d H:i e] '). \"Status: \".$param->payment_status.PHP_EOL, 3, LOG_FILE);\n }\n } else if (strcmp ($res, \"INVALID\") == 0) {\n \t//error_log(date('[Y-m-d H:i e] '). \"Invalid IPN: $req\" . PHP_EOL, 3, LOG_FILE);\n }\n die('error');\n }", "protected function setUp()\n {\n parent::setUp();\n $this->_payment = new Response\\Payment();\n }", "public function paypalAction()\n {\n $adaptor = new \\Phalcon\\Logger\\Adapter\\File(APPLICATION_LOG_DIR . '/payment-paypal-ipn-' . date('Y-m-d') . '.log');\n $adaptor->info(var_export($_REQUEST, true));\n $response = new Response();\n $response->setStatusCode(200, 'OK');\n return $response;\n }", "protected function setUp() {\n\t\tinclude ('config.php');\n\t\t\n\t\t$transport = getTransport($config);\t\n\t\t$mapper = new XmlMapper();\n\t\t$this->apiConnector = new ApiConnector($config['clientname'], $transport, $mapper);\n\t\t$this->service = $this->apiConnector->getService('Invoice');\n\t\tif (!is_null(self::$invoiceId)) {\n\t\t\t$this->object = $this->service->getById(self::$invoiceId);\n\t\t}\n\t}", "function inquireTransaction() {\n\n $messageLog = \"\\n### Initiate ###\\n\";\n\n $fp = fopen('easypay_inquire.log', 'a');\n fwrite($fp, $messageLog);\n fclose($fp);\n\n\n $messageLog = \"\\n####### Inquire Api Start #######\\n\";\n echo \"\\nTime : \" . date(\"Y-m-d h:i:sa\") . \"\\n\";\n $messageLog .= \"\\nTime : \" . date(\"Y-m-d h:i:sa\") . \"\\n\";\n $data12['ep_live'] = $this->config->item('ep_live');\n\n // Create the context as you did in your test\n $context = stream_context_create(\n array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n ));\n\n if ($data12['ep_live'] == 'no') {\n\n $client = new SoapClient(\"https://easypaystg.easypaisa.com.pk/easypay-service/PartnerBusinessService/META-INF/wsdl/partner/transaction/PartnerBusinessService.wsdl\", array(\"classmap\" => $this->classmap,\n \"location\" => \"https://easypaystg.easypaisa.com.pk/easypay-service/PartnerBusinessService\",\n \"trace\" => true,\n \"exceptions\" => true,\n \"stream_context\" => $context\n ));\n\n $client->__setLocation(\"https://easypaystg.easypaisa.com.pk/easypay-service/PartnerBusinessService\");\n } else {\n $client = new SoapClient(\"https://easypay.easypaisa.com.pk/easypay-service/PartnerBusinessService/META-INF/wsdl/partner/transaction/PartnerBusinessService.wsdl\", array(\"classmap\" => $this->classmap,\n \"location\" => \"https://easypay.easypaisa.com.pk/easypay-service/PartnerBusinessService\",\n \"trace\" => true,\n \"exceptions\" => true,\n \"stream_context\" => $context\n ));\n $client->__setLocation(\"https://easypay.easypaisa.com.pk/easypay-service/PartnerBusinessService\");\n }\n\n\n echo '<br> Fetching transaction log data ...';\n $messageLog .=\"\\nFetching transaction log data of pending status ...\";\n $transactionLog = $this->db->query(\"SELECT * FROM `transaction_log` WHERE status = 'pending' AND row_status = 'active' \");\n\n if ($transactionLog->num_rows() > 0) {\n echo \"<br> data found\";\n $messageLog .= \"\\n data found\";\n $transactionLogData = $transactionLog->result_array();\n\n foreach ($transactionLogData as $key => $value) {\n// echo '<pre>';\n// echo '<br> Key : ' . $key . '';\n// echo '<br> Unique Id : ' . $value['order_unique_id'] . '<br>';\n// print_r($value);\n\n if ($data12['ep_live'] == 'no') {\n $inquireResponse = $client->__soapCall(\"inquireTransaction\", array(\"inquireTransactionRequestType\" => array(\n \"username\" => \"skillorbit\",\n \"password\" => \"472ef47c0d9a99d14ec5ed4a7f0a0053\",\n \"orderId\" => $value['order_unique_id'],\n \"accountNum\" => \"20074\"\n )));\n } else {\n $inquireResponse = $client->__soapCall(\"inquireTransaction\", array(\"inquireTransactionRequestType\" => array(\n \"username\" => \"kueball\",\n \"password\" => \"dab72e2062b7d094123288f6de4f844f\",\n \"orderId\" => $value['order_unique_id'],\n \"accountNum\" => \"54818908\"\n )));\n }\n\n\n echo '<br>checking response ';\n $messageLog .= \"\\n checking soap api response of order id : \" . $value['order_unique_id'];\n echo '<br>inquireResponse->responseCode : ', $inquireResponse->responseCode;\n\n// echo '<pre>';\n// print_r($inquireResponse);\n\n if ($inquireResponse->responseCode == 0000) {\n echo '<br>success ';\n $messageLog .= \"\\n success \";\n\n $messageLog .= \"\\n checking transaction status is \" . $inquireResponse->transactionStatus;\n if ($inquireResponse->transactionStatus == 'PAID') {\n\n\n $messageLog .= \"\\nfetching from transaction log...\\n\";\n\n $forOrderDetails = $this->db->query(\"SELECT * FROM `transaction_log` WHERE order_unique_id = '\" . $inquireResponse->orderId . \"' \");\n\n if ($forOrderDetails->num_rows() > 0) {\n $messageLog .= \"\\nqueryOneData : Found\\n\";\n\n $orderDetails = $forOrderDetails->result_array()[0];\n $tlId = $orderDetails['id'];\n $type = $orderDetails['event'];\n $tStatus = $orderDetails['status'];\n// $orderDetails = $forPackageID->result_array()[0];\n\n $messageLog .= \"\\n\\n\" . print_r($orderDetails, TRUE);\n $messageLog .= \"\\nType : \" . $type . \"\\n\";\n// $message .= \"\\nBrandId : \" . $brandID . \"\\n\";\n $transactionId = $inquireResponse->transactionId;\n\n// $paykey = strtolower($data->order_id);\n $paykey = $inquireResponse->orderId;\n\n// \n if ($type == 'campaign') {\n\n $messageLog .= \"\\n Category : Campaign\";\n\n $senderId = $orderDetails['sender_entity_id'];\n $infUserId = $orderDetails['inf_user_id'];\n $recieverId = $orderDetails['receiver_entity_id'];\n $behalfOfRecieverId = $orderDetails['behalf_of_receiver_entity_id'];\n $campId = $orderDetails['campaign_id'];\n $statusForUpdate = $orderDetails['status_for_update'];\n\n $messageLog .= \"\\n Transaction Status in db : \" . $tStatus . \"\\n\";\n if ($tStatus != 'success') {\n\n// making data \n $messageLog .= \"\\n making data for entries...\\n\";\n\n $data1['sender_entity_id'] = $senderId;\n $data1['campaign_id'] = $campId;\n// $recieverId\n $data1['receiver_entity_id'] = ($behalfOfRecieverId == NULL || $behalfOfRecieverId == \"\" ? $recieverId : $behalfOfRecieverId);\n// $behalfOfRecieverId\n $data1['behalf_of_receiver_entity_id'] = ($behalfOfRecieverId == null || $behalfOfRecieverId == \"\" ? null : $recieverId);\n $data1['paykey'] = $paykey;\n// $data1['receiver_invoice'] = 0;\n $date = date_create();\n $data1['transaction_date'] = date_timestamp_get($date);\n $data1['transaction_status'] = \"success\";\n $data1['transaction_type'] = \"auto_paid\";\n// $data1['transaction_type'] = date(\"Y-m-d H:i:s\");\n $data1['amount_paid'] = $inquireResponse->transactionAmount;\n// $data1['setup_currency_id'] = NULL;\n $data1['transaction_id'] = $transactionId;\n $data1['row_status'] = 'active';\n// \n// \n $data2['campaign_payment_status'] = $statusForUpdate;\n// $data2['campaign_payment_status'] = \"escrow_paid_scxn\";\n\n $data3['status'] = \"success\";\n\n $messageLog .= \"\\n transactions begins...\\n\";\n $this->db->trans_begin();\n\n $this->db->insert('campaigns_transactions', $data1);\n\n\n $array2 = array('campaign_id' => $campId, 'user_id' => $infUserId, 'row_status' => 'active');\n $this->db->where($array2);\n $this->db->update('campaigns_offered_influencers', $data2);\n\n $array3 = array('id' => $tlId);\n $this->db->where($array3);\n $this->db->update('transaction_log', $data3);\n\n if ($this->db->trans_status() === FALSE) {\n $this->db->trans_rollback();\n $messageLog .= \"\\n status : transaction rollback...\\n\";\n// echo 'false';\n } else {\n $this->db->trans_commit();\n $messageLog .= \"\\n status : transaction commit...\\n\";\n }\n }\n }\n// \n else {\n $messageLog .= \"\\n Category : Not Found\\n\";\n }\n } else {\n $messageLog .= \"\\n queryOneData : Not Found\\n\";\n }\n } elseif ($inquireResponse->transactionStatus == 'PENDING' || $inquireResponse->transactionStatus == 'INITIATED') {\n\n $messageLog .= \"\\n nothing to do \\n\";\n } elseif ($inquireResponse->transactionStatus == 'EXPIRED' || $inquireResponse->transactionStatus == 'CANCELLED' || $inquireResponse->transactionStatus == 'REVERSED' || $inquireResponse->transactionStatus == 'FAILED' || $inquireResponse->transactionStatus == 'DROPPED' || $inquireResponse->transactionStatus == 'BLOCKED') {\n\n echo \"<br> http request\";\n// $messageLog .= \"\\n http request for token\";\n// $url = 'http://localhost:3000/api/v1.1.0/transactionToken';\n $url = $this->config->item('api_url') . 'api/v1.1.0/transactionToken';\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_URL, $url);\n $output = curl_exec($curl);\n curl_close($curl);\n\n $data = json_decode($output);\n\n// $messageLog .= \"\\n\\n\" . print_r($data, TRUE);\n// echo \"<pre>\";\n// print_r($data);\n// print_r($value);\n $token = $data->genericResponse->genericBody->data->token;\n// echo '<br> token : ' . $token;\n\n $data1['prefix'] = $value['prefix'];\n $data1['sender_entity_id'] = $value['sender_entity_id'];\n $data1['behalf_of_sender_entity_id'] = $value['behalf_of_sender_entity_id'];\n $data1['campaign_id'] = $value['campaign_id'];\n $data1['inf_user_id'] = $value['inf_user_id'];\n $data1['receiver_entity_id'] = $value['receiver_entity_id'];\n $data1['behalf_of_receiver_entity_id'] = $value['behalf_of_receiver_entity_id'];\n $data1['status_for_update'] = $value['status_for_update'];\n $data1['event'] = $value['event'];\n $data1['order_unique_id'] = $token;\n $data1['status'] = 'pending';\n $data1['created_by'] = $value['created_by'];\n $data1['row_status'] = 'active';\n// \n $data2['status'] = strtolower($inquireResponse->transactionStatus);\n $data2['row_status'] = \"inactive\";\n\n $messageLog .= \"\\n transactions begins...\\n\";\n $this->db->trans_begin();\n\n $this->db->insert('transaction_log', $data1);\n\n\n $array2 = array('id' => $value['id']);\n $this->db->where($array2);\n $this->db->update('transaction_log', $data2);\n\n if ($this->db->trans_status() === FALSE) {\n $this->db->trans_rollback();\n $messageLog .= \"\\n status : transaction rollback...\\n\";\n// echo 'false';\n } else {\n $this->db->trans_commit();\n $messageLog .= \"\\n status : transaction commit...\\n\";\n }\n } else {\n \n }\n } elseif ($inquireResponse->responseCode == 0001) {\n\n echo '<br> system error ';\n $messageLog .= \"\\n system error \";\n } elseif ($inquireResponse->responseCode == 0002) {\n\n echo '<br>required field is missing ';\n $messageLog .= \"\\n required field is missing \";\n } else {\n// $inquireResponse->responseCode == 0003\n echo '<br>invalid order ID or may not initiated ';\n $messageLog .= \"\\n invalid order ID or may not initiated \";\n }\n }\n } else {\n echo 'no data found';\n $messageLog .= \"\\n no data found\";\n }\n\n $messageLog .= \"\\n####### Inquire Api End #######\\n\";\n\n $fp = fopen('easypay_inquire.log', 'a');\n fwrite($fp, $messageLog);\n fclose($fp);\n }", "public function store(Request $request)\n {\n \n\n toastr::success ('You have paid Successfully', 'success');\n return redirect()->route('layout');\n\n /*\n $apiContext = new \\PayPal\\Rest\\ApiContext(\n new \\PayPal\\Auth\\OAuthTokenCredential(\n 'AeqdFHXOg-V0nHCfbjIjGNBcvZRIdiYfsUVcg-KlXZCU7YrAXn7kJ95fsRyv3nREmSpZFOfU6uvpY-a6',// ClientID\n 'EGQp7HnroeqRafSbrhZTJ3z7J6MU-Cqx7iUColYQqIa4kaXAfBWpja6Y14K-RNtQ0CCoOhgTiPXc9nuJ'//ClientSecret\n )\n );\n $payer = new Payer();\n $payer->setPaymentMethod(\"paypal\");\n $item1 = new Item();\n $item1->setName('Ground Coffee 40 oz')\n ->setCurrency('USD')\n ->setQuantity(1)\n ->setPrice($request->get('amount'));\n $itemList = new ItemList();\n $itemList->setItems(array($item1));\n $amount = new Amount();\n $amount->setCurrency(\"USD\")\n ->setTotal($request->get('amount'));\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($itemList)\n ->setDescription(\"Payment description\")\n ->setInvoiceNumber(uniqid());\n $redirectUrls = new RedirectUrls();\n $redirectUrls->setReturnUrl(\"http://localhost:8000/executePayment\")\n ->setCancelUrl(\"http://localhost:8000/cancel\");\n $payment = new Payment();\n $payment->setIntent(\"sale\")\n ->setPayer($payer)\n ->setRedirectUrls($redirectUrls)\n ->setTransactions(array($transaction));\n $payment->create($apiContext);\n return redirect($payment->getApprovalLink());\n*/\n\n\n }", "protected function setUp() {\n $this->object = new KactoosAPI;\n $this->object->apikey('8f14e45fceea167a5a36dedd4bea2543')\n ->country('br')\n ->module('products')\n ->appname('jaydson')\n ->format('xml');\n }", "public function setUp()\n {\n $this->amount = mt_rand(1, 100);\n $this->returnUrl = 'https://test.com/' . uniqid('', true);\n $this->orderNumber = uniqid('order_number_', true);\n $this->currency = 'RUB';\n\n parent::setUp();\n }", "protected function set_up()\n {\n $this->_yahoo = new Zend_Service_Yahoo(constant('TESTS_ZEND_SERVICE_YAHOO_ONLINE_APPID'));\n\n $this->_httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket();\n\n $this->_yahoo->getRestClient()\n ->getHttpClient()\n ->setAdapter($this->_httpClientAdapterSocket);\n }", "public function setUp()\n {\n parent::setUp();\n $this->payoutService = $this->app->make(Payout::class);\n }", "public function __construct () {\n // Merchant ID\n $this->_mid = \"\";\n\n // User ID\n $this->_userID = \"\";\n\n // Password\n $this->_password = \"\";\n\n // Developer ID\n $this->_devID = \"\";\n\n // Device ID\n $this->_deviceID = \"\";\n\n // API server\n $this->_tsepApiServer = \"https://stagegw.transnox.com\";\n }", "public function __construct()\n {\n parent::__construct();\n\n /** verifico se produção ou sandbox * */\n switch (Config::PS_AMBIENTE) {\n\n // ambiente de testes\n case 'sandbox':\n $this->psWS = 'https://ws.sandbox.pagseguro.uol.com.br/v2/checkout';\n $this->psWSTransparente = 'https://ws.sandbox.pagseguro.uol.com.br/v2/sessions';\n $this->psURL = 'https://sandbox.pagseguro.uol.com.br/v2/checkout/payment.html';\n $this->psURL_Script = 'https://stc.sandbox.pagseguro.uol.com.br/pagseguro/api/v2/checkout/pagseguro.lightbox.js';\n $this->ScriptTransparente = 'https://stc.sandbox.pagseguro.uol.com.br/pagseguro/api/v2/checkout/pagseguro.directpayment.js';\n $this->psURL_Notificacao = 'https://ws.sandbox.pagseguro.uol.com.br/v2/transactions/';\n $this->token = Config::PS_TOKEN_SB;\n break;\n // ambiente de produção real\n case 'production':\n $this->psWS = 'https://ws.pagseguro.uol.com.br/v2/checkout';\n $this->psWSTransparente = 'https://ws.pagseguro.uol.com.br/v2/sessions';\n $this->psURL = 'https://pagseguro.uol.com.br/v2/checkout/payment.html';\n $this->psURL_Script = 'https://stc.pagseguro.uol.com.br/pagseguro/api/v2/checkout/pagseguro.lightbox.js';\n $this->ScriptTransparente = 'https://stc.pagseguro.uol.com.br/pagseguro/api/v2/checkout/pagseguro.directpayment.js';\n $this->psURL_Notificacao = 'https://ws.pagseguro.uol.com.br/v2/transactions/';\n $this->token = Config::PS_TOKEN;\n break;\n }\n\n }", "protected function setUp()\n { \n $settings = require __DIR__ . '/../../../config/settings.php';\n $container = new \\Slim\\Container($settings);\n $container['stockconfig'] = function ($config) {\n $stockconfig =$config['settings']['stockconfig']; \n return $stockconfig;\n };\n $dependencies = new Dependencies($container);\n $dependencies->registerLogger();\n $dependencies->registerDatabase();\n $this->object = new ScoringResource($container);\n \n }", "public function postPaymentWithpaypal(Request $request)\n {\n// echo $request;\n// echo $request->get('amount');\n// echo $sdfdsf=$request->get('checkoutInfo');\n// exit;\n $payer = new Payer();\n $payer->setPaymentMethod('paypal');\n $item_1 = new Item();\n $item_1->setName('Item 1') /** item name **/\n ->setCurrency('USD')\n ->setQuantity(1)\n ->setPrice($request->get('amount')); /** unit price **/\n $item_list = new ItemList();\n $item_list->setItems(array($item_1));\n $amount = new Amount();\n $amount->setCurrency('USD')\n ->setTotal($request->get('amount'));\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($item_list)\n ->setDescription('Your transaction description');\n $redirect_urls = new RedirectUrls();\n $redirect_urls->setReturnUrl(URL::route('payment.status')) /** Specify return URL **/\n ->setCancelUrl(URL::route('payment.status'));\n// $redirect_urls->setReturnUrl(URL::route('payment.status',['amount'=>$request->get('amount'),'checkoutInfo'=>$request->get('checkoutInfo')])) /** Specify return URL **/\n// ->setCancelUrl(URL::route('payment.status',['amount'=>$request->get('amount'),'checkoutInfo'=>$request->get('checkoutInfo')]));\n $payment = new Payment();\n $payment->setIntent('Sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirect_urls)\n ->setTransactions(array($transaction));\n /** dd($payment->create($this->_api_context));exit; **/\n try {\n $payment->create($this->_api_context);\n } catch (\\PayPal\\Exception\\PPConnectionException $ex) {\n if (\\Config::get('app.debug')) {\n \\Session::put('error','Connection timeout');\n return Redirect::route('addmoney.paywithpaypal');\n /** echo \"Exception: \" . $ex->getMessage() . PHP_EOL; **/\n /** $err_data = json_decode($ex->getData(), true); **/\n /** exit; **/\n } else {\n \\Session::put('error','Some error occur, sorry for inconvenient');\n return Redirect::route('addmoney.paywithpaypal');\n /** die('Some error occur, sorry for inconvenient'); **/\n }\n }\n foreach($payment->getLinks() as $link) {\n if($link->getRel() == 'approval_url') {\n $redirect_url = $link->getHref();\n break;\n }\n }\n /** add payment ID to session **/\n Session::put('paypal_payment_id', $payment->getId());\n Session::put('checkoutInfo', $request->get('checkoutInfo'));\n \n if(isset($redirect_url)) {\n /** redirect to paypal **/\n return Redirect::away($redirect_url);\n }\n \\Session::put('error','Unknown error occurred');\n return Redirect::route('addmoney.paywithpaypal');\n }", "public function __construct()\n {\n // create object to manage MangoPay API\n $this->connexionApi = new MangoPay\\MangoPayApi();\n // login : password : temp directory\n $this->connexionApi->Config->ClientId = 'aurelgouilhers';\n $this->connexionApi->Config->ClientPassword = 'wr42AYOg5LU5OE3dn10qNrbfsDC7iYeRHu3N4Gjw3KtGDuSC1V';\n $this->connexionApi->Config->TemporaryFolder = __DIR__.\"/../../../TEMP_MANGOPAY\";\n //declaration reoute retour pour recuperation card_Id object\n $this->urlServer = 'http' . ( isset($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'];\n $this->urlServer .= substr($_SERVER['REQUEST_URI'], 0, strripos($_SERVER['REQUEST_URI'], ' ') + 1);\n\n }", "public function invoke(PayPalApiStruct $webhook, Context $context): void;", "protected function _getConfig()\n {\n return $this->_paypalConfig;\n }", "protected function setUp()\n {\n $this->api_key = getenv('API_KEY');\n $this->api = new Api($this->api_key);\n }" ]
[ "0.80538964", "0.7916806", "0.7874544", "0.7858266", "0.7845124", "0.7807325", "0.7804147", "0.77423376", "0.77423376", "0.77328724", "0.77328146", "0.7668857", "0.76405644", "0.76376027", "0.75170064", "0.74457026", "0.70924", "0.6848668", "0.6826303", "0.6677252", "0.6433717", "0.6391158", "0.63018763", "0.6205945", "0.61979127", "0.61568743", "0.61366194", "0.61351866", "0.6084375", "0.6080154", "0.6033793", "0.5844766", "0.57596254", "0.57540035", "0.5748965", "0.57386196", "0.5733724", "0.5671451", "0.5614587", "0.55984575", "0.5579499", "0.5579338", "0.5569217", "0.55662596", "0.55529994", "0.55368936", "0.5534272", "0.55271226", "0.55230445", "0.55050844", "0.5492704", "0.5484344", "0.54815996", "0.5479175", "0.5438932", "0.5437308", "0.5435962", "0.5434842", "0.54130346", "0.5412873", "0.54097635", "0.54036", "0.54027885", "0.5402587", "0.5394516", "0.5393291", "0.539152", "0.53838664", "0.5374715", "0.53596205", "0.53575206", "0.53328675", "0.53237313", "0.53174806", "0.5310878", "0.5299642", "0.5298737", "0.52924997", "0.5286137", "0.5281014", "0.5278045", "0.5273856", "0.5263597", "0.5257199", "0.5255949", "0.5252136", "0.524814", "0.5247971", "0.52472234", "0.5245559", "0.5240271", "0.5234725", "0.523337", "0.52308", "0.5228304", "0.5223465", "0.52186805", "0.5213431", "0.5191675", "0.51893336" ]
0.78760594
2