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
Call the laravel callbacks.
public function afterEach() { foreach ($this->afterEachCallbacks as $callback) { call_user_func($callback); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function callback();", "private function callCallback() {\n\t\tif ($this->callback !== null) {\n\t\t\t$response = $this->buildResponse();\n\t\t\tcall_user_func($this->callback, $response, $this->data);\n\t\t}\n\t}", "public function call()\n {\n $this->dispatchRequest($this['request'], $this['response']);\n }", "protected function fireAppCallbacks(array $callbacks)\n {\n foreach ($callbacks as $callback) {\n \\call_user_func($callback, $this);\n }\n }", "public function listen(Closure $callback)\n\t{\n\t\t$this->neoeloquent->listen($callback);\n\t}", "protected function fireAppCallbacks(array $callbacks)\n {\n foreach ($callbacks as $callback) {\n call_user_func($callback, $this);\n }\n }", "public function callback() {\n // Get a handle of the Auth0 service (we don't know if it has an alias)\n $service = \\App::make('auth0');\n\n // Try to get the user informatio\n $auth0User = $service->getUserInfo();\n if ($auth0User) {\n // If we have, we are going to log him in, buut, if\n // there is an onLogin defined we need to allow the Laravel developer\n // to implement the user as he wants an also let him store it\n if ($service->hasOnLogin()) {\n $user = $service->callOnLogin($auth0User);\n } else {\n // If not, the user will be fine\n $user = $auth0User;\n }\n \\Auth::login($user);\n }\n return \\Redirect::intended('/');\n }", "public function callNow()\n {\n $c = $this->callback;\n $c();\n }", "public function setCallbacks()\n {\n // __AUTH__ must return true or false\n $this->on('__AUTH__', function($auth, $request) {\n if (is_object($auth)) {\n if ($auth->type == 'Basic') {\n if ($auth->user == 'Andrew' && $auth->password == 'foo') {\n return true;\n }\n }\n }\n\n return false;\n });\n\n // dummy callback, just shows how to add return headers to be used\n $this->on('rate.limit.headers', function($remoteAddr) {\n // .. do something with the remoteAddr\n return ['X-RateLimit-Limit' => 5000, 'X-RateLimit-Remaining' => 4999];\n });\n }", "protected function callAfterDispatchCallbacks()\r\n {\r\n try {\r\n foreach ($this->after_filter_callbacks as $callback) {\r\n if (is_callable($callback)) {\r\n if (is_string($callback)) {\r\n $callback($this);\r\n\r\n } else {\r\n call_user_func($callback, $this);\r\n\r\n }\r\n }\r\n }\r\n } catch (Exception $e) {\r\n $this->error($e);\r\n }\r\n }", "protected function _callCompletionCallbacks()\n {\n if(empty($this->_completion_callbacks) === false)\n {\n foreach ($this->_completion_callbacks as $callback)\n {\n call_user_func($callback, $this);\n }\n }\n }", "protected function callMiddleware()\n {\n if (count($this->middleware) > 0) {\n foreach ($this->middleware as $middleware) {\n $controller = new $middleware;\n call_user_func_array([$controller, 'handle'], []);\n }\n }\n }", "public function registerCallbacks()\n {\n parent::registerCallbacks();\n }", "public function run()\n {\n // $this->call\n }", "public function run()\n {\n $this->users();\n }", "protected function perform_callback()\n\t{\t\t\n\t\t// Loop through the callbacks\n\t\tforeach ($this->rule['callbacks'] as $role => $callback)\n\t\t{\n\t\t\t// If the user matches the role (or it's a default), execute it\n\t\t\tif ($role === ACL::CALLBACK_DEFAULT OR $this->user->is_a($role))\n\t\t\t{\n\t\t\t\tcall_user_func_array($callback['function'], $callback['args']);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n $this->call(SocialIcons::class);\n $this->call(BackgroundImages::class);\n $this->call(UserAdminAcount::class);\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(FB_api_mode::class);\n $this->call(FB_page_edge::class);\n $this->call(FB_field::class);\n $this->call(FB_page_edge_node::class);\n $this->call(FB_edge_edgeNode::class);\n $this->call(FB_field_followingrequest::class);\n $this->call(FB_parent_field::class);\n $this->call(Provider::class);\n $this->call(User::class);\n $this->call(News::class);\n $this->call(InfoApiCost::class);\n $this->call(MediaApiCost::class);\n $this->call(ForumSection::class);\n $this->call(CheckoutFlow::class);\n $this->call(ApiDiscount::class);\n $this->call(UserPayment::class);\n $this->call(FB_api_group_full_mode_and_statistics::class);\n\n Model::reguard();\n }", "public function handle()\n {\n User::whereNotNull('email_verified_at')\n ->whereDate('created_at',now()->subDays())\n ->get()->each(function($user){\n $user->notify(new SendDocLinkNotification());\n });\n }", "public static function call(){\n\t\t\t$request = self::get_request();\n\t\t\t$method = self::get_method();\n\t\t\t\n\t\t\t$callback_information = self::route($method, $request);\n\t\t\t$callback = $callback_information[0];\n\t\t\t$params = $callback_information[1];\n\n\t\t\t// Start an output buffer, execute the callback function for our route, and store all the captured output in $body:\n\t\t\tob_start();\n\n\t\t\t\tif(count($params) == 0)\n\t\t\t\t\tcall_user_func($callback);\n\t\t\t\telse\n\t\t\t\t\tcall_user_func($callback, $params);\n\t\t\t\t\n\t\t\t\tif (self::$body == '')\n\t\t\t\t\tself::$body = ob_get_contents();\n\t\t\t\t\n\t\t\tob_end_clean();\n\t\t}", "public function run()\n {\n $this->call(baihat_casi::class);\n $this->call(baihatduyet::class);\n $this->call(users::class);\n $this->call(theloai::class);\n $this->call(casi::class);\n $this->call(baihatmoi::class);\n $this->call(baihathot::class);\n $this->call(baihathot_casi::class);\n }", "public function run()\n {\n $this -> call ('agregar_empresas_iniciales'::class);\n $this -> call ('agregar_empleados_iniciales'::class);\n $this -> call ('agregar_empresas_adicionales'::class);\n $this -> call ('agregar_empleados_adicionales'::class);\n }", "public function callback()\n {\n $this->jsonResponse([\n 'ok' => true\n ]);\n }", "private function executeHandle() {\n // call hook function\n is_callable(config('hooks.onExecute')) && call_user_func(config('hooks.onExecute'), $this);\n // execute controller\n $this->router->executeController();\n }", "public function run()\n {\n Model::unguard();\n\n //$this->call(TracuuFaker::class);\n //$this->call(SanphamFaker::class);\n //$this->call(DeliveryFaker::class);\n $this->call(updateImages::class);\n\n Model::reguard();\n }", "public function run()\n\t{\n\t\t$response = $this->dispatch($this['request']);\n\n\t\t$response->send();\n\n\t\t$this->callFinishMiddleware($response);\n\t}", "public function callback() {\n\t\t$this->load->library('twconnect');\n\n\t\t$ok = $this->twconnect->twprocess_callback();\n\t\t\n\t\tif ( $ok ) { redirect('twtest/success'); }\n\t\telse redirect ('twtest/failure');\n\t}", "public function run()\n {\n $this->call(DigitalFulfillmentPositions::class);\n $this->call(DigitalFulfillmentAccountPositions::class);\n $this->call(DexMediaAPAccountPositions::class);\n }", "public function boot()\n {\n\n Route::bind('facebook_webhook' , function(){\n\n\n $facebookWebhook = new FacebookWebhook();\n $request = request();\n $verifyToken = 'Axb123xyz';\n if($request->isMethod('get')){\n\n if($verifyToken == $request->input('hub_verify_token')){\n $facebookWebhook->hubChallenge = $request->input('hub_verify_challenge');\n }\n }\n else if($request->isMethod('post')){\n echo 'in post request';\n\n $facebookWebhook = new FacebookWebhook();\n $facebookWebhook->field = $request->input('entry.0.changes.0.field');\n\n if($facebookWebhook->field == 'live_videos'){\n $facebookWebhook->webhookLiveVideoId = $request->input('entry.0.changes.0.value.id');\n $facebookWebhook->webhookLiveVideoStatus =$request->input('entry.0.changes.0.value.status');\n }\n else if($facebookWebhook->field == 'feed'){\n\n $facebookWebhook->item = $request->input('entry.0.changes.0.value.item');\n\n if($facebookWebhook->item == 'comment'){\n $facebookWebhook->webhookCommentPostId = $request->input('entry.0.changes.0.value.post_id');\n $facebookWebhook->webhookCommentId = $request->input('entry.0.changes.0.value.comment_id');\n $facebookWebhook->webhookCommentSenderId = $request->input('entry.0.changes.0.value.sender_id');\n $facebookWebhook->webhookCommentSenderName = $request->input('entry.0.changes.0.value.sender_name');\n $facebookWebhook->webhookCommentBody = $request->input('entry.0.changes.0.value.message');\n }\n }\n\n }\n return $facebookWebhook;\n });\n }", "public function run()\n {\n $this->call(specialites::class);\n $this->call(cancers::class);\n $this->call(organes::class);\n $this->call(wilayas::class);\n $this->call(dairas::class);\n $this->call(communes::class);\n $this->call(employes::class);\n $this->call(permissions::class);\n $this->call(roles::class);\n $this->call(users::class);\n }", "public function callback(){\n $body = file_get_contents('php://input');\n $res = json_decode($body, true);\n \\Think\\Log::write('点播回调开始 begin');\n \n if($res['status'] == 'fail'){\n \\Think\\Log::write('点播回调失败 fail');\n }else{\n \\Think\\Log::write('点播回调成功 success');\n $this->_handle($res);\n }\n }", "public function callback()\n {\n $transaction = PaytmWallet::with('receive');\n\n $response = $transaction->response(); // To get raw response as array\n $invoiceId = $this->getInvoiceId($response['ORDERID']);\n \\Storage::put('/txn/_' . $response['ORDERID'] . '.json', json_encode($response));\n\n if ($transaction->isSuccessful()) {\n $payment = (new \\Modules\\Payments\\Helpers\\PaymentEngine('paytm', $response))->transact();\n toastr()->success('Payment received successfully', langapp('response_status'));\n return redirect()->route('invoices.index');\n }\n // Schedule Job to check transaction\n RecheckPaytmStatus::dispatch($response['ORDERID'])->delay(now()->addMinutes(3));\n toastr()->warning('We will verify your transaction shortly', langapp('response_status'));\n return redirect()->route('invoices.index');\n }", "protected function firePostCreateHooks()\n {\n foreach ($this->postCreate as $callback) {\n call_user_func($callback);\n }\n }", "public function call()\n {\n // TODO: Implement call() method.\n }", "public function call()\n {\n foreach (config('lucy.crud') as $type) {\n if ($this->builder->getAttribute($type)) {\n $method = 'call'.ucfirst(strtolower($type));\n\n $this->{$method}();\n }\n }\n }", "public function call()\n {\n // Get the reference to the application\n $app = $this->app;\n\n // Get the application request without trailing slashes \n $requesturi = ltrim($app->request->getPathInfo(), '/');\n\n if($requesturi != 'unauthorized') {\n // Check if the user is authorized to execute this request\n if(!Security::isUserAuthorized($requesturi)) {\n $app->redirect('/unauthorized');\n }\n }\n\n // Run the inner middleware and application\n $this->next->call();\n }", "public static function booted($callback){\n \\Illuminate\\Foundation\\Application::booted($callback);\n }", "public function map(callable ...$callbacks): self;", "public function call()\n {\n $env = $this->application->environment();\n if (isset($env['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n // Header commonly used by Backbone.js and others\n $env['light.method_override.original_method'] = $env['REQUEST_METHOD'];\n $env['REQUEST_METHOD'] = strtoupper($env['HTTP_X_HTTP_METHOD_OVERRIDE']);\n } elseif (isset($env['REQUEST_METHOD']) && $env['REQUEST_METHOD'] === 'POST') {\n // HTML Form Override\n $req = new \\Light\\Http\\Request($env);\n $method = $req->post($this->configs['key']);\n if ($method) {\n $env['light.method_override.original_method'] = $env['REQUEST_METHOD'];\n $env['REQUEST_METHOD'] = strtoupper($method);\n }\n }\n $this->next->call();\n }", "protected function bootAppCallbacks(array $callbacks)\n {\n foreach ($callbacks as $callback) {\n $callback($this);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(pessoaFisica::class);\n $this->call(cursos::class);\n $this->call(alunos::class);\n $this->call(funcoes::class);\n $this->call(professores::class);\n $this->call(funcaoProfessor::class);\n $this->call(modalidades::class);\n $this->call(tipoAtividade::class);\n }", "public function bootedCallback()\n {\n Validation::lock();\n }", "public function CallBack($response);", "public function callbackSuccess()\n {\n $this->di->get(\"response\")->redirect(\"question\")->send();\n }", "public function handle()\n {\n foreach (Subscription::query()\n ->where('active', true)\n ->whereNotNull('email_verified_at')->get() as $sub) {\n $sub->notify((new DailyMailNotification())->onQueue('dailyMail'));\n }\n }", "public static function listen($callback){\n\t\t\\Illuminate\\Log\\Writer::listen($callback);\n\t}", "public function listen(Closure $callback)\n {\n if(isset($this->events)) {\n $this->events->listen(RequestExecuted::class, $callback);\n }\n }", "public function booting($callback)\n {\n $callback();\n }", "public function run()\n {\n\n // Base path of the API requests\n $basePath = trim($this->settings['application.path']);\n if( $basePath != '/' ){\n $basePath = '/'.trim($basePath, '/').'/';\n }\n\n // Setup dynamic routing\n $this->map($basePath.':args+', array($this, 'dispatch'))->via('GET', 'POST', 'HEAD', 'PUT', 'DELETE', 'OPTIONS');\n\n //Invoke middleware and application stack\n $this->middleware[0]->call();\n\n //Fetch status, header, and body\n list($status, $header, $body) = $this->response->finalize();\n\n //Send headers\n if (headers_sent() === false) {\n\n //Send status\n header(sprintf('HTTP/%s %s', $this->config('http.version'), \\Slim\\Http\\Response::getMessageForCode($status)));\n\n //Send headers\n foreach ($header as $name => $value) {\n $hValues = explode(\"\\n\", $value);\n foreach ($hValues as $hVal) {\n header(\"$name: $hVal\", true);\n }\n }\n }\n\n // Send body\n echo $body;\n }", "public function call()\n {\n $this->addTranslations($this->getTranslator(), $this->getTranslationsRootFolder());\n\n $middleware = $this;\n $this->app->container->singleton(\n self::SERVICE_VALIDATOR,\n function () use ($middleware) {\n return $middleware->createValidator();\n }\n );\n\n $this->next->call();\n }", "public function callback()\n {\n\n \ttry {\n\n\t\t \t$facebookUser = Socialite::driver('facebook')->user();\n $existUser = User::where('email',$facebookUser->email)->first();\n\n \t\tif($existUser) {\n Auth::loginUsingId($existUser->id);\n } else {\n $user = new User;\n $user->name = $facebookUser->name;\n $user->email = $facebookUser->email;\n $user->avatar = $facebookUser->avatar;\n\t\t\t\t\n $user->email_verified_at = date('Y-m-d H:i:s');\n\t\t\t\t\n $user->social_login_token = $facebookUser->token;\n $user->social_login_id = $facebookUser->id;\n $user->social_login_type = 'facebook';\n $user->user_type = 4;\n $user->password = \\Hash::make('12345678');\n $user->save();\n Auth::loginUsingId($user->id);\n }\n return redirect()->to('/home');\n \t\t\n \t} catch (Exception $e) {\n \t\techo $e; \n \t}\n }", "public function run()\n {\n $this->user();\n }", "public function dispatch()\r\n {\r\n foreach($this->broadcast as $event => $data) {\r\n $this->execute($event);\r\n }\r\n }", "public static function listen(Closure $callback)\n {\n }", "public function after_run() {}", "public function run(callable $callback)\n {\n ApiHandler::register($this->url, $this->method, $callback);\n }", "public function CallBack($response) {\n\t\n\t}", "public function run()\n {\n $response = Http::get('https://jsonplaceholder.typicode.com/users');\n\n if($response->failed()){\n return;\n }\n\n $users = collect($response->json());\n\n $statuses = collect([\n 'delivered',\n 'info',\n 'pending',\n 'danger'\n ]);\n\n $users->each(function($user) use($statuses){\n User::create([\n 'name' => $user['name'], \n 'username' => $user['username'], \n 'email' => $user['email'], \n 'phone' => $user['phone'], \n 'website' => $user['website'], \n 'status' => $statuses->random(),\n 'company' => $user['company']['name'],\n 'password' => 'secret'\n ]);\n });\n\n\n }", "public function listen(callable $callback);", "protected function callAfterCallbacks(Application $app)\n {\n foreach ($this->_afterCallbacks as $callback) {\n call_user_func($callback, $app);\n }\n }", "public function after_run(){}", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(pajak::class);\n $this->call(data_pekerjaan::class);\n $this->call(bank::class);\n $this->call(status_penerimaan::class);\n $this->call(statuspembayaran::class);\n $this->call(kecamatan::class);\n }", "public function execute (Request $request)\n {\n $result = null;\n if (is_object($this->callback))\n {\n $result = call_user_func_array ($this->callback, $this->getInput($request->getPath()));\n }\n else\n {\n $separator = strpos($this->callback, '@');\n if ($separator!==false)\n {\n $controller = substr ($this->callback, 0, $separator);\n $method = substr ($this->callback, $separator+1);\n if ($controller!==false)\n {\n $class = '\\\\App\\\\Controller\\\\'.$controller;\n if ($method===false)\n {\n $method = 'index';\n }\n //class_alias ($class,'Controller');\n $object = new $class;\n $result = call_user_func_array ([$object, $method], $this->getInput($request->getPath()));\n }\n }\n }\n return $result;\n }", "public function run()\n {\n Reader::create(\n [\n 'is_verified' => 1,\n 'notify' => 1,\n ]\n );\n Reader::create(\n [\n 'is_verified' => 0,\n 'notify' => 0,\n ]\n );\n }", "public function on($event, $callback){ }", "public function callbackSuccess()\n {\n $this->di->get(\"response\")->redirect(\"user\")->send();\n }", "public function boot()\n {\n parent::boot();\n\n ///Переобернули события старого типа в более удобный тип\n\n Event::listen('cron.collectJobs', function () {\n Event::fire(new CronCollectJobs());\n });\n Event::listen('cron.beforeRun', function ($RunDate) {\n Event::fire(new CronBeforeRun($RunDate));\n });\n Event::listen('cron.jobError', function ($name, $return, $runtime, $rundate) {\n Event::fire(new CronJobError($name, $return, $runtime, $rundate));\n });\n Event::listen('cron.jobSuccess', function ($name, $runtime, $rundate) {\n Event::fire(new CronJobSuccess($name, $runtime, $rundate));\n });\n Event::listen('cron.afterRun', function ($name, $return, $runtime, $rundate) {\n Event::fire(new CronAfterRun($name, $return, $runtime, $rundate));\n });\n Event::listen('cron.locked', function ($lockfile) {\n Event::fire(new CronLocked($lockfile));\n });\n }", "public function run()\n {\n $this['events']->applyHook('before');\n\n if ($this['env'] !== 'console') {\n ob_start('mb_output_handler');\n }\n\n $this->boot();\n\n // Invoke middleware and application stack\n try {\n $this['middleware'][0]->call();\n } catch (\\Exception $e) {\n $this['response']->write($this['exception']->handleException($e), true);\n }\n\n // Finalize and send response\n $this->finalize();\n\n $this['events']->applyHook('after');\n }", "public function run() {\r\n $this->routeRequest(new Request());\r\n }", "public function after($callback);", "public function postDispatch()\n {\n\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n //$this->makeDiagnosis();\n $this->user_regist();\n }", "public function run() {\n }", "public function onRun()\n {\n }", "protected function callHandlers()\n {\n // Iterate handlers and run them\n foreach ($this->handlers as $i => $handler) {\n // Create handler params array with first parameter pointing to this query object\n $params = array(& $this);\n\n // Combine params with existing ones in one array\n $params = array_merge($params, $this->params[$i]);\n\n // Execute handler\n call_user_func_array($handler, $params);\n }\n }", "public function run()\n {\n $this->call(dktour::class);\n }", "public function run()\n {\n $this->executeStaticRoutes();\n $this->executeGroupRoutes();\n }", "public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function run()\n {\n $this->taskStart(\"CallbackSeeder\");\n\n factory(Callback::class, 10)->create();\n\n // 任務結束時間\n $this->taskEnd();\n }", "public function onRequestComplete($callback) {\n $this->eventManager->attach('complete', $callback);\n }", "public function run() {\n }", "public static function bootOnimage(): void\n {\n static::saving(function (Model $model) {\n $model->onimageSavingObserver();\n });\n\n static::saved(function (Model $model) {\n $model->onimageSavedObserver();\n });\n\n// static::deleting(function (Model $model) {\n// return $model->deleteTranslations();\n// });\n//\n// static::retrieved(function (Model $model) {\n// $model->getTranslations();\n// $model->getAvailableTranslations();\n// });\n }", "public function callback()\n {\n $user = Socialite::driver('facebook')->user();\n // mostrar lo que trajo: dd($user);\n\n // Video 25: Consulta para saber si ya se registro antes con facebook, y mandarlo defrente\n $existing = User::whereHas('socialProfiles', function($query) use ($user) {\n $query->where('social_id',$user->id);\n })->first();\n if($existing !== null){\n auth()->login($existing);\n\n return redirect('/');\n }\n\n\n // datos por cada session\n session()->flash('facebookUser',$user);\n\n return view('users.facebook',[\n 'user' => $user\n ]);\n }", "function handle_callback() {\r\n }", "public function run()\n {\n /* desactivar los eventos relacionados a un modelo en provider . una causa es voy a mandar muchos coreos electronicos al momento de seedear el modelo de user\n es buena idea desactivarlo por cada uno de nuestros modelos 121\n */\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n\n\n /* evitar caller en el problema de claves Foreaneas al momento de borra */\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n /* lo que hace truncar es decir borra registro de la tabla No borra tabla , referimos limpiar antes de insertar de migrar datos */\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n /* =>para tabla pivote puesto que no tenemos un modelo directo , hacemos acceso a este por medio de la TABLA utulizando la facede de DB , */\n DB::table('category_product')->truncate();\n\n\n\n\n /* el orden logico mas importante - hay seeders necesitan dependencia de prop de otros modelos : otros seeders */\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(TransactionSeeder::class);\n\n\n\n\n\n }", "public function postDispatch()\n {\n //...\n }", "public function listenForBuildModelResponse(\\Closure $callback)\n {\n $this->ch->basic_consume($this->opts['build-models.response.queue'], \"\",\n false, false, false, false, function (AMQPMessage $msg) use ($callback) {\n $reader = new BuildModelsResponseReader();\n $resp = $reader->read($msg->body);\n if ($resp) {\n call_user_func($callback, $resp);\n $msg->delivery_info['channel']->\n basic_ack($msg->delivery_info['delivery_tag']);\n }\n });\n }", "public function run()\n {\n Model::unguard();\n\n // Create categories\n foreach ($this->categories as $name => $color) {\n $category = Category::firstOrNew(['name' => $name]);\n $category->color = $color;\n $category->save();\n }\n\n // Create priorities\n $this->call(BasicPriorities::class);\n\n // Create statuses\n $this->call(BasicStatuses::class);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;'); // ignore foreign\n $this->categories();\n // $this->apps();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;'); // set foreign\n }", "public function run()\n {\n $this->call(CountriesSeed::class);\n $this->call(ReplayMapsSeeding::class);\n $this->call(ReplayTypesSeeding::class);\n $this->call(ForumSectionSeeding::class);\n $this->call(UserRoleSeeding::class);\n $this->call(GameVersionSeeding::class);\n }", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function callbackAction()\n {\n // set needed request method parameter\n if ($this->_request->isPost()) {\n $_SERVER['REQUEST_METHOD'] = 'post';\n } else {\n $_SERVER['REQUEST_METHOD'] = 'get';\n }\n\n // disable rendering\n $this->_helper->viewRenderer->setNoRender();\n\n // disable layout for Ajax requests\n $this->_helper->layout()->disableLayout();\n\n // get the subscription storage\n $subscriptionStorage = new PubSubHubbub_Subscription(\n $this->_subscriptionModelInstance,\n $this->_privateConfig->get('subscriptions')\n );\n\n //get the Callback instance and hond over the storage\n $callback = new PubSubHubbub_Subscriber_Callback;\n $callback->setStorage($subscriptionStorage);\n\n // handle request and immediatly send response, to avoid blocking the hub\n $callback->handle($this->_request->getParams(), true);\n\n // ######## Feed Update Handling ########\n // if hub sends you a couple of feed updates\n if (true === $callback->hasFeedUpdate()) {\n //get filepath for the feed update files\n $filePath = $this->_owApp->erfurt->getTmpDir() .\n \"pubsub_\" .\n $this->_request->getParam('xhub_subscription') .\n \"_\" .\n time() .\n \".xml\";\n\n // if filepath is not writable\n if ( false === ( $fh = fopen($filePath, 'w') ) ) {\n // can't open the file\n $m = \"No write permissions for \". $filePath;\n throw new CubeViz_Exception($m);\n }\n\n // write the hole feed update to the file\n fwrite($fh, $callback->getFeedUpdate() . \"\\n\");\n // set file mode\n chmod($filePath, 0755);\n // clsoe file\n fclose($fh);\n\n // collect all subscripton properties\n $subscriptionResourceData = $subscriptionStorage->getSubscription(\n $this->_request->getParam('xhub_subscription')\n );\n\n // create erfurt event\n $event = new Erfurt_Event('onFeedUpdate');\n\n // attach some information to the event\n $event->autoInsertFeedUpdates = 'true' == $this->_privateConfig\n ->get('subscriptions')\n ->get('autoInsertFeedUpdates') ? true : false;\n $event->feedUpdateFilePath = $filePath;\n $event->feedUpdates = $callback->getFeedUpdate();\n\n // extract model iri from subscription entry in subscriptions model\n $modelIriProperty = $this->_privateConfig->get('subscriptions')->get('modelIri');\n $modelIri = $subscriptionResourceData['resourceProperties'][$modelIriProperty][0]['uri'];\n $event->modelInstance = new Erfurt_Rdf_Model($modelIri);\n\n // add source resource to the event\n $event->sourceResource = $subscriptionStorage->getSourceResource(\n $this->_request->getParam('xhub_subscription')\n );\n\n // add subscripton properties to the event\n $event->subscriptionResourceProperties = $subscriptionResourceData['resourceProperties'];\n\n // trigger the event\n $event->trigger();\n }\n }", "protected static function boot()\r\n {\r\n parent::boot();\r\n\r\n foreach (static::$handleableEvents as $event) {\r\n static::$event(function($model) use ($event) {\r\n /** @var Model $model */\r\n return $model->handleEvent($event);\r\n });\r\n }\r\n }", "public function run(){\n $this->app->run();\n }", "public static function booting($callback){\n \\Illuminate\\Foundation\\Application::booting($callback);\n }" ]
[ "0.61618227", "0.59565717", "0.5932705", "0.5849905", "0.58320475", "0.5796437", "0.575475", "0.5693363", "0.5665298", "0.56488854", "0.56269693", "0.5591312", "0.5590045", "0.5586058", "0.55803734", "0.5531946", "0.5515084", "0.5506738", "0.55005354", "0.5476235", "0.547333", "0.5471815", "0.546121", "0.5441385", "0.5439101", "0.5407052", "0.54020363", "0.53988993", "0.5388966", "0.5381881", "0.5368409", "0.5360802", "0.53569084", "0.5351946", "0.53386277", "0.5326195", "0.5319949", "0.53011906", "0.5294185", "0.5290619", "0.5254832", "0.5254096", "0.5245387", "0.5226905", "0.5218628", "0.5217252", "0.5214065", "0.52090555", "0.5208536", "0.5207261", "0.520721", "0.5201949", "0.5201712", "0.5193264", "0.5192986", "0.51789266", "0.51782715", "0.51758313", "0.5174388", "0.5169024", "0.51659805", "0.51478136", "0.51468086", "0.514601", "0.5144799", "0.5140949", "0.51273", "0.5125444", "0.51211333", "0.5116889", "0.5107842", "0.5106026", "0.51043665", "0.5103515", "0.5102825", "0.510211", "0.5101178", "0.51008767", "0.5099099", "0.5099099", "0.5097976", "0.50979614", "0.50979614", "0.5094614", "0.50935996", "0.50916505", "0.50883895", "0.5087537", "0.50864863", "0.50806075", "0.50785303", "0.5073165", "0.5066269", "0.5065964", "0.5060586", "0.5051654", "0.5051654", "0.50508195", "0.5047951", "0.504702", "0.504511" ]
0.0
-1
Add the option to the command line.
public function numbered() { $this->arguments[] = '--numbered'; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_option($option, $args = array())\n {\n }", "function add_screen_option($option, $args = array())\n {\n }", "function addOptions(GetOpt $_options)\n {\n $_options->addOptions(array(\n array(null, \"cmd\", GetOpt::NO_ARGUMENT, \"ConsoleOutput - Wenn die Ausgabe per CMD Fenster oder Terminal erfolgt.\\n\")\n ));\n }", "public function addOption(string $_option)\n {\n $this->options[] = $_option;\n }", "function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')\n {\n }", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "public function add_option() {\n\t\tadd_option(\n\t\t\t$this->header_text_option, // The header text option\n\t\t\t$this->default_header_text // The default header text\n\t\t);\n\t}", "public function option(string $option);", "final protected function addOption($option) {\n $this->selectedOptions[$option] = 1;\n }", "public function addOptions(Getopt $_options)\n {\n\n }", "public function addOption($option, $value = '')\n {\n $option = (string) $option;\n $this->_options[$option] = $value;\n }", "protected function appendOptions(): void\n {\n $this->signature .= '\n {--force : Force the worker to run even in maintenance mode}\n {--memory=128 : The memory limit in megabytes}\n {--sleep=0 : Number of seconds to sleep at each iteration in a loop}\n {--timeout=60 : The number of seconds a child process can run}\n ';\n }", "abstract public function addOptions(Getopt $_options);", "public function addOption()\n {\n try {\n $this->validate();\n DB::beginTransaction();\n if ($this->option !== \"\") {\n $this->assessment->options()->create([\n 'option' => $this->option,\n ]);\n }\n $this->option = \"\";\n } catch (\\Throwable $th) {\n DB::rollback();\n session()->flash('error', $th->getMessage());\n }\n DB::commit();\n $this->emitSelf('render');\n }", "public function\r\n add_option(HTMLTags_Option $option)\r\n {\r\n $attribute = $option->get_attribute('value');\r\n \r\n /*\r\n * What's this line for?\r\n */\r\n $attribute->get_value();\r\n \r\n $this->options[$attribute->get_value()] = $option;\r\n }", "function main() {\n\t$cmdline = new Recharg\\CommandLine();\n\n\t$progname = $GLOBALS['argv'][0];\n\n\t$cmdline->setUsage(<<<ETX\n$progname [OPTION]... [-T] SOURCE DEST\n or: $progname [OPTION]... SOURCE... DIRECTORY\n or: $progname [OPTION]... -t DIRECTORY SOURCE...\nETX\n );\n\n\t// Add description text, displayed above the option list.\n\t$cmdline\n\t\t->setDescription('Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.');\n\n\t$opt = new Recharg\\Option('help');\n\t$opt->setHelp('display this help and exit');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('version');\n\t$opt->setHelp('output version information and exit');\n\t$cmdline->addOption($opt);\n\n\t// Note: if no matches are provided, Recharg will assume \"--name\" for a\n\t// an option named \"name\".\n\t$opt = new Recharg\\Option('backup');\n\t$opt\n\t\t->setDefault('existing')\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('CONTROL')\n\t\t->setHelp('make a backup of each existing destination file');\n\t$cmdline->addOption($opt);\n\n\t// If a name consisting of a single character is passed, the option is\n\t// actually created with name \"opt_X\" (where \"X\" is the character\n\t// passed), and a single option \"X\"). In other words:\n\t//\n\t// new Option('a')\n\t//\n\t// is equivalent to\n\t//\n\t// new Option('opt_a', ['a']);\n\t$opt = new Recharg\\Option('b');\n\t$opt\n\t\t->setHelp('like --backup but does not accept an argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('force', ['f', 'force']);\n\t$opt\n\t\t->setHelp('do not prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('interactive', ['i', 'interactive']);\n\t$opt\n\t\t->setHelp('prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-clobber', ['n', 'no-clobber']);\n\t$opt\n\t\t->setHelp('do not overwrite an existing file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('strip-trailing-slashes');\n\t$opt\n\t\t->setHelp('remove any trailing slashes from each SOURCE argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('suffix');\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setHelp('override the usual backup suffix');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('target-directory', ['t', 'target-directory']);\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('DIRECTORY')\n\t\t->setHelp('move all SOURCE arguments into DIRECTORY');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-target-directory',\n\t ['T', 'no-target-directory']);\n\t$opt\n\t\t->setHelp('treat DEST as a normal file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('update', ['u', 'update']);\n\t$opt\n\t\t->setHelp('move only when the SOURCE file is newer than the destination file or when the destination file is missing');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('verbose', ['v', 'verbose']);\n\t$opt\n\t\t->setHelp('explain what is being done');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('context', ['Z', 'context']);\n\t$opt\n\t\t->setHelp('set SELinux security context of destination file to default type');\n\t$cmdline->addOption($opt);\n\n\n\t$cmdline->setFooter(<<<ETX\nIf you specify more than one of -i, -f, -n, only the final one takes effect.\n\nThe backup suffix is '~', unless set with --suffix. The version control method may be selected via the --backup option. CONTROL can be:\n\n none, off never make backups (even if --backup is given)\n numbered, t make numbered backups\n existing, nil numbered if numbered backups exist, simple otherwise\n simple, never always make simple backups\n\nThis is a example command line processor using PHP Recharg. Visit\nhttp://github.org/flaviovs/recharg for more information.\nETX\n );\n\n\n\t//\n\t// Parse the command line.\n\t//\n\t$p = new Recharg\\Parser($cmdline);\n\n\ttry {\n\t\t$res = $p->parse();\n\t} catch (Recharg\\ParserException $ex) {\n\t\t// Get current program name. This is set to the current program\n\t\t// automatically when we created the CommandLine without specifying a name\n\t\t// for it.\n\t\t$commands = $ex->getCommands();\n\t\t$progname = array_shift($commands);\n\n\t\t// Get the current command sequence.\n\t\t$commands = implode(' ', $commands);\n\n\t\t$prefix = $progname;\n\t\tif ($commands) {\n\t\t\t$prefix .= \" $commands\";\n\t\t}\n\n\t\t// FIXME - move this command building logic to the exception\n\n\t\t$hint = \"$progname --help\";\n\t\tif ($commands) {\n\t\t\t$hint .= \" $commands\";\n\t\t}\n\n\t\t// Display the error message.\n\t\tprint \"$prefix: \" . $ex->getMessage() . \"\\n\";\n\t\tprint \"Try \\\"$hint\\\"\\n\";\n\n\t\texit(1);\n\t}\n\n\t// Display help if \"--help\" was passed.\n\tif ($res['help']) {\n\t\tprint $cmdline->getHelp($res->getCommands()) . \"\\n\";\n\t\texit(0);\n\t}\n\n\t// Act on parser results.\n\tprint \"* Execute command: \" . implode(' ', $res->getCommands()) . \"\\n\";\n\tprint \"* Options:\\n\";\n\tprint_r($res->getArguments());\n\tprint \"* Operands:\\n\";\n\tprint_r($res->getOperands());\n}", "public function addOption($hOption)\n {\n $this->hOptionList[] = $hOption;\n }", "protected function addOption($option, $value)\n\t{\n\t\treturn add_option($option,$value);\n\t}", "protected function defineCommandOptions()\n {\n $this->addOption('all', 'A', InputOption::VALUE_NONE, \"List all defined globals settings\");\n\n $this->addArgument('key', InputArgument::OPTIONAL, \"Config param name\", null);\n $this->addArgument('value', InputArgument::OPTIONAL, \"If set, will set param [key] to this value\", null);\n\n }", "public function addOption( $option ) {\n\t\t$option->setCustomizeSection( $this->getMenuSlug() );\n\n\t\t$this->options[] = $option;\n\t}", "function tidy_getopt(tidy $object, $option) {}", "protected function addOption(TrackerCommandOption $option)\n\t{\n\t\t$this->options[] = $option;\n\n\t\treturn $this;\n\t}", "protected function defineCommandOptions(){}", "public function addOption($name, $value = null)\n {\n $this->options[$name] = $value;\n }", "public function createOption($name, $value)\n {\n $this->runWpCliCommand('option', 'add', [$name, $value]);\n }", "public function addOption($option, $value)\n {\n $this->transport->addOption($option, $value);\n }", "public function appendCommandArgument($arg)\n {\n $this->cmd->createArgument()->setValue($arg);\n }", "public function addOptions(Getopt $_options)\n {\n $_options->addOptions(\n [\n ['x', \"x\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the x-position of the glider on the board.\"],\n ['y', \"y\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the y-position of the glider on the board.\"]\n ]);\n }", "protected function createCommandLineOptions() {\n\t\ttry {\n\t\t\t$this->commandLineOptions = t3lib_div::makeInstance('tx_mnogosearch_clioptions');\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\techo $e->getMessage() . chr(10);\n\t\t\t$this->showUsageAndExit();\n\t\t}\n\t}", "private function createCommandLineOptions()\n {\n $options = $this->options;\n\n $cmdOptions = [];\n\n // Metadata (all, exif, icc, xmp or none (default))\n // Comma-separated list of existing metadata to copy from input to output\n $cmdOptions[] = '-metadata ' . $options['metadata'];\n\n // preset. Appears first in the list as recommended in the docs\n if (!is_null($options['preset'])) {\n if ($options['preset'] != 'none') {\n $cmdOptions[] = '-preset ' . $options['preset'];\n }\n }\n\n // Size\n $addedSizeOption = false;\n if (!is_null($options['size-in-percentage'])) {\n $sizeSource = filesize($this->source);\n if ($sizeSource !== false) {\n $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);\n $cmdOptions[] = '-size ' . $targetSize;\n $addedSizeOption = true;\n }\n }\n\n // quality\n if (!$addedSizeOption) {\n $cmdOptions[] = '-q ' . $this->getCalculatedQuality();\n }\n\n // alpha-quality\n if ($this->options['alpha-quality'] !== 100) {\n $cmdOptions[] = '-alpha_q ' . escapeshellarg($this->options['alpha-quality']);\n }\n\n // Losless PNG conversion\n if ($options['encoding'] == 'lossless') {\n // No need to add -lossless when near-lossless is used\n if ($options['near-lossless'] === 100) {\n $cmdOptions[] = '-lossless';\n }\n }\n\n // Near-lossles\n if ($options['near-lossless'] !== 100) {\n // We only let near_lossless have effect when encoding is set to \"lossless\"\n // otherwise encoding=auto would not work as expected\n if ($options['encoding'] == 'lossless') {\n $cmdOptions[] ='-near_lossless ' . $options['near-lossless'];\n }\n }\n\n if ($options['auto-filter'] === true) {\n $cmdOptions[] = '-af';\n }\n\n // Built-in method option\n $cmdOptions[] = '-m ' . strval($options['method']);\n\n // Built-in low memory option\n if ($options['low-memory']) {\n $cmdOptions[] = '-low_memory';\n }\n\n // command-line-options\n if ($options['command-line-options']) {\n array_push(\n $cmdOptions,\n ...self::escapeShellArgOnCommandLineOptions($options['command-line-options'])\n );\n }\n\n // Source file\n $cmdOptions[] = escapeshellarg($this->source);\n\n // Output\n $cmdOptions[] = '-o ' . escapeshellarg($this->destination);\n\n // Redirect stderr to same place as stdout\n // https://www.brianstorti.com/understanding-shell-script-idiom-redirect/\n $cmdOptions[] = '2>&1';\n\n $commandOptions = implode(' ', $cmdOptions);\n $this->logLn('command line options:' . $commandOptions);\n\n return $commandOptions;\n }", "public function addArg($name, $options = []) {\n $trimmed = trim($name);\n\n if (strlen($trimmed) > 0 && !strpos($trimmed, ' ')) {\n if (gettype($options) == 'array') {\n $this->commandArgs[$trimmed] = $this->_checkArgOptions($options);\n } else {\n $this->commandArgs[$trimmed] = [\n 'optional' => false,\n 'description' => '<NO DESCRIPTION>'\n ];\n }\n\n return true;\n }\n\n return false;\n }", "public function setOption(string $option, string $value): bool {}", "private function append_compiler_options ($command) {\n\t\t\n\t\t// System version macro\n\t\t$system_version = $this->osx_system_version();\n\t\t$command .= \"-dMAC_SYSTEM_VERSION:=$system_version \";\n\t\t\n\t\t// Debugging options\n\t\tif ($this->launch_mode == self::LAUNCH_MODE_DEBUG) {\n\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\n\t\t}\n\t\t\n\t\t// Platform specific options\n\t\tswitch ($this->target_loader->platform) {\n\t\t\tcase PLATFORM_IPHONE_DEVICE: {\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_DEVICE].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Cfvfpv2 \";\n\t\t\t\t\n\t\t\t\t// Add debugging options since we run the project by debugging\n\t\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PLATFORM_IPHONE_SIMULATOR: {\n\t\t\t\t// Add -XR for iPhone SDK\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_SIMULATOR].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Tiphonesim \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $command;\n\t}", "public function setOption($option)\n {\n if (!isset(static::$availableOptions[$option])) {\n throw new \\InvalidArgumentException(sprintf(\n 'Invalid option specified: \"%s\". Expected one of (%s)',\n $option,\n implode(', ', array_keys(static::$availableOptions))\n ));\n }\n\n if (!in_array(static::$availableOptions[$option], $this->options)) {\n $this->options[] = static::$availableOptions[$option];\n }\n }", "function add_site_option($option, $value)\n {\n }", "protected function configure()\n {\n $this\n ->setDescription('Print all indices of an app-id')\n ->addOption(\n 'app-id',\n 'a',\n InputOption::VALUE_OPTIONAL\n );\n }", "public function addOption($sTitle, $sValue = null)\n {\n if (is_null($sValue))\n {\n $sValue = $sTitle;\n }\n\n //We keep track of all additions, even if they happen *after* bInit == TRUE.\n $oOption = \\Limbonia\\Widget::factory('Option');\n $oOption->setParam('value', $sValue);\n $oOption->addText((string)$sTitle);\n $this->addTag($oOption);\n\n if ($this->bInit)\n {\n $this->writeJavascript(\"Limbonia_addOption('$this->sName', '$sTitle', '$sValue');\");\n }\n }", "public function setOption(string $name, $value);", "public function setOption(string $name, $value);", "protected function configure(): void\n {\n $this\n ->setDescription('This command triggers ZgwToVrijbrpService->zgwToVrijbrpHandler() for a birth e-dienst')\n ->setHelp('This command allows you to test mapping and sending a ZGW zaak to the Vrijbrp api /dossiers')\n ->addOption('zaak', 'z', InputOption::VALUE_REQUIRED, 'The zaak uuid we should test with')\n ->addOption('source', 's', InputOption::VALUE_OPTIONAL, 'The location of the Source we will send a request to, location of an existing Source object')\n ->addOption('location', 'l', InputOption::VALUE_OPTIONAL, 'The endpoint we will use on the Source to send a request, just a string')\n ->addOption('mapping', 'm', InputOption::VALUE_OPTIONAL, 'The reference of the mapping we will use before sending the data to the source')\n ->addOption('synchronizationEntity', 'se', InputOption::VALUE_OPTIONAL, 'The reference of the entity we need to create a synchronization object');\n }", "protected function loadCommand()\r {\r $this->addCommandLine( 'lsb_release -a');\r\r }", "protected function setOptions() {\n\t\t$this->_options->setHelpText(\"This tool provides a mechanism to run recurring workflow tasks.\");\n\n\t\t$text = \"This option triggers the execution of all known workflows.\\n\";\n\t\t$text.= \"You may filter the execution using option '--workflow'.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_RUN, array('--run', '-r'), Option::TYPE_NO_VALUE, $text, 'value'));\n\n\t\t$text = \"This options provides a way to filter a specific workflow.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_WORKFLOW, array('--workflow', '-w'), Option::TYPE_VALUE, $text, 'value'));\n\t}", "public function addOption($attribute, $data)\r\n {\r\n Mage::helper('api')->toArray($data);\r\n return parent::addOption($attribute, $data);\r\n }", "private function addLongOption($name, $value)\n {\n $this->options[$name] = $value;\n }", "public function addOption($value, $text)\n\t{\n\t\tif (!is_scalar($value)) {\n\t\t\tthrow new DataGridColumnStatusException('Option value has to be scalar');\n\t\t}\n\n\t\t$option = new Option($this, $value, $text);\n\n\t\t$this->options[] = $option;\n\n\t\treturn $option;\n\t}", "public function set_option( string $option ) : void {\t\n\t\tself::$api_option = $option;\n\t}", "protected function registerOption($group, $option, $args = [])\n\t{\n\t\tregister_setting($group,$option,$args);\n\t}", "protected function addEmOption() {\r\n\t\t$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'Name of a entity manager in application config (Helpful if using multiple connections with \"orm.ems.options\")', DoctrineMigrationsServiceProvider::DEFAULT_ENTITY_MANAGER_NAME);\r\n\t}", "public static function register_option() {\n\t\tWPSEO_Options::register_option( static::get_instance() );\n\t}", "public function main()\n {\n $this->out($this->OptionParser->help());\n }", "public function add_option($name, $value)\n {\n if ('' == trim($name)) {\n return false;\n }\n\n $this->options[ $name ] = $value;\n\n return true;\n }", "public function register_option($option){\r\n\t\tif(!is_array($option))\r\n\t\t\t$option = array($option=>'');\r\n\t\t$this->registered_option = array_merge($this->registered_option, $option);\r\n\t}", "protected function configure()\n {\n $this->setName('merge:benchmark');\n $this->addOption('output-file', 'o', InputOption::VALUE_REQUIRED, 'Output file name for merged benchmark');\n $this->addOption('ignore-sample', 'i', InputOption::VALUE_NONE, 'Ignores sample size');\n $this->addArgument('path', InputArgument::IS_ARRAY|InputArgument::REQUIRED, 'File or directory path with benchmarks');\n }", "protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('format', '%isd% %mobile%');\n }", "protected function setCliArguments() {}", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "public function cli()\n {\n _APP_=='varimax' && $this->registerConsoleCommand();\n }", "public function addConfigOption($option)\n {\n $this->config['options'][] = $option;\n }", "protected function configure()\n {\n $this->setName('console')\n ->setDescription('Finds path to breweries for collecting unique beers for my party.')\n ->addOption('lat', null, InputOption::VALUE_REQUIRED, 'Start point latitude value')\n ->addOption('lon', null, InputOption::VALUE_REQUIRED, 'Start point longitude value')\n ->addOption('distance', null, InputOption::VALUE_REQUIRED, 'Distance limit to travel', 2000)\n ->addOption(\n 'bruteforce',\n null,\n InputOption::VALUE_NONE,\n 'Try to find best path with max beers (takes lot of time)'\n )\n ->setHelp(<<<EOT\nThis application tries to find best path to travel between several breweries and collect beers and return to home.\nThis looks like traveling salesman problem solver with limitations. It must travel not more than defined maximum\ndistance (with return to home).\n\nUser must define latitude and longitude of start point via parameters --lat and --lon\nLocation point parameters accepts several formats (use quotes to define as a parameter value):\n* 51.1548597\n* 40.23°\n* -5.234°\n* 56.242 E\n* 40° 26.222'\n* 65° 32.22' S\n* +40:26:46\n* 40:26:46 S\n\nDistance parameter defines limit of total travel distance with return to home. Must be non negative numeric value.\n\nIf You have time - You can try bruteforce option. This option generates all possible routes (with respect to max\ndistance) and calculates number of beers could be collected. Maximum number of beers returns best route.\n\nExample usage:\n bin/console --lat=54.6858453 --lon=25.2865201\nEOT\n );\n }", "private function configureDaemonDefinition(): void\n {\n $this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once.');\n $this->addOption('run-max', null, InputOption::VALUE_OPTIONAL, 'Run the command x time.');\n $this->addOption('memory-max', null, InputOption::VALUE_OPTIONAL, 'Gracefully stop running command when given memory volume, in bytes, is reached.', 0);\n $this->addOption('shutdown-on-exception', null, InputOption::VALUE_NONE, 'Ask for shutdown if an exception is thrown.');\n $this->addOption('show-exceptions', null, InputOption::VALUE_NONE, 'Display exception on command output.');\n }", "protected function configure()\n {\n $this\n ->setDescription('Produce messages from console.')\n ->addArgument('message', InputArgument::REQUIRED, 'The message')\n ->addOption('--repeat', '-r', InputOption::VALUE_REQUIRED, 'How many times the message must be published. Useful for testing.')\n ->addOption('--base64', '-b', InputOption::VALUE_REQUIRED, 'Set value to \"1\" if the message is base64 encoded.')\n ;\n }", "function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}", "protected function configure(): void\n {\n $this->setName('abc:check-cars')\n ->setDescription('Check all cars')\n ->addArgument('format', InputArgument::OPTIONAL, 'Progress format')\n ->addOption('option', null, InputOption::VALUE_NONE, 'Option description');\n }", "public function addOption($label, $value=\"\"){\n\t\t$option = new Element(\"option\");\n\t\t$value = (empty($value)) ? $label : $value;\n\t\t$option->setAttribute(\"value\", $value);\n\t\t$option->setInnerText($label);\n\t\t$this->options[] = $option;\n\t}", "protected function configure()\n {\n $this\n ->setName('generate')\n ->setDescription('Generate Licenses file from project dependencies.')\n ->addOption('hide-version', 'hv', InputOption::VALUE_NONE, 'Hide dependency version')\n ->addOption('csv', null, InputOption::VALUE_NONE, 'Output csv format');\n }", "protected function configure()\n {\n $this\n ->setDescription('Imports a mock csv data and calculates the the sum of all the documents')\n ->addArgument('file_path',InputArgument::REQUIRED, 'path to csv file') //{src/Data/data.csv}\n ->addArgument('currencies', InputArgument::REQUIRED, 'currencies')\n ->addArgument('output_currency',InputArgument::REQUIRED, 'output currency')\n ->addOption('vat', null,InputOption::VALUE_OPTIONAL, 'Option description')\n ;\n }", "protected function useOption(string $option, bool $switch): string\n {\n return ($switch ? ' ' . $option : '');\n }", "#[CLI\\Command(name: 'improved:options', aliases: ['c'])]\n #[CLI\\Argument(name: 'a1', description: 'an arg')]\n #[CLI\\Argument(name: 'a2', description: 'another arg')]\n #[CLI\\Option(name: 'o1', description: 'an option')]\n #[CLI\\Option(name: 'o2', description: 'another option')]\n #[CLI\\Usage(name: 'a b --o1=x --o2=y', description: 'Print some example values')]\n public function improvedOptions($a1, $a2, $o1 = 'one', $o2 = 'two')\n {\n return \"args are $a1 and $a2, and options are \" . var_export($o1, true) . ' and ' . var_export($o2, true);\n }", "public function add_argument ($key, $value)\n {\n $this->_args [$key] = $value;\n }", "public function insertOption($data);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function addOptions(...$options)\n {\n foreach ($options as $option) {\n $this->addOption($option);\n }\n }", "function update_option($option, $value, $autoload = \\null)\n {\n }", "protected function configure()\n {\n $this\n ->addOption('site', null, InputOption::VALUE_REQUIRED, 'Site ID')\n ->addOption('process', null, InputOption::VALUE_REQUIRED, 'Process ID', uniqid())\n ;\n }", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "function add_blog_option($id, $option, $value)\n {\n }", "public function add_cli_command() {\n\t\tif ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::add_command( 'queue', '\\WP_Queue\\Command' );\n\t}", "public function setOption($option, $value);", "public function setOption($name, $value = null);", "function hello_world_install() {\nadd_option(\"ernaehrungsnews_anzahl\", '3', '', 'yes');\nadd_option(\"ernaehrungsnews_trimmer\", '100', '', 'yes');\nadd_option(\"ernaehrungsnews_kategorieId\", '3', '', 'yes');\n\n\n\n}", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option)\n\t{\n\t\t$question->addOption($option);\n\t\t$this->update($question);//this will throw an exception if it does not exist in our array\n\t}", "function AddArgument($key, $value)\r\n\t{\r\n\t\t$this->Argument[$key]=$value;\r\n\t}", "protected function configure()\n {\n $this->setDescription('Scan for legacy error middleware or error middleware invocation.');\n $this->setHelp(self::HELP);\n $this->addOption('dir', 'd', InputOption::VALUE_REQUIRED, self::HELP_OPT_DIR);\n }", "private function o(string $option): string\n {\n return '<bold:bgLightYellow>' . $option . '</bold:bgLightYellow>';\n }", "protected function configure()\n {\n $this\n ->setName('check')\n ->setDescription('Check current for build or runtime')\n //->addOption('path', null, InputOption::VALUE_REQUIRED, 'Install on specific path', getcwd())\n ;\n }", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "protected function configure(): void\n {\n $this->setDescription('Generates the code for a project')\n ->addOption('project', 'p', InputOption::VALUE_REQUIRED, 'The path to the project definition file.', __DIR__ . '/project.json')\n ->addOption('template', 't', InputOption::VALUE_REQUIRED, 'The path to the template to use for code generation.', dirname(__DIR__) . '/templates/joomla35classic')\n ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'The path to the output directory for the generated code.', dirname(__DIR__, 2) . '/generated')\n ;\n }", "public function setOption($key, $value);", "public static function add($key, $type, $human, $default){\n\t\treturn System::addOption($key, $type, $human, $default);\n\t}", "public function addGuide($option = array())\n {\n $this->epub->addGuide($option);\n }", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option) {\n $questionObj = $this->find($question->getId());\n $questionObj->addOption($option);\n\t}", "function add_allowed_options($new_options, $options = '')\n {\n }", "protected function configure()\n {\n $this->addOption(\n 'v|version', '-s',\n 'The version of the template that is to be installed; optional if '\n .'project is installed with PEAR'\n );\n }", "protected function addTestOptions()\n {\n foreach (['test' => 'PHPUnit', 'pest' => 'Pest'] as $option => $name) {\n $this->getDefinition()->addOption(new InputOption(\n $option,\n null,\n InputOption::VALUE_NONE,\n \"Generate an accompanying {$name} test for the {$this->type}\"\n ));\n }\n }", "protected function getDefaultOptions()\n {\n // Option to run command once\n $this->addOption(\n 'run-once',\n null,\n InputOption::VALUE_NONE,\n 'Run the command just once, do not go into an endless loop'\n );\n\n //Option to print memory usage\n $this->addOption(\n 'detect-leaks',\n null,\n InputOption::VALUE_NONE,\n 'Output information about memory usage'\n );\n\n //Option to create pid file\n $this->addOption(\n 'pidfile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The location of the PID file that should be created for this process',\n null\n );\n\n //Option to set interval for command\n $this->addOption(\n 'interval',\n null,\n InputOption::VALUE_REQUIRED,\n 'Interval to run',\n null\n );\n }", "function add_network_option($network_id, $option, $value)\n {\n }", "public function setDefaultOption(string $name, $value = true): CommandExecutorInterface;", "public function set_option($option, $value) {\n $this->options[$option] = $value;\n \n }" ]
[ "0.70175916", "0.6983609", "0.6949047", "0.68163276", "0.6787973", "0.6573456", "0.65504974", "0.65468806", "0.6324418", "0.6293724", "0.62850595", "0.62624854", "0.6250904", "0.61706716", "0.6113512", "0.60732675", "0.6019406", "0.5988806", "0.59799385", "0.5942778", "0.5880332", "0.58585054", "0.5846865", "0.57971185", "0.57843786", "0.5769758", "0.5764285", "0.57637316", "0.5760441", "0.5727272", "0.5726846", "0.5657578", "0.56394744", "0.5631571", "0.5604765", "0.55982786", "0.558052", "0.5580074", "0.5580074", "0.555866", "0.5547719", "0.5534043", "0.55284196", "0.5513657", "0.5507125", "0.5494232", "0.5493967", "0.5485185", "0.54645836", "0.544963", "0.5446444", "0.5437363", "0.5427425", "0.5420167", "0.54150534", "0.5413763", "0.5394699", "0.539458", "0.53789634", "0.5378603", "0.5373823", "0.5364346", "0.53554416", "0.53550965", "0.53489614", "0.5341461", "0.5339343", "0.53282714", "0.53256494", "0.52980125", "0.52974075", "0.52974075", "0.52974075", "0.52974075", "0.52927864", "0.5286151", "0.52822506", "0.52761674", "0.52635866", "0.5260319", "0.5257001", "0.52560604", "0.52557725", "0.52493954", "0.52487475", "0.5244076", "0.5239107", "0.5235473", "0.52304417", "0.52257776", "0.52067554", "0.5203249", "0.5200584", "0.51961184", "0.51950073", "0.5194221", "0.5183879", "0.5178929", "0.5175521", "0.51753545", "0.5169033" ]
0.0
-1
Add the option to the command line.
public function summary() { $this->arguments[] = '--summary'; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_option($option, $args = array())\n {\n }", "function add_screen_option($option, $args = array())\n {\n }", "function addOptions(GetOpt $_options)\n {\n $_options->addOptions(array(\n array(null, \"cmd\", GetOpt::NO_ARGUMENT, \"ConsoleOutput - Wenn die Ausgabe per CMD Fenster oder Terminal erfolgt.\\n\")\n ));\n }", "public function addOption(string $_option)\n {\n $this->options[] = $_option;\n }", "function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')\n {\n }", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "public function add_option() {\n\t\tadd_option(\n\t\t\t$this->header_text_option, // The header text option\n\t\t\t$this->default_header_text // The default header text\n\t\t);\n\t}", "public function option(string $option);", "final protected function addOption($option) {\n $this->selectedOptions[$option] = 1;\n }", "public function addOptions(Getopt $_options)\n {\n\n }", "public function addOption($option, $value = '')\n {\n $option = (string) $option;\n $this->_options[$option] = $value;\n }", "protected function appendOptions(): void\n {\n $this->signature .= '\n {--force : Force the worker to run even in maintenance mode}\n {--memory=128 : The memory limit in megabytes}\n {--sleep=0 : Number of seconds to sleep at each iteration in a loop}\n {--timeout=60 : The number of seconds a child process can run}\n ';\n }", "abstract public function addOptions(Getopt $_options);", "public function addOption()\n {\n try {\n $this->validate();\n DB::beginTransaction();\n if ($this->option !== \"\") {\n $this->assessment->options()->create([\n 'option' => $this->option,\n ]);\n }\n $this->option = \"\";\n } catch (\\Throwable $th) {\n DB::rollback();\n session()->flash('error', $th->getMessage());\n }\n DB::commit();\n $this->emitSelf('render');\n }", "public function\r\n add_option(HTMLTags_Option $option)\r\n {\r\n $attribute = $option->get_attribute('value');\r\n \r\n /*\r\n * What's this line for?\r\n */\r\n $attribute->get_value();\r\n \r\n $this->options[$attribute->get_value()] = $option;\r\n }", "function main() {\n\t$cmdline = new Recharg\\CommandLine();\n\n\t$progname = $GLOBALS['argv'][0];\n\n\t$cmdline->setUsage(<<<ETX\n$progname [OPTION]... [-T] SOURCE DEST\n or: $progname [OPTION]... SOURCE... DIRECTORY\n or: $progname [OPTION]... -t DIRECTORY SOURCE...\nETX\n );\n\n\t// Add description text, displayed above the option list.\n\t$cmdline\n\t\t->setDescription('Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.');\n\n\t$opt = new Recharg\\Option('help');\n\t$opt->setHelp('display this help and exit');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('version');\n\t$opt->setHelp('output version information and exit');\n\t$cmdline->addOption($opt);\n\n\t// Note: if no matches are provided, Recharg will assume \"--name\" for a\n\t// an option named \"name\".\n\t$opt = new Recharg\\Option('backup');\n\t$opt\n\t\t->setDefault('existing')\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('CONTROL')\n\t\t->setHelp('make a backup of each existing destination file');\n\t$cmdline->addOption($opt);\n\n\t// If a name consisting of a single character is passed, the option is\n\t// actually created with name \"opt_X\" (where \"X\" is the character\n\t// passed), and a single option \"X\"). In other words:\n\t//\n\t// new Option('a')\n\t//\n\t// is equivalent to\n\t//\n\t// new Option('opt_a', ['a']);\n\t$opt = new Recharg\\Option('b');\n\t$opt\n\t\t->setHelp('like --backup but does not accept an argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('force', ['f', 'force']);\n\t$opt\n\t\t->setHelp('do not prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('interactive', ['i', 'interactive']);\n\t$opt\n\t\t->setHelp('prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-clobber', ['n', 'no-clobber']);\n\t$opt\n\t\t->setHelp('do not overwrite an existing file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('strip-trailing-slashes');\n\t$opt\n\t\t->setHelp('remove any trailing slashes from each SOURCE argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('suffix');\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setHelp('override the usual backup suffix');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('target-directory', ['t', 'target-directory']);\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('DIRECTORY')\n\t\t->setHelp('move all SOURCE arguments into DIRECTORY');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-target-directory',\n\t ['T', 'no-target-directory']);\n\t$opt\n\t\t->setHelp('treat DEST as a normal file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('update', ['u', 'update']);\n\t$opt\n\t\t->setHelp('move only when the SOURCE file is newer than the destination file or when the destination file is missing');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('verbose', ['v', 'verbose']);\n\t$opt\n\t\t->setHelp('explain what is being done');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('context', ['Z', 'context']);\n\t$opt\n\t\t->setHelp('set SELinux security context of destination file to default type');\n\t$cmdline->addOption($opt);\n\n\n\t$cmdline->setFooter(<<<ETX\nIf you specify more than one of -i, -f, -n, only the final one takes effect.\n\nThe backup suffix is '~', unless set with --suffix. The version control method may be selected via the --backup option. CONTROL can be:\n\n none, off never make backups (even if --backup is given)\n numbered, t make numbered backups\n existing, nil numbered if numbered backups exist, simple otherwise\n simple, never always make simple backups\n\nThis is a example command line processor using PHP Recharg. Visit\nhttp://github.org/flaviovs/recharg for more information.\nETX\n );\n\n\n\t//\n\t// Parse the command line.\n\t//\n\t$p = new Recharg\\Parser($cmdline);\n\n\ttry {\n\t\t$res = $p->parse();\n\t} catch (Recharg\\ParserException $ex) {\n\t\t// Get current program name. This is set to the current program\n\t\t// automatically when we created the CommandLine without specifying a name\n\t\t// for it.\n\t\t$commands = $ex->getCommands();\n\t\t$progname = array_shift($commands);\n\n\t\t// Get the current command sequence.\n\t\t$commands = implode(' ', $commands);\n\n\t\t$prefix = $progname;\n\t\tif ($commands) {\n\t\t\t$prefix .= \" $commands\";\n\t\t}\n\n\t\t// FIXME - move this command building logic to the exception\n\n\t\t$hint = \"$progname --help\";\n\t\tif ($commands) {\n\t\t\t$hint .= \" $commands\";\n\t\t}\n\n\t\t// Display the error message.\n\t\tprint \"$prefix: \" . $ex->getMessage() . \"\\n\";\n\t\tprint \"Try \\\"$hint\\\"\\n\";\n\n\t\texit(1);\n\t}\n\n\t// Display help if \"--help\" was passed.\n\tif ($res['help']) {\n\t\tprint $cmdline->getHelp($res->getCommands()) . \"\\n\";\n\t\texit(0);\n\t}\n\n\t// Act on parser results.\n\tprint \"* Execute command: \" . implode(' ', $res->getCommands()) . \"\\n\";\n\tprint \"* Options:\\n\";\n\tprint_r($res->getArguments());\n\tprint \"* Operands:\\n\";\n\tprint_r($res->getOperands());\n}", "public function addOption($hOption)\n {\n $this->hOptionList[] = $hOption;\n }", "protected function addOption($option, $value)\n\t{\n\t\treturn add_option($option,$value);\n\t}", "protected function defineCommandOptions()\n {\n $this->addOption('all', 'A', InputOption::VALUE_NONE, \"List all defined globals settings\");\n\n $this->addArgument('key', InputArgument::OPTIONAL, \"Config param name\", null);\n $this->addArgument('value', InputArgument::OPTIONAL, \"If set, will set param [key] to this value\", null);\n\n }", "public function addOption( $option ) {\n\t\t$option->setCustomizeSection( $this->getMenuSlug() );\n\n\t\t$this->options[] = $option;\n\t}", "function tidy_getopt(tidy $object, $option) {}", "protected function addOption(TrackerCommandOption $option)\n\t{\n\t\t$this->options[] = $option;\n\n\t\treturn $this;\n\t}", "protected function defineCommandOptions(){}", "public function addOption($name, $value = null)\n {\n $this->options[$name] = $value;\n }", "public function createOption($name, $value)\n {\n $this->runWpCliCommand('option', 'add', [$name, $value]);\n }", "public function addOption($option, $value)\n {\n $this->transport->addOption($option, $value);\n }", "public function appendCommandArgument($arg)\n {\n $this->cmd->createArgument()->setValue($arg);\n }", "public function addOptions(Getopt $_options)\n {\n $_options->addOptions(\n [\n ['x', \"x\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the x-position of the glider on the board.\"],\n ['y', \"y\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the y-position of the glider on the board.\"]\n ]);\n }", "protected function createCommandLineOptions() {\n\t\ttry {\n\t\t\t$this->commandLineOptions = t3lib_div::makeInstance('tx_mnogosearch_clioptions');\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\techo $e->getMessage() . chr(10);\n\t\t\t$this->showUsageAndExit();\n\t\t}\n\t}", "public function addArg($name, $options = []) {\n $trimmed = trim($name);\n\n if (strlen($trimmed) > 0 && !strpos($trimmed, ' ')) {\n if (gettype($options) == 'array') {\n $this->commandArgs[$trimmed] = $this->_checkArgOptions($options);\n } else {\n $this->commandArgs[$trimmed] = [\n 'optional' => false,\n 'description' => '<NO DESCRIPTION>'\n ];\n }\n\n return true;\n }\n\n return false;\n }", "private function createCommandLineOptions()\n {\n $options = $this->options;\n\n $cmdOptions = [];\n\n // Metadata (all, exif, icc, xmp or none (default))\n // Comma-separated list of existing metadata to copy from input to output\n $cmdOptions[] = '-metadata ' . $options['metadata'];\n\n // preset. Appears first in the list as recommended in the docs\n if (!is_null($options['preset'])) {\n if ($options['preset'] != 'none') {\n $cmdOptions[] = '-preset ' . $options['preset'];\n }\n }\n\n // Size\n $addedSizeOption = false;\n if (!is_null($options['size-in-percentage'])) {\n $sizeSource = filesize($this->source);\n if ($sizeSource !== false) {\n $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);\n $cmdOptions[] = '-size ' . $targetSize;\n $addedSizeOption = true;\n }\n }\n\n // quality\n if (!$addedSizeOption) {\n $cmdOptions[] = '-q ' . $this->getCalculatedQuality();\n }\n\n // alpha-quality\n if ($this->options['alpha-quality'] !== 100) {\n $cmdOptions[] = '-alpha_q ' . escapeshellarg($this->options['alpha-quality']);\n }\n\n // Losless PNG conversion\n if ($options['encoding'] == 'lossless') {\n // No need to add -lossless when near-lossless is used\n if ($options['near-lossless'] === 100) {\n $cmdOptions[] = '-lossless';\n }\n }\n\n // Near-lossles\n if ($options['near-lossless'] !== 100) {\n // We only let near_lossless have effect when encoding is set to \"lossless\"\n // otherwise encoding=auto would not work as expected\n if ($options['encoding'] == 'lossless') {\n $cmdOptions[] ='-near_lossless ' . $options['near-lossless'];\n }\n }\n\n if ($options['auto-filter'] === true) {\n $cmdOptions[] = '-af';\n }\n\n // Built-in method option\n $cmdOptions[] = '-m ' . strval($options['method']);\n\n // Built-in low memory option\n if ($options['low-memory']) {\n $cmdOptions[] = '-low_memory';\n }\n\n // command-line-options\n if ($options['command-line-options']) {\n array_push(\n $cmdOptions,\n ...self::escapeShellArgOnCommandLineOptions($options['command-line-options'])\n );\n }\n\n // Source file\n $cmdOptions[] = escapeshellarg($this->source);\n\n // Output\n $cmdOptions[] = '-o ' . escapeshellarg($this->destination);\n\n // Redirect stderr to same place as stdout\n // https://www.brianstorti.com/understanding-shell-script-idiom-redirect/\n $cmdOptions[] = '2>&1';\n\n $commandOptions = implode(' ', $cmdOptions);\n $this->logLn('command line options:' . $commandOptions);\n\n return $commandOptions;\n }", "public function setOption(string $option, string $value): bool {}", "private function append_compiler_options ($command) {\n\t\t\n\t\t// System version macro\n\t\t$system_version = $this->osx_system_version();\n\t\t$command .= \"-dMAC_SYSTEM_VERSION:=$system_version \";\n\t\t\n\t\t// Debugging options\n\t\tif ($this->launch_mode == self::LAUNCH_MODE_DEBUG) {\n\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\n\t\t}\n\t\t\n\t\t// Platform specific options\n\t\tswitch ($this->target_loader->platform) {\n\t\t\tcase PLATFORM_IPHONE_DEVICE: {\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_DEVICE].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Cfvfpv2 \";\n\t\t\t\t\n\t\t\t\t// Add debugging options since we run the project by debugging\n\t\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PLATFORM_IPHONE_SIMULATOR: {\n\t\t\t\t// Add -XR for iPhone SDK\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_SIMULATOR].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Tiphonesim \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $command;\n\t}", "public function setOption($option)\n {\n if (!isset(static::$availableOptions[$option])) {\n throw new \\InvalidArgumentException(sprintf(\n 'Invalid option specified: \"%s\". Expected one of (%s)',\n $option,\n implode(', ', array_keys(static::$availableOptions))\n ));\n }\n\n if (!in_array(static::$availableOptions[$option], $this->options)) {\n $this->options[] = static::$availableOptions[$option];\n }\n }", "function add_site_option($option, $value)\n {\n }", "protected function configure()\n {\n $this\n ->setDescription('Print all indices of an app-id')\n ->addOption(\n 'app-id',\n 'a',\n InputOption::VALUE_OPTIONAL\n );\n }", "public function addOption($sTitle, $sValue = null)\n {\n if (is_null($sValue))\n {\n $sValue = $sTitle;\n }\n\n //We keep track of all additions, even if they happen *after* bInit == TRUE.\n $oOption = \\Limbonia\\Widget::factory('Option');\n $oOption->setParam('value', $sValue);\n $oOption->addText((string)$sTitle);\n $this->addTag($oOption);\n\n if ($this->bInit)\n {\n $this->writeJavascript(\"Limbonia_addOption('$this->sName', '$sTitle', '$sValue');\");\n }\n }", "public function setOption(string $name, $value);", "public function setOption(string $name, $value);", "protected function configure(): void\n {\n $this\n ->setDescription('This command triggers ZgwToVrijbrpService->zgwToVrijbrpHandler() for a birth e-dienst')\n ->setHelp('This command allows you to test mapping and sending a ZGW zaak to the Vrijbrp api /dossiers')\n ->addOption('zaak', 'z', InputOption::VALUE_REQUIRED, 'The zaak uuid we should test with')\n ->addOption('source', 's', InputOption::VALUE_OPTIONAL, 'The location of the Source we will send a request to, location of an existing Source object')\n ->addOption('location', 'l', InputOption::VALUE_OPTIONAL, 'The endpoint we will use on the Source to send a request, just a string')\n ->addOption('mapping', 'm', InputOption::VALUE_OPTIONAL, 'The reference of the mapping we will use before sending the data to the source')\n ->addOption('synchronizationEntity', 'se', InputOption::VALUE_OPTIONAL, 'The reference of the entity we need to create a synchronization object');\n }", "protected function loadCommand()\r {\r $this->addCommandLine( 'lsb_release -a');\r\r }", "protected function setOptions() {\n\t\t$this->_options->setHelpText(\"This tool provides a mechanism to run recurring workflow tasks.\");\n\n\t\t$text = \"This option triggers the execution of all known workflows.\\n\";\n\t\t$text.= \"You may filter the execution using option '--workflow'.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_RUN, array('--run', '-r'), Option::TYPE_NO_VALUE, $text, 'value'));\n\n\t\t$text = \"This options provides a way to filter a specific workflow.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_WORKFLOW, array('--workflow', '-w'), Option::TYPE_VALUE, $text, 'value'));\n\t}", "public function addOption($attribute, $data)\r\n {\r\n Mage::helper('api')->toArray($data);\r\n return parent::addOption($attribute, $data);\r\n }", "private function addLongOption($name, $value)\n {\n $this->options[$name] = $value;\n }", "public function addOption($value, $text)\n\t{\n\t\tif (!is_scalar($value)) {\n\t\t\tthrow new DataGridColumnStatusException('Option value has to be scalar');\n\t\t}\n\n\t\t$option = new Option($this, $value, $text);\n\n\t\t$this->options[] = $option;\n\n\t\treturn $option;\n\t}", "protected function registerOption($group, $option, $args = [])\n\t{\n\t\tregister_setting($group,$option,$args);\n\t}", "public function set_option( string $option ) : void {\t\n\t\tself::$api_option = $option;\n\t}", "protected function addEmOption() {\r\n\t\t$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'Name of a entity manager in application config (Helpful if using multiple connections with \"orm.ems.options\")', DoctrineMigrationsServiceProvider::DEFAULT_ENTITY_MANAGER_NAME);\r\n\t}", "public static function register_option() {\n\t\tWPSEO_Options::register_option( static::get_instance() );\n\t}", "public function add_option($name, $value)\n {\n if ('' == trim($name)) {\n return false;\n }\n\n $this->options[ $name ] = $value;\n\n return true;\n }", "public function main()\n {\n $this->out($this->OptionParser->help());\n }", "public function register_option($option){\r\n\t\tif(!is_array($option))\r\n\t\t\t$option = array($option=>'');\r\n\t\t$this->registered_option = array_merge($this->registered_option, $option);\r\n\t}", "protected function configure()\n {\n $this->setName('merge:benchmark');\n $this->addOption('output-file', 'o', InputOption::VALUE_REQUIRED, 'Output file name for merged benchmark');\n $this->addOption('ignore-sample', 'i', InputOption::VALUE_NONE, 'Ignores sample size');\n $this->addArgument('path', InputArgument::IS_ARRAY|InputArgument::REQUIRED, 'File or directory path with benchmarks');\n }", "protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('format', '%isd% %mobile%');\n }", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "protected function setCliArguments() {}", "public function addConfigOption($option)\n {\n $this->config['options'][] = $option;\n }", "public function cli()\n {\n _APP_=='varimax' && $this->registerConsoleCommand();\n }", "private function configureDaemonDefinition(): void\n {\n $this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once.');\n $this->addOption('run-max', null, InputOption::VALUE_OPTIONAL, 'Run the command x time.');\n $this->addOption('memory-max', null, InputOption::VALUE_OPTIONAL, 'Gracefully stop running command when given memory volume, in bytes, is reached.', 0);\n $this->addOption('shutdown-on-exception', null, InputOption::VALUE_NONE, 'Ask for shutdown if an exception is thrown.');\n $this->addOption('show-exceptions', null, InputOption::VALUE_NONE, 'Display exception on command output.');\n }", "protected function configure()\n {\n $this->setName('console')\n ->setDescription('Finds path to breweries for collecting unique beers for my party.')\n ->addOption('lat', null, InputOption::VALUE_REQUIRED, 'Start point latitude value')\n ->addOption('lon', null, InputOption::VALUE_REQUIRED, 'Start point longitude value')\n ->addOption('distance', null, InputOption::VALUE_REQUIRED, 'Distance limit to travel', 2000)\n ->addOption(\n 'bruteforce',\n null,\n InputOption::VALUE_NONE,\n 'Try to find best path with max beers (takes lot of time)'\n )\n ->setHelp(<<<EOT\nThis application tries to find best path to travel between several breweries and collect beers and return to home.\nThis looks like traveling salesman problem solver with limitations. It must travel not more than defined maximum\ndistance (with return to home).\n\nUser must define latitude and longitude of start point via parameters --lat and --lon\nLocation point parameters accepts several formats (use quotes to define as a parameter value):\n* 51.1548597\n* 40.23°\n* -5.234°\n* 56.242 E\n* 40° 26.222'\n* 65° 32.22' S\n* +40:26:46\n* 40:26:46 S\n\nDistance parameter defines limit of total travel distance with return to home. Must be non negative numeric value.\n\nIf You have time - You can try bruteforce option. This option generates all possible routes (with respect to max\ndistance) and calculates number of beers could be collected. Maximum number of beers returns best route.\n\nExample usage:\n bin/console --lat=54.6858453 --lon=25.2865201\nEOT\n );\n }", "protected function configure()\n {\n $this\n ->setDescription('Produce messages from console.')\n ->addArgument('message', InputArgument::REQUIRED, 'The message')\n ->addOption('--repeat', '-r', InputOption::VALUE_REQUIRED, 'How many times the message must be published. Useful for testing.')\n ->addOption('--base64', '-b', InputOption::VALUE_REQUIRED, 'Set value to \"1\" if the message is base64 encoded.')\n ;\n }", "function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}", "public function addOption($label, $value=\"\"){\n\t\t$option = new Element(\"option\");\n\t\t$value = (empty($value)) ? $label : $value;\n\t\t$option->setAttribute(\"value\", $value);\n\t\t$option->setInnerText($label);\n\t\t$this->options[] = $option;\n\t}", "protected function configure(): void\n {\n $this->setName('abc:check-cars')\n ->setDescription('Check all cars')\n ->addArgument('format', InputArgument::OPTIONAL, 'Progress format')\n ->addOption('option', null, InputOption::VALUE_NONE, 'Option description');\n }", "protected function configure()\n {\n $this\n ->setName('generate')\n ->setDescription('Generate Licenses file from project dependencies.')\n ->addOption('hide-version', 'hv', InputOption::VALUE_NONE, 'Hide dependency version')\n ->addOption('csv', null, InputOption::VALUE_NONE, 'Output csv format');\n }", "protected function configure()\n {\n $this\n ->setDescription('Imports a mock csv data and calculates the the sum of all the documents')\n ->addArgument('file_path',InputArgument::REQUIRED, 'path to csv file') //{src/Data/data.csv}\n ->addArgument('currencies', InputArgument::REQUIRED, 'currencies')\n ->addArgument('output_currency',InputArgument::REQUIRED, 'output currency')\n ->addOption('vat', null,InputOption::VALUE_OPTIONAL, 'Option description')\n ;\n }", "protected function useOption(string $option, bool $switch): string\n {\n return ($switch ? ' ' . $option : '');\n }", "#[CLI\\Command(name: 'improved:options', aliases: ['c'])]\n #[CLI\\Argument(name: 'a1', description: 'an arg')]\n #[CLI\\Argument(name: 'a2', description: 'another arg')]\n #[CLI\\Option(name: 'o1', description: 'an option')]\n #[CLI\\Option(name: 'o2', description: 'another option')]\n #[CLI\\Usage(name: 'a b --o1=x --o2=y', description: 'Print some example values')]\n public function improvedOptions($a1, $a2, $o1 = 'one', $o2 = 'two')\n {\n return \"args are $a1 and $a2, and options are \" . var_export($o1, true) . ' and ' . var_export($o2, true);\n }", "public function add_argument ($key, $value)\n {\n $this->_args [$key] = $value;\n }", "public function insertOption($data);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function addOptions(...$options)\n {\n foreach ($options as $option) {\n $this->addOption($option);\n }\n }", "function update_option($option, $value, $autoload = \\null)\n {\n }", "protected function configure()\n {\n $this\n ->addOption('site', null, InputOption::VALUE_REQUIRED, 'Site ID')\n ->addOption('process', null, InputOption::VALUE_REQUIRED, 'Process ID', uniqid())\n ;\n }", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "function add_blog_option($id, $option, $value)\n {\n }", "public function add_cli_command() {\n\t\tif ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::add_command( 'queue', '\\WP_Queue\\Command' );\n\t}", "public function setOption($option, $value);", "public function setOption($name, $value = null);", "function hello_world_install() {\nadd_option(\"ernaehrungsnews_anzahl\", '3', '', 'yes');\nadd_option(\"ernaehrungsnews_trimmer\", '100', '', 'yes');\nadd_option(\"ernaehrungsnews_kategorieId\", '3', '', 'yes');\n\n\n\n}", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option)\n\t{\n\t\t$question->addOption($option);\n\t\t$this->update($question);//this will throw an exception if it does not exist in our array\n\t}", "function AddArgument($key, $value)\r\n\t{\r\n\t\t$this->Argument[$key]=$value;\r\n\t}", "protected function configure()\n {\n $this->setDescription('Scan for legacy error middleware or error middleware invocation.');\n $this->setHelp(self::HELP);\n $this->addOption('dir', 'd', InputOption::VALUE_REQUIRED, self::HELP_OPT_DIR);\n }", "private function o(string $option): string\n {\n return '<bold:bgLightYellow>' . $option . '</bold:bgLightYellow>';\n }", "protected function configure()\n {\n $this\n ->setName('check')\n ->setDescription('Check current for build or runtime')\n //->addOption('path', null, InputOption::VALUE_REQUIRED, 'Install on specific path', getcwd())\n ;\n }", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "protected function configure(): void\n {\n $this->setDescription('Generates the code for a project')\n ->addOption('project', 'p', InputOption::VALUE_REQUIRED, 'The path to the project definition file.', __DIR__ . '/project.json')\n ->addOption('template', 't', InputOption::VALUE_REQUIRED, 'The path to the template to use for code generation.', dirname(__DIR__) . '/templates/joomla35classic')\n ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'The path to the output directory for the generated code.', dirname(__DIR__, 2) . '/generated')\n ;\n }", "public function setOption($key, $value);", "public static function add($key, $type, $human, $default){\n\t\treturn System::addOption($key, $type, $human, $default);\n\t}", "public function addGuide($option = array())\n {\n $this->epub->addGuide($option);\n }", "function add_allowed_options($new_options, $options = '')\n {\n }", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option) {\n $questionObj = $this->find($question->getId());\n $questionObj->addOption($option);\n\t}", "protected function configure()\n {\n $this->addOption(\n 'v|version', '-s',\n 'The version of the template that is to be installed; optional if '\n .'project is installed with PEAR'\n );\n }", "protected function addTestOptions()\n {\n foreach (['test' => 'PHPUnit', 'pest' => 'Pest'] as $option => $name) {\n $this->getDefinition()->addOption(new InputOption(\n $option,\n null,\n InputOption::VALUE_NONE,\n \"Generate an accompanying {$name} test for the {$this->type}\"\n ));\n }\n }", "function add_network_option($network_id, $option, $value)\n {\n }", "protected function getDefaultOptions()\n {\n // Option to run command once\n $this->addOption(\n 'run-once',\n null,\n InputOption::VALUE_NONE,\n 'Run the command just once, do not go into an endless loop'\n );\n\n //Option to print memory usage\n $this->addOption(\n 'detect-leaks',\n null,\n InputOption::VALUE_NONE,\n 'Output information about memory usage'\n );\n\n //Option to create pid file\n $this->addOption(\n 'pidfile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The location of the PID file that should be created for this process',\n null\n );\n\n //Option to set interval for command\n $this->addOption(\n 'interval',\n null,\n InputOption::VALUE_REQUIRED,\n 'Interval to run',\n null\n );\n }", "public function setDefaultOption(string $name, $value = true): CommandExecutorInterface;", "public function set_option($option, $value) {\n $this->options[$option] = $value;\n \n }" ]
[ "0.7018918", "0.69849926", "0.694903", "0.68171656", "0.67902976", "0.6573595", "0.65510744", "0.6546718", "0.63249725", "0.6295193", "0.6285895", "0.626304", "0.62528145", "0.61725116", "0.61141235", "0.6072572", "0.60198694", "0.5990883", "0.59777933", "0.5943669", "0.58807385", "0.5859245", "0.5845954", "0.57982177", "0.5785457", "0.5770874", "0.5765665", "0.5765006", "0.5759053", "0.57271194", "0.57264525", "0.5657821", "0.5639472", "0.56316525", "0.5606967", "0.5596437", "0.5580527", "0.55804664", "0.55804664", "0.5557227", "0.5546539", "0.55329967", "0.5529908", "0.55157995", "0.5508216", "0.54949397", "0.549317", "0.54848886", "0.5465162", "0.54485345", "0.54470986", "0.5438521", "0.54265547", "0.54201806", "0.54143274", "0.5413965", "0.53943336", "0.5391862", "0.5377147", "0.53770345", "0.53722763", "0.5365167", "0.53565705", "0.5353464", "0.534691", "0.5340503", "0.5339772", "0.5329402", "0.5326521", "0.5299197", "0.5297819", "0.5297819", "0.5297819", "0.5297819", "0.52945685", "0.5286646", "0.5280484", "0.5274949", "0.5265478", "0.5258068", "0.5257003", "0.52562904", "0.52557164", "0.52497965", "0.5249475", "0.5243197", "0.5238742", "0.5233783", "0.5230962", "0.5223988", "0.5206842", "0.52039856", "0.520213", "0.51980203", "0.5196283", "0.5193061", "0.5185066", "0.5177185", "0.5176181", "0.5173828", "0.51684386" ]
0.0
-1
Add the option to the command line.
public function email() { $this->arguments[] = '--email'; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_option($option, $args = array())\n {\n }", "function add_screen_option($option, $args = array())\n {\n }", "function addOptions(GetOpt $_options)\n {\n $_options->addOptions(array(\n array(null, \"cmd\", GetOpt::NO_ARGUMENT, \"ConsoleOutput - Wenn die Ausgabe per CMD Fenster oder Terminal erfolgt.\\n\")\n ));\n }", "public function addOption(string $_option)\n {\n $this->options[] = $_option;\n }", "function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')\n {\n }", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "public function add_option() {\n\t\tadd_option(\n\t\t\t$this->header_text_option, // The header text option\n\t\t\t$this->default_header_text // The default header text\n\t\t);\n\t}", "public function option(string $option);", "final protected function addOption($option) {\n $this->selectedOptions[$option] = 1;\n }", "public function addOptions(Getopt $_options)\n {\n\n }", "public function addOption($option, $value = '')\n {\n $option = (string) $option;\n $this->_options[$option] = $value;\n }", "protected function appendOptions(): void\n {\n $this->signature .= '\n {--force : Force the worker to run even in maintenance mode}\n {--memory=128 : The memory limit in megabytes}\n {--sleep=0 : Number of seconds to sleep at each iteration in a loop}\n {--timeout=60 : The number of seconds a child process can run}\n ';\n }", "abstract public function addOptions(Getopt $_options);", "public function addOption()\n {\n try {\n $this->validate();\n DB::beginTransaction();\n if ($this->option !== \"\") {\n $this->assessment->options()->create([\n 'option' => $this->option,\n ]);\n }\n $this->option = \"\";\n } catch (\\Throwable $th) {\n DB::rollback();\n session()->flash('error', $th->getMessage());\n }\n DB::commit();\n $this->emitSelf('render');\n }", "public function\r\n add_option(HTMLTags_Option $option)\r\n {\r\n $attribute = $option->get_attribute('value');\r\n \r\n /*\r\n * What's this line for?\r\n */\r\n $attribute->get_value();\r\n \r\n $this->options[$attribute->get_value()] = $option;\r\n }", "function main() {\n\t$cmdline = new Recharg\\CommandLine();\n\n\t$progname = $GLOBALS['argv'][0];\n\n\t$cmdline->setUsage(<<<ETX\n$progname [OPTION]... [-T] SOURCE DEST\n or: $progname [OPTION]... SOURCE... DIRECTORY\n or: $progname [OPTION]... -t DIRECTORY SOURCE...\nETX\n );\n\n\t// Add description text, displayed above the option list.\n\t$cmdline\n\t\t->setDescription('Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.');\n\n\t$opt = new Recharg\\Option('help');\n\t$opt->setHelp('display this help and exit');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('version');\n\t$opt->setHelp('output version information and exit');\n\t$cmdline->addOption($opt);\n\n\t// Note: if no matches are provided, Recharg will assume \"--name\" for a\n\t// an option named \"name\".\n\t$opt = new Recharg\\Option('backup');\n\t$opt\n\t\t->setDefault('existing')\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('CONTROL')\n\t\t->setHelp('make a backup of each existing destination file');\n\t$cmdline->addOption($opt);\n\n\t// If a name consisting of a single character is passed, the option is\n\t// actually created with name \"opt_X\" (where \"X\" is the character\n\t// passed), and a single option \"X\"). In other words:\n\t//\n\t// new Option('a')\n\t//\n\t// is equivalent to\n\t//\n\t// new Option('opt_a', ['a']);\n\t$opt = new Recharg\\Option('b');\n\t$opt\n\t\t->setHelp('like --backup but does not accept an argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('force', ['f', 'force']);\n\t$opt\n\t\t->setHelp('do not prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('interactive', ['i', 'interactive']);\n\t$opt\n\t\t->setHelp('prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-clobber', ['n', 'no-clobber']);\n\t$opt\n\t\t->setHelp('do not overwrite an existing file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('strip-trailing-slashes');\n\t$opt\n\t\t->setHelp('remove any trailing slashes from each SOURCE argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('suffix');\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setHelp('override the usual backup suffix');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('target-directory', ['t', 'target-directory']);\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('DIRECTORY')\n\t\t->setHelp('move all SOURCE arguments into DIRECTORY');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-target-directory',\n\t ['T', 'no-target-directory']);\n\t$opt\n\t\t->setHelp('treat DEST as a normal file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('update', ['u', 'update']);\n\t$opt\n\t\t->setHelp('move only when the SOURCE file is newer than the destination file or when the destination file is missing');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('verbose', ['v', 'verbose']);\n\t$opt\n\t\t->setHelp('explain what is being done');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('context', ['Z', 'context']);\n\t$opt\n\t\t->setHelp('set SELinux security context of destination file to default type');\n\t$cmdline->addOption($opt);\n\n\n\t$cmdline->setFooter(<<<ETX\nIf you specify more than one of -i, -f, -n, only the final one takes effect.\n\nThe backup suffix is '~', unless set with --suffix. The version control method may be selected via the --backup option. CONTROL can be:\n\n none, off never make backups (even if --backup is given)\n numbered, t make numbered backups\n existing, nil numbered if numbered backups exist, simple otherwise\n simple, never always make simple backups\n\nThis is a example command line processor using PHP Recharg. Visit\nhttp://github.org/flaviovs/recharg for more information.\nETX\n );\n\n\n\t//\n\t// Parse the command line.\n\t//\n\t$p = new Recharg\\Parser($cmdline);\n\n\ttry {\n\t\t$res = $p->parse();\n\t} catch (Recharg\\ParserException $ex) {\n\t\t// Get current program name. This is set to the current program\n\t\t// automatically when we created the CommandLine without specifying a name\n\t\t// for it.\n\t\t$commands = $ex->getCommands();\n\t\t$progname = array_shift($commands);\n\n\t\t// Get the current command sequence.\n\t\t$commands = implode(' ', $commands);\n\n\t\t$prefix = $progname;\n\t\tif ($commands) {\n\t\t\t$prefix .= \" $commands\";\n\t\t}\n\n\t\t// FIXME - move this command building logic to the exception\n\n\t\t$hint = \"$progname --help\";\n\t\tif ($commands) {\n\t\t\t$hint .= \" $commands\";\n\t\t}\n\n\t\t// Display the error message.\n\t\tprint \"$prefix: \" . $ex->getMessage() . \"\\n\";\n\t\tprint \"Try \\\"$hint\\\"\\n\";\n\n\t\texit(1);\n\t}\n\n\t// Display help if \"--help\" was passed.\n\tif ($res['help']) {\n\t\tprint $cmdline->getHelp($res->getCommands()) . \"\\n\";\n\t\texit(0);\n\t}\n\n\t// Act on parser results.\n\tprint \"* Execute command: \" . implode(' ', $res->getCommands()) . \"\\n\";\n\tprint \"* Options:\\n\";\n\tprint_r($res->getArguments());\n\tprint \"* Operands:\\n\";\n\tprint_r($res->getOperands());\n}", "public function addOption($hOption)\n {\n $this->hOptionList[] = $hOption;\n }", "protected function addOption($option, $value)\n\t{\n\t\treturn add_option($option,$value);\n\t}", "protected function defineCommandOptions()\n {\n $this->addOption('all', 'A', InputOption::VALUE_NONE, \"List all defined globals settings\");\n\n $this->addArgument('key', InputArgument::OPTIONAL, \"Config param name\", null);\n $this->addArgument('value', InputArgument::OPTIONAL, \"If set, will set param [key] to this value\", null);\n\n }", "public function addOption( $option ) {\n\t\t$option->setCustomizeSection( $this->getMenuSlug() );\n\n\t\t$this->options[] = $option;\n\t}", "function tidy_getopt(tidy $object, $option) {}", "protected function addOption(TrackerCommandOption $option)\n\t{\n\t\t$this->options[] = $option;\n\n\t\treturn $this;\n\t}", "protected function defineCommandOptions(){}", "public function addOption($name, $value = null)\n {\n $this->options[$name] = $value;\n }", "public function createOption($name, $value)\n {\n $this->runWpCliCommand('option', 'add', [$name, $value]);\n }", "public function addOption($option, $value)\n {\n $this->transport->addOption($option, $value);\n }", "public function appendCommandArgument($arg)\n {\n $this->cmd->createArgument()->setValue($arg);\n }", "public function addOptions(Getopt $_options)\n {\n $_options->addOptions(\n [\n ['x', \"x\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the x-position of the glider on the board.\"],\n ['y', \"y\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the y-position of the glider on the board.\"]\n ]);\n }", "protected function createCommandLineOptions() {\n\t\ttry {\n\t\t\t$this->commandLineOptions = t3lib_div::makeInstance('tx_mnogosearch_clioptions');\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\techo $e->getMessage() . chr(10);\n\t\t\t$this->showUsageAndExit();\n\t\t}\n\t}", "private function createCommandLineOptions()\n {\n $options = $this->options;\n\n $cmdOptions = [];\n\n // Metadata (all, exif, icc, xmp or none (default))\n // Comma-separated list of existing metadata to copy from input to output\n $cmdOptions[] = '-metadata ' . $options['metadata'];\n\n // preset. Appears first in the list as recommended in the docs\n if (!is_null($options['preset'])) {\n if ($options['preset'] != 'none') {\n $cmdOptions[] = '-preset ' . $options['preset'];\n }\n }\n\n // Size\n $addedSizeOption = false;\n if (!is_null($options['size-in-percentage'])) {\n $sizeSource = filesize($this->source);\n if ($sizeSource !== false) {\n $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);\n $cmdOptions[] = '-size ' . $targetSize;\n $addedSizeOption = true;\n }\n }\n\n // quality\n if (!$addedSizeOption) {\n $cmdOptions[] = '-q ' . $this->getCalculatedQuality();\n }\n\n // alpha-quality\n if ($this->options['alpha-quality'] !== 100) {\n $cmdOptions[] = '-alpha_q ' . escapeshellarg($this->options['alpha-quality']);\n }\n\n // Losless PNG conversion\n if ($options['encoding'] == 'lossless') {\n // No need to add -lossless when near-lossless is used\n if ($options['near-lossless'] === 100) {\n $cmdOptions[] = '-lossless';\n }\n }\n\n // Near-lossles\n if ($options['near-lossless'] !== 100) {\n // We only let near_lossless have effect when encoding is set to \"lossless\"\n // otherwise encoding=auto would not work as expected\n if ($options['encoding'] == 'lossless') {\n $cmdOptions[] ='-near_lossless ' . $options['near-lossless'];\n }\n }\n\n if ($options['auto-filter'] === true) {\n $cmdOptions[] = '-af';\n }\n\n // Built-in method option\n $cmdOptions[] = '-m ' . strval($options['method']);\n\n // Built-in low memory option\n if ($options['low-memory']) {\n $cmdOptions[] = '-low_memory';\n }\n\n // command-line-options\n if ($options['command-line-options']) {\n array_push(\n $cmdOptions,\n ...self::escapeShellArgOnCommandLineOptions($options['command-line-options'])\n );\n }\n\n // Source file\n $cmdOptions[] = escapeshellarg($this->source);\n\n // Output\n $cmdOptions[] = '-o ' . escapeshellarg($this->destination);\n\n // Redirect stderr to same place as stdout\n // https://www.brianstorti.com/understanding-shell-script-idiom-redirect/\n $cmdOptions[] = '2>&1';\n\n $commandOptions = implode(' ', $cmdOptions);\n $this->logLn('command line options:' . $commandOptions);\n\n return $commandOptions;\n }", "public function addArg($name, $options = []) {\n $trimmed = trim($name);\n\n if (strlen($trimmed) > 0 && !strpos($trimmed, ' ')) {\n if (gettype($options) == 'array') {\n $this->commandArgs[$trimmed] = $this->_checkArgOptions($options);\n } else {\n $this->commandArgs[$trimmed] = [\n 'optional' => false,\n 'description' => '<NO DESCRIPTION>'\n ];\n }\n\n return true;\n }\n\n return false;\n }", "public function setOption(string $option, string $value): bool {}", "private function append_compiler_options ($command) {\n\t\t\n\t\t// System version macro\n\t\t$system_version = $this->osx_system_version();\n\t\t$command .= \"-dMAC_SYSTEM_VERSION:=$system_version \";\n\t\t\n\t\t// Debugging options\n\t\tif ($this->launch_mode == self::LAUNCH_MODE_DEBUG) {\n\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\n\t\t}\n\t\t\n\t\t// Platform specific options\n\t\tswitch ($this->target_loader->platform) {\n\t\t\tcase PLATFORM_IPHONE_DEVICE: {\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_DEVICE].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Cfvfpv2 \";\n\t\t\t\t\n\t\t\t\t// Add debugging options since we run the project by debugging\n\t\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PLATFORM_IPHONE_SIMULATOR: {\n\t\t\t\t// Add -XR for iPhone SDK\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_SIMULATOR].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Tiphonesim \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $command;\n\t}", "public function setOption($option)\n {\n if (!isset(static::$availableOptions[$option])) {\n throw new \\InvalidArgumentException(sprintf(\n 'Invalid option specified: \"%s\". Expected one of (%s)',\n $option,\n implode(', ', array_keys(static::$availableOptions))\n ));\n }\n\n if (!in_array(static::$availableOptions[$option], $this->options)) {\n $this->options[] = static::$availableOptions[$option];\n }\n }", "function add_site_option($option, $value)\n {\n }", "protected function configure()\n {\n $this\n ->setDescription('Print all indices of an app-id')\n ->addOption(\n 'app-id',\n 'a',\n InputOption::VALUE_OPTIONAL\n );\n }", "public function addOption($sTitle, $sValue = null)\n {\n if (is_null($sValue))\n {\n $sValue = $sTitle;\n }\n\n //We keep track of all additions, even if they happen *after* bInit == TRUE.\n $oOption = \\Limbonia\\Widget::factory('Option');\n $oOption->setParam('value', $sValue);\n $oOption->addText((string)$sTitle);\n $this->addTag($oOption);\n\n if ($this->bInit)\n {\n $this->writeJavascript(\"Limbonia_addOption('$this->sName', '$sTitle', '$sValue');\");\n }\n }", "public function setOption(string $name, $value);", "public function setOption(string $name, $value);", "protected function configure(): void\n {\n $this\n ->setDescription('This command triggers ZgwToVrijbrpService->zgwToVrijbrpHandler() for a birth e-dienst')\n ->setHelp('This command allows you to test mapping and sending a ZGW zaak to the Vrijbrp api /dossiers')\n ->addOption('zaak', 'z', InputOption::VALUE_REQUIRED, 'The zaak uuid we should test with')\n ->addOption('source', 's', InputOption::VALUE_OPTIONAL, 'The location of the Source we will send a request to, location of an existing Source object')\n ->addOption('location', 'l', InputOption::VALUE_OPTIONAL, 'The endpoint we will use on the Source to send a request, just a string')\n ->addOption('mapping', 'm', InputOption::VALUE_OPTIONAL, 'The reference of the mapping we will use before sending the data to the source')\n ->addOption('synchronizationEntity', 'se', InputOption::VALUE_OPTIONAL, 'The reference of the entity we need to create a synchronization object');\n }", "protected function loadCommand()\r {\r $this->addCommandLine( 'lsb_release -a');\r\r }", "protected function setOptions() {\n\t\t$this->_options->setHelpText(\"This tool provides a mechanism to run recurring workflow tasks.\");\n\n\t\t$text = \"This option triggers the execution of all known workflows.\\n\";\n\t\t$text.= \"You may filter the execution using option '--workflow'.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_RUN, array('--run', '-r'), Option::TYPE_NO_VALUE, $text, 'value'));\n\n\t\t$text = \"This options provides a way to filter a specific workflow.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_WORKFLOW, array('--workflow', '-w'), Option::TYPE_VALUE, $text, 'value'));\n\t}", "public function addOption($attribute, $data)\r\n {\r\n Mage::helper('api')->toArray($data);\r\n return parent::addOption($attribute, $data);\r\n }", "private function addLongOption($name, $value)\n {\n $this->options[$name] = $value;\n }", "public function addOption($value, $text)\n\t{\n\t\tif (!is_scalar($value)) {\n\t\t\tthrow new DataGridColumnStatusException('Option value has to be scalar');\n\t\t}\n\n\t\t$option = new Option($this, $value, $text);\n\n\t\t$this->options[] = $option;\n\n\t\treturn $option;\n\t}", "protected function registerOption($group, $option, $args = [])\n\t{\n\t\tregister_setting($group,$option,$args);\n\t}", "public function set_option( string $option ) : void {\t\n\t\tself::$api_option = $option;\n\t}", "protected function addEmOption() {\r\n\t\t$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'Name of a entity manager in application config (Helpful if using multiple connections with \"orm.ems.options\")', DoctrineMigrationsServiceProvider::DEFAULT_ENTITY_MANAGER_NAME);\r\n\t}", "public static function register_option() {\n\t\tWPSEO_Options::register_option( static::get_instance() );\n\t}", "public function main()\n {\n $this->out($this->OptionParser->help());\n }", "public function add_option($name, $value)\n {\n if ('' == trim($name)) {\n return false;\n }\n\n $this->options[ $name ] = $value;\n\n return true;\n }", "public function register_option($option){\r\n\t\tif(!is_array($option))\r\n\t\t\t$option = array($option=>'');\r\n\t\t$this->registered_option = array_merge($this->registered_option, $option);\r\n\t}", "protected function configure()\n {\n $this->setName('merge:benchmark');\n $this->addOption('output-file', 'o', InputOption::VALUE_REQUIRED, 'Output file name for merged benchmark');\n $this->addOption('ignore-sample', 'i', InputOption::VALUE_NONE, 'Ignores sample size');\n $this->addArgument('path', InputArgument::IS_ARRAY|InputArgument::REQUIRED, 'File or directory path with benchmarks');\n }", "protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('format', '%isd% %mobile%');\n }", "protected function setCliArguments() {}", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "public function cli()\n {\n _APP_=='varimax' && $this->registerConsoleCommand();\n }", "public function addConfigOption($option)\n {\n $this->config['options'][] = $option;\n }", "protected function configure()\n {\n $this->setName('console')\n ->setDescription('Finds path to breweries for collecting unique beers for my party.')\n ->addOption('lat', null, InputOption::VALUE_REQUIRED, 'Start point latitude value')\n ->addOption('lon', null, InputOption::VALUE_REQUIRED, 'Start point longitude value')\n ->addOption('distance', null, InputOption::VALUE_REQUIRED, 'Distance limit to travel', 2000)\n ->addOption(\n 'bruteforce',\n null,\n InputOption::VALUE_NONE,\n 'Try to find best path with max beers (takes lot of time)'\n )\n ->setHelp(<<<EOT\nThis application tries to find best path to travel between several breweries and collect beers and return to home.\nThis looks like traveling salesman problem solver with limitations. It must travel not more than defined maximum\ndistance (with return to home).\n\nUser must define latitude and longitude of start point via parameters --lat and --lon\nLocation point parameters accepts several formats (use quotes to define as a parameter value):\n* 51.1548597\n* 40.23°\n* -5.234°\n* 56.242 E\n* 40° 26.222'\n* 65° 32.22' S\n* +40:26:46\n* 40:26:46 S\n\nDistance parameter defines limit of total travel distance with return to home. Must be non negative numeric value.\n\nIf You have time - You can try bruteforce option. This option generates all possible routes (with respect to max\ndistance) and calculates number of beers could be collected. Maximum number of beers returns best route.\n\nExample usage:\n bin/console --lat=54.6858453 --lon=25.2865201\nEOT\n );\n }", "private function configureDaemonDefinition(): void\n {\n $this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once.');\n $this->addOption('run-max', null, InputOption::VALUE_OPTIONAL, 'Run the command x time.');\n $this->addOption('memory-max', null, InputOption::VALUE_OPTIONAL, 'Gracefully stop running command when given memory volume, in bytes, is reached.', 0);\n $this->addOption('shutdown-on-exception', null, InputOption::VALUE_NONE, 'Ask for shutdown if an exception is thrown.');\n $this->addOption('show-exceptions', null, InputOption::VALUE_NONE, 'Display exception on command output.');\n }", "protected function configure()\n {\n $this\n ->setDescription('Produce messages from console.')\n ->addArgument('message', InputArgument::REQUIRED, 'The message')\n ->addOption('--repeat', '-r', InputOption::VALUE_REQUIRED, 'How many times the message must be published. Useful for testing.')\n ->addOption('--base64', '-b', InputOption::VALUE_REQUIRED, 'Set value to \"1\" if the message is base64 encoded.')\n ;\n }", "function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}", "public function addOption($label, $value=\"\"){\n\t\t$option = new Element(\"option\");\n\t\t$value = (empty($value)) ? $label : $value;\n\t\t$option->setAttribute(\"value\", $value);\n\t\t$option->setInnerText($label);\n\t\t$this->options[] = $option;\n\t}", "protected function configure(): void\n {\n $this->setName('abc:check-cars')\n ->setDescription('Check all cars')\n ->addArgument('format', InputArgument::OPTIONAL, 'Progress format')\n ->addOption('option', null, InputOption::VALUE_NONE, 'Option description');\n }", "protected function configure()\n {\n $this\n ->setName('generate')\n ->setDescription('Generate Licenses file from project dependencies.')\n ->addOption('hide-version', 'hv', InputOption::VALUE_NONE, 'Hide dependency version')\n ->addOption('csv', null, InputOption::VALUE_NONE, 'Output csv format');\n }", "protected function configure()\n {\n $this\n ->setDescription('Imports a mock csv data and calculates the the sum of all the documents')\n ->addArgument('file_path',InputArgument::REQUIRED, 'path to csv file') //{src/Data/data.csv}\n ->addArgument('currencies', InputArgument::REQUIRED, 'currencies')\n ->addArgument('output_currency',InputArgument::REQUIRED, 'output currency')\n ->addOption('vat', null,InputOption::VALUE_OPTIONAL, 'Option description')\n ;\n }", "protected function useOption(string $option, bool $switch): string\n {\n return ($switch ? ' ' . $option : '');\n }", "#[CLI\\Command(name: 'improved:options', aliases: ['c'])]\n #[CLI\\Argument(name: 'a1', description: 'an arg')]\n #[CLI\\Argument(name: 'a2', description: 'another arg')]\n #[CLI\\Option(name: 'o1', description: 'an option')]\n #[CLI\\Option(name: 'o2', description: 'another option')]\n #[CLI\\Usage(name: 'a b --o1=x --o2=y', description: 'Print some example values')]\n public function improvedOptions($a1, $a2, $o1 = 'one', $o2 = 'two')\n {\n return \"args are $a1 and $a2, and options are \" . var_export($o1, true) . ' and ' . var_export($o2, true);\n }", "public function add_argument ($key, $value)\n {\n $this->_args [$key] = $value;\n }", "public function insertOption($data);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function addOptions(...$options)\n {\n foreach ($options as $option) {\n $this->addOption($option);\n }\n }", "function update_option($option, $value, $autoload = \\null)\n {\n }", "protected function configure()\n {\n $this\n ->addOption('site', null, InputOption::VALUE_REQUIRED, 'Site ID')\n ->addOption('process', null, InputOption::VALUE_REQUIRED, 'Process ID', uniqid())\n ;\n }", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "function add_blog_option($id, $option, $value)\n {\n }", "public function add_cli_command() {\n\t\tif ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::add_command( 'queue', '\\WP_Queue\\Command' );\n\t}", "public function setOption($option, $value);", "public function setOption($name, $value = null);", "function hello_world_install() {\nadd_option(\"ernaehrungsnews_anzahl\", '3', '', 'yes');\nadd_option(\"ernaehrungsnews_trimmer\", '100', '', 'yes');\nadd_option(\"ernaehrungsnews_kategorieId\", '3', '', 'yes');\n\n\n\n}", "function AddArgument($key, $value)\r\n\t{\r\n\t\t$this->Argument[$key]=$value;\r\n\t}", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option)\n\t{\n\t\t$question->addOption($option);\n\t\t$this->update($question);//this will throw an exception if it does not exist in our array\n\t}", "protected function configure()\n {\n $this->setDescription('Scan for legacy error middleware or error middleware invocation.');\n $this->setHelp(self::HELP);\n $this->addOption('dir', 'd', InputOption::VALUE_REQUIRED, self::HELP_OPT_DIR);\n }", "private function o(string $option): string\n {\n return '<bold:bgLightYellow>' . $option . '</bold:bgLightYellow>';\n }", "protected function configure()\n {\n $this\n ->setName('check')\n ->setDescription('Check current for build or runtime')\n //->addOption('path', null, InputOption::VALUE_REQUIRED, 'Install on specific path', getcwd())\n ;\n }", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "protected function configure(): void\n {\n $this->setDescription('Generates the code for a project')\n ->addOption('project', 'p', InputOption::VALUE_REQUIRED, 'The path to the project definition file.', __DIR__ . '/project.json')\n ->addOption('template', 't', InputOption::VALUE_REQUIRED, 'The path to the template to use for code generation.', dirname(__DIR__) . '/templates/joomla35classic')\n ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'The path to the output directory for the generated code.', dirname(__DIR__, 2) . '/generated')\n ;\n }", "public function setOption($key, $value);", "public static function add($key, $type, $human, $default){\n\t\treturn System::addOption($key, $type, $human, $default);\n\t}", "public function addGuide($option = array())\n {\n $this->epub->addGuide($option);\n }", "function add_allowed_options($new_options, $options = '')\n {\n }", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option) {\n $questionObj = $this->find($question->getId());\n $questionObj->addOption($option);\n\t}", "protected function configure()\n {\n $this->addOption(\n 'v|version', '-s',\n 'The version of the template that is to be installed; optional if '\n .'project is installed with PEAR'\n );\n }", "protected function addTestOptions()\n {\n foreach (['test' => 'PHPUnit', 'pest' => 'Pest'] as $option => $name) {\n $this->getDefinition()->addOption(new InputOption(\n $option,\n null,\n InputOption::VALUE_NONE,\n \"Generate an accompanying {$name} test for the {$this->type}\"\n ));\n }\n }", "protected function getDefaultOptions()\n {\n // Option to run command once\n $this->addOption(\n 'run-once',\n null,\n InputOption::VALUE_NONE,\n 'Run the command just once, do not go into an endless loop'\n );\n\n //Option to print memory usage\n $this->addOption(\n 'detect-leaks',\n null,\n InputOption::VALUE_NONE,\n 'Output information about memory usage'\n );\n\n //Option to create pid file\n $this->addOption(\n 'pidfile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The location of the PID file that should be created for this process',\n null\n );\n\n //Option to set interval for command\n $this->addOption(\n 'interval',\n null,\n InputOption::VALUE_REQUIRED,\n 'Interval to run',\n null\n );\n }", "function add_network_option($network_id, $option, $value)\n {\n }", "public function setDefaultOption(string $name, $value = true): CommandExecutorInterface;", "public function set_option($option, $value) {\n $this->options[$option] = $value;\n \n }" ]
[ "0.7017618", "0.6983917", "0.6948958", "0.68156135", "0.6788639", "0.65723425", "0.65493953", "0.65454954", "0.6323385", "0.62940395", "0.6284396", "0.62622255", "0.62516826", "0.6170558", "0.6112595", "0.60737234", "0.6018191", "0.59890413", "0.5978059", "0.594203", "0.5880576", "0.5858359", "0.5845784", "0.5796762", "0.57842225", "0.57692146", "0.5765416", "0.57639945", "0.5759816", "0.5727478", "0.57274556", "0.56566906", "0.56397754", "0.56302375", "0.56050867", "0.5596494", "0.5579644", "0.55792296", "0.55792296", "0.5557449", "0.5547496", "0.55325985", "0.5528836", "0.551414", "0.5506945", "0.54935855", "0.54919636", "0.5484427", "0.5463648", "0.5447941", "0.54473203", "0.54366374", "0.5427058", "0.54196703", "0.5414924", "0.5413485", "0.5393202", "0.5392933", "0.5377926", "0.5377177", "0.53726536", "0.5363857", "0.53549796", "0.5353934", "0.5347607", "0.53408927", "0.5339553", "0.532963", "0.5326024", "0.529773", "0.5296492", "0.5296492", "0.5296492", "0.5296492", "0.5293389", "0.5285713", "0.5280359", "0.52742714", "0.5263644", "0.5259289", "0.5255688", "0.5255177", "0.5254696", "0.5248927", "0.52488315", "0.52429706", "0.52377635", "0.5234464", "0.52298486", "0.522411", "0.5205695", "0.52032053", "0.52005786", "0.51961833", "0.51953447", "0.5192334", "0.51837635", "0.5176787", "0.5175894", "0.51738834", "0.51671517" ]
0.0
-1
Add the option to the command line.
public function format($format) { $this->arguments[] = '--format=' . $format; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_option($option, $args = array())\n {\n }", "function add_screen_option($option, $args = array())\n {\n }", "function addOptions(GetOpt $_options)\n {\n $_options->addOptions(array(\n array(null, \"cmd\", GetOpt::NO_ARGUMENT, \"ConsoleOutput - Wenn die Ausgabe per CMD Fenster oder Terminal erfolgt.\\n\")\n ));\n }", "public function addOption(string $_option)\n {\n $this->options[] = $_option;\n }", "function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')\n {\n }", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "public function add_option() {\n\t\tadd_option(\n\t\t\t$this->header_text_option, // The header text option\n\t\t\t$this->default_header_text // The default header text\n\t\t);\n\t}", "public function option(string $option);", "final protected function addOption($option) {\n $this->selectedOptions[$option] = 1;\n }", "public function addOptions(Getopt $_options)\n {\n\n }", "public function addOption($option, $value = '')\n {\n $option = (string) $option;\n $this->_options[$option] = $value;\n }", "protected function appendOptions(): void\n {\n $this->signature .= '\n {--force : Force the worker to run even in maintenance mode}\n {--memory=128 : The memory limit in megabytes}\n {--sleep=0 : Number of seconds to sleep at each iteration in a loop}\n {--timeout=60 : The number of seconds a child process can run}\n ';\n }", "abstract public function addOptions(Getopt $_options);", "public function addOption()\n {\n try {\n $this->validate();\n DB::beginTransaction();\n if ($this->option !== \"\") {\n $this->assessment->options()->create([\n 'option' => $this->option,\n ]);\n }\n $this->option = \"\";\n } catch (\\Throwable $th) {\n DB::rollback();\n session()->flash('error', $th->getMessage());\n }\n DB::commit();\n $this->emitSelf('render');\n }", "public function\r\n add_option(HTMLTags_Option $option)\r\n {\r\n $attribute = $option->get_attribute('value');\r\n \r\n /*\r\n * What's this line for?\r\n */\r\n $attribute->get_value();\r\n \r\n $this->options[$attribute->get_value()] = $option;\r\n }", "function main() {\n\t$cmdline = new Recharg\\CommandLine();\n\n\t$progname = $GLOBALS['argv'][0];\n\n\t$cmdline->setUsage(<<<ETX\n$progname [OPTION]... [-T] SOURCE DEST\n or: $progname [OPTION]... SOURCE... DIRECTORY\n or: $progname [OPTION]... -t DIRECTORY SOURCE...\nETX\n );\n\n\t// Add description text, displayed above the option list.\n\t$cmdline\n\t\t->setDescription('Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.');\n\n\t$opt = new Recharg\\Option('help');\n\t$opt->setHelp('display this help and exit');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('version');\n\t$opt->setHelp('output version information and exit');\n\t$cmdline->addOption($opt);\n\n\t// Note: if no matches are provided, Recharg will assume \"--name\" for a\n\t// an option named \"name\".\n\t$opt = new Recharg\\Option('backup');\n\t$opt\n\t\t->setDefault('existing')\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('CONTROL')\n\t\t->setHelp('make a backup of each existing destination file');\n\t$cmdline->addOption($opt);\n\n\t// If a name consisting of a single character is passed, the option is\n\t// actually created with name \"opt_X\" (where \"X\" is the character\n\t// passed), and a single option \"X\"). In other words:\n\t//\n\t// new Option('a')\n\t//\n\t// is equivalent to\n\t//\n\t// new Option('opt_a', ['a']);\n\t$opt = new Recharg\\Option('b');\n\t$opt\n\t\t->setHelp('like --backup but does not accept an argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('force', ['f', 'force']);\n\t$opt\n\t\t->setHelp('do not prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('interactive', ['i', 'interactive']);\n\t$opt\n\t\t->setHelp('prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-clobber', ['n', 'no-clobber']);\n\t$opt\n\t\t->setHelp('do not overwrite an existing file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('strip-trailing-slashes');\n\t$opt\n\t\t->setHelp('remove any trailing slashes from each SOURCE argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('suffix');\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setHelp('override the usual backup suffix');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('target-directory', ['t', 'target-directory']);\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('DIRECTORY')\n\t\t->setHelp('move all SOURCE arguments into DIRECTORY');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-target-directory',\n\t ['T', 'no-target-directory']);\n\t$opt\n\t\t->setHelp('treat DEST as a normal file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('update', ['u', 'update']);\n\t$opt\n\t\t->setHelp('move only when the SOURCE file is newer than the destination file or when the destination file is missing');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('verbose', ['v', 'verbose']);\n\t$opt\n\t\t->setHelp('explain what is being done');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('context', ['Z', 'context']);\n\t$opt\n\t\t->setHelp('set SELinux security context of destination file to default type');\n\t$cmdline->addOption($opt);\n\n\n\t$cmdline->setFooter(<<<ETX\nIf you specify more than one of -i, -f, -n, only the final one takes effect.\n\nThe backup suffix is '~', unless set with --suffix. The version control method may be selected via the --backup option. CONTROL can be:\n\n none, off never make backups (even if --backup is given)\n numbered, t make numbered backups\n existing, nil numbered if numbered backups exist, simple otherwise\n simple, never always make simple backups\n\nThis is a example command line processor using PHP Recharg. Visit\nhttp://github.org/flaviovs/recharg for more information.\nETX\n );\n\n\n\t//\n\t// Parse the command line.\n\t//\n\t$p = new Recharg\\Parser($cmdline);\n\n\ttry {\n\t\t$res = $p->parse();\n\t} catch (Recharg\\ParserException $ex) {\n\t\t// Get current program name. This is set to the current program\n\t\t// automatically when we created the CommandLine without specifying a name\n\t\t// for it.\n\t\t$commands = $ex->getCommands();\n\t\t$progname = array_shift($commands);\n\n\t\t// Get the current command sequence.\n\t\t$commands = implode(' ', $commands);\n\n\t\t$prefix = $progname;\n\t\tif ($commands) {\n\t\t\t$prefix .= \" $commands\";\n\t\t}\n\n\t\t// FIXME - move this command building logic to the exception\n\n\t\t$hint = \"$progname --help\";\n\t\tif ($commands) {\n\t\t\t$hint .= \" $commands\";\n\t\t}\n\n\t\t// Display the error message.\n\t\tprint \"$prefix: \" . $ex->getMessage() . \"\\n\";\n\t\tprint \"Try \\\"$hint\\\"\\n\";\n\n\t\texit(1);\n\t}\n\n\t// Display help if \"--help\" was passed.\n\tif ($res['help']) {\n\t\tprint $cmdline->getHelp($res->getCommands()) . \"\\n\";\n\t\texit(0);\n\t}\n\n\t// Act on parser results.\n\tprint \"* Execute command: \" . implode(' ', $res->getCommands()) . \"\\n\";\n\tprint \"* Options:\\n\";\n\tprint_r($res->getArguments());\n\tprint \"* Operands:\\n\";\n\tprint_r($res->getOperands());\n}", "public function addOption($hOption)\n {\n $this->hOptionList[] = $hOption;\n }", "protected function addOption($option, $value)\n\t{\n\t\treturn add_option($option,$value);\n\t}", "protected function defineCommandOptions()\n {\n $this->addOption('all', 'A', InputOption::VALUE_NONE, \"List all defined globals settings\");\n\n $this->addArgument('key', InputArgument::OPTIONAL, \"Config param name\", null);\n $this->addArgument('value', InputArgument::OPTIONAL, \"If set, will set param [key] to this value\", null);\n\n }", "public function addOption( $option ) {\n\t\t$option->setCustomizeSection( $this->getMenuSlug() );\n\n\t\t$this->options[] = $option;\n\t}", "function tidy_getopt(tidy $object, $option) {}", "protected function addOption(TrackerCommandOption $option)\n\t{\n\t\t$this->options[] = $option;\n\n\t\treturn $this;\n\t}", "protected function defineCommandOptions(){}", "public function addOption($name, $value = null)\n {\n $this->options[$name] = $value;\n }", "public function createOption($name, $value)\n {\n $this->runWpCliCommand('option', 'add', [$name, $value]);\n }", "public function addOption($option, $value)\n {\n $this->transport->addOption($option, $value);\n }", "public function appendCommandArgument($arg)\n {\n $this->cmd->createArgument()->setValue($arg);\n }", "public function addOptions(Getopt $_options)\n {\n $_options->addOptions(\n [\n ['x', \"x\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the x-position of the glider on the board.\"],\n ['y', \"y\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the y-position of the glider on the board.\"]\n ]);\n }", "protected function createCommandLineOptions() {\n\t\ttry {\n\t\t\t$this->commandLineOptions = t3lib_div::makeInstance('tx_mnogosearch_clioptions');\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\techo $e->getMessage() . chr(10);\n\t\t\t$this->showUsageAndExit();\n\t\t}\n\t}", "private function createCommandLineOptions()\n {\n $options = $this->options;\n\n $cmdOptions = [];\n\n // Metadata (all, exif, icc, xmp or none (default))\n // Comma-separated list of existing metadata to copy from input to output\n $cmdOptions[] = '-metadata ' . $options['metadata'];\n\n // preset. Appears first in the list as recommended in the docs\n if (!is_null($options['preset'])) {\n if ($options['preset'] != 'none') {\n $cmdOptions[] = '-preset ' . $options['preset'];\n }\n }\n\n // Size\n $addedSizeOption = false;\n if (!is_null($options['size-in-percentage'])) {\n $sizeSource = filesize($this->source);\n if ($sizeSource !== false) {\n $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);\n $cmdOptions[] = '-size ' . $targetSize;\n $addedSizeOption = true;\n }\n }\n\n // quality\n if (!$addedSizeOption) {\n $cmdOptions[] = '-q ' . $this->getCalculatedQuality();\n }\n\n // alpha-quality\n if ($this->options['alpha-quality'] !== 100) {\n $cmdOptions[] = '-alpha_q ' . escapeshellarg($this->options['alpha-quality']);\n }\n\n // Losless PNG conversion\n if ($options['encoding'] == 'lossless') {\n // No need to add -lossless when near-lossless is used\n if ($options['near-lossless'] === 100) {\n $cmdOptions[] = '-lossless';\n }\n }\n\n // Near-lossles\n if ($options['near-lossless'] !== 100) {\n // We only let near_lossless have effect when encoding is set to \"lossless\"\n // otherwise encoding=auto would not work as expected\n if ($options['encoding'] == 'lossless') {\n $cmdOptions[] ='-near_lossless ' . $options['near-lossless'];\n }\n }\n\n if ($options['auto-filter'] === true) {\n $cmdOptions[] = '-af';\n }\n\n // Built-in method option\n $cmdOptions[] = '-m ' . strval($options['method']);\n\n // Built-in low memory option\n if ($options['low-memory']) {\n $cmdOptions[] = '-low_memory';\n }\n\n // command-line-options\n if ($options['command-line-options']) {\n array_push(\n $cmdOptions,\n ...self::escapeShellArgOnCommandLineOptions($options['command-line-options'])\n );\n }\n\n // Source file\n $cmdOptions[] = escapeshellarg($this->source);\n\n // Output\n $cmdOptions[] = '-o ' . escapeshellarg($this->destination);\n\n // Redirect stderr to same place as stdout\n // https://www.brianstorti.com/understanding-shell-script-idiom-redirect/\n $cmdOptions[] = '2>&1';\n\n $commandOptions = implode(' ', $cmdOptions);\n $this->logLn('command line options:' . $commandOptions);\n\n return $commandOptions;\n }", "public function addArg($name, $options = []) {\n $trimmed = trim($name);\n\n if (strlen($trimmed) > 0 && !strpos($trimmed, ' ')) {\n if (gettype($options) == 'array') {\n $this->commandArgs[$trimmed] = $this->_checkArgOptions($options);\n } else {\n $this->commandArgs[$trimmed] = [\n 'optional' => false,\n 'description' => '<NO DESCRIPTION>'\n ];\n }\n\n return true;\n }\n\n return false;\n }", "public function setOption(string $option, string $value): bool {}", "private function append_compiler_options ($command) {\n\t\t\n\t\t// System version macro\n\t\t$system_version = $this->osx_system_version();\n\t\t$command .= \"-dMAC_SYSTEM_VERSION:=$system_version \";\n\t\t\n\t\t// Debugging options\n\t\tif ($this->launch_mode == self::LAUNCH_MODE_DEBUG) {\n\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\n\t\t}\n\t\t\n\t\t// Platform specific options\n\t\tswitch ($this->target_loader->platform) {\n\t\t\tcase PLATFORM_IPHONE_DEVICE: {\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_DEVICE].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Cfvfpv2 \";\n\t\t\t\t\n\t\t\t\t// Add debugging options since we run the project by debugging\n\t\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PLATFORM_IPHONE_SIMULATOR: {\n\t\t\t\t// Add -XR for iPhone SDK\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_SIMULATOR].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Tiphonesim \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $command;\n\t}", "public function setOption($option)\n {\n if (!isset(static::$availableOptions[$option])) {\n throw new \\InvalidArgumentException(sprintf(\n 'Invalid option specified: \"%s\". Expected one of (%s)',\n $option,\n implode(', ', array_keys(static::$availableOptions))\n ));\n }\n\n if (!in_array(static::$availableOptions[$option], $this->options)) {\n $this->options[] = static::$availableOptions[$option];\n }\n }", "function add_site_option($option, $value)\n {\n }", "protected function configure()\n {\n $this\n ->setDescription('Print all indices of an app-id')\n ->addOption(\n 'app-id',\n 'a',\n InputOption::VALUE_OPTIONAL\n );\n }", "public function addOption($sTitle, $sValue = null)\n {\n if (is_null($sValue))\n {\n $sValue = $sTitle;\n }\n\n //We keep track of all additions, even if they happen *after* bInit == TRUE.\n $oOption = \\Limbonia\\Widget::factory('Option');\n $oOption->setParam('value', $sValue);\n $oOption->addText((string)$sTitle);\n $this->addTag($oOption);\n\n if ($this->bInit)\n {\n $this->writeJavascript(\"Limbonia_addOption('$this->sName', '$sTitle', '$sValue');\");\n }\n }", "public function setOption(string $name, $value);", "public function setOption(string $name, $value);", "protected function configure(): void\n {\n $this\n ->setDescription('This command triggers ZgwToVrijbrpService->zgwToVrijbrpHandler() for a birth e-dienst')\n ->setHelp('This command allows you to test mapping and sending a ZGW zaak to the Vrijbrp api /dossiers')\n ->addOption('zaak', 'z', InputOption::VALUE_REQUIRED, 'The zaak uuid we should test with')\n ->addOption('source', 's', InputOption::VALUE_OPTIONAL, 'The location of the Source we will send a request to, location of an existing Source object')\n ->addOption('location', 'l', InputOption::VALUE_OPTIONAL, 'The endpoint we will use on the Source to send a request, just a string')\n ->addOption('mapping', 'm', InputOption::VALUE_OPTIONAL, 'The reference of the mapping we will use before sending the data to the source')\n ->addOption('synchronizationEntity', 'se', InputOption::VALUE_OPTIONAL, 'The reference of the entity we need to create a synchronization object');\n }", "protected function loadCommand()\r {\r $this->addCommandLine( 'lsb_release -a');\r\r }", "protected function setOptions() {\n\t\t$this->_options->setHelpText(\"This tool provides a mechanism to run recurring workflow tasks.\");\n\n\t\t$text = \"This option triggers the execution of all known workflows.\\n\";\n\t\t$text.= \"You may filter the execution using option '--workflow'.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_RUN, array('--run', '-r'), Option::TYPE_NO_VALUE, $text, 'value'));\n\n\t\t$text = \"This options provides a way to filter a specific workflow.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_WORKFLOW, array('--workflow', '-w'), Option::TYPE_VALUE, $text, 'value'));\n\t}", "public function addOption($attribute, $data)\r\n {\r\n Mage::helper('api')->toArray($data);\r\n return parent::addOption($attribute, $data);\r\n }", "private function addLongOption($name, $value)\n {\n $this->options[$name] = $value;\n }", "public function addOption($value, $text)\n\t{\n\t\tif (!is_scalar($value)) {\n\t\t\tthrow new DataGridColumnStatusException('Option value has to be scalar');\n\t\t}\n\n\t\t$option = new Option($this, $value, $text);\n\n\t\t$this->options[] = $option;\n\n\t\treturn $option;\n\t}", "protected function registerOption($group, $option, $args = [])\n\t{\n\t\tregister_setting($group,$option,$args);\n\t}", "public function set_option( string $option ) : void {\t\n\t\tself::$api_option = $option;\n\t}", "protected function addEmOption() {\r\n\t\t$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'Name of a entity manager in application config (Helpful if using multiple connections with \"orm.ems.options\")', DoctrineMigrationsServiceProvider::DEFAULT_ENTITY_MANAGER_NAME);\r\n\t}", "public static function register_option() {\n\t\tWPSEO_Options::register_option( static::get_instance() );\n\t}", "public function main()\n {\n $this->out($this->OptionParser->help());\n }", "public function add_option($name, $value)\n {\n if ('' == trim($name)) {\n return false;\n }\n\n $this->options[ $name ] = $value;\n\n return true;\n }", "public function register_option($option){\r\n\t\tif(!is_array($option))\r\n\t\t\t$option = array($option=>'');\r\n\t\t$this->registered_option = array_merge($this->registered_option, $option);\r\n\t}", "protected function configure()\n {\n $this->setName('merge:benchmark');\n $this->addOption('output-file', 'o', InputOption::VALUE_REQUIRED, 'Output file name for merged benchmark');\n $this->addOption('ignore-sample', 'i', InputOption::VALUE_NONE, 'Ignores sample size');\n $this->addArgument('path', InputArgument::IS_ARRAY|InputArgument::REQUIRED, 'File or directory path with benchmarks');\n }", "protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('format', '%isd% %mobile%');\n }", "protected function setCliArguments() {}", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "public function cli()\n {\n _APP_=='varimax' && $this->registerConsoleCommand();\n }", "public function addConfigOption($option)\n {\n $this->config['options'][] = $option;\n }", "protected function configure()\n {\n $this->setName('console')\n ->setDescription('Finds path to breweries for collecting unique beers for my party.')\n ->addOption('lat', null, InputOption::VALUE_REQUIRED, 'Start point latitude value')\n ->addOption('lon', null, InputOption::VALUE_REQUIRED, 'Start point longitude value')\n ->addOption('distance', null, InputOption::VALUE_REQUIRED, 'Distance limit to travel', 2000)\n ->addOption(\n 'bruteforce',\n null,\n InputOption::VALUE_NONE,\n 'Try to find best path with max beers (takes lot of time)'\n )\n ->setHelp(<<<EOT\nThis application tries to find best path to travel between several breweries and collect beers and return to home.\nThis looks like traveling salesman problem solver with limitations. It must travel not more than defined maximum\ndistance (with return to home).\n\nUser must define latitude and longitude of start point via parameters --lat and --lon\nLocation point parameters accepts several formats (use quotes to define as a parameter value):\n* 51.1548597\n* 40.23°\n* -5.234°\n* 56.242 E\n* 40° 26.222'\n* 65° 32.22' S\n* +40:26:46\n* 40:26:46 S\n\nDistance parameter defines limit of total travel distance with return to home. Must be non negative numeric value.\n\nIf You have time - You can try bruteforce option. This option generates all possible routes (with respect to max\ndistance) and calculates number of beers could be collected. Maximum number of beers returns best route.\n\nExample usage:\n bin/console --lat=54.6858453 --lon=25.2865201\nEOT\n );\n }", "private function configureDaemonDefinition(): void\n {\n $this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once.');\n $this->addOption('run-max', null, InputOption::VALUE_OPTIONAL, 'Run the command x time.');\n $this->addOption('memory-max', null, InputOption::VALUE_OPTIONAL, 'Gracefully stop running command when given memory volume, in bytes, is reached.', 0);\n $this->addOption('shutdown-on-exception', null, InputOption::VALUE_NONE, 'Ask for shutdown if an exception is thrown.');\n $this->addOption('show-exceptions', null, InputOption::VALUE_NONE, 'Display exception on command output.');\n }", "protected function configure()\n {\n $this\n ->setDescription('Produce messages from console.')\n ->addArgument('message', InputArgument::REQUIRED, 'The message')\n ->addOption('--repeat', '-r', InputOption::VALUE_REQUIRED, 'How many times the message must be published. Useful for testing.')\n ->addOption('--base64', '-b', InputOption::VALUE_REQUIRED, 'Set value to \"1\" if the message is base64 encoded.')\n ;\n }", "function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}", "public function addOption($label, $value=\"\"){\n\t\t$option = new Element(\"option\");\n\t\t$value = (empty($value)) ? $label : $value;\n\t\t$option->setAttribute(\"value\", $value);\n\t\t$option->setInnerText($label);\n\t\t$this->options[] = $option;\n\t}", "protected function configure(): void\n {\n $this->setName('abc:check-cars')\n ->setDescription('Check all cars')\n ->addArgument('format', InputArgument::OPTIONAL, 'Progress format')\n ->addOption('option', null, InputOption::VALUE_NONE, 'Option description');\n }", "protected function configure()\n {\n $this\n ->setName('generate')\n ->setDescription('Generate Licenses file from project dependencies.')\n ->addOption('hide-version', 'hv', InputOption::VALUE_NONE, 'Hide dependency version')\n ->addOption('csv', null, InputOption::VALUE_NONE, 'Output csv format');\n }", "protected function configure()\n {\n $this\n ->setDescription('Imports a mock csv data and calculates the the sum of all the documents')\n ->addArgument('file_path',InputArgument::REQUIRED, 'path to csv file') //{src/Data/data.csv}\n ->addArgument('currencies', InputArgument::REQUIRED, 'currencies')\n ->addArgument('output_currency',InputArgument::REQUIRED, 'output currency')\n ->addOption('vat', null,InputOption::VALUE_OPTIONAL, 'Option description')\n ;\n }", "protected function useOption(string $option, bool $switch): string\n {\n return ($switch ? ' ' . $option : '');\n }", "#[CLI\\Command(name: 'improved:options', aliases: ['c'])]\n #[CLI\\Argument(name: 'a1', description: 'an arg')]\n #[CLI\\Argument(name: 'a2', description: 'another arg')]\n #[CLI\\Option(name: 'o1', description: 'an option')]\n #[CLI\\Option(name: 'o2', description: 'another option')]\n #[CLI\\Usage(name: 'a b --o1=x --o2=y', description: 'Print some example values')]\n public function improvedOptions($a1, $a2, $o1 = 'one', $o2 = 'two')\n {\n return \"args are $a1 and $a2, and options are \" . var_export($o1, true) . ' and ' . var_export($o2, true);\n }", "public function add_argument ($key, $value)\n {\n $this->_args [$key] = $value;\n }", "public function insertOption($data);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function addOptions(...$options)\n {\n foreach ($options as $option) {\n $this->addOption($option);\n }\n }", "function update_option($option, $value, $autoload = \\null)\n {\n }", "protected function configure()\n {\n $this\n ->addOption('site', null, InputOption::VALUE_REQUIRED, 'Site ID')\n ->addOption('process', null, InputOption::VALUE_REQUIRED, 'Process ID', uniqid())\n ;\n }", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "function add_blog_option($id, $option, $value)\n {\n }", "public function add_cli_command() {\n\t\tif ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::add_command( 'queue', '\\WP_Queue\\Command' );\n\t}", "public function setOption($option, $value);", "public function setOption($name, $value = null);", "function hello_world_install() {\nadd_option(\"ernaehrungsnews_anzahl\", '3', '', 'yes');\nadd_option(\"ernaehrungsnews_trimmer\", '100', '', 'yes');\nadd_option(\"ernaehrungsnews_kategorieId\", '3', '', 'yes');\n\n\n\n}", "function AddArgument($key, $value)\r\n\t{\r\n\t\t$this->Argument[$key]=$value;\r\n\t}", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option)\n\t{\n\t\t$question->addOption($option);\n\t\t$this->update($question);//this will throw an exception if it does not exist in our array\n\t}", "protected function configure()\n {\n $this->setDescription('Scan for legacy error middleware or error middleware invocation.');\n $this->setHelp(self::HELP);\n $this->addOption('dir', 'd', InputOption::VALUE_REQUIRED, self::HELP_OPT_DIR);\n }", "private function o(string $option): string\n {\n return '<bold:bgLightYellow>' . $option . '</bold:bgLightYellow>';\n }", "protected function configure()\n {\n $this\n ->setName('check')\n ->setDescription('Check current for build or runtime')\n //->addOption('path', null, InputOption::VALUE_REQUIRED, 'Install on specific path', getcwd())\n ;\n }", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "protected function configure(): void\n {\n $this->setDescription('Generates the code for a project')\n ->addOption('project', 'p', InputOption::VALUE_REQUIRED, 'The path to the project definition file.', __DIR__ . '/project.json')\n ->addOption('template', 't', InputOption::VALUE_REQUIRED, 'The path to the template to use for code generation.', dirname(__DIR__) . '/templates/joomla35classic')\n ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'The path to the output directory for the generated code.', dirname(__DIR__, 2) . '/generated')\n ;\n }", "public function setOption($key, $value);", "public static function add($key, $type, $human, $default){\n\t\treturn System::addOption($key, $type, $human, $default);\n\t}", "public function addGuide($option = array())\n {\n $this->epub->addGuide($option);\n }", "function add_allowed_options($new_options, $options = '')\n {\n }", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option) {\n $questionObj = $this->find($question->getId());\n $questionObj->addOption($option);\n\t}", "protected function configure()\n {\n $this->addOption(\n 'v|version', '-s',\n 'The version of the template that is to be installed; optional if '\n .'project is installed with PEAR'\n );\n }", "protected function addTestOptions()\n {\n foreach (['test' => 'PHPUnit', 'pest' => 'Pest'] as $option => $name) {\n $this->getDefinition()->addOption(new InputOption(\n $option,\n null,\n InputOption::VALUE_NONE,\n \"Generate an accompanying {$name} test for the {$this->type}\"\n ));\n }\n }", "protected function getDefaultOptions()\n {\n // Option to run command once\n $this->addOption(\n 'run-once',\n null,\n InputOption::VALUE_NONE,\n 'Run the command just once, do not go into an endless loop'\n );\n\n //Option to print memory usage\n $this->addOption(\n 'detect-leaks',\n null,\n InputOption::VALUE_NONE,\n 'Output information about memory usage'\n );\n\n //Option to create pid file\n $this->addOption(\n 'pidfile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The location of the PID file that should be created for this process',\n null\n );\n\n //Option to set interval for command\n $this->addOption(\n 'interval',\n null,\n InputOption::VALUE_REQUIRED,\n 'Interval to run',\n null\n );\n }", "function add_network_option($network_id, $option, $value)\n {\n }", "public function setDefaultOption(string $name, $value = true): CommandExecutorInterface;", "public function set_option($option, $value) {\n $this->options[$option] = $value;\n \n }" ]
[ "0.7017618", "0.6983917", "0.6948958", "0.68156135", "0.6788639", "0.65723425", "0.65493953", "0.65454954", "0.6323385", "0.62940395", "0.6284396", "0.62622255", "0.62516826", "0.6170558", "0.6112595", "0.60737234", "0.6018191", "0.59890413", "0.5978059", "0.594203", "0.5880576", "0.5858359", "0.5845784", "0.5796762", "0.57842225", "0.57692146", "0.5765416", "0.57639945", "0.5759816", "0.5727478", "0.57274556", "0.56566906", "0.56397754", "0.56302375", "0.56050867", "0.5596494", "0.5579644", "0.55792296", "0.55792296", "0.5557449", "0.5547496", "0.55325985", "0.5528836", "0.551414", "0.5506945", "0.54935855", "0.54919636", "0.5484427", "0.5463648", "0.5447941", "0.54473203", "0.54366374", "0.5427058", "0.54196703", "0.5414924", "0.5413485", "0.5393202", "0.5392933", "0.5377926", "0.5377177", "0.53726536", "0.5363857", "0.53549796", "0.5353934", "0.5347607", "0.53408927", "0.5339553", "0.532963", "0.5326024", "0.529773", "0.5296492", "0.5296492", "0.5296492", "0.5296492", "0.5293389", "0.5285713", "0.5280359", "0.52742714", "0.5263644", "0.5259289", "0.5255688", "0.5255177", "0.5254696", "0.5248927", "0.52488315", "0.52429706", "0.52377635", "0.5234464", "0.52298486", "0.522411", "0.5205695", "0.52032053", "0.52005786", "0.51961833", "0.51953447", "0.5192334", "0.51837635", "0.5176787", "0.5175894", "0.51738834", "0.51671517" ]
0.0
-1
Add the option to the command line.
public function revisionRange($revisionRange) { $this->arguments[] = $revisionRange; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_option($option, $args = array())\n {\n }", "function add_screen_option($option, $args = array())\n {\n }", "function addOptions(GetOpt $_options)\n {\n $_options->addOptions(array(\n array(null, \"cmd\", GetOpt::NO_ARGUMENT, \"ConsoleOutput - Wenn die Ausgabe per CMD Fenster oder Terminal erfolgt.\\n\")\n ));\n }", "public function addOption(string $_option)\n {\n $this->options[] = $_option;\n }", "function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')\n {\n }", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "public function add_option() {\n\t\tadd_option(\n\t\t\t$this->header_text_option, // The header text option\n\t\t\t$this->default_header_text // The default header text\n\t\t);\n\t}", "public function option(string $option);", "final protected function addOption($option) {\n $this->selectedOptions[$option] = 1;\n }", "public function addOptions(Getopt $_options)\n {\n\n }", "public function addOption($option, $value = '')\n {\n $option = (string) $option;\n $this->_options[$option] = $value;\n }", "protected function appendOptions(): void\n {\n $this->signature .= '\n {--force : Force the worker to run even in maintenance mode}\n {--memory=128 : The memory limit in megabytes}\n {--sleep=0 : Number of seconds to sleep at each iteration in a loop}\n {--timeout=60 : The number of seconds a child process can run}\n ';\n }", "abstract public function addOptions(Getopt $_options);", "public function addOption()\n {\n try {\n $this->validate();\n DB::beginTransaction();\n if ($this->option !== \"\") {\n $this->assessment->options()->create([\n 'option' => $this->option,\n ]);\n }\n $this->option = \"\";\n } catch (\\Throwable $th) {\n DB::rollback();\n session()->flash('error', $th->getMessage());\n }\n DB::commit();\n $this->emitSelf('render');\n }", "public function\r\n add_option(HTMLTags_Option $option)\r\n {\r\n $attribute = $option->get_attribute('value');\r\n \r\n /*\r\n * What's this line for?\r\n */\r\n $attribute->get_value();\r\n \r\n $this->options[$attribute->get_value()] = $option;\r\n }", "function main() {\n\t$cmdline = new Recharg\\CommandLine();\n\n\t$progname = $GLOBALS['argv'][0];\n\n\t$cmdline->setUsage(<<<ETX\n$progname [OPTION]... [-T] SOURCE DEST\n or: $progname [OPTION]... SOURCE... DIRECTORY\n or: $progname [OPTION]... -t DIRECTORY SOURCE...\nETX\n );\n\n\t// Add description text, displayed above the option list.\n\t$cmdline\n\t\t->setDescription('Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.');\n\n\t$opt = new Recharg\\Option('help');\n\t$opt->setHelp('display this help and exit');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('version');\n\t$opt->setHelp('output version information and exit');\n\t$cmdline->addOption($opt);\n\n\t// Note: if no matches are provided, Recharg will assume \"--name\" for a\n\t// an option named \"name\".\n\t$opt = new Recharg\\Option('backup');\n\t$opt\n\t\t->setDefault('existing')\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('CONTROL')\n\t\t->setHelp('make a backup of each existing destination file');\n\t$cmdline->addOption($opt);\n\n\t// If a name consisting of a single character is passed, the option is\n\t// actually created with name \"opt_X\" (where \"X\" is the character\n\t// passed), and a single option \"X\"). In other words:\n\t//\n\t// new Option('a')\n\t//\n\t// is equivalent to\n\t//\n\t// new Option('opt_a', ['a']);\n\t$opt = new Recharg\\Option('b');\n\t$opt\n\t\t->setHelp('like --backup but does not accept an argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('force', ['f', 'force']);\n\t$opt\n\t\t->setHelp('do not prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('interactive', ['i', 'interactive']);\n\t$opt\n\t\t->setHelp('prompt before overwriting');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-clobber', ['n', 'no-clobber']);\n\t$opt\n\t\t->setHelp('do not overwrite an existing file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('strip-trailing-slashes');\n\t$opt\n\t\t->setHelp('remove any trailing slashes from each SOURCE argument');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('suffix');\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setHelp('override the usual backup suffix');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('target-directory', ['t', 'target-directory']);\n\t$opt\n\t\t->setAcceptsArguments(TRUE)\n\t\t->setPlaceholder('DIRECTORY')\n\t\t->setHelp('move all SOURCE arguments into DIRECTORY');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('no-target-directory',\n\t ['T', 'no-target-directory']);\n\t$opt\n\t\t->setHelp('treat DEST as a normal file');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('update', ['u', 'update']);\n\t$opt\n\t\t->setHelp('move only when the SOURCE file is newer than the destination file or when the destination file is missing');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('verbose', ['v', 'verbose']);\n\t$opt\n\t\t->setHelp('explain what is being done');\n\t$cmdline->addOption($opt);\n\n\t$opt = new Recharg\\Option('context', ['Z', 'context']);\n\t$opt\n\t\t->setHelp('set SELinux security context of destination file to default type');\n\t$cmdline->addOption($opt);\n\n\n\t$cmdline->setFooter(<<<ETX\nIf you specify more than one of -i, -f, -n, only the final one takes effect.\n\nThe backup suffix is '~', unless set with --suffix. The version control method may be selected via the --backup option. CONTROL can be:\n\n none, off never make backups (even if --backup is given)\n numbered, t make numbered backups\n existing, nil numbered if numbered backups exist, simple otherwise\n simple, never always make simple backups\n\nThis is a example command line processor using PHP Recharg. Visit\nhttp://github.org/flaviovs/recharg for more information.\nETX\n );\n\n\n\t//\n\t// Parse the command line.\n\t//\n\t$p = new Recharg\\Parser($cmdline);\n\n\ttry {\n\t\t$res = $p->parse();\n\t} catch (Recharg\\ParserException $ex) {\n\t\t// Get current program name. This is set to the current program\n\t\t// automatically when we created the CommandLine without specifying a name\n\t\t// for it.\n\t\t$commands = $ex->getCommands();\n\t\t$progname = array_shift($commands);\n\n\t\t// Get the current command sequence.\n\t\t$commands = implode(' ', $commands);\n\n\t\t$prefix = $progname;\n\t\tif ($commands) {\n\t\t\t$prefix .= \" $commands\";\n\t\t}\n\n\t\t// FIXME - move this command building logic to the exception\n\n\t\t$hint = \"$progname --help\";\n\t\tif ($commands) {\n\t\t\t$hint .= \" $commands\";\n\t\t}\n\n\t\t// Display the error message.\n\t\tprint \"$prefix: \" . $ex->getMessage() . \"\\n\";\n\t\tprint \"Try \\\"$hint\\\"\\n\";\n\n\t\texit(1);\n\t}\n\n\t// Display help if \"--help\" was passed.\n\tif ($res['help']) {\n\t\tprint $cmdline->getHelp($res->getCommands()) . \"\\n\";\n\t\texit(0);\n\t}\n\n\t// Act on parser results.\n\tprint \"* Execute command: \" . implode(' ', $res->getCommands()) . \"\\n\";\n\tprint \"* Options:\\n\";\n\tprint_r($res->getArguments());\n\tprint \"* Operands:\\n\";\n\tprint_r($res->getOperands());\n}", "public function addOption($hOption)\n {\n $this->hOptionList[] = $hOption;\n }", "protected function addOption($option, $value)\n\t{\n\t\treturn add_option($option,$value);\n\t}", "protected function defineCommandOptions()\n {\n $this->addOption('all', 'A', InputOption::VALUE_NONE, \"List all defined globals settings\");\n\n $this->addArgument('key', InputArgument::OPTIONAL, \"Config param name\", null);\n $this->addArgument('value', InputArgument::OPTIONAL, \"If set, will set param [key] to this value\", null);\n\n }", "public function addOption( $option ) {\n\t\t$option->setCustomizeSection( $this->getMenuSlug() );\n\n\t\t$this->options[] = $option;\n\t}", "function tidy_getopt(tidy $object, $option) {}", "protected function addOption(TrackerCommandOption $option)\n\t{\n\t\t$this->options[] = $option;\n\n\t\treturn $this;\n\t}", "protected function defineCommandOptions(){}", "public function addOption($name, $value = null)\n {\n $this->options[$name] = $value;\n }", "public function createOption($name, $value)\n {\n $this->runWpCliCommand('option', 'add', [$name, $value]);\n }", "public function addOption($option, $value)\n {\n $this->transport->addOption($option, $value);\n }", "public function appendCommandArgument($arg)\n {\n $this->cmd->createArgument()->setValue($arg);\n }", "public function addOptions(Getopt $_options)\n {\n $_options->addOptions(\n [\n ['x', \"x\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the x-position of the glider on the board.\"],\n ['y', \"y\", Getopt::REQUIRED_ARGUMENT, \"Allows to set the y-position of the glider on the board.\"]\n ]);\n }", "protected function createCommandLineOptions() {\n\t\ttry {\n\t\t\t$this->commandLineOptions = t3lib_div::makeInstance('tx_mnogosearch_clioptions');\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\techo $e->getMessage() . chr(10);\n\t\t\t$this->showUsageAndExit();\n\t\t}\n\t}", "private function createCommandLineOptions()\n {\n $options = $this->options;\n\n $cmdOptions = [];\n\n // Metadata (all, exif, icc, xmp or none (default))\n // Comma-separated list of existing metadata to copy from input to output\n $cmdOptions[] = '-metadata ' . $options['metadata'];\n\n // preset. Appears first in the list as recommended in the docs\n if (!is_null($options['preset'])) {\n if ($options['preset'] != 'none') {\n $cmdOptions[] = '-preset ' . $options['preset'];\n }\n }\n\n // Size\n $addedSizeOption = false;\n if (!is_null($options['size-in-percentage'])) {\n $sizeSource = filesize($this->source);\n if ($sizeSource !== false) {\n $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);\n $cmdOptions[] = '-size ' . $targetSize;\n $addedSizeOption = true;\n }\n }\n\n // quality\n if (!$addedSizeOption) {\n $cmdOptions[] = '-q ' . $this->getCalculatedQuality();\n }\n\n // alpha-quality\n if ($this->options['alpha-quality'] !== 100) {\n $cmdOptions[] = '-alpha_q ' . escapeshellarg($this->options['alpha-quality']);\n }\n\n // Losless PNG conversion\n if ($options['encoding'] == 'lossless') {\n // No need to add -lossless when near-lossless is used\n if ($options['near-lossless'] === 100) {\n $cmdOptions[] = '-lossless';\n }\n }\n\n // Near-lossles\n if ($options['near-lossless'] !== 100) {\n // We only let near_lossless have effect when encoding is set to \"lossless\"\n // otherwise encoding=auto would not work as expected\n if ($options['encoding'] == 'lossless') {\n $cmdOptions[] ='-near_lossless ' . $options['near-lossless'];\n }\n }\n\n if ($options['auto-filter'] === true) {\n $cmdOptions[] = '-af';\n }\n\n // Built-in method option\n $cmdOptions[] = '-m ' . strval($options['method']);\n\n // Built-in low memory option\n if ($options['low-memory']) {\n $cmdOptions[] = '-low_memory';\n }\n\n // command-line-options\n if ($options['command-line-options']) {\n array_push(\n $cmdOptions,\n ...self::escapeShellArgOnCommandLineOptions($options['command-line-options'])\n );\n }\n\n // Source file\n $cmdOptions[] = escapeshellarg($this->source);\n\n // Output\n $cmdOptions[] = '-o ' . escapeshellarg($this->destination);\n\n // Redirect stderr to same place as stdout\n // https://www.brianstorti.com/understanding-shell-script-idiom-redirect/\n $cmdOptions[] = '2>&1';\n\n $commandOptions = implode(' ', $cmdOptions);\n $this->logLn('command line options:' . $commandOptions);\n\n return $commandOptions;\n }", "public function addArg($name, $options = []) {\n $trimmed = trim($name);\n\n if (strlen($trimmed) > 0 && !strpos($trimmed, ' ')) {\n if (gettype($options) == 'array') {\n $this->commandArgs[$trimmed] = $this->_checkArgOptions($options);\n } else {\n $this->commandArgs[$trimmed] = [\n 'optional' => false,\n 'description' => '<NO DESCRIPTION>'\n ];\n }\n\n return true;\n }\n\n return false;\n }", "public function setOption(string $option, string $value): bool {}", "private function append_compiler_options ($command) {\n\t\t\n\t\t// System version macro\n\t\t$system_version = $this->osx_system_version();\n\t\t$command .= \"-dMAC_SYSTEM_VERSION:=$system_version \";\n\t\t\n\t\t// Debugging options\n\t\tif ($this->launch_mode == self::LAUNCH_MODE_DEBUG) {\n\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\n\t\t}\n\t\t\n\t\t// Platform specific options\n\t\tswitch ($this->target_loader->platform) {\n\t\t\tcase PLATFORM_IPHONE_DEVICE: {\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_DEVICE].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Cfvfpv2 \";\n\t\t\t\t\n\t\t\t\t// Add debugging options since we run the project by debugging\n\t\t\t\t$command .= $this->target_loader->advanced_debugging.\" \";\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PLATFORM_IPHONE_SIMULATOR: {\n\t\t\t\t// Add -XR for iPhone SDK\n\t\t\t\t$command .= \"-XR\".$this->target_loader->sdks[SDK_IPHONE_SIMULATOR].\" \";\n\t\t\t\t$command .= \"-XX \";\n\t\t\t\t$command .= \"-Tiphonesim \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $command;\n\t}", "public function setOption($option)\n {\n if (!isset(static::$availableOptions[$option])) {\n throw new \\InvalidArgumentException(sprintf(\n 'Invalid option specified: \"%s\". Expected one of (%s)',\n $option,\n implode(', ', array_keys(static::$availableOptions))\n ));\n }\n\n if (!in_array(static::$availableOptions[$option], $this->options)) {\n $this->options[] = static::$availableOptions[$option];\n }\n }", "function add_site_option($option, $value)\n {\n }", "protected function configure()\n {\n $this\n ->setDescription('Print all indices of an app-id')\n ->addOption(\n 'app-id',\n 'a',\n InputOption::VALUE_OPTIONAL\n );\n }", "public function addOption($sTitle, $sValue = null)\n {\n if (is_null($sValue))\n {\n $sValue = $sTitle;\n }\n\n //We keep track of all additions, even if they happen *after* bInit == TRUE.\n $oOption = \\Limbonia\\Widget::factory('Option');\n $oOption->setParam('value', $sValue);\n $oOption->addText((string)$sTitle);\n $this->addTag($oOption);\n\n if ($this->bInit)\n {\n $this->writeJavascript(\"Limbonia_addOption('$this->sName', '$sTitle', '$sValue');\");\n }\n }", "public function setOption(string $name, $value);", "public function setOption(string $name, $value);", "protected function configure(): void\n {\n $this\n ->setDescription('This command triggers ZgwToVrijbrpService->zgwToVrijbrpHandler() for a birth e-dienst')\n ->setHelp('This command allows you to test mapping and sending a ZGW zaak to the Vrijbrp api /dossiers')\n ->addOption('zaak', 'z', InputOption::VALUE_REQUIRED, 'The zaak uuid we should test with')\n ->addOption('source', 's', InputOption::VALUE_OPTIONAL, 'The location of the Source we will send a request to, location of an existing Source object')\n ->addOption('location', 'l', InputOption::VALUE_OPTIONAL, 'The endpoint we will use on the Source to send a request, just a string')\n ->addOption('mapping', 'm', InputOption::VALUE_OPTIONAL, 'The reference of the mapping we will use before sending the data to the source')\n ->addOption('synchronizationEntity', 'se', InputOption::VALUE_OPTIONAL, 'The reference of the entity we need to create a synchronization object');\n }", "protected function loadCommand()\r {\r $this->addCommandLine( 'lsb_release -a');\r\r }", "protected function setOptions() {\n\t\t$this->_options->setHelpText(\"This tool provides a mechanism to run recurring workflow tasks.\");\n\n\t\t$text = \"This option triggers the execution of all known workflows.\\n\";\n\t\t$text.= \"You may filter the execution using option '--workflow'.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_RUN, array('--run', '-r'), Option::TYPE_NO_VALUE, $text, 'value'));\n\n\t\t$text = \"This options provides a way to filter a specific workflow.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_WORKFLOW, array('--workflow', '-w'), Option::TYPE_VALUE, $text, 'value'));\n\t}", "public function addOption($attribute, $data)\r\n {\r\n Mage::helper('api')->toArray($data);\r\n return parent::addOption($attribute, $data);\r\n }", "private function addLongOption($name, $value)\n {\n $this->options[$name] = $value;\n }", "public function addOption($value, $text)\n\t{\n\t\tif (!is_scalar($value)) {\n\t\t\tthrow new DataGridColumnStatusException('Option value has to be scalar');\n\t\t}\n\n\t\t$option = new Option($this, $value, $text);\n\n\t\t$this->options[] = $option;\n\n\t\treturn $option;\n\t}", "public function set_option( string $option ) : void {\t\n\t\tself::$api_option = $option;\n\t}", "protected function registerOption($group, $option, $args = [])\n\t{\n\t\tregister_setting($group,$option,$args);\n\t}", "protected function addEmOption() {\r\n\t\t$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'Name of a entity manager in application config (Helpful if using multiple connections with \"orm.ems.options\")', DoctrineMigrationsServiceProvider::DEFAULT_ENTITY_MANAGER_NAME);\r\n\t}", "public static function register_option() {\n\t\tWPSEO_Options::register_option( static::get_instance() );\n\t}", "public function main()\n {\n $this->out($this->OptionParser->help());\n }", "public function add_option($name, $value)\n {\n if ('' == trim($name)) {\n return false;\n }\n\n $this->options[ $name ] = $value;\n\n return true;\n }", "public function register_option($option){\r\n\t\tif(!is_array($option))\r\n\t\t\t$option = array($option=>'');\r\n\t\t$this->registered_option = array_merge($this->registered_option, $option);\r\n\t}", "protected function configure()\n {\n $this->setName('merge:benchmark');\n $this->addOption('output-file', 'o', InputOption::VALUE_REQUIRED, 'Output file name for merged benchmark');\n $this->addOption('ignore-sample', 'i', InputOption::VALUE_NONE, 'Ignores sample size');\n $this->addArgument('path', InputArgument::IS_ARRAY|InputArgument::REQUIRED, 'File or directory path with benchmarks');\n }", "protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('format', '%isd% %mobile%');\n }", "protected function setCliArguments() {}", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "public function cli()\n {\n _APP_=='varimax' && $this->registerConsoleCommand();\n }", "public function addConfigOption($option)\n {\n $this->config['options'][] = $option;\n }", "protected function configure()\n {\n $this->setName('console')\n ->setDescription('Finds path to breweries for collecting unique beers for my party.')\n ->addOption('lat', null, InputOption::VALUE_REQUIRED, 'Start point latitude value')\n ->addOption('lon', null, InputOption::VALUE_REQUIRED, 'Start point longitude value')\n ->addOption('distance', null, InputOption::VALUE_REQUIRED, 'Distance limit to travel', 2000)\n ->addOption(\n 'bruteforce',\n null,\n InputOption::VALUE_NONE,\n 'Try to find best path with max beers (takes lot of time)'\n )\n ->setHelp(<<<EOT\nThis application tries to find best path to travel between several breweries and collect beers and return to home.\nThis looks like traveling salesman problem solver with limitations. It must travel not more than defined maximum\ndistance (with return to home).\n\nUser must define latitude and longitude of start point via parameters --lat and --lon\nLocation point parameters accepts several formats (use quotes to define as a parameter value):\n* 51.1548597\n* 40.23°\n* -5.234°\n* 56.242 E\n* 40° 26.222'\n* 65° 32.22' S\n* +40:26:46\n* 40:26:46 S\n\nDistance parameter defines limit of total travel distance with return to home. Must be non negative numeric value.\n\nIf You have time - You can try bruteforce option. This option generates all possible routes (with respect to max\ndistance) and calculates number of beers could be collected. Maximum number of beers returns best route.\n\nExample usage:\n bin/console --lat=54.6858453 --lon=25.2865201\nEOT\n );\n }", "private function configureDaemonDefinition(): void\n {\n $this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once.');\n $this->addOption('run-max', null, InputOption::VALUE_OPTIONAL, 'Run the command x time.');\n $this->addOption('memory-max', null, InputOption::VALUE_OPTIONAL, 'Gracefully stop running command when given memory volume, in bytes, is reached.', 0);\n $this->addOption('shutdown-on-exception', null, InputOption::VALUE_NONE, 'Ask for shutdown if an exception is thrown.');\n $this->addOption('show-exceptions', null, InputOption::VALUE_NONE, 'Display exception on command output.');\n }", "protected function configure()\n {\n $this\n ->setDescription('Produce messages from console.')\n ->addArgument('message', InputArgument::REQUIRED, 'The message')\n ->addOption('--repeat', '-r', InputOption::VALUE_REQUIRED, 'How many times the message must be published. Useful for testing.')\n ->addOption('--base64', '-b', InputOption::VALUE_REQUIRED, 'Set value to \"1\" if the message is base64 encoded.')\n ;\n }", "function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}", "protected function configure(): void\n {\n $this->setName('abc:check-cars')\n ->setDescription('Check all cars')\n ->addArgument('format', InputArgument::OPTIONAL, 'Progress format')\n ->addOption('option', null, InputOption::VALUE_NONE, 'Option description');\n }", "public function addOption($label, $value=\"\"){\n\t\t$option = new Element(\"option\");\n\t\t$value = (empty($value)) ? $label : $value;\n\t\t$option->setAttribute(\"value\", $value);\n\t\t$option->setInnerText($label);\n\t\t$this->options[] = $option;\n\t}", "protected function configure()\n {\n $this\n ->setName('generate')\n ->setDescription('Generate Licenses file from project dependencies.')\n ->addOption('hide-version', 'hv', InputOption::VALUE_NONE, 'Hide dependency version')\n ->addOption('csv', null, InputOption::VALUE_NONE, 'Output csv format');\n }", "protected function configure()\n {\n $this\n ->setDescription('Imports a mock csv data and calculates the the sum of all the documents')\n ->addArgument('file_path',InputArgument::REQUIRED, 'path to csv file') //{src/Data/data.csv}\n ->addArgument('currencies', InputArgument::REQUIRED, 'currencies')\n ->addArgument('output_currency',InputArgument::REQUIRED, 'output currency')\n ->addOption('vat', null,InputOption::VALUE_OPTIONAL, 'Option description')\n ;\n }", "protected function useOption(string $option, bool $switch): string\n {\n return ($switch ? ' ' . $option : '');\n }", "#[CLI\\Command(name: 'improved:options', aliases: ['c'])]\n #[CLI\\Argument(name: 'a1', description: 'an arg')]\n #[CLI\\Argument(name: 'a2', description: 'another arg')]\n #[CLI\\Option(name: 'o1', description: 'an option')]\n #[CLI\\Option(name: 'o2', description: 'another option')]\n #[CLI\\Usage(name: 'a b --o1=x --o2=y', description: 'Print some example values')]\n public function improvedOptions($a1, $a2, $o1 = 'one', $o2 = 'two')\n {\n return \"args are $a1 and $a2, and options are \" . var_export($o1, true) . ' and ' . var_export($o2, true);\n }", "public function add_argument ($key, $value)\n {\n $this->_args [$key] = $value;\n }", "public function insertOption($data);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function addOptions(...$options)\n {\n foreach ($options as $option) {\n $this->addOption($option);\n }\n }", "function update_option($option, $value, $autoload = \\null)\n {\n }", "protected function configure()\n {\n $this\n ->addOption('site', null, InputOption::VALUE_REQUIRED, 'Site ID')\n ->addOption('process', null, InputOption::VALUE_REQUIRED, 'Process ID', uniqid())\n ;\n }", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "function add_blog_option($id, $option, $value)\n {\n }", "public function add_cli_command() {\n\t\tif ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::add_command( 'queue', '\\WP_Queue\\Command' );\n\t}", "public function setOption($option, $value);", "public function setOption($name, $value = null);", "function hello_world_install() {\nadd_option(\"ernaehrungsnews_anzahl\", '3', '', 'yes');\nadd_option(\"ernaehrungsnews_trimmer\", '100', '', 'yes');\nadd_option(\"ernaehrungsnews_kategorieId\", '3', '', 'yes');\n\n\n\n}", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option)\n\t{\n\t\t$question->addOption($option);\n\t\t$this->update($question);//this will throw an exception if it does not exist in our array\n\t}", "function AddArgument($key, $value)\r\n\t{\r\n\t\t$this->Argument[$key]=$value;\r\n\t}", "protected function configure()\n {\n $this->setDescription('Scan for legacy error middleware or error middleware invocation.');\n $this->setHelp(self::HELP);\n $this->addOption('dir', 'd', InputOption::VALUE_REQUIRED, self::HELP_OPT_DIR);\n }", "private function o(string $option): string\n {\n return '<bold:bgLightYellow>' . $option . '</bold:bgLightYellow>';\n }", "protected function configure()\n {\n $this\n ->setName('check')\n ->setDescription('Check current for build or runtime')\n //->addOption('path', null, InputOption::VALUE_REQUIRED, 'Install on specific path', getcwd())\n ;\n }", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "protected function configure(): void\n {\n $this->setDescription('Generates the code for a project')\n ->addOption('project', 'p', InputOption::VALUE_REQUIRED, 'The path to the project definition file.', __DIR__ . '/project.json')\n ->addOption('template', 't', InputOption::VALUE_REQUIRED, 'The path to the template to use for code generation.', dirname(__DIR__) . '/templates/joomla35classic')\n ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'The path to the output directory for the generated code.', dirname(__DIR__, 2) . '/generated')\n ;\n }", "public function setOption($key, $value);", "public static function add($key, $type, $human, $default){\n\t\treturn System::addOption($key, $type, $human, $default);\n\t}", "public function addGuide($option = array())\n {\n $this->epub->addGuide($option);\n }", "public function addSharedOption(ChoiceQuestion $question, SharedOption $option) {\n $questionObj = $this->find($question->getId());\n $questionObj->addOption($option);\n\t}", "function add_allowed_options($new_options, $options = '')\n {\n }", "protected function configure()\n {\n $this->addOption(\n 'v|version', '-s',\n 'The version of the template that is to be installed; optional if '\n .'project is installed with PEAR'\n );\n }", "protected function addTestOptions()\n {\n foreach (['test' => 'PHPUnit', 'pest' => 'Pest'] as $option => $name) {\n $this->getDefinition()->addOption(new InputOption(\n $option,\n null,\n InputOption::VALUE_NONE,\n \"Generate an accompanying {$name} test for the {$this->type}\"\n ));\n }\n }", "protected function getDefaultOptions()\n {\n // Option to run command once\n $this->addOption(\n 'run-once',\n null,\n InputOption::VALUE_NONE,\n 'Run the command just once, do not go into an endless loop'\n );\n\n //Option to print memory usage\n $this->addOption(\n 'detect-leaks',\n null,\n InputOption::VALUE_NONE,\n 'Output information about memory usage'\n );\n\n //Option to create pid file\n $this->addOption(\n 'pidfile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The location of the PID file that should be created for this process',\n null\n );\n\n //Option to set interval for command\n $this->addOption(\n 'interval',\n null,\n InputOption::VALUE_REQUIRED,\n 'Interval to run',\n null\n );\n }", "function add_network_option($network_id, $option, $value)\n {\n }", "public function setDefaultOption(string $name, $value = true): CommandExecutorInterface;", "public function set_option($option, $value) {\n $this->options[$option] = $value;\n \n }" ]
[ "0.70175916", "0.6983609", "0.6949047", "0.68163276", "0.6787973", "0.6573456", "0.65504974", "0.65468806", "0.6324418", "0.6293724", "0.62850595", "0.62624854", "0.6250904", "0.61706716", "0.6113512", "0.60732675", "0.6019406", "0.5988806", "0.59799385", "0.5942778", "0.5880332", "0.58585054", "0.5846865", "0.57971185", "0.57843786", "0.5769758", "0.5764285", "0.57637316", "0.5760441", "0.5727272", "0.5726846", "0.5657578", "0.56394744", "0.5631571", "0.5604765", "0.55982786", "0.558052", "0.5580074", "0.5580074", "0.555866", "0.5547719", "0.5534043", "0.55284196", "0.5513657", "0.5507125", "0.5494232", "0.5493967", "0.5485185", "0.54645836", "0.544963", "0.5446444", "0.5437363", "0.5427425", "0.5420167", "0.54150534", "0.5413763", "0.5394699", "0.539458", "0.53789634", "0.5378603", "0.5373823", "0.5364346", "0.53554416", "0.53550965", "0.53489614", "0.5341461", "0.5339343", "0.53282714", "0.53256494", "0.52980125", "0.52974075", "0.52974075", "0.52974075", "0.52974075", "0.52927864", "0.5286151", "0.52822506", "0.52761674", "0.52635866", "0.5260319", "0.5257001", "0.52560604", "0.52557725", "0.52493954", "0.52487475", "0.5244076", "0.5239107", "0.5235473", "0.52304417", "0.52257776", "0.52067554", "0.5203249", "0.5200584", "0.51961184", "0.51950073", "0.5194221", "0.5183879", "0.5178929", "0.5175521", "0.51753545", "0.5169033" ]
0.0
-1
Linewrap the output by wrapping each line at width. The first line of each entry is indented by indent1 spaces, and the second and subsequent lines are indented by indent2 spaces. Width, indent1, and indent2 default to 76, 6 and 9 respectively. If width is 0 (zero) then indent the lines of the output without wrapping them.
public function w($width, $indent1 = null, $indent2 = null) { if ($indent1) { $width .= ',' . $indent1; if ($indent2) { $width .= ',' . $indent2; } } $this->arguments[] = '-w' . $width; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function wrapText($text, $indent = 0, $width = 0): string\n {\n if (!$text) {\n return $text;\n }\n\n if ((int)$width <= 0) {\n $size = Sys::getScreenSize();\n\n if ($size === false || $size[0] <= $indent) {\n return $text;\n }\n\n $width = $size[0];\n }\n\n $pad = str_repeat(' ', $indent);\n $lines = explode(\"\\n\", wordwrap($text, $width - $indent, \"\\n\", true));\n $first = true;\n\n foreach ($lines as $i => $line) {\n if ($first) {\n $first = false;\n continue;\n }\n $lines[$i] = $pad . $line;\n }\n\n return $pad . ' ' . implode(\"\\n\", $lines);\n }", "private static function wordWrap(&$line, $wrap, $charset = null)\n {\n preg_match('/^([\\t >]*)([^\\t >].*)?$/', $line, $regs);\n $beginning_spaces = $regs[1];\n if (isset($regs[2])) {\n $words = explode(' ', $regs[2]);\n } else {\n $words = array();\n }\n $i = 0;\n $line = $beginning_spaces;\n while ($i < count($words)) {\n /* Force one word to be on a line (minimum) */\n $line .= $words[$i];\n $line_len = strlen($beginning_spaces) + mb_strlen($words[$i], $charset) + 2;\n if (isset($words[$i + 1]))\n $line_len += mb_strlen($words[$i + 1], $charset);\n $i ++;\n /* Add more words (as long as they fit) */\n while ($line_len < $wrap && $i < count($words)) {\n $line .= ' ' . $words[$i];\n $i ++;\n if (isset($words[$i]))\n $line_len += mb_strlen($words[$i], $charset) + 1;\n else\n $line_len += 1;\n }\n /* Skip spaces if they are the first thing on a continued line */\n while (! isset($words[$i]) && $i < count($words)) {\n $i ++;\n }\n /* Go to the next line if we have more to process */\n if ($i < count($words)) {\n $line .= \"\\n\";\n }\n }\n }", "function wrap($string, $length)\r\n{\r\n echo \"To confirm your string is \\\"\" . $string . \"\\\" and your length is \" . $length . \"\\nOutput: \\n\";\r\n \r\n //turn string into array of words\r\n $words = preg_split('/\\s+/', $string, -1, PREG_SPLIT_NO_EMPTY);\r\n //line length starts at 0\r\n $lineLen = 0;\r\n //string to hold output\r\n $newString = \"\";\r\n\r\n \r\n foreach ($words as $word) {\r\n //work out word length\r\n $wordLen = strlen($word);\r\n \r\n //if wordlength is greater than length it needs to be split up further\r\n if ($wordLen > $length) {\r\n $partWord = str_split($word, $length);\r\n foreach ($partWord as $parts) {\r\n if ($parts == $partWord[0]) {\r\n //first word does not need new line before it, only after\r\n //if last char in string is not \\n add \\n\r\n if(substr($newString, -1) != \"\\n\"){\r\n $newString .= \"\\n\";\r\n }\r\n $newString .= \"$parts\";\r\n \r\n\r\n } else {\r\n //splitting after first split space needs to go after word\r\n \r\n $newString .= \"\\n$parts \";\r\n \r\n }\r\n }\r\n //calculate total line length to ensure it is not over the required length\r\n $lineLen += $wordLen;\r\n } else /*word is equal to or under maximum line length */ {\r\n if (($lineLen + $wordLen) <= $length) /*check adding word to line won't make it go over length */{\r\n\r\n if (($lineLen + $wordLen) < $length) {\r\n $newString .= \"$word \";\r\n //add 1 to length to account for space\r\n $wordLen += 1;\r\n } else /*line is going to be too big */{\r\n $newString .= $word;\r\n }\r\n //recalculate line length\r\n $lineLen += $wordLen;\r\n } else {\r\n //add spaces and add word back into output \r\n $newString .= \"\\n\";\r\n $lineLen = $wordLen + 1;\r\n $newString .= \"$word \";\r\n }\r\n }\r\n }\r\n\r\n return $newString;\r\n}", "function word_wrap_txt($string, $length){\n\t\t\n\t\t$line = '';\n\t\t$i = 0;\n\t\t\n\t\t$outputStringArray = str_split($string, $length);\n\t\t\n\t\t$noOFLines = count($outputStringArray) + 1;\n\t\t\n\t\tif (count($outputStringArray) == 1){\n\t\t\t\n\t\t\t$line .= \"\\t\".$outputStringArray[0].\"\\t\";\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tforeach ($outputStringArray as $outputString){\n\t\t\t\t//,\"/t |\"\n\t\t\t\tif ($noOFLines == $i){\n\t\t\t\t\t\n\t\t\t\t\t$line .= '|'.\"\\t\".$outputString.\"\\t\".'|';\n\t\t\t\t\t$line .= $i;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tif ($i != 0){\n\t\t\t\t\t\t$line .= \"\\t\".' '.\"\\t\".'|';\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$line .= '|'.\"\\t\".$outputString.\"\\t\".'|'.\"\\n\";\n\t\t\t\t\t//$line .= $i;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\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\treturn $line;\n\t\t\n\t}", "function _wordwrap($line)\n{\n\treturn wordwrap($line,100,\"\\n\",1);\n}", "function wrapWord($str, $width=50) {\r\n\tif (($width > -1) && ($width != 999999)) {\r\n\t $lines = explode(\"\\n\", $str);\r\n\t foreach ($lines as $line) {\r\n\t\t$words = explode(' ', $line );\r\n\t\tforeach ($words as $word) {\r\n\t\t $wordlength = JString::strlen($word);\r\n\t\t if($wordlength > $width) {\r\n\t\t\tfor($i =0; $i < $wordlength; $i = $i + $width) {\r\n\t\t\t $subword = JString::substr($word, $i, $width);\r\n\t\t\t $splitedArray[] = $subword;\r\n\t\t\t}\r\n\t\t } else {\r\n\t\t\t$splitedArray[] = $word;\r\n\t\t }\r\n\t\t}\r\n\t\t$linewords = implode(' ', $splitedArray);\r\n\t\t$splitedArray = '';\r\n\t\t$finalstring[] = $linewords;\r\n\t }\r\n\t return implode(\"\\n\",$finalstring);\r\n\t} else {\r\n\t return $str;\r\n\t}\r\n }", "public function wktGenerateMultilinestring();", "public function applyWidth() {\n $curTarget = $this->width;\n $start = 0;\n $arrayByLine = array();\n $arrayByLineIndex = 0;\n $arraytoPrint = array();\n $temp = \"\";\n $localArray = $this->originalArray;\n \n for ($i = 0; $i < count($this->originalArray); $i++) {\n \n $val = strlen($temp) + strlen($localArray[$i]) + 1; \n \n if (strlen($temp) + strlen($localArray[$i]) + 1 <= $this->width) {\n if (strlen($temp) == 0) {\n $temp = $temp.$localArray[$i];\n } else {\n $temp = $temp.\" \".$localArray[$i];\n }\n } else {\n\n $arrayByLine[$arrayByLineIndex] = $temp;\n $arrayByLineIndex++;\n $i--;\n $temp = \"\";\n }\n \n if ($i == count($this->originalArray) - 1) {\n $arrayByLine[$arrayByLineIndex] = $temp;\n }\n }\n \n $this->textToPrint = $arrayByLine;\n }", "function smart_wordwrap($string, $width = 75, $break = \"<br/>\") {\n $pattern = sprintf('/([^ ]{%d,})/', $width);\n $output = '';\n $words = preg_split($pattern, $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n\n foreach ($words as $word) {\n if (false !== strpos($word, ' ')) {\n // normal behaviour, rebuild the string\n $output .= $word;\n } else {\n // work out how many characters would be on the current line\n $wrapped = explode($break, wordwrap($output, $width, $break));\n $count = $width - (strlen(end($wrapped)) % $width);\n\n // fill the current line and add a break\n $output .= substr($word, 0, $count) . $break;\n\n // wrap any remaining characters from the problem word\n $output .= wordwrap(substr($word, $count), $width, $break, true);\n }\n }\n\n // wrap the final output\n return wordwrap($output, $width, $break);\n}", "public function indent($count = 4);", "private function makeLineBreaks(): void {\n\t\tif($this->getMaxLineLength()) {\n\t\t\t$this->setMsg(wordwrap($this->getMsg(), $this->getMaxLineLength(), PHP_EOL));\n\t\t}\n\n\t\t$this->setMsg(str_replace('<br />', PHP_EOL, str_replace('<br>', PHP_EOL, $this->getMsg())));\n\t}", "private function wrapText($size, $path, $text, $width) {\n $ret = \"\";\n $lines = explode(\"\\n\", $text);\n\n foreach ($lines as $line) {\n $words = explode(\" \", $line);\n foreach ($words as $word) {\n $testboxWord = imagettfbbox($size, 0, $path, $word);\n\n $len = strlen($word);\n while ($testboxWord[2] > $width && $len > 0) {\n $word = substr($word, 0, $len);\n $len--;\n $testboxWord = imagettfbbox($size, 0, $path, $word);\n }\n\n $teststring = $ret.\" \".$word;\n $testboxString = imagettfbbox($size, 0, $path, $teststring);\n if ($testboxString[2] > $width){\n $ret .= ($ret == \"\" ? \"\" : \"\\n\").$word;\n }else{\n $ret .= ($ret == \"\" ? \"\" : \" \").$word;\n }\n }\n $ret .= \"\\n\";\n }\n\n return $ret;\n }", "function mb_eaw_wrap($string, $width = 75, $break = \"\\n\", $table = null, $encoding = null)\n{\n if (func_num_args() < 5) {\n $encoding = mb_internal_encoding();\n }\n $len = mb_strlen($string, $encoding);\n if ($len === false) {\n return false;\n }\n $line = '';\n $lineLen = 0;\n $retval = '';\n for ($start = 0; $start < $len; ++$start) {\n $char = mb_substr($string, $start, 1, $encoding);\n $charwidth = mb_eaw_strwidth($char, $table, $encoding);\n if (($lineLen + $charwidth) <= $width) {\n $line .= $char;\n $lineLen += $charwidth;\n } else {\n $retval .= $line.$break;\n $line = $char;\n $lineLen = $charwidth;\n }\n }\n if ($line !== '') {\n return $retval.$line.$break;\n }\n return $retval;\n}", "public function justifyText() {\n $positions = array();\n for ($i = 0; $i < count($this->textToPrint); $i++) { // do this for each line of text\n\n $lineByLine = str_word_count($this->textToPrint[$i],1,self::CHARLIST);\n\n for ($j = 0; $j < count($lineByLine)-1; $j++) { // pad all words but last with trailing whitespace\n $lineByLine[$j] = $lineByLine[$j]. \" \";\n }\n $whiteSpaces = count($lineByLine) - 1; \n \n // this wasn't getting calculated correctly if there were multiple spaces, such as after a period in a sentence\n $localLength = 0;\n foreach ($lineByLine as $key => $value) {\n $localLength += strlen($value);\n }\n $spacesNeeded = $this->width - $localLength;\n \n if ($whiteSpaces > 0) { // dont' do this for a line containing only one word.\n \n $middle = (int) (($whiteSpaces+1)/2); // need to find middle of array\n $whereToInsert = $middle;\n $lkey = 1;\n $rkey = 1;\n $linc = 2;\n $rinc = 2;\n $rinit = $rkey;\n $linit = $lkey;\n\n if ($whiteSpaces % 2 == 0) { // if there are an even number of whitespaces, then we don't have a true middle, start at the right\n $side = \"right\";\n } else {\n $side = \"middle\";\n }\n\n while ($spacesNeeded > 0) {\n \n // insert to middle, then increment keys\n if ($side == \"middle\") {\n array_splice( $lineByLine, $whereToInsert, 0, \" \" );\n $lkey++;\n $rkey++;\n }\n \n if($side == \"right\") {\n $whereToInsert = $middle+$rkey;\n if ($whereToInsert >= count($lineByLine)) { // reached the end of array -- need to reset right side\n $rkey = $rinit;\n $whereToInsert = $middle+$rkey;\n }\n array_splice( $lineByLine, $whereToInsert, 0, \" \" );\n $rkey+=$rinc;\n } else if ($side == \"left\") {\n $whereToInsert = $middle-$lkey;\n if ($whereToInsert <= 0) { //reached the end of array -- need to reset left side\n $lkey = $linit;\n $whereToInsert = $middle-$lkey;\n }\n array_splice( $lineByLine, $whereToInsert, 0, \" \" );\n $lkey+=$linc;\n }\n \n $middle = (int) (count($lineByLine)/2);\n $side = ($side == \"right\" ? \"left\" : \"right\");\n $spacesNeeded--;\n }\n $this->textToPrint[$i] = implode(\"\", $lineByLine);\n }\n }\n }", "public static function wordwrap($str, $charLimit, $breakline = '<br/>') {\n\t\tif (! is_numeric ( $charLimit ))\n\t\t\t$charLimit = 76;\n\t\t\n\t\t$str = preg_replace ( \"| +|\", \" \", $str );\n\t\t$str = preg_replace ( \"/\\r\\n|\\r/\", \"\\n\", $str );\n\t\t\n\t\t$nowrap = array ();\n\t\tif (preg_match_all ( \"|(\\[nowrap\\].+?\\[/nowrap\\])|s\", $str, $matches )) {\n\t\t\t$count = count ( $matches ['0'] );\n\t\t\tfor($i = 0; $i < $count; $i ++) {\n\t\t\t\t$nowrap [] = $matches ['1'] [$i];\n\t\t\t\t$str = str_replace ( $matches ['1'] [$i], \"[[nowrapped\" . $i . \"]]\", $str );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$str = wordwrap ( $str, $charLimit, $breakline, false );\n\t\t\n\t\t$output = '';\n\t\tforeach ( explode ( $breakline, $str ) as $line ) {\n\t\t\tif (strlen ( $line ) <= $charLimit) {\n\t\t\t\t$output .= $line . $breakline;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$temp = '';\n\t\t\twhile ( (strlen ( $line )) > $charLimit ) {\n\t\t\t\tif (preg_match ( \"!\\[url.+\\]|://|wwww.!\", $line ))\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t$temp .= substr ( $line, 0, $charLimit - 1 );\n\t\t\t\t$line = substr ( $line, $charLimit - 1 );\n\t\t\t}\n\t\t\t$output .= ($temp != '' ? $temp . $line : $line) . $breakline;\n\t\t}\n\t\t\n\t\tif (count ( $nowrap ) > 0) {\n\t\t\tforeach ( $nowrap as $key => $val ) {\n\t\t\t\t$output = str_replace ( \"[[nowrapped\" . $key . \"]]\", $val, $output );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$output = str_replace ( array (\n\t\t\t\t'[nowrap]',\n\t\t\t\t'[/nowrap]' \n\t\t), '', $output );\n\t\treturn $output;\n\t}", "protected function wrap(?string $message = null, int $wrapLength = self::LINE_LENGTH_MUST): array\n {\n if ($message === null || $message === '') {\n return [''];\n }\n $message = str_replace([\"\\r\\n\", \"\\r\"], \"\\n\", $message);\n $lines = explode(\"\\n\", $message);\n $formatted = [];\n $cut = ($wrapLength === static::LINE_LENGTH_MUST);\n\n foreach ($lines as $line) {\n if (empty($line) && $line !== '0') {\n $formatted[] = '';\n continue;\n }\n if (strlen($line) < $wrapLength) {\n $formatted[] = $line;\n continue;\n }\n if (!preg_match('/<[a-z]+.*>/i', $line)) {\n $formatted = array_merge(\n $formatted,\n explode(\"\\n\", Text::wordWrap($line, $wrapLength, \"\\n\", $cut))\n );\n continue;\n }\n\n $tagOpen = false;\n $tmpLine = $tag = '';\n $tmpLineLength = 0;\n for ($i = 0, $count = strlen($line); $i < $count; $i++) {\n $char = $line[$i];\n if ($tagOpen) {\n $tag .= $char;\n if ($char === '>') {\n $tagLength = strlen($tag);\n if ($tagLength + $tmpLineLength < $wrapLength) {\n $tmpLine .= $tag;\n $tmpLineLength += $tagLength;\n } else {\n if ($tmpLineLength > 0) {\n $formatted = array_merge(\n $formatted,\n explode(\"\\n\", Text::wordWrap(trim($tmpLine), $wrapLength, \"\\n\", $cut))\n );\n $tmpLine = '';\n $tmpLineLength = 0;\n }\n if ($tagLength > $wrapLength) {\n $formatted[] = $tag;\n } else {\n $tmpLine = $tag;\n $tmpLineLength = $tagLength;\n }\n }\n $tag = '';\n $tagOpen = false;\n }\n continue;\n }\n if ($char === '<') {\n $tagOpen = true;\n $tag = '<';\n continue;\n }\n if ($char === ' ' && $tmpLineLength >= $wrapLength) {\n $formatted[] = $tmpLine;\n $tmpLineLength = 0;\n continue;\n }\n $tmpLine .= $char;\n $tmpLineLength++;\n if ($tmpLineLength === $wrapLength) {\n $nextChar = $line[$i + 1] ?? '';\n if ($nextChar === ' ' || $nextChar === '<') {\n $formatted[] = trim($tmpLine);\n $tmpLine = '';\n $tmpLineLength = 0;\n if ($nextChar === ' ') {\n $i++;\n }\n } else {\n $lastSpace = strrpos($tmpLine, ' ');\n if ($lastSpace === false) {\n continue;\n }\n $formatted[] = trim(substr($tmpLine, 0, $lastSpace));\n $tmpLine = substr($tmpLine, $lastSpace + 1);\n\n $tmpLineLength = strlen($tmpLine);\n }\n }\n }\n if (!empty($tmpLine)) {\n $formatted[] = $tmpLine;\n }\n }\n $formatted[] = '';\n\n return $formatted;\n }", "function smart_wordwrap($string, $width = 75, $break = \"<br>\") {\n $pattern = sprintf('/([^ ]{%d,})/', $width);\n $output = '';\n $words = preg_split($pattern, $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n\n foreach ($words as $word) {\n // normal behaviour, rebuild the string\n if (false !== strpos($word, ' ')) {\n $output .= $word;\n } else {\n // work out how many characters would be on the current line\n $wrapped = explode($break, wordwrap($output, $width, $break));\n $count = $width - (strlen(end($wrapped)) % $width);\n\n // fill the current line and add a break\n $output .= substr($word, 0, $count) . $break;\n\n // wrap any remaining characters from the problem word\n $output .= wordwrap(substr($word, $count), $width, $break, true);\n }\n }\n\n // wrap the final output\n return wordwrap($output, $width, $break);\n }", "function rc_wordwrap($string, $width=75, $break=\"\\n\", $cut=false)\n{\n $para = explode($break, $string);\n $string = '';\n while (count($para)) {\n $list = explode(' ', array_shift($para));\n $len = 0;\n while (count($list)) {\n $line = array_shift($list);\n $l = mb_strlen($line);\n $newlen = $len + $l + ($len ? 1 : 0);\n\n if ($newlen <= $width) {\n $string .= ($len ? ' ' : '').$line;\n $len += (1 + $l);\n } else {\n\tif ($l > $width) {\n\t if ($cut) {\n\t $start = 0;\n\t while ($l) {\n\t $str = mb_substr($line, $start, $width);\n\t $strlen = mb_strlen($str);\n\t $string .= ($len ? $break : '').$str;\n\t $start += $strlen;\n\t $l -= $strlen;\n\t $len = $strlen;\n\t }\n\t } else {\n $string .= ($len ? $break : '').$line;\n\t if (count($list)) $string .= $break;\n\t $len = 0;\n\t }\n\t} else {\n $string .= $break.$line;\n\t $len = $l;\n }\n }\n }\n if (count($para)) $string .= $break;\n }\n return $string;\n}", "function s_m_put_txt_data_order_rows($rows, $width){\r\n // $width is containing the width for eacht column\r\n if(count($rows) == 0){\r\n echo \"Error, no rows\";\r\n die();\r\n }\r\n // add space\r\n $rows_new = array();\r\n for($r = 0; $r < count($rows); $r++){\r\n $k = 0;\r\n foreach ($rows[$r] as $key => $value) {\r\n $rows_new[$r][$key] = $rows[$r][$key] . str_repeat(\" \", $width[$k] - strlen($rows[$r][$key]));\r\n $k++;\r\n }\r\n }\r\n return $rows_new;\r\n}", "private function makeLineBreaksHTML(): void {\n\t\t$this->setMsg(str_replace([PHP_EOL, '\\r\\n'], '<br />', $this->getMsg()));\n\n\t\tif($this->getMaxLineLength()) {\n\t\t\t$this->setMsg(wordwrap($this->getMsg(), $this->getMaxLineLength(), '<br />' . PHP_EOL));\n\t\t}\n\t}", "function smart_wordwrap($string, $width = 75, $break = \"\\n\") {\n\t\t\t$pattern = sprintf('/([^ ]{%d,})/', $width);\n\t\t\t$output = '';\n\t\t\t$words = preg_split($pattern, $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n\n\t\t\tforeach ($words as $word) {\n\t\t\t\tif (false !== strpos($word, ' ')) {\n\t\t\t\t// normal behaviour, rebuild the string\n\t\t\t\t\t$output .= $word;\n\t\t\t\t} else {\n\t\t\t\t\t// work out how many characters would be on the current line\n\t\t\t\t\t$wrapped = explode($break, wordwrap($output, $width, $break));\n\t\t\t\t\t$count = $width - (strlen(end($wrapped)) % $width);\n\n\t\t\t\t\t// fill the current line and add a break\n\t\t\t\t\t$output .= substr($word, 0, $count) . $break;\n\n\t\t\t\t\t// wrap any remaining characters from the problem word\n\t\t\t\t\t$output .= wordwrap(substr($word, $count), $width, $break, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// wrap the final output\n\t\t\treturn wordwrap($output, $width, $break);\n\t\t}", "function IndentMultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $indent=0)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n\n $wFirst = $w-$indent;\n $wOther = $w;\n\n $wmaxFirst=($wFirst-2*$this->cMargin)*1000/$this->FontSize;\n $wmaxOther=($wOther-2*$this->cMargin)*1000/$this->FontSize;\n\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 && $s[$nb-1]==\"\\n\")\n $nb--;\n $b=0;\n if($border)\n {\n if($border==1)\n {\n $border='LTRB';\n $b='LRT';\n $b2='LR';\n }\n else\n {\n $b2='';\n if(is_int(strpos($border,'L')))\n $b2.='L';\n if(is_int(strpos($border,'R')))\n $b2.='R';\n $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2;\n }\n }\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $ns=0;\n $nl=1;\n $first=true;\n while($i<$nb)\n {\n //Get next character\n $c=$s[$i];\n if($c==\"\\n\")\n {\n //Explicit line break\n if($this->ws>0)\n {\n $this->ws=0;\n $this->_out('0 Tw');\n }\n $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $ns=0;\n $nl++;\n if($border && $nl==2)\n $b=$b2;\n continue;\n }\n if($c==' ')\n {\n $sep=$i;\n $ls=$l;\n $ns++;\n }\n $l+=$cw[$c];\n\n if ($first)\n {\n $wmax = $wmaxFirst;\n $w = $wFirst;\n }\n else\n {\n $wmax = $wmaxOther;\n $w = $wOther;\n }\n\n if($l>$wmax)\n {\n //Automatic line break\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n if($this->ws>0)\n {\n $this->ws=0;\n $this->_out('0 Tw');\n }\n $SaveX = $this->x; \n if ($first && $indent>0)\n {\n $this->SetX($this->x + $indent);\n $first=false;\n }\n $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);\n $this->SetX($SaveX);\n }\n else\n {\n if($align=='J')\n {\n $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;\n $this->_out(sprintf('%.3f Tw',$this->ws*$this->k));\n }\n $SaveX = $this->x; \n if ($first && $indent>0)\n {\n $this->SetX($this->x + $indent);\n $first=false;\n }\n $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);\n $this->SetX($SaveX);\n $i=$sep+1;\n }\n $sep=-1;\n $j=$i;\n $l=0;\n $ns=0;\n $nl++;\n if($border && $nl==2)\n $b=$b2;\n }\n else\n $i++;\n }\n //Last chunk\n if($this->ws>0)\n {\n $this->ws=0;\n $this->_out('0 Tw');\n }\n if($border && is_int(strpos($border,'B')))\n $b.='B';\n $this->Cell($w,$h,substr($s,$j,$i),$b,2,$align,$fill);\n $this->x=$this->lMargin;\n }", "protected function lineBreaks() {\n\t\t$this->text = $this->removeUnneccesaryLinebreaks($this->text);\n\t\t$this->text = nl2br($this->text);\n\t\tReturn $this;\n\t}", "public function firstLineIndentProvider()\n {\n return [[1]];\n }", "function jumpoff_line_wrap ( $textarea, $type=\"list\" ){\n // Get each line break from our field/input\n $lines = explode(\"\\n\", $textarea);\n\n // If we have something\n if ( !empty($lines) ) {\n \n // Loop through all our lines\n // Would never exceed 5\n foreach ( $lines as $line ) {\n\n // If is $type = list\n if ($type == 'list'){\n $output .= '<li>'. trim( $line ) .'</li>';\n } \n // If $type = span\n elseif ($type == 'span'){\n $output .= '<span>'. trim( $line ) .'</span>';\n }\n \n }\n }\n return $output;\n}", "private function wrapLine($marker, $class, $line, $colspan=0)\n\t{\n\t\tif ($line !== '')\n\t\t{\n\t\t\t// The <div> wrapper is needed for 'overflow: auto' style to scroll properly\n\t\t\t$line = \"<div>$line</div>\";\n\t\t}\n\t\t$html = \"\\t\\t\\t\".'<td class=\"diff-marker\">'.$marker.'</td>'.\"\\n\";\n\t\t$html .= \"\\t\\t\\t\".'<td ';\n\t\t$html .= ($colspan > 0) ? 'colspan=\"'.$colspan.'\" ' : '';\n\t\t$html .= 'class=\"'.$class.'\">'.$line.'</td>'.\"\\n\";\n\t\treturn $html;\n\t}", "public static function wordwrap_per_line(\n string $str,\n int $width = 75,\n string $break = \"\\n\",\n bool $cut = false,\n bool $add_final_break = true,\n string $delimiter = null\n ): string {\n if ($delimiter === null) {\n $strings = \\preg_split('/\\\\r\\\\n|\\\\r|\\\\n/', $str);\n } else {\n $strings = \\explode($delimiter, $str);\n }\n\n $string_helper_array = [];\n if ($strings !== false) {\n foreach ($strings as $value) {\n $string_helper_array[] = self::wordwrap($value, $width, $break, $cut);\n }\n }\n\n if ($add_final_break) {\n $final_break = $break;\n } else {\n $final_break = '';\n }\n\n return \\implode($delimiter ?? \"\\n\", $string_helper_array) . $final_break;\n }", "public static function wordwrap($text, $width = null, $break = \"\\n\")\n {\n if (null === $width) {\n $window = Console\\Window::getSize();\n $width = $window['x'];\n }\n\n return wordwrap($text, $width, $break, true);\n }", "private function add_line($text = \"\", $should_wordwrap = true)\n {\n $text = $should_wordwrap ? wordwrap($text, $this->printer_width) : $text;\n $this->printer->text($text . \"\\n\");\n }", "private function add_line($text = \"\", $should_wordwrap = true)\n {\n $text = $should_wordwrap ? wordwrap($text, $this->printer_width) : $text;\n $this->printer->text($text.\"\\n\");\n }", "function show_lines2($list_lines,$list_numlines,$list_indent,$only_code,$max_lines,$indent_mccount = Array()) {\n\necho \"<table>\\n\";\necho \"<thead><tr><th>Line</th><th>MC count</th><th>Code</th></tr></thead>\\n\";\necho \"<tbody>\\n\";\nfor ($i=0;$i<min(count($list_lines),$max_lines);$i++)\n{\n\techo \"<tr><td>\\n\";\n\n\t$line = htmlentities($list_lines[$i]);\n\t$numline = $list_numlines[$i];\n\t$indent = $list_indent[$i];\n\t\n\t$num_spaces = $indent*8;\n\t$indent_str = str_repeat(':'.str_repeat('&nbsp;',8),$indent); // indentazione\n\t\n\tif (count('indent_mccount') > 0)\n\t{\n\t\t$mc_count = $indent_mccount[$i];\n\t\tif ($mc_count > 0)\n\t\t{\n\t\t\t$ks_mccount = sprintf('(->%1d) </td><td> ', $mc_count);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ks_mccount = ' </td><td> ';\n\t\t}\n\t}\n\telse\n\t{\n\t\t$ks_mccount = '';\n\t}\n\t\n\t// function line spacing\n\tif (substr($line,0,8) === 'function')\n\t{\n\t\techo \"&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>\\n<tr><td>\\n\";\n\t}\n\t\n\tif ($only_code)\n\t{\n\t\techo(sprintf('%s%s%s',$ks_mccount,$indent_str,$line));\n\t}\n\telse\n\t{\n\t\techo(sprintf('%3d </td><td> %s%s%s',$numline,$ks_mccount,$indent_str,$line));\n\t}\n\techo \"</td></tr>\\n\";\n} // end for $i\n\necho \"</tbody></table>\\n\";\n// stampa(' ');\n// stampa('------------------------------------------------------------------------------');\n\n}", "function setLineWidth($width)\n {\n $this->_pdfDocument->data['lineWidth'] = $width;\n $this->pageBuffer .= sprintf(\"%.2F w\\n\", $width * $this->getDocument()->getScaleFactor());\n\n return $this->_pdfDocument;\n }", "public function setOutlineWidth($outlineWidth) {}", "public function indentLines($startLine, $endLine);", "function line_break($length = 40)\n{\n $output = \"\";\n for($i = 0; $i < $length; $i++) {\n $output .= '-';\n }\n return $output;\n}", "function lineBreaks($str, $lineLength = 80) {\n\t$lineBreak = '\\n';\n\t$tempString = $str;\n\t$returnString = '';\n\t\n\twhile(strlen($tempString) > 0) {\n\t\t$buildString = substr($tempString, 0, $lineLength);\n\t\t$buildString .= $lineBreak;\n\t\t$returnString .= $buildString;\n\t\t\n\t\t$tempString = substr($tempString, $lineLength);\n\t}\n\t\n\treturn $returnString;\n}", "public function setWordWrap()\n {\n }", "function solution_mt($cols, $rows, $width) {\n for($r=1; $r<= $rows; $r++) {\n for($c=1; $c <= $cols; $c++ ) {\n yield str_pad($r*$c, $width, ' ', STR_PAD_LEFT);\n }\n yield \"\\n\";\n }\n}", "public function stdWrap_encapsLines($content = '', $conf = [])\n {\n return $this->encaps_lineSplit($content, $conf['encapsLines.']);\n }", "private function _indent($amount = 1)\n {\n return str_repeat(' ', $amount);\n }", "function lineBreaks($str, $lineLength = 80) {\n $lineBreak = '\\n';\n $tempString = $str;\n $returnString = '';\n \n while(strlen($tempString) > 0) {\n $buildString = substr($tempString, 0, $lineLength);\n $buildString .= $lineBreak;\n $returnString .= $buildString;\n \n $tempString = substr($tempString, $lineLength);\n }\n \n return $returnString;\n}", "function WordWrap(&$text, $maxwidth)\n\t\t{\n\t\t\t$biggestword=0;//EDITEI\n\t\t\t$toonarrow=false;//EDITEI\n\n\t\t\t$text = trim($text);\n\t\t\tif ($text==='') return 0;\n\t\t\t$space = $this->GetStringWidth(' ');\n\t\t\t$lines = explode(\"\\n\", $text);\n\t\t\t$text = '';\n\t\t\t$count = 0;\n\n\t\t\tforeach ($lines as $line)\n\t\t\t{\n\t\t\t\t$words = preg_split('/ +/', $line);\n\t\t\t\t$width = 0;\n\n\t\t\t\tforeach ($words as $word)\n\t\t\t\t{\n\t\t\t\t\t$wordwidth = $this->GetStringWidth($word);\n\n\t\t\t\t\t //EDITEI\n\t\t\t\t\t //Warn user that maxwidth is insufficient\n\t\t\t\t\t if ($wordwidth > $maxwidth)\n\t\t\t\t\t {\n\t\t\t\t\t\t if ($wordwidth > $biggestword) $biggestword = $wordwidth;\n\t\t\t\t\t\t $toonarrow=true;//EDITEI\n\t\t\t\t\t }\n\t\t\t\t\tif ($width + $wordwidth <= $maxwidth)\n\t\t\t\t\t{\n\t\t\t\t\t\t$width += $wordwidth + $space;\n\t\t\t\t\t\t$text .= $word.' ';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$width = $wordwidth + $space;\n\t\t\t\t\t\t$text = rtrim($text).\"\\n\".$word.' ';\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$text = rtrim($text).\"\\n\";\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t$text = rtrim($text);\n\n\t\t\t//Return -(wordsize) if word is bigger than maxwidth \n\t\t\tif ($toonarrow) return -$biggestword;\n\t\t\telse return $count;\n\t\t}", "public static function lineBreakCorrectlyTransformedOnWayToRteProvider() {}", "public function test_indent(){\n\t\t$listotron = new Listotron();\n\n\t\t$user1 = md5(rand() . md5(rand()));\n\t\t$now = $listotron->getNOW();\n\t\t\n\t\t// modify the List\n\t\t$rows = $listotron->indent(4, $user1);\n\t\t\n\t\t// check the output\n\t\t$this->assertEqual(count($rows), 2);\n\t\t$this->assertEqual($rows[0][\"row_id\"], 4);\n\t\t$this->assertEqual($rows[0][\"par\"], 3);\n\t\t$this->assertEqual($rows[0][\"prev\"], null);\n\t\t$this->assertEqual($rows[0][\"lm\"], $now);\n\t\t$this->assertEqual($rows[0][\"lmb\"], $user1);\n\t\t\n\t\t$this->assertEqual($rows[1][\"row_id\"], 5);\n\t\t$this->assertEqual($rows[1][\"par\"], 1);\n\t\t$this->assertEqual($rows[1][\"prev\"], 3);\n\t\t$this->assertEqual($rows[1][\"lm\"], $now);\n\t\t$this->assertEqual($rows[1][\"lmb\"], $user1);\n\t}", "public function setWrap($value)\n\t{\n\t\t$this->getStyle()->setWrap($value);\n\t}", "private function _format_lines($tokensource)\n\t{\n $nocls = $this->noclasses;\n $lsep = $this->lineseparator;\n // for <span style=\"\"> lookup only\n $getcls = &$this->ttype2class;\n $c2s = &$this->class2style;\n \n $lspan = '';\n $line = '';\n foreach($tokensource as $ttype => $value) {\n if($nocls) {\n $cclass = $getcls[$ttype];\n $i = 0;\n while(is_null($cclass)) {\n $ttype = Token::getToken($ttype)->parent;\n $cclass = $getcls[\"$ttype\"];\n\n if($i>=10) break;\n $i++;\n }\n $cspan = $cclass ? sprintf('<span style=\"%s\">', $c2s[$cclass][0]) : '';\n } else {\n $cls = $this->_get_css_class($ttype);\n $cspan = $cls ? sprintf('<span class=\"%s\">', $cls) : '';\n \n\t\t\t}\n\t\t\t$parts = htmlspecialchars($value, ENT_QUOTES);\n\t\t\t$parts = explode(\"\\n\", $parts);\n\t\t\t\n\t\t\t$part_last = array_pop($parts);\n\t\t\t\n\t\t\t// Weiler: ZERO bug, $part = '0'; we need to use !=''\n\t\t\t\n\t\t\t// for all but the last line\n\t\t\tforeach($parts as $part) {\n if($line!='') {\n if($lspan != $cspan) {\n $line .= ($lspan ? '</span>' : '') . $cspan . $part .\n ($cspan ? '</span>' : '') . $lsep;\n } else { // both are the same\n $line .= $part . ($lspan ? '</span>' : '') . $lsep;\n }\n yield [1, $line];\n $line = '';\n } elseif($part!='') {\n yield [1, $cspan . $part . ($cspan ? '</span>' : '') . $lsep];\n } else {\n yield [1, $lsep];\n }\n\t\t\t}\n // for the last line\n\t\t\tif($line!='' && $part_last!='') {\n if($lspan != $cspan) {\n $line .= ($lspan ? '</span>' : '') . $cspan . $part_last;\n $lspan = $cspan;\n } else {\n $line .= $part_last;\n }\n\t\t\t} elseif($part_last!='') {\n $line = $cspan . $part_last;\n $lspan = $cspan;\n\t\t\t}\n // else we neither have to open a new span nor set lspan\n }\n \n if($line!='') {\n \tyield [1, $line . ($lspan ? '</span>' : '') . $lsep];\n }\n\n\t}", "public function smart_wordwrap($string, $width = 75, $break = \"\\n\") {\n\t\t// split on problem words over the line length\n\t\t$pattern = sprintf('/([^ ]{%d,})/', $width);\n\t\t$output = '';\n\t\t$words = preg_split($pattern, $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n\t\tforeach ($words as $word) {\n\t\t\tif (false !== strpos($word, ' ')) {\n\t\t\t\t// normal behaviour, rebuild the string\n\t\t\t\t$output .= $word;\n\t\t\t} else {\n\t\t\t\t// work out how many characters would be on the current line\n\t\t\t\t$wrapped = explode($break, wordwrap($output, $width, $break));\n\t\t\t\t$count = $width - (strlen(end($wrapped)) % $width);\n\t\t\t\t// fill the current line and add a break\n\t\t\t\t$output .= substr($word, 0, $count) . $break;\n\t\t\t\t// wrap any remaining characters from the problem word\n\t\t\t\t$output .= wordwrap(substr($word, $count), $width, $break, true);\n\t\t\t}\n\t\t}\n\t\t// wrap the final output\n\t\treturn wordwrap($output, $width, $break);\n\t}", "protected function writeLn($message = '', int $verbosity = null, int $width = null, bool $escape_tags = null)\n {\n return $this->getRequest()->getOutput()->writeLn($message, $verbosity, $width, $escape_tags);\n }", "public function lineWidth($width)\n {\n if (is_int($width)) {\n $this->addOption(array('lineWidth' => $width));\n } else {\n throw $this->invalidConfigValue(\n __FUNCTION__,\n 'int'\n );\n }\n\n return $this;\n }", "private function _wrap_inlinelinenos($inner)\n\t{\n $lines = $inner;\n $sp = $this->linenospecial;\n $st = $this->linenostep;\n $num = $this->linenostart;\n $mw = strlen((string)(count($lines) + $num - 1));\n $mw = str_repeat(' ', $mw);\t\n\n if($this->noclasses) {\n if($sp) {\n\t\t\t\tforeach($lines as $llines) {\n\t\t\t\t\tlist($t, $line) = $llines;\n if($num%$sp == 0) {\n $style = 'background-color: #ffffc0; padding: 0 5px 0 5px';\n } else {\n $style = 'background-color: #f0f0f0; padding: 0 5px 0 5px';\n\t\t\t\t\t}\n yield [1, sprintf('<span style=\"%s\">%s%s</span> ', \n $style, $mw, ($num%$st ? ' ' : $num)) . $line];\n $num += 1;\n\t\t\t\t}\n } else {\n\t\t\t\tforeach($lines as $llines) {\n\t\t\t\t\tlist($t, $line) = $llines;\n yield [1, sprintf('<span style=\"background-color: #f0f0f0; ' .\n 'padding: 0 5px 0 5px\">%s%s</span> ', \n $mw, ($num%$st ? ' ' : $num)) . $line];\n $num += 1;\n\t\t\t\t}\n\t\t\t}\n } elseif($sp) {\n\t\t\tforeach($lines as $llines) {\n\t\t\t\tlist($t, $line) = $llines;\n yield [1, sprintf('<span class=\"lineno%s\">%s%s</span> ',\n ($num%$sp == 0 ? ' special' : ''), $mw,\n ($num%$st ? ' ' : $num)) . $line];\n $num += 1;\n\t\t\t}\n } else {\n\t\t\tforeach($lines as $llines) {\n\t\t\t\tlist($t, $line) = $llines;\n yield [1, sprintf('<span class=\"lineno\">%s%s</span> ',\n $mw, ($num%$st ? ' ' : $num)) . $line];\n $num += 1;\t\n\t\t\t}\n\t\t}\n\t}", "function htmlwrap($str, $width = 60, $break = \"\\n\", $nobreak = \"\") {\n\n\t // Split HTML content into an array delimited by < and >\n\t // The flags save the delimeters and remove empty variables\n\t $content = preg_split(\"/([<>])/\", $str, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\n\t // Transform protected element lists into arrays\n\t $nobreak = explode(\" \", strtolower($nobreak));\n\n\t // Variable setup\n\t $intag = false;\n\t $innbk = array();\n\t $drain = \"\";\n\n\t // List of characters it is \"safe\" to insert line-breaks at\n\t // It is not necessary to add < and > as they are automatically implied\n\t $lbrks = \"/?!%)-}]\\\\\\\"':;&\";\n\n\t // Is $str a UTF8 string?\n//\t $utf8 = (preg_match(\"/^([\\x09\\x0A\\x0D\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF]|\\xF0[\\x90-\\xBF][\\x80-\\xBF]{2}|[\\xF1-\\xF3][\\x80-\\xBF]{3}|\\xF4[\\x80-\\x8F][\\x80-\\xBF]{2})*$/\", $str)) ? \"u\" : \"\";\n\t // original utf8 problems seems to cause problems with very long text (forumposts)\n\t // replaced by a little simpler function call by fxstein 8-13-08\n\t $utf8 = (mb_detect_encoding($str . 'a' , 'UTF-8') == 'UTF-8') ? \"u\" : \"\";\n\n\t while (list(, $value) = each($content)) {\n\t switch ($value) {\n\n\t // If a < is encountered, set the \"in-tag\" flag\n\t case \"<\": $intag = true; break;\n\n\t // If a > is encountered, remove the flag\n\t case \">\": $intag = false; break;\n\n\t default:\n\n\t // If we are currently within a tag...\n\t if ($intag) {\n\n\t // Create a lowercase copy of this tag's contents\n\t $lvalue = strtolower($value);\n\n\t // If the first character is not a / then this is an opening tag\n\t if ($lvalue{0} != \"/\") {\n\n\t // Collect the tag name\n\t preg_match(\"/^(\\w*?)(\\s|$)/\", $lvalue, $t);\n\n\t // If this is a protected element, activate the associated protection flag\n\t if (in_array($t[1], $nobreak)) array_unshift($innbk, $t[1]);\n\n\t // Otherwise this is a closing tag\n\t } else {\n\n\t // If this is a closing tag for a protected element, unset the flag\n\t if (in_array(substr($lvalue, 1), $nobreak)) {\n\t reset($innbk);\n\t while (list($key, $tag) = each($innbk)) {\n\t if (substr($lvalue, 1) == $tag) {\n\t unset($innbk[$key]);\n\t break;\n\t }\n\t }\n\t $innbk = array_values($innbk);\n\t }\n\t }\n\n\t // Else if we're outside any tags...\n\t } else if ($value) {\n\n\t // If unprotected...\n\t if (!count($innbk)) {\n\n\t // Use the ACK (006) ASCII symbol to replace all HTML entities temporarily\n\t $value = str_replace(\"\\x06\", \"\", $value);\n\t preg_match_all(\"/&([a-z\\d]{2,7}|#\\d{2,5});/i\", $value, $ents);\n\t $value = preg_replace(\"/&([a-z\\d]{2,7}|#\\d{2,5});/i\", \"\\x06\", $value);\n\n\t // Enter the line-break loop\n\t do {\n\t $store = $value;\n\n\t // Find the first stretch of characters over the $width limit\n\t if (preg_match(\"/^(.*?\\s)?([^\\s]{\".$width.\"})(?!(\".preg_quote($break, \"/\").\"|\\s))(.*)$/s{$utf8}\", $value, $match)) {\n\n\t if (strlen($match[2])) {\n\t // Determine the last \"safe line-break\" character within this match\n\t for ($x = 0, $ledge = 0; $x < strlen($lbrks); $x++) $ledge = max($ledge, strrpos($match[2], $lbrks{$x}));\n\t if (!$ledge) $ledge = strlen($match[2]) - 1;\n\n\t // Insert the modified string\n\t $value = $match[1].substr($match[2], 0, $ledge + 1).$break.substr($match[2], $ledge + 1).$match[4];\n\t }\n\t }\n\n\t // Loop while overlimit strings are still being found\n\t } while ($store != $value);\n\n\t // Put captured HTML entities back into the string\n\t foreach ($ents[0] as $ent) $value = preg_replace(\"/\\x06/\", $ent, $value, 1);\n\t }\n\t }\n\t }\n\n\t // Send the modified segment down the drain\n\t $drain .= $value;\n\t }\n\n\t // Return contents of the drain\n\t return $drain;\n\t}", "public function lineHeightProvider()\n {\n return [[1]];\n }", "function NbLines($w,$txt)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n}", "function NbLines($w,$txt)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n}", "function NbLines($w,$txt)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n}", "function NbLines($w,$txt)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n}", "function linebreak() {\n $this->doc .= '<br/>'.DOKU_LF;\n }", "function NbLines($w,$txt)\r\n{\r\n $cw=&$this->CurrentFont['cw'];\r\n if($w==0)\r\n $w=$this->w-$this->rMargin-$this->x;\r\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\r\n $s=str_replace(\"\\r\",'',$txt);\r\n $nb=strlen($s);\r\n if($nb>0 and $s[$nb-1]==\"\\n\")\r\n $nb--;\r\n $sep=-1;\r\n $i=0;\r\n $j=0;\r\n $l=0;\r\n $nl=1;\r\n while($i<$nb)\r\n {\r\n $c=$s[$i];\r\n if($c==\"\\n\")\r\n {\r\n $i++;\r\n $sep=-1;\r\n $j=$i;\r\n $l=0;\r\n $nl++;\r\n continue;\r\n }\r\n if($c==' ')\r\n $sep=$i;\r\n $l+=$cw[$c];\r\n if($l>$wmax)\r\n {\r\n if($sep==-1)\r\n {\r\n if($i==$j)\r\n $i++;\r\n }\r\n else\r\n $i=$sep+1;\r\n $sep=-1;\r\n $j=$i;\r\n $l=0;\r\n $nl++;\r\n }\r\n else\r\n $i++;\r\n }\r\n return $nl;\r\n}", "function NbLines($w,$txt)\r\n{\r\n\t$cw=&$this->CurrentFont['cw'];\r\n\tif($w==0)\r\n\t\t$w=$this->w-$this->rMargin-$this->x;\r\n\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\r\n\t$s=str_replace(\"\\r\",'',$txt);\r\n\t$nb=strlen($s);\r\n\tif($nb>0 and $s[$nb-1]==\"\\n\")\r\n\t\t$nb--;\r\n\t$sep=-1;\r\n\t$i=0;\r\n\t$j=0;\r\n\t$l=0;\r\n\t$nl=1;\r\n\twhile($i<$nb)\r\n\t{\r\n\t\t$c=$s[$i];\r\n\t\tif($c==\"\\n\")\r\n\t\t{\r\n\t\t\t$i++;\r\n\t\t\t$sep=-1;\r\n\t\t\t$j=$i;\r\n\t\t\t$l=0;\r\n\t\t\t$nl++;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif($c==' ')\r\n\t\t\t$sep=$i;\r\n\t\t$l+=$cw[$c];\r\n\t\tif($l>$wmax)\r\n\t\t{\r\n\t\t\tif($sep==-1)\r\n\t\t\t{\r\n\t\t\t\tif($i==$j)\r\n\t\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$i=$sep+1;\r\n\t\t\t$sep=-1;\r\n\t\t\t$j=$i;\r\n\t\t\t$l=0;\r\n\t\t\t$nl++;\r\n\t\t}\r\n\t\telse\r\n\t\t\t$i++;\r\n\t}\r\n\treturn $nl;\r\n}", "function NbLines($w,$txt)\r\n{\r\n\t$cw=&$this->CurrentFont['cw'];\r\n\tif($w==0)\r\n\t\t$w=$this->w-$this->rMargin-$this->x;\r\n\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\r\n\t$s=str_replace(\"\\r\",'',$txt);\r\n\t$nb=strlen($s);\r\n\tif($nb>0 and $s[$nb-1]==\"\\n\")\r\n\t\t$nb--;\r\n\t$sep=-1;\r\n\t$i=0;\r\n\t$j=0;\r\n\t$l=0;\r\n\t$nl=1;\r\n\twhile($i<$nb)\r\n\t{\r\n\t\t$c=$s[$i];\r\n\t\tif($c==\"\\n\")\r\n\t\t{\r\n\t\t\t$i++;\r\n\t\t\t$sep=-1;\r\n\t\t\t$j=$i;\r\n\t\t\t$l=0;\r\n\t\t\t$nl++;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif($c==' ')\r\n\t\t\t$sep=$i;\r\n\t\t$l+=$cw[$c];\r\n\t\tif($l>$wmax)\r\n\t\t{\r\n\t\t\tif($sep==-1)\r\n\t\t\t{\r\n\t\t\t\tif($i==$j)\r\n\t\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$i=$sep+1;\r\n\t\t\t$sep=-1;\r\n\t\t\t$j=$i;\r\n\t\t\t$l=0;\r\n\t\t\t$nl++;\r\n\t\t}\r\n\t\telse\r\n\t\t\t$i++;\r\n\t}\r\n\treturn $nl;\r\n}", "public function wrapText(mixed $string, int $maxWidth, int $angle = 0): string;", "function __replaceWithNewlines() {\n\t\t$args = func_get_args();\n\t\t$numLineBreaks = count(explode(\"\\n\", $args[0][0]));\n\t\treturn str_pad('', $numLineBreaks - 1, \"\\n\");\n\t}", "function utf8_wordwrap($str, $width, $break = \"\\n\") // wordwrap() with utf-8 support\n{\n $str = preg_split('/([\\x20\\r\\n\\t]++|\\xc2\\xa0)/sSX', $str, -1, PREG_SPLIT_NO_EMPTY);\n $len = 0;\n $return = '';\n foreach ($str as $val) {\n $val .= ' ';\n $tmp = mb_strlen($val, 'utf-8');\n $len += $tmp;\n if ($len >= $width) {\n $return .= $break . $val;\n $len = $tmp;\n } else\n $return .= $val;\n }\n return $return;\n}", "public function formatRowWithStringsAlignLeft()\n {\n // Given\n $fieldSpecs = array(\n array(\n \"len\" => \"10\",\n \"type\" => \"s\",\n \"align\" => \"left\"),\n array(\n \"len\" => \"15\",\n \"type\" => \"s\",\n \"align\" => \"left\"),\n );\n $values = array(\"first\", \"second\");\n\n // When\n $result = RowFormatter::format($values, $fieldSpecs, \" \");\n\n // Then\n $this->assertEquals($result, \"first second \");\n }", "function infy_nl($count = 1)\n {\n return str_repeat(PHP_EOL, $count);\n }", "function lineBreak()\r\n {\r\n // have a $count parameter because of speed issues.\r\n return self::$lineBreak;\r\n }", "function NbLines($w, $txt) {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l += $cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt) {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l+=$cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt) {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l+=$cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt) {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l+=$cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function Row1($data)\r\n{\r\n $nb=0;\r\n for($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n $h=5*$nb;\r\n //Issue a page break first if needed\r\n $this->CheckPageBreak1($h);\r\n //Draw the cells of the row\r\n for($i=0;$i<count($data);$i++)\r\n {\r\n $w=$this->widths[$i];\r\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n //Save the current position\r\n $x=$this->GetX();\r\n $y=$this->GetY();\r\n //Draw the border\r\n //$this->Rect($x,$y,$w,$h);\r\n //Print the text\r\n $this->MultiCell($w,5,$data[$i],0,$a);\r\n //Put the position to the right of the cell\r\n $this->SetXY($x+$w,$y);\r\n }\r\n //Go to the next line\r\n $this->Ln($h);\r\n}", "public function test_indent_with_kids(){\n\t\t$listotron = new Listotron();\n\n\t\t$user1 = md5(rand() . md5(rand()));\n\t\t$now = $listotron->getNOW();\n\t\t\n\t\t// modify the List\n\t\t$rows = $listotron->outdent(4, $user1);\n\t\t$rows = $listotron->indent(4, $user1);\n\t\t\n\t\t// check the output\n\t\t$this->assertEqual(count($rows), 1);\n\t\t$this->assertEqual($rows[0][\"row_id\"], 4);\n\t\t$this->assertEqual($rows[0][\"par\"], 1);\n\t\t$this->assertEqual($rows[0][\"prev\"], 3);\n\t\t$this->assertEqual($rows[0][\"lm\"], $now);\n\t\t$this->assertEqual($rows[0][\"lmb\"], $user1);\n\t\t\n\t}", "public function SetWordWrap() {\n\t if($this->WordWrap < 1) {\n\t return;\n\t }\n\t switch($this->message_type) {\n\t case 'alt':\n\t case 'alt_attachments':\n\t $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);\n\t break;\n\t default:\n\t $this->Body = $this->WrapText($this->Body, $this->WordWrap);\n\t break;\n\t }\n\t}", "function NbLines($w, $txt)\n {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l += $cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt)\n {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l += $cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "public function getOutlineWidth() {}", "public function base64EncodeWrapMB($str, $linebreak = null)\n {\n }", "protected function wrap_fields()\n {\n }", "public function setLineWidth($lineWidth = 1) {}", "function prep_diff_text($string, $wrap = true)\n\t{\n\t\tif (trim($string) === '')\n\t\t{\n\t\t\treturn '&nbsp;';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($wrap)\n\t\t\t{\n\t\t\t\t$string = nl2br(htmlspecialchars_uni($string));\n\t\t\t\t$string = preg_replace('#( ){2}#', '&nbsp; ', $string);\n\t\t\t\t$string = str_replace(\"\\t\", '&nbsp; &nbsp; ', $string);\n\t\t\t\treturn \"<code>$string</code>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn '<pre style=\"display:inline\">' . \"\\n\" . htmlspecialchars_uni($string) . '</pre>';\n\t\t\t}\n\t\t}\n\t}", "function NbLines($w,$txt)\n{\n\t$cw=&$this->CurrentFont['cw'];\n\tif($w==0)\n\t\t$w=$this->w-$this->rMargin-$this->x;\n\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t$s=str_replace(\"\\r\",'',$txt);\n\t$nb=strlen($s);\n\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t$nb--;\n\t$sep=-1;\n\t$i=0;\n\t$j=0;\n\t$l=0;\n\t$nl=1;\n\twhile($i<$nb)\n\t{\n\t\t$c=$s[$i];\n\t\tif($c==\"\\n\")\n\t\t{\n\t\t\t$i++;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t\tcontinue;\n\t\t}\n\t\tif($c==' ')\n\t\t\t$sep=$i;\n\t\t$l+=$cw[$c];\n\t\tif($l>$wmax)\n\t\t{\n\t\t\tif($sep==-1)\n\t\t\t{\n\t\t\t\tif($i==$j)\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i=$sep+1;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t}\n\t\telse\n\t\t\t$i++;\n\t}\n\treturn $nl;\n}", "function NbLines($w,$txt)\n{\n\t$cw=&$this->CurrentFont['cw'];\n\tif($w==0)\n\t\t$w=$this->w-$this->rMargin-$this->x;\n\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t$s=str_replace(\"\\r\",'',$txt);\n\t$nb=strlen($s);\n\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t$nb--;\n\t$sep=-1;\n\t$i=0;\n\t$j=0;\n\t$l=0;\n\t$nl=1;\n\twhile($i<$nb)\n\t{\n\t\t$c=$s[$i];\n\t\tif($c==\"\\n\")\n\t\t{\n\t\t\t$i++;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t\tcontinue;\n\t\t}\n\t\tif($c==' ')\n\t\t\t$sep=$i;\n\t\t$l+=$cw[$c];\n\t\tif($l>$wmax)\n\t\t{\n\t\t\tif($sep==-1)\n\t\t\t{\n\t\t\t\tif($i==$j)\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i=$sep+1;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t}\n\t\telse\n\t\t\t$i++;\n\t}\n\treturn $nl;\n}", "function NbLines($w,$txt)\n{\n\t$cw=&$this->CurrentFont['cw'];\n\tif($w==0)\n\t\t$w=$this->w-$this->rMargin-$this->x;\n\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t$s=str_replace(\"\\r\",'',$txt);\n\t$nb=strlen($s);\n\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t$nb--;\n\t$sep=-1;\n\t$i=0;\n\t$j=0;\n\t$l=0;\n\t$nl=1;\n\twhile($i<$nb)\n\t{\n\t\t$c=$s[$i];\n\t\tif($c==\"\\n\")\n\t\t{\n\t\t\t$i++;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t\tcontinue;\n\t\t}\n\t\tif($c==' ')\n\t\t\t$sep=$i;\n\t\t$l+=$cw[$c];\n\t\tif($l>$wmax)\n\t\t{\n\t\t\tif($sep==-1)\n\t\t\t{\n\t\t\t\tif($i==$j)\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i=$sep+1;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t}\n\t\telse\n\t\t\t$i++;\n\t}\n\treturn $nl;\n}", "function NbLines($w, $txt)\n {\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\", '', $txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n }", "function indentation() {\n echo '<br><br>';\n}", "function Latex_Minipage_Old($width,$text,$align='t')\n {\n return\n \"\\\\begin{minipage}[\".$align.\"]{\".$width.\"}\\n\".\n $text.\"\\n\".\n \"\\\\end{minipage}\\n\".\n \"\";\n\n }", "function fix_indentation($input) {\n return str_replace(\"\\n * \", \"\\n * \", $input);\n}", "function NbLinesSplit($w,$txt,$lineno)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n $cnt=0;\n while($i<$nb)\n {\n $c=$s[$i];\n $cnt+=1;\n \t\t$a[$cnt]= $nl;\n if($nl==$lineno){\n \t$Stringposition=$i;\n \tbreak;\n }\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n \t \n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n \n }\n else{\n $i++;\n \n }\n /* if($nl=='12'){\n \t$Stringposition=$i;\n \tbreak;\n }*/\n }\n return $Stringposition;\n}", "public function newLine() {\n\t\t$this->_section=0;\n\t\t$this->_lineNumber++;\n\t\t$this->_text[$this->_lineNumber]=array();\n\t\t$this->_text[$this->_lineNumber][0]['text']='';\n\t\t$this->_text[$this->_lineNumber][0]['encoding']='';\n\t\t$this->_text[$this->_lineNumber][0]['font']=$this->_font;\n\t\t$this->_text[$this->_lineNumber][0]['fontSize']=$this->_fontSize;\n\t\t$this->_text[$this->_lineNumber][0]['width']=0;\n\n\t\t\n\t\t$this->_initializeLine();\n\t\t\n\t\t$this->_text[$this->_lineNumber]['alignment']=$this->_text[$this->_lineNumber-1]['alignment'];\n\t\t//add the last cell's height to the auto height if we have an auto-height box.\n\t\tif ($this->isAutoHeight()) {\n\t\t\t$this->_autoHeight+=$this->_text[$this->_lineNumber-1]['height'];\n\t\t}\n\t}", "function NbLines($w,$txt){\r\n \t$cw=&$this->CurrentFont['cw'];\r\n \tif($w==0)\r\n \t\t$w=$this->w-$this->rMargin-$this->x;\r\n \t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\r\n \t$s=str_replace(\"\\r\",'',$txt);\r\n \t$nb=strlen($s);\r\n \tif($nb>0 and $s[$nb-1]==\"\\n\")\r\n \t\t$nb--;\r\n \t$sep=-1;\r\n \t$i=0;\r\n \t$j=0;\r\n \t$l=0;\r\n \t$nl=1;\r\n \twhile($i<$nb)\r\n \t{\r\n \t\t$c=$s[$i];\r\n \t\tif($c==\"\\n\")\r\n \t\t{\r\n \t\t\t$i++;\r\n \t\t\t$sep=-1;\r\n \t\t\t$j=$i;\r\n \t\t\t$l=0;\r\n \t\t\t$nl++;\r\n \t\t\tcontinue;\r\n \t\t}\r\n \t\tif($c==' ')\r\n \t\t\t$sep=$i;\r\n \t\t$l+=$cw[$c];\r\n \t\tif($l>$wmax)\r\n \t\t{\r\n \t\t\tif($sep==-1)\r\n \t\t\t{\r\n \t\t\t\tif($i==$j)\r\n \t\t\t\t\t$i++;\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t\t$i=$sep+1;\r\n \t\t\t$sep=-1;\r\n \t\t\t$j=$i;\r\n \t\t\t$l=0;\r\n \t\t\t$nl++;\r\n \t\t}\r\n \t\telse\r\n \t\t\t$i++;\r\n \t}\r\n \treturn $nl;\r\n }", "public function stdWrap_wrap($content = '', $conf = [])\n {\n return $this->wrap($content, $conf['wrap'], $conf['wrap.']['splitChar'] ? $conf['wrap.']['splitChar'] : '|');\n }", "public function setWordWrap()\n {\n if ($this->WordWrap < 1) {\n return;\n }\n\n switch ($this->message_type) {\n case 'alt':\n case 'alt_inline':\n case 'alt_attach':\n case 'alt_inline_attach':\n $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap);\n break;\n default:\n $this->Body = $this->wrapText($this->Body, $this->WordWrap);\n break;\n }\n }", "protected static function fold($s, $wrap = 75)\n {\n // Because we add an extra space to each broken line, they tend to get 76 instead of 75.\n // As a workaround, remove the first character, split in (n-1) to allow room for the spaces.\n // and then restore the character for the first line.\n return substr($s, 0, 1) . wordwrap(substr($s, 1), $wrap - 1, \"\\n \", true);\n }", "public function nextLine($spacing = 1.0);", "function printResults(array $results, bool $includeDescription = false)\n{\n $width = [\n 'name' => 0,\n 'price' => 0,\n 'link' => 0,\n 'eshop' => 0,\n 'description' => 0,\n ];\n\n foreach ($results as $result) {\n foreach ($result as $key => $value) {\n $width[$key] = max(mb_strlen($value), $width[$key]);\n }\n }\n\n echo '+'.str_repeat('-', 2 + $width['name']);\n echo '+'.str_repeat('-', 2 + $width['price']);\n echo '+'.str_repeat('-', 2 + $width['link']);\n echo '+'.str_repeat('-', 2 + $width['eshop']).\"+\\n\";\n\n\n foreach ($results as $result) {\n\n echo '| '.$result['name'].str_repeat(' ', $width['name'] - mb_strlen($result['name'])).' ';\n echo '| '.$result['price'].str_repeat(' ', $width['price'] - mb_strlen($result['price'])).' ';\n echo '| '.$result['link'].str_repeat(' ', $width['link'] - mb_strlen($result['link'])).' ';\n echo '| '.$result['eshop'].str_repeat(' ', $width['eshop'] - mb_strlen($result['eshop'])).' ';\n echo \"|\\n\";\n echo '+'.str_repeat('-', 2 + $width['name']);\n echo '+'.str_repeat('-', 2 + $width['price']);\n echo '+'.str_repeat('-', 2 + $width['link']);\n echo '+'.str_repeat('-', 2 + $width['eshop']).\"+\\n\";\n if ($includeDescription) {\n echo '| '.$result['description'].str_repeat(' ',\n max(0, 7 + $width['name'] + $width['price'] + $width['link'] - mb_strlen($result['description'])));\n echo \"|\\n\";\n echo str_repeat('-', 10 + $width['name'] + $width['price'] + $width['link']).\"\\n\";\n }\n }\n}", "function linify($string, $fitwidth, $font, $size){\n\t\t$words = explode(' ', $string);\n\t\t$lines = array($words[0]);\n\t\t$currentLine = 0; \n\t for($i = 1; $i < count($words); $i++) { \n\t\t\t// see if next word fits\n\t $lineSize = imagettfbbox($size, 0, $font, $lines[$currentLine] . ' ' . $words[$i]);\n\t\t\t$linewidth = $lineSize[2] - $lineSize[0];\n\t if($linewidth < $fitwidth) { \n\t $lines[$currentLine] .= ' ' . $words[$i]; \n\t }else { \n\t $currentLine += 1;\n\t $lines[$currentLine] = $words[$i]; \n\t } \n\t }\n\t\treturn $lines;\n\t}", "protected function wordWrap($txt, $limit=null, $wrapLinks=false) {\n\t\t$limit = (is_null($limit)) ? 76 : $limit;\n\t\t$txt = preg_replace('/ +/', ' ', $txt);\n\t\t$txt = preg_replace('/\\r\\n/', '\\n', $txt);\n\t\t$txt = preg_replace('/\\r/', '\\n', $txt);\n\t\t$txt = wordwrap($txt, $limit, $this->_endString, false); //sprawdzic\n\t\t$lines = explode('\\n', $txt);\n\t\t$outputTxt = '';\n\t\tforeach($lines as $line) {\n\t\t\tif(strlen($line) <= $limit) {\n\t\t\t\t$outputTxt .= $line . $this->_endString;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(preg_match('/http:|ftp:|www.|:\\/\\//', $line) AND $wrapLinks === false) {\n\t\t\t\t\t$outputTxt .= $line . $this->_endString;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$lineLength = strlen($line);\n\t\t\t\t\t$tempLine ='';\n\t\t\t\t\twhile($lineLength > $limit) {\n\t\t\t\t\t\t$tempLine = substr($line, 0, $limit-1);\n\t\t\t\t\t\t$line = substr($line, $limit-1);\n\t\t\t\t\t\t$outputTxt .= $tempLine . $this->_endString;\n\t\t\t\t\t\t$lineLength = strlen($line);\n\t\t\t\t\t}\n\t\t\t\t\t$outputTxt .= $line . $this->_endString;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $outputTxt;\t \n\t}", "function wkt_generate_multilinestring() {\n $start = $this->random_point();\n $num = $this->dd_generate(1, 3, TRUE);\n $lines[] = $this->wkt_generate_linestring($start);\n for ($i = 0; $i < $num; $i += 1) {\n $diff = $this->random_point();\n $start[0] += $diff[0] / 100;\n $start[1] += $diff[1] / 100;\n $lines[] = $this->wkt_generate_linestring($start);\n }\n return '(' . implode('), (', $lines) . ')';\n }", "public function lineThrough()\n {\n $this->label.= '9;';\n return $this;\n }", "public function enableRemoveLineBreaksFromTemplate() {}" ]
[ "0.60723287", "0.59221876", "0.58266294", "0.56569713", "0.5626201", "0.55132866", "0.53468627", "0.5333832", "0.53141654", "0.5305439", "0.5288189", "0.5265652", "0.5244936", "0.51802033", "0.5169902", "0.51697606", "0.5168961", "0.514137", "0.51412773", "0.50925034", "0.5091279", "0.5074578", "0.5065309", "0.5059", "0.5057241", "0.50555927", "0.5050885", "0.50325966", "0.5021225", "0.5002809", "0.5000239", "0.49786392", "0.49721825", "0.49113804", "0.48991838", "0.48908088", "0.48683342", "0.48621368", "0.48407963", "0.48395732", "0.48388886", "0.4836086", "0.47980934", "0.47928265", "0.47913128", "0.47720695", "0.4759788", "0.47491303", "0.4732142", "0.47277346", "0.4715647", "0.47107434", "0.4704478", "0.4704478", "0.4704478", "0.4704478", "0.46929717", "0.46869195", "0.46678334", "0.46678334", "0.46659258", "0.46654359", "0.46627927", "0.46520695", "0.46321738", "0.4631556", "0.46040452", "0.45992917", "0.45992917", "0.45992917", "0.4593644", "0.4590176", "0.45842823", "0.45795178", "0.45795178", "0.45775288", "0.4551755", "0.4544639", "0.4543449", "0.45425984", "0.45366162", "0.45366162", "0.45366162", "0.45363444", "0.45348296", "0.4534535", "0.4530137", "0.45231944", "0.4514533", "0.45101556", "0.4508477", "0.4494176", "0.44850105", "0.4471832", "0.447153", "0.44670397", "0.44661015", "0.44543177", "0.44504505", "0.44476902" ]
0.50840855
21
Execute the command and return the result.
public function execute($pathSpec = null, $_ = null) { $args = \func_get_args(); if (\count($args)) { $this->arguments[] = '--'; foreach ($args as $pathSpec) { $this->arguments[] = $pathSpec; } } return $this->run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute() {\n \n return (new Result(shell_exec($this->fullCommand())));\n }", "public function execute()\n {\n return curl_exec($this->_handle);\n }", "public function execute()\n {\n \tif ( $this->cur_query != \"\" )\n \t{\n \t\t$res = $this->query( $this->cur_query );\n \t}\n \t\n \t$this->cur_query \t= \"\";\n \t$this->is_shutdown \t= false;\n\n \treturn $res;\n }", "public function execute() {\n\t\t$this->command->execute($this->arguments, $this->flags);\n\t}", "abstract protected function executeCommand();", "public function exec()\n {\n exec($this->cmd, $this->output, $this->return_value);\n }", "public function Execute()\r\n {\r\n $this->PREPARE_STATEMENT($this->sql);\r\n return $this->EXECUTE_STATEMENT($this->statement);\r\n \r\n }", "public function process() {\n\t\ttry {\n\t\t\t$params = $this->arguments;\n\t\t\t$command = array_shift($params);\n\n\t\t\tif ($command === null)\n\t\t\t\t$this->help();\n\t\t\t\n\t\t\tif ($command == '--version' || $command == '-v')\n\t\t\t\t$command = 'version';\n\t\t\tif ($command == '--help' || $command == '-h')\n\t\t\t\t$command = 'help';\n\t\t\t\n\t\t\tif (!isset($this->commands[$command])) {\n\t\t\t\t$this->help('Invalid command '.$command);\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t$class = $this->commands[$command];\n\t\t\t$instance = new $class($this, $params);\n\t\t\t\n\t\t\treturn $instance->execute($this, $params);\n\t\t} catch (HelpException $e) {\n\t\t\t$this->showHelp($e->getMessage());\n\t\t}\n\t}", "public function execute()\n {\n return $this->_execute();\n }", "public function exec(){\n return curl_exec($this->handler);\n }", "public function exec()\n {\n return curl_exec($this->curl);\n }", "public function exec()\n {\n return curl_exec($this->curl);\n }", "public function execute()\n {\n if ($this->escape !== false) {\n $this->options = $this->escape($this->options);\n }\n $command = $this->builder->build($this->options);\n\n exec($command);\n }", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute()\n {\n return $this->riak->execute($this);\n }", "public function execute()\n {\n return $this->riak->execute($this);\n }", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public abstract function execute();", "public abstract function execute();", "public abstract function execute();", "function exec() {\r\n return curl_exec($this->curl);\r\n }", "private function execute() {\n $query = $this->db->query($this->sql);\n return $query->result();\n }", "public function executeCommand( $cmd ){\n\n\t\t//Redirect the command result to the standar output\n\t\t$cmd = $cmd . \" 2>&1 \";\n\n\t\tif( env('CLOUD_DEBUG') ){\n\t\t\techo sprintf( \"Executing fake : %s\", $cmd );\n\t\t}\n\t\telse{\n $result = shell_exec($cmd);\n return $result;\n\t\t}\n }", "private static function execute($command) {\n\t\treturn shell_exec($command);\n\t}", "protected function execute()\n {\n if (null === $this->command) {\n throw new \\RuntimeException('Guzzle command not initialized');\n }\n\n try {\n $result = $this->command->execute();\n } catch(\\Guzzle\\Service\\Exception\\ValidationException $e) {\n $result = new BaseResponse();\n $result->setError(\n new Error(\n 'Validation schema API Exception', \n print_r($e->getErrors(), true)\n )\n );\n } catch(\\Guzzle\\Common\\Exception\\RuntimeException $e) {\n $result = new BaseResponse();\n $result->setError(\n new Error(\n 'Guzzle: API request runtime exception', \n print_r($e->getMessage(), true)\n )\n );\n } catch(\\Exception $e) {\n $result = new BaseResponse();\n $result->setError(\n new Error(\n 'Exception while call API method', \n print_r($e->getMessage(), true)\n )\n );\n }\n\n return $result;\n }", "public function run(){\n $result = FALSE;\n $command = $this->getCommand();\n if($command && in_array($command, $this->apiCommands) && method_exists($this, $command)){\n $key = $this->getRequest('apiKey', FALSE);\n if(!$key || !$this->db->checkAPIkey($key)){\n $this->sendError(1, 'Invalid API key');\n }\n $this->defaults = $this->db->getAPIKeyDefaults($key, $command);\n $result = call_user_func(array($this, $command));\n }\n return $result;\n }", "function execute($command) {\r\n\t\t$res = @ftp_exec($this->_handle, $command);\r\n\t\tif ( !$res ) {\r\n\t\t\tthrow new ftpExecCommandException($command);\r\n\t\t} else {\r\n\t\t\treturn $res;\r\n\t\t}\r\n\t}", "public function execute ()\n\t{\n\t\treturn parent::execute();\n\t}", "public function execute ()\n\t{\n\t\treturn parent::execute();\n\t}", "public function execute(): int;", "public function exec()\n {\n return curl_exec($this->_session);\n }", "public function execute() {\n try {\n return $this->statement->execute();\n } catch (PDOException $e) {\n $this->error = $e->getMessage();\n die($this->error);\n }\n }", "public function execute(){\n return $this->general(); \n }", "public function execute() {\n\t\t$data = $this->getResultData();\n\t\t$this->printText($data[0]);\n\t}", "public function execute() { }", "abstract public function Execute();", "protected function exec($command) {\n // connection plugin doesn't give us those codes, so for compatibility\n // with that plugin, we don't either.\n Log::log('LocalServerConn::exec: ' . \"\\n\" . $command, L_DEBUG);\n $result = trim(shell_exec($command));\n Log::log('LocalServerConn::resp: ' . $result, L_DEBUG);\n Log::log('=====================================================================', L_DEBUG);\n\n if (substr($result, 0, 20) == 'sudo: no tty present') {\n throw new Exception(\"The current user does not have sudo permission. Check server config or run from console as root\");\n }\n\n return $result;\n }", "private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }", "public function execute(Command $command)\n {\n return $this->getActiveNode()->execute($command, $this->api);\n }", "public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after !== NULL) {\n\t\t\t\tcall_user_func_array($this->after, array($connection));\n\t\t\t}\n\t\t}", "public function exec()\n {\n try {\n $http_response = $this->front_controller->exec();\n return $this->http_transport->sendResponse($http_response);\n } catch (Exception $e) {\n $this->echoException($e);\n exit(1);\n }\n }", "final public function execute()\n {\n return $this\n ->finalize()\n ->getDB()\n ->execute($this);\n }", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "abstract public function run($command, $withInteraction = false, $returnOutput = false);", "public function execute()\n {\n return $this->query($this->sSql);\n }", "public abstract function exec();", "public function Exec ( $command )\n\t {\n\t\t$process\t= $this -> ShellInstance -> Exec ( $command ) ;\n\t\t\n\t\treturn ( $process ) ;\n\t }", "function execute() {\n return 1;\n }", "public function execute()\n {\n $resultForward = $this->resultForwardFactory->create();\n\n return $resultForward->forward('edit');\n }", "public function execute() {\n $this->query->filter($this->filter);\n $data = $this->query->execute();\n $results = $data['results'];\n\n if (!$results) {\n return;\n }\n\n return entity_load($this->EntityType, array_keys($results));\n }", "public function Execute($sql) {\r\n return $this->_connection->query($sql);\r\n }", "public function testExecute() : void\n {\n $character = new Character();\n $result = $this->command->execute($character);\n\n $this->assertEquals(\"result\", $result);\n }", "public function execute() {\n if (empty($this->recordId)) {\n throw new FileMakerException($this->fm, 'Duplicate commands require a record id.');\n }\n $params = $this->_getCommandParams();\n $params['-dup'] = true;\n $params['-recid'] = $this->recordId;\n $result = $this->fm->execute($params);\n return $this->_getResult($result);\n }", "public function fetch()\n {\n $this->parse();\n $parseEvent = new QueryEvent($this);\n $this->getEntityManager()->getEventManager()->dispatch(QueryEvents::PARSE, $parseEvent);\n\n $result = call_user_func($this->handlers[$this->getOperation()], $this);\n $executeEvent = new QueryEvent($this, $result);\n $this->getEntityManager()->getEventManager()->dispatch(QueryEvents::EXECUTE, $executeEvent);\n\n return $result;\n }", "public function execute() { \n return $this -> stmt -> execute();\n }", "public function execute() {\n return $this->stmt->execute();\n }", "public function execute()\n\t{\n\t\t$this->query->setFetchMode($this->fetchMode);\n\n\t\t$this->query->execute($this->params);\t\n\n\t\t// Fetch the data in the appropriate format\n\t\tswitch ($this->fetchMethod) {\n\t\t\tcase 'row':\n\t\t\t\t$this->result = $this->query->fetch();\n\t\t\t\tbreak;\n\t\t\tcase 'field':\n\t\t\t\t$this->result = $this->query->fetchColumn();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->result = $this->query->fetchAll();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function exec($command, array &$output = null, &$return_var = null)\n {\n return @exec($command, $output, $return_var);\n }", "public function exec($command)\n {\n $command = implode(' ', func_get_args());\n $this->_debugLog(trim($command), '>>>');\n\n socket_write($this->_socketHandler, str_replace(\"\\n\", '\\n', $command) . PHP_EOL);\n\n $buffer = '';\n socket_recv($this->_socketHandler, $buffer, 2048, 0);\n $buffer = $this->sanitize($buffer);\n $this->_debugLog(PHP_EOL . trim($buffer), '<<<');\n\n $resultData = explode(\"\\n\", trim($buffer));\n $lastLine = array_pop($resultData);\n\n list($code, $message) = explode(' ', $lastLine, 2);\n if (!$code || !$message) {\n throw new RawClientException('Error while parsing answer: ' . $lastLine);\n }\n\n $this->_resultCode = intval($code);\n $this->_resultData = $resultData;\n $this->_resultMessage = $message;\n\n $this->_debugLog(sprintf('Code - (%s)', trim($this->_resultCode)), '***');\n $this->_debugLog(sprintf('Message - (%s)', trim($this->_resultMessage)), '***');\n $this->_debugLog(PHP_EOL);\n\n return true;\n }", "abstract function execute();", "abstract function execute();", "public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }", "public function excCommand() {\n $this->_parseArgs();\n\n if ($this->_checkIsArgsSet()) {\n $execResult = $this->exec();\n\n if ($execResult === null) {\n return 0;\n }\n\n return intval($execResult);\n }\n\n return -1;\n }", "public function execute()\n\t{\n\t\t$this->run();\n\t}" ]
[ "0.8193067", "0.73992264", "0.7080208", "0.69551885", "0.6913788", "0.6832017", "0.6794462", "0.6739776", "0.66871524", "0.6670058", "0.666733", "0.666733", "0.665199", "0.6643447", "0.6643447", "0.66433805", "0.66433805", "0.66433805", "0.66433805", "0.66433805", "0.66433805", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6642151", "0.6611364", "0.6611364", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.65764034", "0.6545308", "0.6545308", "0.6545308", "0.6545096", "0.6502573", "0.6484314", "0.6453117", "0.6417202", "0.64000285", "0.638042", "0.6377349", "0.6377349", "0.63429767", "0.633995", "0.6338062", "0.6332561", "0.63301444", "0.6318099", "0.6284439", "0.6280315", "0.627886", "0.6268762", "0.6267848", "0.6241948", "0.62146956", "0.618967", "0.618967", "0.618967", "0.618967", "0.61720335", "0.61579436", "0.61502", "0.61452734", "0.61317986", "0.6128505", "0.6118858", "0.6118062", "0.6108755", "0.61035657", "0.60766715", "0.60617477", "0.60613626", "0.60569113", "0.6051809", "0.6051057", "0.60464865", "0.60464865", "0.60440564", "0.6032229", "0.60312074" ]
0.0
-1
Overrides the base implementation to convert a string parameter to a float.
public function convertValue($value) { $floatValue = floatval($value); if ($floatValue === 0.0 && $value !== '0' && $value !== '0.0') { throw new InvalidParameterValueException(); } return $floatValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _v( $str ) { return (float) substr($str,1); }", "function str2float($str, $default = 0)\n{\n if (is_null($str) || strlen($str) == 0)\n {\n $value = $default;\n }\n else\n {\n $value = floatval($str);\n }\n return $value;\n}", "public function str2float($string) {\n $string = str_replace('.', '', $string);\n $string = str_replace(',', '.', $string);\n $float = floatval($string);\n return $float;\n }", "function to_float($string_number){\n $number = floatval(str_replace('.', ',', str_replace(',', '', $string_number)));\n\n // At this point, $number is a \"natural\" float.\n return $number;\n }", "public function testStringToFloat()\n {\n $locale = localeconv();\n $string = \"13{$locale['decimal_point']}543\";\n $this->assertSame(13.543, $this->_filter->filter($string));\n }", "static public function Float($var, $flags = null) {\r\n\r\n\t\t$cleaned = filter_var($var, FILTER_SANITIZE_NUMBER_FLOAT, $flags);\r\n\t\treturn $cleaned == \"\" ? false : (float)$cleaned;\r\n\r\n\t}", "public static function float(?string $valueType = null);", "static public function str2float($string, $thousand_separator = '.', $decimal_separator = ',') {\n $string = str_replace($thousand_separator, '', $string);\n $string = str_replace($decimal_separator, '.', $string);\n $float = floatval($string);\n return $float;\n }", "public static function isFloat($string) {\n return is_float($string);\n\n }", "public function getFloat($name);", "public function parseFloat()\n {\n if (is_string($this->value)) {\n $this->value = preg_replace('/\\s|`|\\'|,/', \"\", preg_replace('/,{1}/', '.', $this->value));\n }\n $this->value = (float)$this->value;\n return $this;\n }", "function toFloat ($value) {\n assert(count(func_get_args()) == 1);\n if (is_scalar($value)) {\n $convertedValue = filter_var($value, FILTER_VALIDATE_FLOAT, FILTER_NULL_ON_FAILURE);\n if ($convertedValue !== null)\n return $convertedValue;\n }\n if (is_object($value) && hasMember($value, 'toFloat'))\n return toFloat($value->toFloat());\n throw new RuntimeException('Unable to convert to float.');\n}", "public function float()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_NUMBER_FLOAT);\n\t}", "public function testFloat() {\n $this->assertEquals(100.25, Sanitize::float('1array(0)0.25'));\n $this->assertEquals(-125.55, Sanitize::float('-abc125.55'));\n $this->assertEquals(1203.11, Sanitize::float('+1203.11'));\n }", "private function mapStringToFloat($results)\n {\n return floatval($results);\n }", "private function float ($param)\n {\n $this->type = 'float';\n $this->value = (float)$this->value;\n return true;\n }", "public static function getFloat($name, $default = 0.0, $hash = 'default')\n {\n return static::getVar($name, $default, $hash, 'float');\n }", "public function float($prompt = 'Float', $message = 'Please enter a floating-point decimal.') {\n return $this->text($prompt, function($result) { \n return filter_var($result, FILTER_VALIDATE_FLOAT); \n }, $message);\n }", "public function checkFloat(): float\n {\n if (!is_float($this->getValue())) {\n throw new TypeInvalidException('float', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }", "public static function converterMoedaParaFloat(string $valor){\n $val = str_replace(\",\",\".\",$valor);\n $val = preg_replace('/\\.(?=.*\\.)/', '', $val);\n return floatval($val);\n }", "public static function float() {}", "public static function user_floatInput(){\n fscanf(STDIN,\"%f\\n\",$number);\n if(filter_var($number,FILTER_VALIDATE_FLOAT)){\n return $number;\n }\n else{\n echo \"Invalid Input!\\n\";\n return Util::user_floatInput();\n }\n }", "function cleanFloat($name) {\n\t\tif (isset($this->getvars[$name])){\n\t\t\tif (is_array($this->getvars[$name])){\n\t\t\t\treturn Cgn::cleanFloatArray($this->getvars[$name]);\n\t\t\t}\n\t\t\treturn floatval($this->getvars[$name]);\n\t\t} else {\n\t\t\tif (@is_array($this->postvars[$name])){\n\t\t\t\treturn Cgn::cleanFloatArray($this->postvars[$name]);\n\t\t\t}\n\t\t\treturn floatval(@$this->postvars[$name]);\n\t\t}\n\t}", "public function getFloat(string $key): float\n {\n return floatval($this->get($key));\n }", "public function float($name, $length = 255, $default = null)\n {\n return self::$driver->float($name, $length, $default);\n }", "function isValidFloat($var) {\n //Returns error message for an invalid float string\n\n //Check for unsafe characters\n $msg = isSantizeString($var);\n if ($msg != \"\") {\n return $msg;\n }\n\n if (filter_var($var, FILTER_VALIDATE_FLOAT)) {\n return \"\";\n } else {\n return \"Invalid Floating Number\";\n }\n}", "public static function _float($inputDataType, string $variableName, $defaultValue = null) {\n return self::_($inputDataType, $variableName, $defaultValue, FILTER_VALIDATE_FLOAT);\n }", "public static function readFloat()\n {\n $res = filter_var(self::readLine(), FILTER_VALIDATE_FLOAT);\n \n if($res === false)\n throw new Exception(\"valor invalido\");\n \n return $res;\n }", "public static function retrieveNumber($str)\n {\n return floatval(preg_replace('/[^0-9.-]/', '', $str));\n }", "function validate_float() {\n # Check if the value is a foat\n if (is_float($this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error( \"Validation for float ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Float Value\n return floatval($this->cur_val);\n }\n }", "public function GetAsFloat(string $key, ?float $default = NULL) : float\r\n\t{\r\n\t\treturn (float)$this->Get($key, $default);\r\n\t}", "public function putFloat(string $name, ?float $value): string;", "function o_castFloat($value) {\n\t\t\treturn Obj::singleton()->castFloat($value);\n\t\t}", "function floatNum($value)\n{\n return floatval(str_replace(',', '.', $value));\n}", "function floatval($var)\n{\n}", "public function toBeFloat(string $message = ''): self\n {\n Assert::assertIsFloat($this->actual, $message);\n return $this;\n }", "public function getManFloat(string $name, ?float $default = null): float;", "public function getFloat(string $field): float\n {\n return floatval($this->get($field));\n }", "protected function getValue(string $strName, int $iSeg = -1) : float\r\n {\r\n $fltValue = 0.0;\r\n if ($iSeg < 0) {\r\n $fltValue = floatval($this->getSummaryValue($strName));\r\n } else {\r\n $fltValue = floatval($this->getSegmentValue($iSeg, $strName));\r\n }\r\n return $fltValue;\r\n }", "public static function parseFloat($value)\n {\n // convert \",\" to \".\"\n $s = str_replace(',', '.', $value);\n\n // remove everything except numbers and dot \".\"\n $s = preg_replace(\"/[^0-9\\.]/\", '', $s);\n\n // remove all seperators from first part and keep the end\n $s = str_replace('.', '', substr($s, 0, -3)).substr($s, -3);\n\n // return float\n return (float) $s;\n }", "public function getFloat($prop) {\n\n\t\t\t// Get property\n\t\t\t$val = $this->get($prop);\n\n\t\t\t// Numeric?\n\t\t\tif (is_numeric($val)) {\n\n\t\t\t\treturn floatval($val);\n\n\t\t\t} else {\n\n\t\t\t\t// Not found\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}", "public function float($name, $displayName = null)\n {\n if (trim($this->data[$name]) != ''\n && !filter_var($this->data[$name], FILTER_VALIDATE_FLOAT)\n ) {\n if (!($this->data[$name] == \"0\")) {\n $this->errors->add(\n '<b>' .\n $this->displayName($name, $displayName) .\n '</b> must be a decimal number.'\n );\n return false;\n }\n }\n return true;\n }", "public function to(string $unit): float\n {\n $this->checkUnitValueIsValid($unit);\n $this->to = $unit;\n return $this->calculate();\n }", "protected function timeAsFloat(string $time): float\n {\n if (empty($time) || strpos($time, ':') === false) {\n return 0.0;\n }\n\n [$hour, $minute] = explode(':', $time);\n $minute /= 60;\n\n return ((int) $hour) + $minute;\n }", "public function toFloat(): float\n {\n return (float) $this->getValue();\n }", "function readFloat();", "public function float()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertSame($floatFilter, $floatFilter->setDecimals(2));\n $this->assertEquals(156, $floatFilter->execute('1.564'));\n }", "public function getFloat(string $key, mixed $default = null): float\n {\n return (float) $this->get($key, $default);\n }", "public function floatValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function testFloat()\n {\n $float = (float) 13.54;\n $this->assertSame($float, $this->_filter->filter($float));\n }", "public static function filterFloat($attrValue)\n\t{\n\t\treturn filter_var($attrValue, FILTER_VALIDATE_FLOAT);\n\t}", "private function coord2float($val) {\n if(strlen($val) === 1 && strpos($val, '/') !== false)\n return 0;\n\n\n $parts = explode('/', $val);\n\n\t\tif (count($parts) == 0 || count($parts) == 1)\n \treturn (float) $val;\n\n return (float) $parts[0] / (float) $parts[1];\n\t}", "public function consumeFloat()\n {\n $s = $this->consume(4);\n list(, $ret) = unpack(\"f\", self::$isLittleEndian ? self::swapEndian32($s) : $s);\n return $ret;\n }", "public function toFloat()\n {\n eval('$var = ' . $this->value . ';');\n\n return $var;\n }", "public static function static_parseFloat($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function toFloat()\n {\n if (is_array($this->value)) {\n throw new InvalidNotArrayException($this->name);\n } elseif (!empty($this->value) && !is_numeric($this->value)) {\n throw new InvalidNumericException($this->name, $this->value);\n }\n\n $this->value = (float) $this->value;\n\n return $this;\n }", "protected function _getFloat($input)\n {\n $f1 = str_pad(ord($input[0]), 2, '0', STR_PAD_LEFT);\n $f1 .= str_pad(ord($input[1]), 2, '0', STR_PAD_LEFT);\n $f1 .= str_pad(ord($input[2]), 2, '0', STR_PAD_LEFT);\n $f1 .= str_pad(ord($input[3]), 2, '0', STR_PAD_LEFT);\n $f2 = $f1 >> 17;\n $f3 = ($f1 & 0x0001FFFF);\n $f1 = $f2 . '.' . $f3;\n return (float) $f1;\n }", "public static function value($str, $round = false)\n {\n if (is_string($str)) {\n $str = strtr($str, '.', '');\n $str = strtr($str, ',', '.');\n }\n\n $val = floatval($str);\n if ($round !== false) {\n $val = round($val, intval($round));\n }\n \n return $val;\n }", "public function scrubFloat(float $data) : float;", "function &float(float $value, string $namespace = 'default'): float\n{\n $var = new Variable\\FloatVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public static function tofloat($num) {\n $dotPos = strrpos($num, '.');\n $commaPos = strrpos($num, ',');\n $sep = (($dotPos > $commaPos) && $dotPos) ? $dotPos : \n ((($commaPos > $dotPos) && $commaPos) ? $commaPos : false);\n \n if (!$sep) {\n return floatval(preg_replace(\"/[^0-9]/\", \"\", $num));\n } \n\n return floatval(\n preg_replace(\"/[^0-9]/\", \"\", substr($num, 0, $sep)) . '.' .\n preg_replace(\"/[^0-9]/\", \"\", substr($num, $sep+1, strlen($num)))\n );\n }", "private function getUnitValue(string $unit): float\n {\n if ($this->checkUnitValueIsValid($unit)) {\n return $this->converterType->dataTable[strtoupper($unit)];\n }\n \n throw new Exception(\"Unit is not vaid\");\n }", "public function validFloatProvider() {\n\t\treturn [\n\t\t\t\"string 12.34\"\t=> [\"12.34\"],\n\t\t\t\"float 12.34\"\t=> [12.34]\n\t\t];\n\t}", "public function getFloat() :float\n {\n return $this->value;\n }", "protected static function validate_float($field, $input, $param = NULL)\n\t{\n\t\tif(!isset($input[$field]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(!filter_var($input[$field], FILTER_VALIDATE_FLOAT))\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'field' => $field,\n\t\t\t\t'value' => $input[$field],\n\t\t\t\t'rule'\t=> __FUNCTION__\n\t\t\t);\n\t\t}\n\t}", "public static function GetFloat($key)\n {\n return (float)self::Get($key);\n }", "public function getFloatField()\n {\n $value = $this->get(self::FLOAT_FIELD);\n return $value === null ? (double)$value : $value;\n }", "function readFloat(): float {\n return \\unpack('g', $this->read(4))[1];\n }", "private function toFloat($value)\n {\n return (float) str_replace(',', '.', $value);\n }", "public function __construct($attrs = null)\n\t{\n\t\tparent::__construct('float', 'datatype-float', $attrs);\n\t}", "public function parse($value) {\n\t\t$json = $this->decode($value);\n\t\tif (JSON_ERROR_NONE == json_last_error()) {\n\t\t\treturn $json;\n\t\t}\n\t\t$float = filter_var($value, FILTER_VALIDATE_FLOAT);\n\t\treturn $float !== false ? $float : $value;\n\t}", "public function float()\n {\n if (!is_float($this->value)) {\n throw new InvalidFloatException($this->name, $this->value);\n }\n\n return $this;\n }", "public static function float($key, $length)\n {\n return static::make($key, $length)->asFloat();\n }", "public function getOptFloat(string $name, ?float $default = null): ?float;", "public function functionCanBeInterpretedAsFloatValidDataProvider() {}", "public function parse_to_float($response, $expectbase = 0) {\n if ($expectbase == 2) {\n $baseprefix = '0b';\n\n } else if ($expectbase == 8) {\n $baseprefix = '0o';\n\n } else if ($expectbase == 10) {\n $baseprefix = '0d';\n\n } else if ($expectbase == 16) {\n $baseprefix = '0x';\n\n } else {\n $baseprefix = '';\n }\n\n if ($baseprefix != '') {\n $prefixre = preg_quote($baseprefix, '/');\n $regex = '/^(-?)(' . $prefixre . ')/i';\n $response = preg_replace($regex, '$1', $response);\n }\n\n list($value, $unit, $multiplier) = $this->apply_units($response);\n if (is_null($value)) {\n return false;\n }\n if (!is_null($multiplier)) {\n $value *= $multiplier;\n }\n return $value;\n }", "function sanitize_float( $value, $key, array $data ) {\n\treturn (float) $value;\n}", "private function readfloat()\n {\n $bin = fread($this->f, 4);\n if ((ord($bin[0]) >> 7) == 0) $sign = 1;\n else $sign = -1;\n if ((ord($bin[0]) >> 6) % 2 == 1) $exponent = 1;\n else $exponent = -127;\n $exponent += (ord($bin[0]) % 64) * 2;\n $exponent += ord($bin[1]) >> 7;\n\n $base = 1.0;\n for ($k = 1; $k < 8; $k++) {\n $base += ((ord($bin[1]) >> (7 - $k)) % 2) * pow(0.5, $k);\n }\n for ($k = 0; $k < 8; $k++) {\n $base += ((ord($bin[2]) >> (7 - $k)) % 2) * pow(0.5, $k + 8);\n }\n for ($k = 0; $k < 8; $k++) {\n $base += ((ord($bin[3]) >> (7 - $k)) % 2) * pow(0.5, $k + 16);\n }\n\n $float = (float)$sign * pow(2, $exponent) * $base;\n return $float;\n }", "private static function toFloat($value)\n {\n return (float) $value;\n }", "static public function Decimal($var, $flags = null) {\r\n\t\t\r\n\t\t$cleaned = filter_var($var, FILTER_SANITIZE_NUMBER_FLOAT, $flags | FILTER_FLAG_ALLOW_FRACTION);\r\n\t\treturn $cleaned == \"\" ? false : (float)$cleaned;\r\n\t\t\r\n\t}", "function float_or_null($f) {\n return $f === null ? null : (float) $f;\n}", "function is_float(mixed $var): bool\n{\n return php_is_float($var);\n}", "public static function NASAtoFloat($val )\n {\n $a = unpack(\"N\",$val);\n $b = unpack(\"f\",pack( \"I\",$a[1]));\n return $b[1];\n }", "public static function isFloat($value, $min = null, $max = null)\n {\n if (!is_float($value)) {\n throw new \\InvalidArgumentException(\"Not an float:\" . json_encode($value));\n }\n\n if ($min !== null) {\n if (!(is_int($min) || is_float($min))) {\n throw new \\InvalidArgumentException(\"Parameter 'min' is not an int or float: \" . json_encode($min));\n }\n if ($value < $min) {\n throw new \\InvalidArgumentException(\"Float smaller than '$min' : $value\");\n }\n }\n if ($max !== null) {\n if (!(is_int($max) || is_float($max))) {\n throw new \\InvalidArgumentException(\"Parameter 'max' is not an int or float : \" . json_encode($max));\n }\n if ($value > $max) {\n throw new \\InvalidArgumentException(\"Float greater than '$max' : $value\");\n }\n }\n\n return $value;\n }", "function num($value)\n{\n $num = str_replace('.', '', $value);\n return floatval(str_replace(',', '', $num));\n}", "public static function assertIsFloat( $actual, $message = '' ) {\n\t\tstatic::assertInternalType( 'float', $actual, $message );\n\t}", "private function float(float $value): string\n {\n return (string) $value;\n }", "function validFloat($value)\n {\n return filter_var($value, FILTER_VALIDATE_FLOAT);\n }", "public function SetFloat(string $key, float $value) : void\r\n\t{\r\n\t\t$this->Set($key, $value);\r\n\t}", "function MoneyToFloat($zMoney) {\n\n /*--- Local Variables ---*/\n\n $laundermoney = null;\n $dollars = null;\n $cents = null;\n\n /*--- Start of Processing ---*/\n\n $zMoney = str_replace(\"$\",\"\",$zMoney);\n\n if(strrchr($zMoney,\",\") )\n {\n $gMoney = str_replace(\",\",\"\",$zMoney); \n if( strrchr($gMoney,\".\") )\n {\n $dollars = strtok($gMoney,\".\");\n $cents= strtok(\".\");\n }\n else\n $dollars = $gMoney;\n }\n else if( strrchr($zMoney,\".\") )\n {\n $dollars = strtok($zMoney,\".\");\n $cents= strtok(\".\");\n }\n else\n {\n $dollars = $zMoney;\n $cents = 0;\n } \n\n $laundermoney = $dollars.\".\".$cents;\n\n (float)$laundermoney = $laundermoney;\n \n return($laundermoney);\n}", "public function getFloat(string $field, string $input_culture = 'pt-br', int $decimal_digits = 2)\n {\n return $this->field_float(INPUT_GET, $field, $decimal_digits, $input_culture);\n }", "public function floatValue($key, $default, $min = null, $max = null);", "public function float(string $column): ColumnDefinition\n {\n return $this->addColumn('float', $column);\n }", "#[@test]\n public function floatType() {\n $this->testType(new Float(0), 0, 0.0);\n }", "public static function ensureFloat($value)\n\t{\n\t\treturn (float)$value;\n\t}", "public function numeric_value( $str ) {\n\t\tif ( preg_match( \"/([0-9\\.]+)/\", $str, $matches ) ) {\n\t\t\t$number = $matches[1];\n\n\t\t\tif ( false !== strpos( $number, '.' ) ) {\n\t\t\t\treturn floatval( $number );\n\t\t\t}\n\n\t\t\treturn intval( $number );\n\n\t\t}\n\n\t\treturn '';\n\t}", "public function fromFloat($value)\n {\n switch ((string) $value) {\n case 'Infinity':\n return INF;\n case '-Infinity':\n return -INF;\n case 'NaN':\n return NAN;\n default:\n return (float) $value;\n }\n }", "function string2Real ($stImporto, $stFormato, $nNumDecimali = 2) {\n\tif ($stImporto == \"\") { return \"\"; }\n\tswitch ($stFormato) {\n\tcase \"XXXX,XX\":\n\t\t$stImporto = str_replace(\",\", \".\", $stImporto);\n\t\tbreak;\n\tcase \"X.XXX,XX\":\n\t\t$stImporto = str_replace(\".\", \"\", $stImporto);\n\t\t$stImporto = str_replace(\",\", \".\", $stImporto);\n\t\tbreak;\n\t}\n\n\treturn round ($stImporto, $nNumDecimali);\n}", "public function testCastToFloat($data) {\n\t\t$this->assertTrue(is_float(Convertor::cast($data)), \"[{$data}] is not Float\");\n\t\t$this->assertGreaterThan(0, Convertor::cast($data), \"[{$data}] is not greater than 0\");\n\t}", "protected static function validateFloat(float $test, float $min, float $max, string $source, string $argument = \"Argument\")\n {\n if (!is_numeric($test)) {\n throw new InvalidArgumentException(\"$argument given to $source must be a float, but '$test' was given.\");\n }\n if ($test < $min || $test > $max) {\n throw new InvalidArgumentException(\"$argument given to $source must be in range $min to $max, but $test was given.\");\n }\n }" ]
[ "0.73212063", "0.7267016", "0.7242643", "0.6848777", "0.65605193", "0.6523229", "0.6519328", "0.6472912", "0.63399464", "0.6338199", "0.6325064", "0.63001204", "0.62923574", "0.6251307", "0.61727756", "0.61595684", "0.61393243", "0.60812867", "0.60602766", "0.6022087", "0.6019523", "0.60136837", "0.59994584", "0.5993103", "0.5972998", "0.5957473", "0.59305716", "0.59221244", "0.5910754", "0.5907397", "0.59026045", "0.58889395", "0.5880555", "0.5864268", "0.5863649", "0.58497196", "0.58452606", "0.584262", "0.5836183", "0.58268493", "0.5785209", "0.57786596", "0.5761746", "0.57567114", "0.5755842", "0.5742035", "0.5719961", "0.57186747", "0.56876564", "0.56829965", "0.5664736", "0.56601256", "0.5640861", "0.562399", "0.562281", "0.56102633", "0.5602993", "0.5595471", "0.5582423", "0.5563935", "0.55441993", "0.5530453", "0.5523304", "0.5505073", "0.5501336", "0.54982454", "0.5494635", "0.5486884", "0.5477744", "0.5412192", "0.5387989", "0.53764355", "0.5375713", "0.5360595", "0.53424966", "0.53337365", "0.53313047", "0.5325281", "0.530555", "0.5289204", "0.52684087", "0.5252798", "0.52327836", "0.5232285", "0.52299565", "0.52192825", "0.52096516", "0.5203536", "0.5202751", "0.5183058", "0.5173708", "0.51561165", "0.5154734", "0.5151076", "0.5146232", "0.51376426", "0.51328593", "0.5125178", "0.5116884", "0.51035154" ]
0.5636858
53
Stellt die Verbindung zum Datenbankserver her.
protected function connect() { // Wenn bereits eine Verbindung besteht soll keine neue Verbindung erstellt werden. if (!is_null($this->_connection)) { return; } // Initialisiert MySQLi und gibt eine Ressource des Moduls zurück. $this->_connection = mysqli_init(); // @ Verhindert Fehlermeldungen die mit Funktionsaufruf möglicherweise erzeugt werden. $this->_isConnected = @mysqli_real_connect($this->_connection, $this->_host, $this->_username, $this->_password, $this->_database, $this->_port); // Werfen einer Fehlermeldung wenn keine Verbindung hergestellt werden konnte. if (!$this->_isConnected) { throw new Exception("Fehler beim DB-Verbindungsaufbau."); } // Anwendung der Zeichenkodierung für die Verbindung. mysqli_set_charset($this->_connection, $this->_charset); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadServer() {\n if($result = DB::get()->query(\"SELECT `host`, `ip` FROM `servers` WHERE `serverID` = \" . $this->serverId)) {\n if($result->num_rows > 0) {\n $row = $result->fetch_assoc();\n list($this->ip, $this->port) = explode(':', $row['ip']);\n $this->host = (int)$row['host'];\n }\n $result->close();\n }\n }", "public function db_server_info()\n {\n }", "private function get_server()\n {\n }", "function serverInfo() {\n\t}", "function ManejoBD(){\n\t\t$this->BaseDatos = \"instituto\"; # aignar valor a la propiedad $BaseDatos\n\t\t$this->Servidor = \"localhost\"; # aignar valor a la propiedad $Servidor\n\t\t$this->Usuario = \"root\"; # aignar valor a la propiedad $Usuario\n\t\t$this->Clave = \"123456\"; # aignar valor a la propiedad $Clave\n\t}", "function serverSync() {\n\n\t\t// check server build\n\t\tif (strlen($this->server->build) == 0 ||\n\t\t ($this->server->getGame() == 'MP' && strcmp($this->server->build, MP_BUILD) < 0)) {\n\t\t\ttrigger_error(\"Obsolete server build '\" . $this->server->build . \"' - must be at least '\" . MP_BUILD . \"' !\", E_USER_ERROR);\n\t\t}\n\n\t\t// get server id, login, nickname, zone & packmask\n\t\t$this->server->isrelay = false;\n\t\t$this->server->relaymaster = null;\n\t\t$this->server->relayslist = array();\n\t\t$this->server->gamestate = Server::RACE;\n\t\t$this->server->packmask = '';\n\t\t$this->client->query('GetSystemInfo');\n\t\t$response['system'] = $this->client->getResponse();\n\t\t$this->server->serverlogin = $response['system']['ServerLogin'];\n\n\t\t$this->client->query('GetDetailedPlayerInfo', $this->server->serverlogin);\n\t\t$response['info'] = $this->client->getResponse();\n\t\t$this->server->id = $response['info']['PlayerId'];\n\t\t$this->server->nickname = $response['info']['NickName'];\n\t\t$this->server->zone = substr($response['info']['Path'], 6); // strip 'World|'\n\n\t\t$this->client->query('GetLadderServerLimits');\n\t\t$response['ladder'] = $this->client->getResponse();\n\t\t$this->server->laddermin = $response['ladder']['LadderServerLimitMin'];\n\t\t$this->server->laddermax = $response['ladder']['LadderServerLimitMax'];\n\n\t\t$this->client->query('IsRelayServer');\n\t\t$this->server->isrelay = ($this->client->getResponse() > 0);\n\t\tif ($this->server->isrelay) {\n\t\t\t$this->client->query('GetMainServerPlayerInfo', 1);\n\t\t\t$this->server->relaymaster = $this->client->getResponse();\n\t\t}\n\n\t\t// get MP packmask\n\t\t$this->client->query('GetServerPackMask');\n\t\t$this->server->packmask = $this->client->getResponse();\n\n\t\t// clear possible leftover ManiaLinks\n\t\t$this->client->query('SendHideManialinkPage');\n\n\t\t// get mode & limits\n\t\t$this->client->query('GetCurrentGameInfo', 1);\n\t\t$response['gameinfo'] = $this->client->getResponse();\n\t\t$this->server->gameinfo = new Gameinfo($response['gameinfo']);\n\n\t\t// get status\n\t\t$this->client->query('GetStatus');\n\t\t$response['status'] = $this->client->getResponse();\n\t\t$this->currstatus = $response['status']['Code'];\n\n\t\t// get game & mapdir\n\t\t$this->client->query('GameDataDirectory');\n\t\t$this->server->gamedir = $this->client->getResponse();\n\t\t$this->client->query('GetTracksDirectory');\n\t\t$this->server->mapdir = $this->client->getResponse();\n\n\t\t// get server name & options\n\t\t$this->getServerOptions();\n\n\t\t// throw 'synchronisation' event\n\t\t$this->releaseEvent('onSync', null);\n\n\t\t// get current players/servers on the server (hardlimited to 300)\n\t\t$this->client->query('GetPlayerList', 300, 0, 2);\n\t\t$response['playerlist'] = $this->client->getResponse();\n\n\t\t// update players/relays lists\n\t\tif (!empty($response['playerlist'])) {\n\t\t\tforeach ($response['playerlist'] as $player) {\n\t\t\t\t// fake it into thinking it's a connecting player:\n\t\t\t\t// it gets team & ladder info this way & will also throw an\n\t\t\t\t// onPlayerConnect event for players (not relays) to all plugins\n\t\t\t\t$this->playerConnect(array($player['Login'], ''));\n\t\t\t}\n\t\t}\n\t}", "function verbindung_Datenbank(){\r\n\t\t$db_host = \"localhost\";\r\n\t\t$db_user = \"root\";\r\n\t\t$db_password = \"\";\r\n\t\t$db_name = \"clothes\";\r\n\r\n\t\t$connect = mysqli_connect($db_host, $db_user, $db_password, $db_name);\r\n\r\n\t\tif(!$connect)\r\n\t\t\tdie('Keine Verbindung Datenbank');\r\n\r\n\t\treturn $connect;\r\n\t}", "function getDBH(){return $this->DBH;}", "function __construct() {\n parent::bdConnect();\n }", "function cl_ing_ingreso_det() {\r\n\r\n $this->database = new Database();\r\n }", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\t\t\n\t\tif(DEBUG_MODE)\n\t\t{\n\t\t\techo '<pre>db array :: ';\n\t\t\tprint_r($db);\n\t\t}\n\t\t\n\t\t$data_city \t\t\t\t= ((in_array(strtolower($this->params['data_city']), $this->dataservers)) ? strtolower($this->params['data_city']) : 'remote');\n\t\t$this->idc_con\t\t\t= $db[strtolower($data_city)]['idc']['master'];\n\t\t$this->local_tme_conn\t= $db[strtolower($data_city)]['tme_jds']['master'];\n\t\t$this->local_d_jds\t\t= $db[strtolower($data_city)]['d_jds']['master'];\n\t\t$this->local_iro_conn\t= $db[strtolower($data_city)]['db_iro']['master'];\n\t\t$this->fin_con\t\t\t= $db[strtolower($data_city)]['fin']['master'];\n\t\t\n\t}", "public function __construct() {\n\t\t // Datenbankverbindung aufbauen \n\t\t\n\t}", "private function serverToevoegenAction()\n {\n if (isset($_POST) && !empty($_POST))\n {\n $this->model->maakServer();\n $this->model->foutGoedMelding('success', '<strong>Gelukt!</strong> server is toegevoegd. <span class=\"glyphicon glyphicon-saved\"></span>');\n $this->model->setLog('Server toevoegen', 'Gelukt');\n $this->forward('klant', 'admin');\n }\n }", "public function getServerList() {}", "private function __construct ( $srv ) { $this->server = $srv; }", "public function server_admin() {\n\n\t\tif ( defined( 'EDD_RI_IS_SERVER' ) && EDD_RI_IS_SERVER ) {\n\t\t\tif ( ! class_exists( 'EDD_RI', false ) ) {\n\t\t\t\trequire( __DIR__ . '/server/class-EDD_RI.php' );\n\t\t\t}\n\n\t\t\tEDD_RI::init();\n\t\t}\n\t}", "public function getServerData() {\n \t\n \t// Return our server object\n \treturn $this->oServerData;\n }", "public function testListServer()\n {\n }", "function m_seleBD(){\n\t\tmysql_select_db($this->a_nomBD, $this->a_conexion);\n\t}", "public function serverChanged(ServerChangedEvent $event): void;", "private function get_server()\n\t{\n\t\treturn $this->m_server;\n\t}", "public function getServers() {}", "function __reload_ne_adapaters() {\n\t\t$appliance_id = $this->response->html->request()->get('appliance_id');\n\t\t$appliance = new appliance();\n\t\t$appliance->get_instance_by_id($appliance_id);\n\t\t$resource = new resource();\n\t\t$resource->get_instance_by_id($appliance->resources);\n\t\t$command = $this->basedir.\"/plugins/hyperv/bin/htvcenter-hyperv-network post_net_adapters -i \".$resource->ip;\n\t\t$command .= ' --htvcenter-ui-user '.$this->user->name;\n\t\t$command .= ' --htvcenter-cmd-mode fork';\n\t\t$file = $this->rootdir.'/plugins/hyperv/hyperv-stat/'.$resource->ip.'.net_adapters';\n\t\tif(file_exists($file)) {\n\t\t\tunlink($file);\n\t\t}\n\t\t$htvcenter_server = new htvcenter_server();\n\t\t$htvcenter_server->send_command($command, NULL, true);\n\t\twhile (!file_exists($file)) // check if the data file has been modified\n\t\t{\n\t\t usleep(10000); // sleep 10ms to unload the CPU\n\t\t clearstatcache();\n\t\t}\n\t\treturn true;\n\t}", "function network_admin_load()\n {\n }", "public static function GetDataServer ()\n {\n\t\treturn self::GetServer('forceDataServer', 'data');\n }", "public function __construct() {\n\t\t$this->host = sfConfig::get('mod_main_host');\n\t\t$this->port = sfConfig::get('mod_main_port');\n\t\t$this->user = sfConfig::get('mod_main_user');\n\t\t$this->pass = sfConfig::get('mod_main_pass');\n\t\t$this->database = sfConfig::get('mod_main_database');\t\t\n\t\t$this->link = mysql_connect($this->host . ':' . $this->port, $this->user, $this->pass);\n\t \n\t\tif(!$this->link)\n\t\t\tthrow new CustomUOMySQLException('Connexion impossible a la BDD : ' . mysql_error($this->link));\n\t\t \n\t\t$base = mysql_select_db($this->database, $this->link);\t \n\t\tif (!$base)\n\t\t\tthrow new CustomUOMySQLException(mysql_error($this->link));\n\t}", "public function getBind();", "public function __construct() {\n\t if($_SERVER['HTTP_HOST']=='127.0.0.1'){\n\t\t//local db\n\t\t$this->host= \"localhost\";\n\t\t$this->user=\"root\";\n\t\t$this->passwd=\"root\";\n\t\t\n\t\t$this->base=\"tvsp\";\n\t\t$this->online=false;\n\t }else{\n\t\t//Hosted db\n\t\t$this->host= \"mysql51-60.perso\";\n\t\t$this->user=\"tvshowpltvsp\";\n\t\t$this->passwd=\"tn5Ij2i7\";\n\t\t\n\t\t$this->base=\"tvshowpltvsp\";\n\t\t$this->online=true;\n\t }\n\t \n\t $this->con= mysql_connect($this->host,$this->user,$this->passwd) or die(\"Connexion\");\n mysql_select_db($this->base,$this->con) or die(\"Sélection de MaBase\");\n }", "function dataBaseAccess() \n {\n error_reporting (E_ALL & ~ E_NOTICE & ~ E_DEPRECATED); \n // error_reporting(0);\n date_default_timezone_set('America/Recife');\n // conexão com o servidor \n $this->myCon=mysqli_connect(\"localhost\", \"X\", \"X\");\n $db_selected = mysqli_select_db( $this->myCon , 'D' );\n return ; \n }", "public function __construct() {\n self::getBdd();\n }", "function get_database_server()\n\t{\n\t\treturn ($this->database_server);\n\t}", "protected function _getServersData()\n {\n return $this->_aServersData;\n }", "function ConnecServ(){\n\t\t\t\n\t\t//mise en place du script de connexion\n\t\t\t$dsn=\"mysql:dbname=\".BASE.\";host=\".SERVEUR;\n\t\t\t\n\t\t//tentative de connexion à la base de données\n\t\t\ttry{\n\t\t\t\t$connexion=new PDO($dsn,USER,PASSWD);\n\t\t\t\t$connexion->exec(\"set names utf8\");\n\t\t\t}\n\t\t\t\n\t\t//affichage d'éventuelles erreurs\n\t\t\tcatch(PDOExecption $e){\n\t\t\t\tprintf(\"Echec de la connexion : %s\\n\", $e->getMessage());\n\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t//renvoi de la connexion\n\t\t\treturn $connexion;\n\t}", "public function attaquerAdversaire() {\n\n }", "function ServerInfo() {}", "function loadServerInfo() {\n\t\t\n\t\t/* define variables */\n\t\t$connections = array(); // to store the active connections\n\t\t$numConnections = 0; // number of connections (number of elements in $connections)\n\t\t$curServer = 0; // next position in the server array to handle\n\t\t\n\t\t/* loop as long as there are master servers to wait for */\n\t\twhile ($numConnections > 0 || isset($this->servers[$curServer])) {\n\t\t\t\n\t\t\t/* build up connections until limit is reached */\n\t\t\tfor (; isset($this->servers[$curServer]) && $numConnections < self::MAX_CONNECTIONS_SERVER; $curServer++) {\n\t\t\t\t\n\t\t\t\tswitch ($this->servers[$curServer][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgief\"; break;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgie3\\x05\"; break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$authority = $this->servers[$curServer][0].':'.$this->servers[$curServer][1];\n\t\t\t\t$connection = self::establishConnection($authority, $data);\n\t\t\t\t\n\t\t\t\t/* add to connection if not failed */\n\t\t\t\tif ($connection) {\n\t\t\t\t\t$connections[$curServer] = array($connection, &$this->servers[$curServer], self::getTimeInMs());\n\t\t\t\t\t$numConnections++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* save memory */\n\t\t\t\tunset($authority, $connection);\n\t\t\t}\n\t\t\t\n\t\t\t/* check for responses */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\t\n\t\t\t\t/* read data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // TODO: find out how great it really can be\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // by my calc the max size is 850, but trying to read more doesn't harm\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* packet length */\n\t\t\t\t$datalen = strlen($data);\n\t\t\t\t// var_dump($datalen);\n\t\t\t\t\n\t\t\t\t/* check if data is usable, otherwise skip */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\tif ($data === false || $datalen < 14 || substr($data, 0, 14) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinfo\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\tif ($data === false || $datalen < 15 || substr($data, 0, 15) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinf35\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* analyse data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = substr((string)$data[0], 14);\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[3];\n\t\t\t\t\t\t$flags = (int)$data[4];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['progression'] = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 8; isset($data[$i+2]); $i += 2) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+1];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[3];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[4];\n\t\t\t\t\t\t$flags = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[8];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[9];\n\t\t\t\t\t\t$connection[1]['num_players_ingame'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players_ingame'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 10; isset($data[$i+4]); $i += 5) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['clan'] = (string)$data[$i+1];\n\t\t\t\t\t\t\t$player['country'] = (int)$data[$i+2];\n\t\t\t\t\t\t\t// $player['countrydata'] = self::getCountry($player['country']);\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+3];\n\t\t\t\t\t\t\t$player['ingame'] = (bool)$data[$i+4];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* drop it, because there comes only one packet to analyse */\n\t\t\t\tunset($connections[$n]);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* drop connections that have timed out */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\tif ((self::getTimeInMs() - $connection[2]) >= self::TIMEOUT_SERVER) {\n\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* renew connection counter */\n\t\t\t$numConnections = count($connections);\n\t\t\t\n\t\t\t/* sleep a bit */\n\t\t\tusleep(self::REQUEST_SLEEP * 1000);\n\t\t}\n\t\t\n\t}", "abstract protected function setupServers();", "public function onLoad($param)\n {\n parent::onLoad($param);\n if(!$this->IsPostBack)\n {\n $sql=\"select * from presupuesto.bancos order by nombre\";\n $bancos=cargar_data($sql,$this);\n $this->drop_bancos->DataSource=$bancos;\n $this->drop_bancos->dataBind();\n }\n }", "protected static function bind() {}", "public function setDataConnection(){\n \n \n }", "public function koneksi(){\n\t\t\t$koneksi = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);\t\t// Menyambungkan ke server\n\t\t\t$database = mysql_select_db($this->dbName, $koneksi);\t// Memilih database\n\t\t}", "function database_get_server_info()\n {\n\t return ( function_exists('mysql_get_server_info') ? mysql_get_server_info($this->database_connection) : FALSE );\n\t}", "public function getServer();", "public function getServer();", "function post_getFromDB () {\n\n // Be sure to remove addresses, otherwise reusing will provide old objects for getAddress, ...\n unset($this->address);\n unset($this->netmask);\n unset($this->gateway);\n\n if (isset($this->fields[\"address\"])\n && isset($this->fields[\"netmask\"])) {\n if ($this->fields[\"version\"] == 4) {\n $this->fields[\"network\"] = sprintf(__('%1$s / %2$s'), $this->fields[\"address\"],\n $this->fields[\"netmask\"]);\n } else { // IPv6\n $this->fields[\"network\"] = sprintf(__('%1$s / %2$s'), $this->fields[\"address\"],\n $this->fields[\"netmask\"]);\n }\n }\n\n }", "function getServerInfo();", "public function getVersionBD() {\n\t\t\n\t\t\t$this->log->debug(\"Maintenance::getVersionBD() Début\");\n\t\t\n\t\t\t$version = 0;\n\t\t\n\t\t\ttry {\n\t\t\t\t$sql = \"select version from tconfig\";\n\t\t\t\t$sth = $this->dbh->prepare($sql);\n\t\t\t\t$sth->execute();\n\t\t\t\t\t\n\t\t\t\t// Obtenir la version de la bd\n\t\t\t\t$version = $sth->fetchColumn();\n\t\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\tErreur::erreurFatal('018', \"Maintenance::getVersionBD() - Erreur technique détectée : '\" . $e->getMessage() . $e->getTraceAsString() . \"'\", $this->log);\n\t\t\t}\n\t\t\n\t\t\t$this->log->debug(\"Maintenance::getVersionBD() Version = '$version'\");\n\t\t\n\t\t\treturn $version;\n\t\t}", "function rest_get_server()\n {\n }", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\n\t\t$data_city \t\t= ((in_array(strtolower($this->params['data_city']), $this->dataservers)) ? strtolower($this->params['data_city']) : 'remote');\n\t\t\n\t\t$this->dbConIro \t\t= $db[$data_city]['iro']['master'];\n\t\t$this->dbConDjds \t\t= $db[$data_city]['d_jds']['master'];\n\t\t$this->dbConDjds_slave\t= $db[$data_city]['d_jds']['master'];\n\t\t$this->dbContme\t\t\t= $db[$data_city]['tme_jds']['master'];\n\t\t//$this->dbConIro_slave\t= $db[$data_city]['iro']['slave'];\n\t\t$this->dbConIdc \t\t= $db[$data_city]['idc']['master'];\t\t\n\t\t$this->dbConbudget \t= $db[$data_city]['db_budgeting']['master'];\n\t\tif((in_array($this->ucode, json_decode(MONGOUSER)) || ALLUSER == 1)){\n\t\t\t$this->mongo_flag = 1;\n\t\t}\n\t\tif((in_array($this->ucode, json_decode(TME_MONGOUSER)) || TME_ALLUSER_MONGO == 1) && in_array(strtolower($data_city), json_decode(MONGOCITY))){\t\n\t\t\t$this->mongo_tme = 1;\n\t\t}\n\t}", "public function getTbrServer() {\n\treturn $this->GTB_SERVER; \n }", "protected function serverHostname()\n {\n }", "public function init()\n {\n $sql_dns = \"SELECT * FROM dns\";\n $response = $this->db_access_admin->query($sql_dns);\n if($response){\n $this->datas_dns = $response->fetchAll();\n }\n }", "public function serch()\n {\n }", "public function __Construct(){\n\t\t\t\t$this->conexao = mysqli_connect(\"127.0.0.1\",\"root\",\"\" ,\"seumadrugagames\")\n\t\t\t\tor die (\"Erro 404\");\n\t\t\t\t$this->tabela = \"vendas\";\n\t\t\t}", "public function boleta()\n\t{\n\t\t//\n\t}", "public function server_data()\n\t{\n\t\t$serialized_selected_app = Hop_new_relic_settings_helper::get_setting('nr_selected_app');\n\t\t$api_key = Hop_new_relic_settings_helper::get_setting('nr_api_key');\n\t\tif ($serialized_selected_app != null && $api_key != null)\n\t\t{\n\t\t\t$selected_app = unserialize($serialized_selected_app);\n\n\t\t\t$server_summary = ee()->cache->get('/'.HOP_NEW_RELIC_NAME.'/server_sum_'.$selected_app->id.'_'.$this->cache_ttl);\n\t\t\tif(!$server_summary)\n\t\t\t{\n\t\t\t\t$new_relic_api = new New_Relic_Api($api_key);\n\t\t\t\t$server_summary = $new_relic_api->get_server_summary($selected_app->links->servers[0]);\n\n\t\t\t\tee()->cache->save('/'.HOP_NEW_RELIC_NAME.'/server_sum_'.$selected_app->id.'_'.$this->cache_ttl, $server_summary, $this->cache_ttl);\n\t\t\t}\n\n\t\t\tif ($server_summary != null && !isset($server_summary->error))\n\t\t\t{\n\n\t\t\t\t$text = '<span>'.$server_summary->summary->cpu.' cpu%';\n\t\t\t\tif($server_summary->summary->cpu_stolen > 0)\n\t\t\t\t{\n\t\t\t\t\t$text .= ' ('.$server->summary->cpu_stolen.' cpu stolen%)';\n\t\t\t\t}\n\t\t\t\t$text .= '</span> <span>'.$server_summary->summary->memory.' mem%';\n\n\t\t\t\tif (isset($server_summary->summary->memory_used) && isset($server_summary->summary->memory_total))\n\t\t\t\t{\n\t\t\t\t\t$text .= ' ('.Hop_new_relic_settings_helper::format_bytes($server_summary->summary->memory_used, 0).'/'.Hop_new_relic_settings_helper::format_bytes($server_summary->summary->memory_total, 0).')';\n\t\t\t\t}\n\n\t\t\t\t$text .= '</span> <span>'.$server_summary->summary->fullest_disk.' disk%</span>';\n\t\t\t\treturn $text;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}", "protected function start(){\n\t\n\t\t\t$this->con = new PDO(\"mysql:host=$this->host;dbname=$this->banco;\", \"$this->user\" , \"$this->senha\");\n\t\t}", "function getServerInfo() {\n $serverInfo = mysql_get_server_info();\n return $serverInfo;\n }", "private function booted()\n {\n }", "public function init()\n\t{\n\t\t$this->serversInit();\n\t}", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\n\t\t$conn_city \t\t= ((in_array(strtolower($this->data_city), $this->dataservers)) ? strtolower($this->data_city) : 'remote');\n\t\t\n\t\t$this->conn_iro \t\t= $db[$conn_city]['iro']['master'];\n\t\t$this->conn_local \t\t= $db[$conn_city]['d_jds']['master'];\n\t\t$this->conn_tme \t\t= $db[$conn_city]['tme_jds']['master'];\n\t\t$this->conn_idc \t\t= $db[$conn_city]['idc']['master'];\n\t\t\n\t\tif(($this->module =='DE') || ($this->module =='CS'))\n\t\t{\n\t\t\t$this->conn_temp\t \t= $this->conn_local;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t}\n\t\telseif($this->module =='TME')\n\t\t{\n\t\t\t$this->conn_temp\t\t= $this->conn_tme;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t\tif((in_array($this->ucode, json_decode(TME_MONGOUSER)) || TME_ALLUSER_MONGO == 1) && in_array(strtolower($conn_city), json_decode(MONGOCITY))){\n\t\t\t\t$this->mongo_tme = 1;\n\t\t\t}\n\n\t\t}\n\t\telseif($this->module =='ME')\n\t\t{\n\t\t\t$this->conn_temp\t\t= $this->conn_idc;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t\tif((in_array($this->ucode, json_decode(MONGOUSER)) || ALLUSER == 1)){\n\t\t\t\t$this->mongo_flag = 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$message = \"Invalid Module.\";\n\t\t\techo json_encode($this->send_die_message($message));\n\t\t\tdie();\n\t\t}\t\t\n\t}", "public function StartBD(){\n if (!$this->BDCon){\n $this->BDCon = pg_connect(\"dbname=$this->db_name port=$this->db_port host=$this->db_host user=$this->db_username password=$this->db_password\") or die(\"No se pudo CONECTAR a la BD\");\n }else{\n $this->EndBD();\n die(\"Doble conexion a BD\");\n }\n \n }", "public function getServerVersion() {}", "public function getServerVersion() {}", "public function getServers();", "public function getVerp()\n {\n }", "public function __construct() {\n parent::__construct('127.0.0.1', '1151178', '1871', 'control_polizas', 3306);\n if (mysqli_connect_errno()) {\n printf(\"Falló la conexión: %s\\n\", mysqli_connect_error());\n exit();\n }\n }", "public function __construct(){\n $servidor='localhost';\n $bd='dbtds';\n $usuario=\"root\";\n $pass=\"\";\n $this->enlace = mysqli_connect($servidor,$usuario,$pass,$bd) or die('Intente más tarde.');\n }", "public function __construct(){\n\t\t\t$this->db = new PDO('pgsql:host=centraldepush.postgresql.dbaas.com.br;dbname=centraldepush', 'centraldepush', 'lampada@@6458');\n\t\t\t$this->db->exec(\"SET NAMES 'UTF8'\");\n\t\t}", "function connectionBangServer(){\n\t\t//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://\n\t\t//:: Connessione al database presente su openshift. $servername, $username e $password sono variabili :://\n //:: che immagazzinano valori rilasciati da openshift per accedere al database.\t\t :://\n\t\t//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://\n\t\t\n\t\t$servername = \"127.11.16.2:3306\";\t$username = \"admin3kEW5iP\";\t\t$password = \"a7l1DrcJDJN-\";\n\n\t\t//:::::::::::::::::::::::::::::::::::::::::::://\n\t\t//:: Si crea la connessione con il server. :://\n\t\t//:::::::::::::::::::::::::::::::::::::::::::://\n\t\t$connection = mysql_connect($servername, $username, $password);\n\n\t\t//:::::::::::::::::::::::::::::::::::::::::::://\n\t\t//:: Check della connessione. :://\n\t\t//:::::::::::::::::::::::::::::::::::::::::::://\n\t\tif (!$connection) {\n\t\t\tdie(\"Connection failed: \".mysql_error());\n\t\t}\n\t\t\n\t\t//:::::::::::::::::::::::::::::::::::::::::::://\n\t\t//:: Creazione connessione con BangServer. :://\n\t\t//:::::::::::::::::::::::::::::::::::::::::::://\n\t\t$database = mysql_select_db (\"bangserver\", $connection);\n\t\t\n\t\t//:::::::::::::::::::::::::::::::::::::::::::://\n\t\t//:: Check della connessione. :://\n\t\t//:::::::::::::::::::::::::::::::::::::::::::://\n\t\tif (!$database) {\n\t\t\tdie(\"Connection database failed: \". mysql_error());\n\t\t}\n\t\t\n\t\treturn $connection;\n\t}", "function __construct(){\n \t//Obtenemos los datos con la función datosConexion declarada mas abajo\n $listadatos = $this->datosConexion();\n //Recorremos el array recibido y guardamos los datos en los atributos de esta clase\n foreach ($listadatos as $key => $value) {\n $this->server = $value['server'];\n $this->user = $value['user'];\n $this->password = $value['password'];\n $this->database = $value['database'];\n $this->port = $value['port'];\n }\n //En el atributo conexión instanciaremos la clase mysqli que nos permitirá conectar con la base de datos. Si la base de datos es de tipo distinto a mysql, habría que cambiar la linea\n $this->conexion = new mysqli($this->server,$this->user,$this->password,$this->database,$this->port);\n //Si la conexión da error, sacaremos un mensaje y detendremos la ejecución\n if($this->conexion->connect_errno){\n echo \"algo va mal con la conexion\";\n die();\n }\n\n }", "function serverSync() {\n\n\t\t// get current players on the server ...\n\t\t$this->client->query('GetPlayerList', 100, 0);\n\t\t$response['playerlist'] = $this->client->getResponse();\n\n\t\t// get game version the server runs on ...\n\t\t$this->client->query('GetVersion');\n\t\t$response['version'] = $this->client->getResponse();\n\n\t\t$this->client->query('GetCurrentGameInfo');\n\t\t$response['gameinfo'] = $this->client->getResponse();\n\n\t\t$this->client->query('GetStatus');\n\t\t$response['status'] = $this->client->getResponse();\n\n\t\t// update player list ...\n\t\tif (!empty($response['playerlist'])) {\n\t\t\tforeach ($response['playerlist'] as $player) {\n\t\t\t \n\t\t\t\t// PRELOAD\n\t\t\t\t// create player object of every player response ...\n\t\t\t\t$player_item = new Player($player);\n\t\t\t\t$player_item->mistral['displayPlayerInfo']=true;\n\n\t\t\t\t// add player object to player list ...\n\t\t\t\t$this->server->players->addPlayer($player_item);\n\n\t\t\t\t// GET ALL INFOS LATER - wtf no wins \n//\t\t\t\t$this->addCall('GetPlayerInfo', array($player['Login']), '', 'initPlayer');\n\t\t\t \n\t\t\t\t// NO RASPWAY\n//\t\t\t\t$this->playerConnect(array($player['Login'], ''));\t\t\t\t\t// fake it into thinking it's a connecting player, it gets team & ladder info this way\n\t\t\t}\n\t\t}\n\n\t\t// get game ...\n\t\t$this->server->game = $response['version']['Name'];\n\n\t\t// get mode ...\n\t\t$this->server->gameinfo = new Gameinfo($response['gameinfo']);\n\n\t\t// get status ...\n\t\t$this->server->status = $response['getstatus']['Code'];\n\n\t\t// get trackdir\n\t\t$this->client->query('GetTracksDirectory');\n\t\t$this->server->trackdir = $this->client->getResponse();\n\t\t// throw new synchronisation event ...\n\t\t$this->releaseEvent('onSync', array());\n\t}", "public function leeDatosZonaVW() {\n\t\t$zona = new ZonaBSN ();\n\t\t$this->zona = $zona->leeDatosForm ($_POST);\n\t}", "public function show(Server $server)\n {\n //\n }", "public function __construct()\n {\n $this->_aServersData = (array) oxRegistry::getConfig()->getConfigParam('aServersData');\n }", "public function boot()\n\t{\t\n\t}", "function __construct(){\n // se definen los datos del servidor de base de datos\n $conection['server']=\"localhost\"; //host\n $conection['user']=\"root\"; // usuario\n $conection['pass']=\"admin\"; //password\n $conection['base']=\"INNSADB\"; //base de datos\n\n // crea la conexion pasandole el servidor , usuario y clave\n $conect= mysql_connect($conection['server'],$conection['user'],$conection['pass']);\n mysql_set_charset('utf8',$conect);\n\n if ($conect) {// si la conexion fue exitosa , selecciona la base\n mysql_select_db($conection['base']);\n $this->con=$conect;\n }\n\n }", "function __construct(){\n $s= gethostbyaddr ( $_SERVER['REMOTE_ADDR']);\n if ($s == 'apch-PC'){$this->server='local';}\n else {$this->server='gamisio';}\n }", "protected function onBoot() {}", "protected function bootingDomain()\n {\n }", "public function Database() {\r\n\r\n $this->hostname = \"localhost\";\r\n $this->database = \"skynet\";\r\n $this->user = \"root\";\r\n $this->pass = \"\";\r\n $this->connect();\r\n\r\n }", "public function onLoad()\r\n {\r\n parent::onLoad();\r\n\r\n // Connect to the database\r\n $this->connect($this->server, $this->username, $this->password, $this->database);\r\n }", "public function host()\n {\n }", "public static function updateServizi()\n {\n //arrivano i servizi modificati\n if (isset($_REQUEST['update_servizi'])) {\n $_SESSION['update_servizi'] = $_REQUEST['update_servizi'];\n }\n // effettua la registrazione dell'azienda\n $update = UtenteFactory::updateServizi();\n if ($update == 1) {\n $_SESSION['errore'] = 6;\n } elseif ($update == 0) {\n $_SESSION['errore'] = 5;\n }\n $vd = new ViewDescriptor();\n $vd->setTitolo(\"SardiniaInFood: Profilo\");\n $vd->setLogoFile(\"../view/in/logo.php\");\n $vd->setMenuFile(\"../view/in/menu_modifica_profilo.php\");\n $vd->setContentFile(\"../view/in/azienda/modifica_servizi.php\");\n $vd->setErrorFile(\"../view/in/error_in.php\");\n $vd->setFooterFile(\"../view/in/footer_empty.php\");\n \n require_once '../view/Master.php';\n }", "public function getServerExtList()\n {\n }", "public function get_signalisation(){retrun($id_local_signalisation); }", "function __construct() {\n\n $this->dbserver = \"MYSQL5005.Smarterasp.net\";\n $this->username = \"9b0406_fm\";\n $this->password = \"vasusubramaniyam\";\n $this->dbname = \"db_9b0406_fm\";\n }", "public function writeServerCode()\n {\n }", "public function EnregistrerSite()\n {\n \n }", "public function ausgeben() {\r\n\t\techo \"Die aktuelle Geschwindigkeit beträgt \" . $this->geschwindigkeit . \": \";\r\n\t}", "function xmlrpc_server_get() {\n return xmlrpc_server_set();\n}", "final public function Selado ()\n {\n if(!self::$conn)\n {\n try\n {\n self::$conn = new PDO(\n $this->param['socket'].\n \":host=\".$this->param['endereco'].\n \";dbname=\".$this->param['bdados'].\n \";charset=\".$this->param['charset'].\n \";\",$this->param['usuario']\n ,$this->param['senha']);\n self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n self::$conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n } catch (PDOException $e)\n {\n print \"***********<br/><h3>Servidor de dados não responde!. <br/><a href=''>tente novamente...</a></h3> \";\n die(\"****************************\");\n }\n }\n }", "protected function bootedDomain()\n {\n }", "public function modload()\n\t{\n\t\tmodules::init_module( 'ns_drop', self::MOD_VERSION, self::MOD_AUTHOR, 'nickserv', 'default' );\n\t\t// these are standard in module constructors\n\t\t\n\t\tnickserv::add_help( 'ns_drop', 'help', &nickserv::$help->NS_HELP_DROP_1 );\n\t\tnickserv::add_help( 'ns_drop', 'help drop', &nickserv::$help->NS_HELP_DROP_ALL );\n\t\t// add the help\n\t\t\n\t\tnickserv::add_command( 'drop', 'ns_drop', 'drop_command' );\n\t\t// add the drop command\n\t}", "function edit(){\n $this->connect(); // open connection\n $this->disconnect(); // close connection\n }", "function zeige_Datensatz_bearbeiten( $conn, $datensatz_id, $suchbegriff ) {\r\n\t$sql = 'SELECT ' .\r\n\t\t\t\t'id, ' .\r\n\t\t\t\t'name_deutsch, ' .\r\n 'name_latein, ' .\r\n 'art, ' .\r\n 'beschreibung, ' .\r\n 'nachweis, ' .\r\n 'bild, ' .\r\n 'datum, ' .\r\n\t\t\t\t'letzte_aenderung' .\r\n\t\t\t\r\n\t\t' FROM ' . DB_TABLE . ' ' .\r\n\t 'WHERE id = ?';\r\n\tif ( $result = $conn->prepare( $sql ) ) {\r\n\t\t$result->bind_param( 'i', $datensatz_id );\r\n\t\t$result->execute();\r\n\t\t$result->store_result();\r\n if ( $result->num_rows == 0 ) {\r\n echo '<h2>Keine Treffer gefunden.</h2>' . \"\\n\";\r\n exit;\r\n }\r\n // Es gab Treffer!\r\n else {\r\n\t\t\t$result->bind_result(\r\n\t\t\t\t$row[ 0 ],\r\n\t\t\t\t$row[ 1 ],\r\n\t\t\t\t$row[ 2 ],\r\n\t\t\t\t$row[ 3 ],\r\n\t\t\t\t$row[ 4 ],\r\n\t\t\t\t$row[ 5 ],\r\n\t\t\t\t$row[ 6 ],\r\n\t\t\t\t$row[ 7 ],\r\n\t\t\t\t$row[ 8 ]\r\n\t\t\t);\r\n\r\n\t\t\t// Zum Glück gibt es doch Treffer ;-)\r\n\t\t\t$result->fetch();\r\n\r\n\t\t\techo '<h2>Bearbeiten</h2>' . \"\\n\";\r\n\r\n\t\t // -----------------------------------------------------------------------\r\n\t\t\t// Knopf zum abbrechen\r\n\t\t echo '<div id=\"container_form_bearbeiten_abbrechen\">' . \"\\n\";\r\n\t\t\techo '<form name=\"edit\" action=\"datensatz_details.php\" method=\"get\">\r\n\t\t\t\t<input type=\"submit\" class=\"btn btn-sm\" value=\"abbrechen\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"datensatz_id\" value=\"' .\r\n\t\t\t\t\t$datensatz_id .\r\n\t\t\t\t'\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"suchbegriff\" value=\"' . $suchbegriff . '\" />' . \"\\n\";\r\n\t\t\techo '</form>' . \"\\n\";\r\n \t\t echo '</div>' . \"\\n\";\r\n\r\n\t\t // -----------------------------------------------------------------------\r\n\t\t\t// Knopf zum speichern\r\n \t\t\techo '<form name=\"edit\" action=\"datensatz_bearbeiten_speichern.php\" method=\"post\" enctype=\"multipart/form-data\">' . \"\\n\";\r\n \t\t\techo '<div id=\"container_form_bearbeiten_speichern\">\r\n\t\t\t\t<input type=\"submit\" class=\"btn btn-primary btn-sm\" value=\"speichern\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"datensatz_id\" value=\"' .\r\n\t\t\t\t\t$datensatz_id .\r\n\t\t\t\t'\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"suchbegriff\" value=\"' . $suchbegriff . '\" />' . \"\\n\";\r\n \t\techo '</div>' . \"\\n\";\r\n\r\n\t\t // -----------------------------------------------------------------------\r\n\t\t\t// Tabelle mit Ergebnissen beginnen\r\n\t\t\techo '<table class=\"table\" border=0 id=\"datensatz_bearbeiten\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>ID</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\">' . htmlentities( $row[ 0 ] ) . '</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>NAME</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\"><input type=\"text\" class=\"form-control\" size=\"' .\r\n\t\t\t\t\tINPUT_TEXT_SIZE . '\"\r\n\t\t\t\t\tname=\"NAME_DEUTSCH\" value=\"' .\r\n\t\t\t\t\thtmlentities( $row[ 1 ] ) . '\"></td>\r\n\t\t\t\t</tr>\r\n\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>LATEIN</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\"><input type=\"text\" class=\"form-control\" size=\"' .\r\n\t\t\t\t\tINPUT_TEXT_SIZE . '\"\r\n\t\t\t\t\tname=\"NAME_LATEIN\" value=\"' . htmlentities( $row[ 2 ] ) . '\"></td>\r\n\t\t\t\t</tr>\r\n\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>ART</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\">\n\n <select name=\"ART\" >\n <option>Keine</option>\n <option>Kräuter</option>\n <option>Sonnengewächs</option>\n <option>Halbschattengewächs</option>\n <option>Schattengewächs</option>\n </select>\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\n\t\t\t\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>BESCHREIBUNG</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\"><textarea rows=\"8\" cols=\"77\" type=\"text\" class=\"form-control\" size=\"' .\r\n\t\t\t\t\tINPUT_TEXT_SIZE . '\"\r\n\t\t\t\t\tname=\"BESCHREIBUNG\">' . htmlentities( $row[ 4 ] ) . '</textarea></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>NACHWEIS</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\"><input type=\"text\" class=\"form-control\" size=\"' .\r\n\t\t\t\t\tINPUT_TEXT_SIZE . '\"\r\n\t\t\t\t\tname=\"NACHWEIS\" value=\"' . htmlentities( $row[ 5 ] ) . '\"></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>BILD</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\">\n\t\t\t\t<input type=\"file\" name=\"BILD\" value\"' . htmlentities( $row[ 6 ] ) . '\"/>\n\n\t\t\t\t<a href=\"' . IMAGE_URL . $row[ 6 ] . '\">'. htmlspecialchars( $row[ 6 ] ) .'</a>\n\t\t\t\t<input type=\"hidden\" name=\"BILD_ALT\" value=\"'. $row[ 6 ] .'\">\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\n\t\t\t\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>DATUM</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\"><input type=\"text\" class=\"form-control\" size=\"' .\r\n\t\t\t\t\tINPUT_TEXT_SIZE . '\"\r\n\t\t\t\t\tname=\"DATUM\" value=\"' . htmlentities( $row[ 7 ] ) . '\"></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td class=\"tabelle_zelle_beschriftung\" align=right>LETZTE ÄNDERUNG</td>\r\n\t\t\t\t<td nowrap class=\"tabelle_zelle_inhalt\">' .\r\n\t\t\t\thtmlentities( $row[ 8 ] ) . '</td>\r\n\t\t\t\t</tr>' . \"\\n\";\r\n\t\t\techo '</tr>' . \"\\n\";\r\n\r\n\t\t\techo '</table>' . \"\\n\";\r\n\r\n\t\t\techo '</form>' . \"\\n\";\r\n\t\t}\r\n\t}\r\n\telse\r\n\t\tdie ( 'SQL-Abfrage konnte nicht ausgef&uuml;hrt werden!' );\r\n\r\n\t// und Referenz zum Result-Objekt löschen, brauchen wir ja nicht mehr...\r\n\tunset( $result );\r\n}", "public function testUpdateServiceData()\n {\n\n }", "public function admin_load()\n {\n }", "public function initialize()\n {\n // attributes\n $this->setName('gs_ingegeven_samenstellingen');\n $this->setPhpName('GsIngegevenSamenstellingen');\n $this->setClassname('PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsIngegevenSamenstellingen');\n $this->setPackage('src.PharmaIntelligence.GstandaardBundle.Model');\n $this->setUseIdGenerator(false);\n // columns\n $this->addColumn('bestandnummer', 'Bestandnummer', 'INTEGER', false, null, null);\n $this->addColumn('mutatiekode', 'Mutatiekode', 'INTEGER', false, null, null);\n $this->addForeignPrimaryKey('handelsproduktkode', 'Handelsproduktkode', 'INTEGER' , 'gs_handelsproducten', 'handelsproduktkode', true, null, null);\n $this->addPrimaryKey('volgnummer', 'Volgnummer', 'INTEGER', true, null, null);\n $this->addColumn('aanduiding_werkzaamhulpstof', 'AanduidingWerkzaamhulpstof', 'VARCHAR', false, 255, null);\n $this->addForeignKey('generiekenaamkode', 'Generiekenaamkode', 'INTEGER', 'gs_generieke_namen', 'generiekenaamkode', false, null, null);\n $this->addColumn('hoeveelheid_werkzame_stof', 'HoeveelheidWerkzameStof', 'DECIMAL', false, 12, null);\n $this->addForeignKey('eenh_hvh_werkzstof_thesaurus_1', 'EenhHvhWerkzstofThesaurus1', 'INTEGER', 'gs_thesauri_totaal', 'thesaurusnummer', false, null, null);\n $this->addForeignKey('eenhhoeveelheid_werkzame_stof_kode', 'EenhhoeveelheidWerkzameStofKode', 'INTEGER', 'gs_thesauri_totaal', 'thesaurus_itemnummer', false, null, null);\n $this->addColumn('stamnaamcode', 'Stamnaamcode', 'INTEGER', false, null, null);\n $this->addForeignKey('stamtoedieningsweg_thesaurus_58', 'StamtoedieningswegThesaurus58', 'INTEGER', 'gs_thesauri_totaal', 'thesaurusnummer', false, null, null);\n $this->addForeignKey('stamtoedieningsweg_code', 'StamtoedieningswegCode', 'INTEGER', 'gs_thesauri_totaal', 'thesaurus_itemnummer', false, null, null);\n // validators\n }", "public function testListServers()\n {\n }", "public function viewDataBobot() {\r\n $d_bobot = new DataBobot($this->registry);\r\n if (isset($_POST['upd_bobot'])) {\r\n $konversi = $_POST['konversi'];\r\n $supplier = $_POST['supplier'];\r\n $sp2d = $_POST['sp2d'];\r\n $lhp = $_POST['lhp'];\r\n $rekon = $_POST['rekon'];\r\n $spm_ba = $_POST['spm_ba'];\r\n $rekon_ba = $_POST['rekon_ba'];\r\n $kontrak_ba = $_POST['kontrak_ba'];\r\n $sp2d_pkn = $_POST['sp2d_pkn'];\r\n $spt_pkn = $_POST['spt_pkn'];\r\n $kppn = $_POST['kppn'];\r\n $ba = $_POST['ba'];\r\n $pkn = $_POST['pkn'];\r\n\r\n $d_bobot->set_konversi($konversi);\r\n $d_bobot->set_supplier($supplier);\r\n $d_bobot->set_sp2d($sp2d);\r\n $d_bobot->set_lhp($lhp);\r\n $d_bobot->set_rekon($rekon);\r\n $d_bobot->set_spm_ba($spm_ba);\r\n $d_bobot->set_rekon_ba($rekon_ba);\r\n $d_bobot->set_kontrak_ba($kontrak_ba);\r\n $d_bobot->set_sp2d_pkn($sp2d_pkn);\r\n $d_bobot->set_spt_pkn($spt_pkn);\r\n $d_bobot->set_kppn($kppn);\r\n $d_bobot->set_ba($ba);\r\n $d_bobot->set_pkn($pkn);\r\n\r\n if (!$d_bobot->update_d_bobot()) {\r\n $this->view->error = $d_bobot->get_error();\r\n $this->view->data = $d_bobot->get_bobot();\r\n $this->view->render('admin/dataBobot');\r\n } else {\r\n header('location:' . URL . 'dataBobot/viewDataBobot');\r\n }\r\n }\r\n $this->view->data = $d_bobot->get_bobot();\r\n $this->view->render('admin/dataBobot');\r\n }" ]
[ "0.62020487", "0.6173674", "0.5937677", "0.55933946", "0.5540866", "0.55109423", "0.53585595", "0.5305867", "0.52947706", "0.52867013", "0.52660096", "0.52488995", "0.5205653", "0.51780295", "0.51764864", "0.51610875", "0.5157211", "0.51529425", "0.5145692", "0.5143657", "0.51399994", "0.51395845", "0.5095662", "0.50940895", "0.5079272", "0.5072484", "0.50699586", "0.5057143", "0.5042988", "0.5042344", "0.50340676", "0.5030926", "0.50280076", "0.5027478", "0.5012332", "0.5011962", "0.50043476", "0.4986809", "0.49771017", "0.4972204", "0.49602607", "0.49595436", "0.49577093", "0.49577093", "0.49546793", "0.4951807", "0.49417746", "0.49395147", "0.49320868", "0.4931772", "0.4925086", "0.4921812", "0.49201232", "0.49125144", "0.49110928", "0.49104097", "0.49055398", "0.49007148", "0.48945305", "0.48871505", "0.48820364", "0.48818052", "0.48743874", "0.48741546", "0.4863584", "0.4859209", "0.48430333", "0.48357913", "0.4828254", "0.48190838", "0.4818574", "0.48160467", "0.4815626", "0.48090866", "0.4806442", "0.48059514", "0.48014703", "0.47904328", "0.47863486", "0.47753587", "0.47734633", "0.4771894", "0.47659016", "0.47658157", "0.47633007", "0.4762553", "0.47624397", "0.47586834", "0.47535512", "0.47393122", "0.47359592", "0.47294447", "0.47292998", "0.4721931", "0.47209358", "0.47208783", "0.4720366", "0.47183958", "0.4715365", "0.4702698", "0.46984038" ]
0.0
-1
Gibt den Fehler der Verbindung aus.
public function printError() { mysqli_error($this->_connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test() {\n\t\t\t\t// self wird beim Kompilieren durch den Klassennamen ersetzt, in der es steht\n\t\t\t\tself::ausgabe();\n\t\t\t}", "protected function Form_Run() {}", "public function ausgeben() {\r\n\t\techo \"Die aktuelle Geschwindigkeit beträgt \" . $this->geschwindigkeit . \": \";\r\n\t}", "public function __init(){}", "private function __() {\n }", "public function postLoad() { }", "public function hookForm() {\n }", "public function afmelden()\n {\n return true;\n }", "public function postLoad() {}", "public function elso()\n {\n }", "private function public_hooks()\n\t{\n\t}", "function ToonFormulierAfspraak()\n{\n\n}", "protected function postLoad(){\n\t\t\t\n\t\t}", "protected function __init__() { }", "function Geofinder_upd()\n\t{\n\t\t$this->EE =& get_instance();\n\t}", "public function hooked()\n {\n $this->setData();\n }", "public function _init_(){\n //var_dump($this);\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "protected function __onInit()\n\t{\n\t}", "public function listforms()\n {\n\t\t\n }", "public function postInit()\n {\n }", "public function postInit()\n {\n }", "public function postInit()\n {\n }", "public function onLoad() {\n \n }", "public function obtener()\n {\n }", "public function CBfunctions() {}", "function bfImport() {\n\t\t$this->__construct();\n\t}", "public function init(){\n\t\t\t\t}", "public function __construct() {\n\t\t // Datenbankverbindung aufbauen \n\t\t\n\t}", "private function init()\n\t{\n\t\treturn;\n\t}", "public function hook();", "public function AggiornaPrezzi(){\n\t}", "public function __construct(){\n\t\t//asi poder tener dispoble la vista que le pertenece a esta clase\n\t\tparent::__construct();\n\t}", "function ft_hook_init() {}", "public function init()\n {\n \treturn;\n }", "public function afterLoad() { }", "protected function registered()\n {\n //\n }", "protected function init() {return;}", "public function init(){\n\t\t}", "protected function afterLoad()\n {\n }", "public function init()\n\t\t{\n\t\n\t\t}", "public function _init() {\r\n\r\n }", "protected function init()\n\t{\n\t\t\n\t}", "function FotografiaControl(){\n\t\t$this->acceso=new AccesoDatos();\n\t}", "function on_creation() {\n $this->init();\n }", "protected function _afterInit() {\n\t}", "public function admin_load()\n {\n }", "public function afficherAll()\n {\n }", "function miguel_mMain()\r\n {\t\r\n\t\t$this->base_Model();\r\n }", "public function __construct()\n {\n //нельзя передавать никакие парпметры в конструктор, даже если в событие передаются!!!\n }", "public function __init()\n {\n\n }", "public static function __events () {\n \n }", "public function __construct()\n\t\t{\t\t\t\n\t\t}", "public static function boot() \n\t{\n parent::boot();\n }", "private function __construct() {\r\n\t\t\r\n\t}", "public function get_handler()\n {\n }", "protected function onInit() {}", "public function init(){\n\t\t\n\t}", "public function init ()\r\n {\r\n }", "protected function _init()\r\n\t{\r\n\t}", "public function getF() {}", "protected function initHandlers()\n\t{\n\t}", "public function boot()\r\n {\r\n parent::boot();\r\n\r\n //\r\n }", "public function boot()\r\n {\r\n parent::boot();\r\n\r\n //\r\n }", "public function reinit()\n {\n }", "protected static function booted()\n {\n //\n }", "protected static function booted()\n {\n //\n }", "public function init()\n {\n \n \n }", "public function init()\n {\t\t\t\n }", "public function init()\n {\t\t\t\n }", "public function __construct() {\n\t\t$form_event = ( isset( \\REALTY_BLOC_LOG::$option['form_event'] ) ? \\REALTY_BLOC_LOG::$option['form_event'] : array() );\n\n\t\t// List Active Form\n\t\t$active_forms = ( ( isset( $form_event['form'] ) and is_array( $form_event['form'] ) ) ? array_keys( $form_event['form'] ) : array() );\n\n\t\t// Add Hook For Save Form\n\t\tforeach ( $active_forms as $form_id ) {\n\t\t\tadd_action( \"wpforms_process_complete_{$form_id}\", array( $this, 'save_form_event' ), 10, 4 );\n\t\t}\n\t}", "protected function _afterLoad()\n {\n return parent::_afterLoad();\n }", "public function leer(){\n }", "public function leer(){\n }", "public function run()\n {\n\n parent::run();\n\n }", "public function boot() {\n\t\t//\n\n\t\tparent::boot();\n\t}", "public function init() {\n\t\t\n\t}", "private function booted()\n {\n }", "public function contrato()\r\n\t{\r\n\t}", "public function add_hooks_and_filters() {\n\t\t\t$this->debugMP('msg',__FUNCTION__ . ' started JdB');\n\t\t parent::add_hooks_and_filters();\n\n\t\t\t/**\n\t\t\t * Simplify the Gravity Forms action and filters\n\t\t\t *\n\t\t\t */\n//\t\t\tadd_filter( 'gform_entry_info', array( $this, 'slp_gfl_gform_entry_info' ), 10, 2 );\n\n//\t\t\tadd_action( 'gform_entry_post_save', array( $this, 'slp_gfl_gform_entry_post_save' ), 10, 2 );\n\t\t}", "public function init() {\t\t\n\n }", "function __construct (){\n\t\t}", "public function lister()\r\n {\r\n }", "public function _register()\n {\n }", "function __construct(){\n\t\t// nowt much...\n\t}", "function __construct(){\n \n }", "public function init()\n {\n parent::init();\n }", "public function init()\n { \t\n }", "function __construct() {\n \n }", "function __construct() {\n \n }", "function __construct() {\n \n }", "function __construct() {\n \n }", "function __construct() {\n \n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}" ]
[ "0.5974986", "0.5973601", "0.5858904", "0.5676905", "0.56468606", "0.5605476", "0.5592039", "0.55454934", "0.5504813", "0.54846585", "0.5482147", "0.54745173", "0.54607177", "0.54588085", "0.5458152", "0.54183537", "0.5399908", "0.53879994", "0.5385714", "0.5359917", "0.53492063", "0.53492063", "0.53492063", "0.5345273", "0.5343648", "0.5332917", "0.53305113", "0.53282017", "0.53201056", "0.53126043", "0.5304912", "0.52909636", "0.52903086", "0.52843773", "0.5265917", "0.5261525", "0.52595305", "0.5256784", "0.5246951", "0.52448946", "0.5232053", "0.5228861", "0.52249634", "0.5223093", "0.5222989", "0.5221265", "0.5213664", "0.52130365", "0.52075183", "0.5204442", "0.5201274", "0.51983285", "0.5190159", "0.51887316", "0.5186888", "0.51863676", "0.51812834", "0.51794857", "0.5177748", "0.51761585", "0.5174253", "0.5173029", "0.51721925", "0.51721925", "0.517145", "0.5166032", "0.5166032", "0.51650965", "0.51607597", "0.51607597", "0.51586413", "0.5158422", "0.51576906", "0.51576906", "0.5155256", "0.51490724", "0.5146374", "0.5144824", "0.5142789", "0.51424426", "0.5140928", "0.51389575", "0.5136972", "0.51333904", "0.5125669", "0.5124361", "0.5123779", "0.5122062", "0.51216197", "0.51216197", "0.51216197", "0.51216197", "0.51216197", "0.5120147", "0.5120147", "0.5120147", "0.5120147", "0.5118429", "0.5118429", "0.5118429", "0.5118429" ]
0.0
-1
Get Shopify integration info
private function createIntegration($shop_domain, $accessToken, $merchant = null) { try { $shopifyIntegration = $this->integrations->findWhereFirst([ 'slug' => 'shopify', 'status' => 1, ]); } catch (\Exception $e) { // No Shopify integration } // Check Shopify integration status if (! isset($shopifyIntegration) || ! $shopifyIntegration) { return abort(500, 'An error has occurred while attempting to connect integration.'); } // Get Shopify shop info try { $api = app('shopify_api')->setup(); $api->setShop($shop_domain); $api->setAccessToken($accessToken); $shop = $api->rest('GET', '/admin/shop.json', [])->body->shop; } catch (\Exception $e) { return abort(500, 'An error has occurred while attempting to get shop data.'); } $email = $shop->email; // New merchant if (! $merchant) { // Check if user already exists try { $user = $this->users->findWhereFirst([ 'email' => $email, ]); } catch (\Exception $e) { // No user with such email } // Create new user if (! isset($user) || (isset($user) && ! $user)) { // Get shop owner name $owner_name = $this->split_name($shop->shop_owner) ?: []; // Prepare new user data $new_user_data = []; $new_user_data['email'] = $email; $new_user_data['first_name'] = isset($owner_name['first_name']) ? $owner_name['first_name'] : ''; $new_user_data['last_name'] = isset($owner_name['last_name']) ? $owner_name['last_name'] : ''; $new_user_data['password'] = str_random(8); $new_user_data['plan'] = 0; // Store user $user = app('user_service')->createNewUser($new_user_data); if (! $user) { return abort(500, 'An error has occurred while attempting to create new user record.'); } /*// Setup Mail API Client $mailClient = app('postmark_api')->setup(); $signature = env('POSTMARK_SIGNATURE'); // Render mail body $mailBody = View::make('emails.auth.you-have-been-successfully-registered', compact('new_user_data')) ->render(); // Send email to user with account data try { $mailClient->sendEmail($signature, $user->email, __('Welcome to '.config('app.name').'!'), $mailBody); } catch (\Exception $e) { Log::error('Mail error: '.$e->getMessage()); }*/ Mail::to($user->email)->queue(new MerchantWelcome($user, true, $new_user_data['password'])); } // Create New Merchant $merchant = app('user_service')->configureMerchant($user, [ 'company' => $shop->name, 'website' => $shop_domain, ]); if (! $merchant) { return abort(500, 'An error has occurred while attempting to create new merchant record.'); } // Login with created user credentials Auth::login($user); } if (! trim($merchant->website)) { $this->merchants->clearEntity(); try { $this->merchants->update($merchant->id, [ 'website' => $shop_domain, ]); } catch (\Exception $exception) { } } // Create/Update Shopify integration try { // Default Shopify integration settings $defaultSettings = [ 'order_settings' => [ 'reward_status' => 'paid', 'subtract_status' => 'refunded', 'include_taxes' => 0, 'include_shipping' => 0, 'exclude_discounts' => 1, 'include_previous_orders' => 1, ], ]; // Update merchant integrations data $this->merchants->clearEntity(); try { app('merchant_service')->deactivateEcommerceIntegrations($merchant, [$shopifyIntegration->id]); } catch (\Exception $e) { Log::error('Shopify integration installing: Error on attempting to deactivate e-commerce integration (merchant #'.$merchant->id.').'); Log::error($e->getMessage()); } $this->merchants->updateIntegrations($merchant, $shopifyIntegration->id, [ 'status' => 1, 'external_id' => $shop_domain, 'token' => $accessToken, 'settings' => json_encode($defaultSettings), ]); // Update merchant details $this->merchantDetails->updateOrCreate([ 'merchant_id' => $merchant->id, ], [ 'ecommerce_shop_domain' => $shop_domain, ]); } catch (\Exception $exception) { Log::error('Create/Update Shopify integration error: '.$exception->getMessage()); return abort(500, 'An unexpected error has occurred while attempting to save merchant integration.'); } // Run jobs after successful Shopify installation $this->installWebhooks($merchant); $this->installScripttags($merchant); $this->installMetafields($merchant); $this->installAssets($merchant); // Set current merchant Auth::user()->switchToTeam($merchant); return redirect()->route('dashboard'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function getShopwareSystemInfo()\n {\n /** @var Configuration $config */\n $config = ServiceRegister::getService(Configuration::CLASS_NAME);\n\n $result['Shopware version'] = $config->getECommerceVersion();\n $result['theme'] = static::getShopTheme();\n $result['admin url'] = Shopware()->Front()->Router()->assemble(['module' => 'backend']);\n $result['async process url'] = $config->getAsyncProcessUrl('test');\n $result['plugin version'] = $config->getModuleVersion();\n $result['webhook_url'] = $config->getWebHookUrl();\n\n return json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n }", "public function getShopifyApi() {\n return $this->parent->getShopifyApi();\n }", "public function get_shopify_merchant_info(){\n \n $code = $this->input->get('code');\n $hmac = $this->input->get('hmac');\n\n $api_key = $this->config->item('shopify_api_key');\n $api_secret = $this->config->item('shopify_api_secret');\n $shop = $this->input->get('shop');\n\n $this->session->set_userdata('shop', $shop);\n\n //check if store is already registered or not\n $store_exist = $this->store->check_store_exist_by_domain($shop);\n\n //save the shop info into the table\n ////Load shopify API related files \n ///// call shopify API to get access(offline) token /////\n $shopifyClient = new ShopifyClient($shop, \"\", $api_key, $api_secret);\n $access_data = $shopifyClient->getAccessToken($code);\n\n if ($store_exist > 0){\n //get the shop token access data\n $response = $this->store->get_store_info_by_domain($shop);\n\n //update the access token\n $dataArray = array('key' => $access_data['access_token'], 'app_status' => '1');\n $this->store->update_store_info($shop, $dataArray);\n\n //get the shop token access data\n $response = $this->store->get_store_info_by_domain($shop);\n $this->register_uninstall_webhook();\n\n if ($response['app_status'] == '0'){\n $this->register_uninstall_webhook();\n\n ///Redirect to the app dashboard for first time users/// \n $redirect_url = \"https://\".$shop.\"/admin/apps/shoptrade-app\";\n redirect($redirect_url, 'location');\n die();\n }\n\n }else{\n \n //Shopify client call to fetch merchant info\n $sc_shop = new ShopifyClient($shop, $access_data['access_token'], $api_key, $api_secret);\n\n // Get shop info \n $shop_info = $sc_shop->call('GET', '/admin/shop.json');\n $shop_info['tokens']= $access_data;\n \n //save shop info\n $result = $this->store->save_store_info($shop_info);\n \n $response = array(\n 'shop' => $shop_info['domain'],\n 'store_id' => $shop_info['id'],\n 'access_token' => $access_data['access_token'],\n 'email' => $shop_info['email'],\n 'shop_owner' => $shop_info['shop_owner']\n );\n\n $this->register_uninstall_webhook();\n \n $redirect_url = \"https://\".$shop.\"/admin/apps/shoptrade-app\";\n redirect($redirect_url, 'location');\n die();\n \n }\n\n //$this->user_activity();\n $this->dashboard();\n }", "public function index()\n {\n $api_key = config('shopify-app.api_key');\n $shared_secret = config('shopify-app.api_secret');\n $params = $_GET; // Retrieve all request parameters\n $hmac = $_GET['hmac']; // Retrieve HMAC request parameter\n\n $params = array_diff_key($params, array('hmac' => '')); // Remove hmac from params\n ksort($params); // Sort params lexographically\n\n $computed_hmac = hash_hmac('sha256', http_build_query($params), $shared_secret);\n\n $access_token = \"\";\n // Use hmac data to check that the response is from Shopify or not\n if (hash_equals($hmac, $computed_hmac)) {\n\n // Set variables for our request\n $query = array(\n \"client_id\" => $api_key, // Your API key\n \"client_secret\" => $shared_secret, // Your app credentials (secret key)\n \"code\" => $params['code'] // Grab the access key from the URL\n );\n\n // Generate access token URL\n $access_token_url = \"https://\" . $params['shop'] . \"/admin/oauth/access_token\";\n\n // Configure curl client and execute request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $access_token_url);\n curl_setopt($ch, CURLOPT_POST, count($query));\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($query));\n $result = curl_exec($ch);\n curl_close($ch);\n\n // Store the access token\n $result = json_decode($result, true);\n $access_token = $result['access_token'];\n\n // Show the access token (don't do this in production!)\n // echo $access_token;\n } else {\n // Someone is trying to be shady!\n die('This request is NOT from Shopify!');\n }\n\n // 获取shop信息\n }", "public function shopsystemInfoAction()\n\t{\n $this->checkShopToken();\n \n $shopsystem = 'shopware';\n $shopsystem_human = Shopware()->App().' '.Shopware()->Config()->version;\n $shopsystem_version = Shopware()->Config()->version;\n $api_version = Shopware_Plugins_Frontend_EasymIntegration_Bootstrap::getVersion();\n \n $jsondata = array(\n 'shopsystem' => $shopsystem,\n 'shopsystem_human' => $shopsystem_human,\n 'shopsystem_version' => $shopsystem_version,\n 'api_version' => $api_version \n );\n \n $this->printOutput($jsondata);\n }", "private function info() {\n $this->client->info();\n }", "public function get_info()\n {\n return $this->_request('getinfo');\n }", "public function retrieveIntegration()\n {\n return $this->start()->uri(\"/api/integration\")\n ->get()\n ->go();\n }", "public static function getInfo()\n {\n return [\n 'name' => __('carrier_sdek'),\n 'tracking_url' => 'https://new.cdek.ru/tracking?order_id=%s',\n ];\n }", "public function provides()\n {\n return array('shopify');\n }", "public function actionWalmartproductinfo()\n {\n $sku = false;\n $productdata = \"add sku on url like ?sku=product_sku\";\n if (isset($_GET['sku'])) {\n $sku = $_GET['sku'];\n }\n $merchant_id = MERCHANT_ID;\n $config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi($config['consumer_id'], $config['secret_key']);\n if ($sku) {\n $productdata = $walmartHelper->getItem($sku);\n }\n print_r($productdata);\n die;\n }", "public function getInfo()\n {\n return array(\n 'version' => $this->getVersion(),\n 'autor' => 'VR pay eCommerce',\n 'copyright' => 'Copyright (c) 2017, VR pay eCommerce',\n 'label' => $this->getLabel(),\n 'supplier' => 'VR pay eCommerce',\n 'description' => 'VR pay eCommerce plugin v'.$this->getVersion(),\n 'support' => '',\n 'link' => 'http://www.vr-epay.info/'\n );\n }", "public function getShopifyId() {\n return $this->getShopifyProperty('id');\n }", "public function getInfo() {}", "public function getInfo() {}", "public function getInfo()\n {\n return $this->getServer()->getInfo();\n }", "public function get_info()\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'name'=>'SecureTrading Xpay',\n\t\t\t\t'description'=>'SecureTrading payment method with payment page hosted on your server.'\n\t\t\t);\n\t\t}", "public function getServiceInfo() {}", "function kvell_edge_woocommerce_info( ) {\n print '<h4 class=\"edgtf-sp-info\">' . esc_html__('Info', 'kvell') . '</h4>';\n }", "public function getShopName()\n {\n return 'oscommerce-2.3.4';\n }", "public function getInfo()\n {\n $result = $this->client->GetInfo();\n if ($this->errorHandling($result, 'Could not get info from FRITZ!Box')) {\n return;\n }\n\n return $result;\n }", "public function info()\n {\n return $this->send('info');\n }", "public function getInfo();", "function info()\n\t{\n\t\t$class=str_replace('hook_pointstore_','',strtolower(get_class($this)));\n\n\t\t$items=array();\n\t\t$rows=$GLOBALS['SITE_DB']->query_select('pstore_customs',array('*'),array('c_enabled'=>1));\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\tif ($row['c_one_per_member']==1)\n\t\t\t{\n\t\t\t\t// Test to see if it's been bought\n\t\t\t\t$test=$GLOBALS['SITE_DB']->query_value_null_ok('sales','id',array('purchasetype'=>'PURCHASE_CUSTOM_PRODUCT','details2'=>strval($rows[0]['id']),'memberid'=>get_member()));\n\t\t\t\tif (!is_null($test)) continue;\n\t\t\t}\n\n\t\t\t$next_url=build_url(array('page'=>'_SELF','type'=>'action','id'=>$class,'sub_id'=>$row['id']),'_SELF');\n\t\t\t$items[]=do_template('POINTSTORE_'.strtoupper($class),array('NEXT_URL'=>$next_url,'TITLE'=>get_translated_text($row['c_title']),'DESCRIPTION'=>get_translated_tempcode($row['c_description'])));\n\t\t}\n\t\treturn $items;\n\t}", "function get_api_info() {\n $response = $this->api_query(array('mode' => 'api_info'));\n\n if ($response['error']) {\n return false;\n }\n return ($response['data']);\n }", "public function license_info() {\n\t\treturn $this->make_request( 'GET', 'license/info' );\n\t}", "public function info()\n {\n return $this->query($this->userEndpoint);\n }", "public function getInfo(){\n $info = $this->getData();\n $price = $this->getData('price');\n $info['formatted_price'] = $this->priceHelper->currency($price, true, false);\n $info['website'] = $this->websiteHelper->getWebsites();\n $info['customergroup'] = $this->customerGroupHelper->getCustomerGroups();\n\n return $info;\n }", "public function getInfo() {\r\n\t\t$response = $this->Client->execute('show version');\r\n\t\treturn $response;\r\n\t}", "function devindavid_site_info() {\n\t\tdo_action( 'devindavid_site_info' );\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Philip Withnall';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 1;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'page', 'id');\n return $info;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'limit', 'hot', 'date_key', 'username_key', 'title', 'check');\n return $info;\n }", "public function getInfo()\n\t{\n\t\treturn $this->clientSoap->__soapCall(\"getInfo\", $this->params);\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'zone', 'give_context', 'include_breadcrumbs', 'guid');\n return $info;\n }", "public function getShopifyInstance()\n {\n $config = config('shopify');\n $client = app(Client::class);\n $shopify = new Shopify($client, $config);\n\n if (count($config['websites']) === 1) {\n $firstWebsite = array_keys($config['websites'])[0];\n $shopify->setWebsite($firstWebsite);\n }\n\n return $shopify;\n }", "public function actionWalmartproductinventoryinfo()\n {\n $sku = false;\n $productdata = \"add sku on url like ?sku=product_sku\";\n if (isset($_GET['sku'])) {\n $sku = $_GET['sku'];\n }\n $merchant_id = MERCHANT_ID;\n $config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi($config['consumer_id'], $config['secret_key']);\n if ($sku) {\n $productdata = $walmartHelper->getInventory($sku);\n }\n\n print_r($productdata);\n die;\n }", "public function sdkInfo()\n {\n return view('client.sms-sdk-info');\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('username', 'period', 'display', 'title', 'width', 'height');\n return $info;\n }", "public function getInfos(){\n\t\treturn array(\n\t\t\t\"serviceDescription\" => \"This is the Comunic API Server.\",\n\t\t\t\"clientURL\" => \"https://communiquons.org/\",\n\t\t);\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=4;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array();\n\t\t$info['update_require_upgrade']=1;\n\n\t\treturn $info;\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 5;\n $info['update_require_upgrade'] = true;\n $info['locked'] = false;\n return $info;\n }", "function getProducts() {\n\techo \"Getting Products </br>\";\n\t$response = getRequest('/api/product');\n\tprintInfo($response);\n}", "public function info()\n {\n $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));\n\n $items = array();\n\n $rows = $GLOBALS['SITE_DB']->query_select('pstore_customs', array('*'), array('c_enabled' => 1));\n\n foreach ($rows as $i => $row) {\n $rows[$i]['_title'] = get_translated_text($row['c_title']);\n }\n sort_maps_by($rows, '_title');\n\n foreach ($rows as $row) {\n if ($row['c_one_per_member'] == 1) {\n // Test to see if it's been bought\n $test = $GLOBALS['SITE_DB']->query_select_value_if_there('sales', 'id', array('purchasetype' => 'PURCHASE_CUSTOM_PRODUCT', 'details2' => strval($rows[0]['id']), 'memberid' => get_member()));\n if (!is_null($test)) {\n continue;\n }\n }\n\n $next_url = build_url(array('page' => '_SELF', 'type' => 'action', 'id' => $class, 'sub_id' => $row['id']), '_SELF');\n $just_row = db_map_restrict($row, array('id', 'c_description'));\n $items[] = do_template('POINTSTORE_' . strtoupper($class), array('NEXT_URL' => $next_url, 'TITLE' =>$row['_title'], 'DESCRIPTION' => get_translated_tempcode('pstore_customs', $just_row, 'c_description')));\n }\n return $items;\n }", "public function query_my_product_info(){\n\t\t$response = $this->execute($this->query_my_product_info_url);\n\t\tif(!$response){\n\t\t\tthrow new Exception(\"error in communication\");\n\t\t}\n\t\treturn json_decode($response,true);\n\t}", "public function getinfo()\n\t{\n\t\treturn $this->connect('getinfo');\n\t}", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function getInfoMerchant()\n {\n\n $response = $this->client->request($this->methods['post'], 'payment_gateway_api/get_vendor', [\n 'json' => [\n 'VENDOR_ID' => $this->vendor_id,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY. $this->vendor_id. $this->sign_time)\n ]\n ]);\n\n return json_decode($response->getBody());\n }", "public function getClientInfo(): array;", "function getshop($shopname) {\n\t\n\t$url = 'https://openapi.etsy.com/v2/shops/?shop_name='.$shopname .'&api_key=' . $apikey;\n\t\n\treturn execCurl ($url);\n\t//num_favorers\n\t\n}", "public function get_info() {\n\n\t\t$info = $this->call_api(\n\t\t\t'update',\n\t\t\tarray(\n\t\t\t\t'email' => '',\n\t\t\t\t'license' => '',\n\t\t\t)\n\t\t);\n\n\t\treturn $info;\n\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=3;\n\t\t$info['locked']=true;\n\t\t$info['update_require_upgrade']=1;\n\t\treturn $info;\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 15;\n $info['locked'] = false;\n return $info;\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'FloUsps',\n 'description' => 'FloCommerce USPS Shipping Plugin',\n 'author' => 'Radiantweb',\n 'icon' => 'icon-shopping-cart'\n ];\n }", "public function getApi()\r\n {\r\n return Mage::getSingleton('firstdatae4/api_nvp');\r\n }", "public function info();", "public function info();", "function accountInformation()\n {\n // Fetch the shop account handler\n $accountHandler = eZShopAccountHandler::instance();\n return $accountHandler->accountInformation( $this );\n }", "public function getGrPluginDetailsList()\n\t{\n\t\techo \"Getresponse-integration details:\\n\";\n\t\t$details = $this->getGrPluginDetails();\n\t\tif ( ! empty($details))\n\t\t{\n\t\t\tforeach ($details as $detail)\n\t\t\t{\n\t\t\t\techo str_replace('GrIntegrationOptions_', '', $detail->option_name) . \" : \" . $detail->option_value . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "public function getLogin()\n {\n return Mage::getStoreConfig('smsnotifier/main_conf/apilogin');\n\n }", "function getInfo () {\n\t\treturn array('id'=>'yahoo');\n\t}", "function getInfo();", "public function showAdminshopinfosAction()\n {\n $shopinfosManager = new ShopinfosManager();\n $shopinfos = $shopinfosManager->getAllShopinfos();\n return $this->twig->render('admin/adminshopinfos.html.twig', array(\n 'shopinfos' => $shopinfos\n ));\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['supports_advanced_import']=false;\n\t\t$info['product']='HTML website (page extraction and basic themeing)';\n\t\t$info['import']=array(\n\t\t\t\t\t\t\t\t'pages',\n\t\t\t\t\t\t\t);\n\t\treturn $info;\n\t}", "function info() {\r\n\t\t$this -> Producto -> recursive = -1;\r\n\t\t$producto = $this -> Producto -> read(null, $this -> data[\"Producto\"][\"id\"]);\r\n\t\techo json_encode($producto);\r\n\t\tConfigure::write('debug', 0);\r\n\t\t$this -> autoRender = false;\r\n\t\texit();\r\n\t}", "public function getShopId()\n {\n return $this->metaRefreshValues['shopid'];\n }", "public function get_info() {\n \n return array(\n 'color' => '#eddb11',\n 'icon' => '<i class=\"fab fa-linkedin\"></i>',\n 'api' => array('client_id', 'client_secret'),\n 'types' => array('post', 'rss')\n );\n \n }", "function dokan_get_store_info( $seller_id ) {\n $info = get_user_meta( $seller_id, 'dokan_profile_settings', true );\n $info = is_array( $info ) ? $info : array();\n\n $defaults = array(\n 'store_name' => '',\n 'social' => array(),\n 'payment' => array( 'paypal' => array( 'email' ), 'bank' => array() ),\n 'phone' => '',\n 'show_email' => 'off',\n 'address' => '',\n 'location' => '',\n 'banner' => 0\n );\n\n $info = wp_parse_args( $info, $defaults );\n\n return $info;\n}", "public function getPurchaseInfo() {\n $info = \"\";\n $productPrice = \"Item: \" . $this->getType() . \" Price: \" . $this->price . \"\\n\"; \n $info .= $productPrice;\n foreach($this->extraItems as $extraItem) {\n $extraPrice = \"- Extra item: \" . $extraItem->getType() . \" Price: \" . $extraItem->getPrice() . \"\\n\";\n $info .= $extraPrice;\n }\n return $info;\n }", "function showspace_api_key() {\n $options = get_option('showspace_options');\n return $options['showspace_api_key'];\n}", "public function getApiKey()\n {\n return Mage::getStoreConfig('magebridge/settings/api_key');\n }", "public function getInfo()\n {\n $user = User::with(['optician'])->find(auth()->id());\n\n return api_resource('mobile\\User')->make($user);\n }", "public function component_info() {\n \n // Load the component's language files\n $this->CI->lang->load( 'frontend', $this->CI->config->item('language'), FALSE, TRUE, MIDRUB_BASE_ADMIN_FRONTEND );\n \n // Return component information\n return array(\n 'app_name' => $this->CI->lang->line('frontend'),\n 'display_app_name' => $this->CI->lang->line('frontend'),\n 'component_slug' => 'frontend',\n 'component_icon' => '<i class=\"far fa-edit\"></i>',\n 'version' => '0.0.1',\n 'required_version' => '0.0.7.8'\n );\n \n }", "public function getConfig() {\n return Mage::getSingleton('profileolabs_shoppingflux/config');\n }", "public function getInfo()\n {\n return array(\n 'version' => $this->getVersion(),\n 'label' => $this->getLabel(),\n 'author' => 'Sören Oehding',\n 'supplier' => 'SO_DSGN',\n 'description' => 'Einfaches Bilder Widget für die Einkaufswelten',\n 'support' => 'Shopware Forum',\n 'link' => 'https://so-dsgn.de'\n );\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "public function orderInfo($increment_id){\n $result = $this->data['client']->salesOrderInfo($this->data['session'], $increment_id);\n \n return $result;\n}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array('root','sort','search','max','param','select','template_set','display_type');\n\t\treturn $info;\n\t}", "public function getApi()\n {\n return Mage::getSingleton('paystation/api_nvp');\n }", "function thrive_dashboard_get_integrations_products()\n{\n $products = array();\n\n $products = apply_filters('thrive_dashboard_integrations_products', $products);\n\n return $products;\n}", "function spf_get_shop_products(){\nwp_send_json([\n 'message' => 'thank you the endpoint is fine'\n], 200);\n}", "public function info(Request $request)\n {\n //\n $store_id = $request->get('id');\n $response = Product::info(\n (object) [\n 'store_id' => $store_id,\n 'file' => 'public/infoProduct.log',\n 'request' => $request,\n 'name' => 'image',\n 'data' => Product::where('store_id', $store_id)->get([\n 'store_id',\n 'sku',\n 'name', \n 'description',\n 'value',\n 'image'\n ]),\n 'success' => function($data) {\n return array(['result' => array([\n 'success' => true,\n 'message' => 'The data was obtained satisfactorily.',\n 'data' => $data\n ])]); \n }, \n 'err' => function(){\n return array(['result' => array([\n 'success' => false,\n 'message' => 'There were no data.',\n 'data' => array()\n ])]);\n } \n ]\n ); \n return \\Response::json($response);\n }", "public function getInfo()\n {\n $this->conn->initialize();\n $json = $this->conn->getClient()->request(\"/{$this->name}/\")->getContent();\n $info = JSONEncoder::decode($json);\n\n return $info;\n }", "public function getproductinfoAction() {\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\t$product = Doctrine::getTable ( 'Products' )->find ( $id )->toArray ();\n\t\tdie ( json_encode ( $product ) );\n\t}", "public function info(): string;", "public function info()\n {\n return curl_getinfo($this->_session);\n }", "function getInfo(){\n return array(\n 'author' => 'seism',\n 'email' => '[email protected]',\n 'date' => '2011-5-1',\n 'name' => 'Embed GitHub Plugin',\n 'desc' => 'Show a GitHUb widget in your wiki',\n 'url' => 'http://www.dokuwiki.org/wiki:plugins',\n );\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts'; \n\t\t$info['hacked_by']=NULL; \n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "public function get_info() {\n\t\t\treturn array(\n\t\t\t\t'name' => 'Purolator',\n\t\t\t\t'description' => 'This shipping method allows to request quotes and shipping options from the Purolator (E-Ship). You must have a Purolator account in order to use this method.'\n\t\t\t);\n\t\t}", "function dcs_dropship_product_info_page_shortcode($atts, $content=null)\r\n{\r\n\t$retval = dcs_dropship_product_info_page($_GET['sku']);\r\n\r\n\treturn $retval;\r\n}", "public function getInformation();", "public function info()\n {\n $info = array();\n $info['author'] = 'Jason Verhagen';\n $info['organisation'] = 'HolleywoodStudio.com';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 12;\n $info['locked'] = false;\n $info['parameters'] = array('name', 'api_key', 'playlist_id', 'title', 'template_main', 'template_style', 'start_video', 'max_videos', 'description_type', 'embed_allowed', 'show_player', 'player_align', 'player_width', 'player_height', 'style', 'nothumbplayer', 'thumbnail', 'formorelead', 'formoretext', 'formoreurl');\n return $info;\n }" ]
[ "0.6678512", "0.65969247", "0.6565232", "0.6270997", "0.61846316", "0.6070791", "0.59887856", "0.59886014", "0.5984198", "0.59705245", "0.591863", "0.59128237", "0.5833986", "0.5823532", "0.5823532", "0.5819503", "0.58103704", "0.58075166", "0.5804842", "0.5800058", "0.57790655", "0.5777969", "0.5767874", "0.57513535", "0.57512736", "0.57506293", "0.5748986", "0.573616", "0.5729933", "0.572988", "0.57250446", "0.5693868", "0.56890875", "0.56859046", "0.5678673", "0.5672691", "0.56336343", "0.56018174", "0.55906224", "0.55854875", "0.55780935", "0.5569906", "0.5569848", "0.5552451", "0.55470914", "0.5539782", "0.5532942", "0.5520311", "0.552006", "0.55193466", "0.5519259", "0.5519259", "0.5519259", "0.5517725", "0.55089647", "0.5501805", "0.5501627", "0.550007", "0.550007", "0.5495383", "0.5492953", "0.5486016", "0.5484733", "0.5484183", "0.5472222", "0.54688734", "0.54688734", "0.54688734", "0.54688734", "0.54688734", "0.5452389", "0.5438496", "0.5433622", "0.5429396", "0.54289305", "0.5406724", "0.5405181", "0.53972936", "0.53965497", "0.53946304", "0.5390018", "0.5389466", "0.53892595", "0.53892595", "0.53892595", "0.53823835", "0.53784704", "0.5373328", "0.53704244", "0.5366524", "0.53656054", "0.5364479", "0.5364056", "0.53531146", "0.5336826", "0.53358364", "0.5334903", "0.5331575", "0.5329264", "0.53204715", "0.53178424" ]
0.0
-1
Finds the Usertable model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Usertable::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function find($primary_key, $model);", "private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public static function find( $primaryKey )\n\t{\n\t\tself::init();\n\t\t\n\t\t// Select one item by primary key in Database\n\t\t$result = Database::selectOne(\"SELECT * FROM `\" . static::$table . \"` WHERE `\" . static::$primaryKey . \"` = ?\", $primaryKey);\t\t\n\t\tif( $result == null )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Create & return new object of Model\n\t\treturn self::newItem($result);\n\t}", "public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}", "public function findById() {\n // TODO: Implement findById() method.\n }", "public function find($model, $id);", "public function find($pk)\r\n {\r\n $row = $this->getTable()->find($pk);\r\n if(!$row){\r\n return false;\r\n }\r\n $sampleModel = new SampleModel();\r\n $this->_map($sampleModel, $row);\r\n return $sampleModel;\r\n }", "public function returnFindByPK($id);", "public function find(int $id): ?Model;", "public function find(int $id): ?Model;", "public function find($primary)\n {\n if (isset($this->models[$primary])) {\n return $this->models[$primary];\n }\n\n return;\n }", "public function findById(string $modelId): ?Model;", "public function find($id){\n return $this->model->query()->findOrFail($id);\n }", "function find($id)\n{\n\t$model = $this->newModel(null);\n\treturn $model->find($id);\n}", "protected function findModel($id)\n {\n if (($model = Menu::findOne([ 'id' => $id ])) !== null)\n {\n return $model;\n }\n else\n {\n throw new HttpException(404, Yii::t('backend', 'The requested page does not exist.'));\n }\n }", "public function getModelByPrimaryKey($action = null, $keyValue = null)\n {\n $keyName = $this->model->getKeyName();\n\n if ($keyValue == '_') {\n if ($this->request()->has(\"data.primaryKey.{$keyName}\")) {\n $keyValue = $this->request()->input(\"data.primaryKey.{$keyName}\");\n } elseif ($this->request()->has(\"data.old.{$keyName}\")) {\n $keyValue = $this->request()->input(\"data.old.{$keyName}\");\n } elseif ($this->request()->has('data.items')) {\n $items = $this->request()->input('data.items');\n if (Arr::has($items, $keyName)) {\n $keyValue = Arr::get($items, $keyName);\n } else {\n $first = Arr::first($items);\n if (Arr::has($first, $keyName)) {\n $keyValue = Arr::get($first, $keyName);\n }\n }\n }\n }\n\n $data = [$keyName => $keyValue];\n\n $r = $this->validateData($data, null, 'primaryKey', $action, [$keyName => ['includeUniqueRules' => false]]);\n if ($r !== true) {\n return $r;\n }\n\n $modelClass = get_class($this->model);\n if ($model = $modelClass::find($data[$keyName])) {\n return $model;\n }\n\n return CrudJsonResponse::error(CrudHttpErrors::TARGET_DATA_MODEL_NOT_FOUND, null, [\n 'action' => 'primaryKey',\n 'parent_action' => $action,\n 'target' => $data,\n ]);\n }", "protected function findModel($id)\n {\n\t\t$p = $this->primaryModel;\n if (($model = $p::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function findModel($class, $id)\n {\n $model = call_user_func([$class, 'findOne'], $id);\n if (!$model) {\n $this->raise404();\n }\n return $model;\n }", "public function findById(int $id) : ?Model;", "abstract public function find($id);", "protected function findModel($id)\n {\n if (($model = Offer::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }", "public function findById ($id);", "public function find($key)\n\t{\n\t\t$user = model('user')->find_user($key);\n\n\t\treturn $user ? UserModel::newWithAttributes(Arr::toArray($user)) : null;\n\t}", "public function findById($primaryKeyValue){\n //Select* From employers Where $this->primaryKey(noemp)=$primaryKeyValue(1000)\n $array = $this->findWhere($this->primaryKey. \"=$primaryKeyValue\");\n if (count($array) != 1 ) die (\"The ID $primaryKeyValue is not valid\");\n return $array[0];\n }", "protected function findModel($id)\n {\n if (($model = Picture::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, \\Yii::t('The requested object does not exist or has been already deleted.'));\n }\n }", "protected function findModel($key)\n {\n if (($model = NotificationsTemplate::find()->andWhere(['key'=>$key])->one()) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}", "protected function findModel($id)\n {\n if (($model = PaidEmployment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404);\n }\n }", "public function find($id)\n {\n return $this->model->findOrFail($id);\n }", "public function find($id)\n {\n return $this->model->findOrFail($id);\n }", "protected function findModel($id)\n {\n if (($model = PostKey::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n if (($model = Stakeholder::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public static function find($id, $key = 'id');", "protected function findModel($id)\n\t{\n\t\tif (($model = Trailer::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "function findById($id);", "protected function findModel($id) {\n\t\tif (($model = EntEmpleados::findOne ( $id )) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\n\t\t}\n\t}", "public function getOneBy(string $field, $value) : ActiveRecordInterface\n\t{\n\t\ttry\n\t\t{\n\t\t\t$requireByField = 'requireOneBy' . ucfirst($field);\n\n\t\t\treturn $this->$requireByField($value);\n\t\t}\n\t\tcatch (EntityNotFoundException $e)\n\t\t{\n\t\t\tthrow new ResourceNotFoundException(($this->getTableMap())->getName() . ' with id ' . $id);\n\t\t}\n\t}", "public function findModel($clz, $key);", "public static function findModel($id='')\n {\n $model = static::find()->where(['id' => $id])->one();\n if ($model == null) {\n throw new \\yii\\web\\NotFoundHttpException(Yii::t('app',\"Page not found!\"));\n }\n return $model;\n }", "function fetch_or_404($class, $id)\n{\n $obj = call_user_func(array($class, 'fetch'), $id);\n if (!$obj) {\n throw new NotFoundException(); \n }\n return $obj;\n}", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }", "public function show($pk)\n {\n return $this->model->findOrFail($pk);\n }", "public function findPk($pk)\r\n {\r\n $pkColumns = $this->getObject()->getTable()->getIdentifierColumnNames();\r\n if(($count = count($pkColumns)) > 1)\r\n {\r\n // composite primary key\r\n if(!is_array($pk))\r\n {\r\n throw new Exception(sprintf('Class %s has a composite primary key and expects %s parameters to retrieve a record by pk', $this->class, join(', ', $pkColumns)));\r\n } \r\n else if (is_array($count[0]))\r\n {\r\n // array of arrays\r\n // sorry the finder can't do that on objects with composte primary keys\r\n throw new Exception('Impossible to find a list of Pks on an objects with composite primary keys');\r\n }\r\n for ($i=0; $i < $count; $i++)\r\n { \r\n $this->addCondition('and', $pkColumns[$i], '=', $pk[$i]);\r\n }\r\n return $this->findOne();\r\n }\r\n else\r\n {\r\n // simple primary kay\r\n if(is_array($pk))\r\n {\r\n $this->addCondition('and', $pkColumns[0], ' IN ', $pk);\r\n return $this->find();\r\n }\r\n else\r\n {\r\n $this->addCondition('and', $pkColumns[0], '=', $pk);\r\n return $this->findOne();\r\n }\r\n }\r\n }", "public function find($primaryValue);", "public function returnDetailFindByPK($id);", "protected function findModel($id)\n {\n if (($model = SubAkun::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = SecurityEntities::findOne($id)) !== null) \n {\n return $model;\n } else \n {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = StoreKasir::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public static function find($primary_key)\n {\n return static::select()\n ->where(static::getPrimaryKey(), $primary_key)\n ->fetchOne();\n }", "protected function findModel($id)\n\t{\n if (($model = UserLevel::findOne($id)) !== null) {\n return $model;\n }\n\n\t\tthrow new \\yii\\web\\NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n\t}", "protected function findModel($id)\n {\n \tif (($model = User::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }", "protected function findModel($id)\n {\n if (($model = UtilitiesBook::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Nursinghomes::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "protected function findModel($id)\n {\n if (($model = Buku::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = Kus::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Amphur::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = CompPrep::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function find($id)\n\t{\n\t\treturn Model::where('id', $id)->first();\n\t}", "protected function findModel($idurl)\n {\n if (($model = Url::findOne($idurl)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }" ]
[ "0.7660258", "0.6881313", "0.6869912", "0.6610683", "0.6578542", "0.65774035", "0.6560535", "0.647853", "0.64251804", "0.64251804", "0.64182395", "0.6414043", "0.6383489", "0.6381461", "0.6350552", "0.63345724", "0.6316716", "0.6288239", "0.62852424", "0.6277502", "0.62619114", "0.6233005", "0.6230264", "0.62164915", "0.6204779", "0.6202618", "0.6199152", "0.61974984", "0.6194562", "0.6194562", "0.6192647", "0.61613584", "0.6145594", "0.61376673", "0.613086", "0.6121032", "0.6120965", "0.61180484", "0.61158115", "0.6112554", "0.61124825", "0.610615", "0.6092459", "0.6092243", "0.608495", "0.6073177", "0.6066649", "0.60586506", "0.6056671", "0.60521024", "0.60442346", "0.6042104", "0.60398996", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.60392857", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6034823", "0.6021494", "0.6019043", "0.6018707", "0.6016161", "0.60111016", "0.60091865" ]
0.6467136
8
1. Definisikan start simbol
function main($rule, $sentence) { $start_simbol = "Q"; //2. Prepocessing kalimat untuk menentukan kelas Nama $new_sentence = $this->prepocessingSentences($sentence); //3. parsing menggunakan algoritma cyk list($isValid, $tabel) = $this->cykParse($rule, $new_sentence, $start_simbol); return array($isValid, $tabel, $new_sentence); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function start();", "abstract public function start();", "abstract public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start(): void {}", "public static function start(): void {\n }", "public function start(): void;", "function start();", "function start();", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start()\n {\n // nop\n }", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start()\n {\n }", "public function start()\n {\n }", "public function start()\n {\n }", "public function start() {\n\t\t$this->invoke(\"start\");\n\t}", "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "public function start($name);", "private function startEngine(){\n $this->start();\n }", "public function startup();", "public function start($single = true);", "function startEngine() {\n }", "public function start()\n {\n // TODO: Implement start() method.\n }", "public function start()\n {\n echo 'Start odometer.',\"\\n\";\n }", "public function start($start);", "public static function start()\n {\n self::registerDefault();\n\n $page = rex_request('page', 'string');\n $subpage = rex_request('subpage', 'string');\n $function = rex_request('function', 'string');\n\n if ($page === 'import_export' && $subpage === 'import' && $function === 'dbimport') {\n rex_register_extension('A1_AFTER_DB_IMPORT', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } elseif ($page === 'developer' && $function === 'update') {\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } else {\n self::synchronize(self::START_EARLY);\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(rex_developer_manager::START_LATE);\n });\n }\n }", "public function start(): int;", "public function start()\n {\n $whoops = new Run();\n $handler = new PrettyPageHandler();\n\n $handler->addResourcePath(__DIR__.'/Resources');\n $handler->setEditor('sublime');\n\n $whoops->pushHandler($handler);\n $whoops->register();\n\n $this->whoops = $whoops;\n }", "static function start ()\r\n {\r\n // INSTALLER LE CHARGEMENT AUTOMATIQUE DE CLASSE\r\n // https://www.php.net/manual/fr/function.spl-autoload-register.php\r\n spl_autoload_register(\"App::chargerCodeClass\");\r\n\r\n\r\n // $test = new Test; \r\n // PHP A BESOIN DE CONNAITRE LA CLASSE Test\r\n // PHP VA APPELER LA METHODE App::chargerCodeClass(\"Test\");\r\n // SI LA METHODE MAGIQUE __construct EXISTE DANS LA CLASSE Test\r\n // ALORS PHP VA L'APPELER AUTOMATIQUEMENT\r\n\r\n // ICI DANS NOTRE PROJET CMS\r\n // ON VEUT AFFICHER UNE PAGE WEB\r\n // NORMALEMENT ON DEVRAIT FAIRE DU MVC\r\n // AFFICHAGE => VIEW\r\n App::afficherPage();\r\n }", "public function start(): bool;", "public function testCanStartSimulation()\n {\n $boardEditor = new BoardEditor(\"test\");\n $option = new StartOption($boardEditor);\n\n $result = $option->startSimulation();\n $this->assertTrue($result);\n }", "public function start($start = null)\n {\n // TODO: Implement start() method.\n }", "public static function start()\r\n {\r\n return self::_init();\r\n }", "public function start()\n\t{\n\t\t$this->define_home_dir_constant();\n\t\t$this->register_root_namespace();\n\t\tspl_autoload_register(array($this, 'autoload'));\n\t}", "public function startWorking(){\r\n }", "public function start() {\n $this->setup();\n $this->fight();\n }", "protected function start(){\n \tLynx_Request::parse();\n }", "public function start()\n\t{\n\t\t// Get contoller and action names\n\t\t$this->getControllerName();\n\t\t$this->getActionName();\n\n\t\t// Set Names of executing class and action names\n\t\t$this->class_Name = ucfirst($this->controllerName);\n\t\t$this->action_Name = ucfirst($this->actionName);\n\n\t\t// Set globals variable\n\t\t$this->setGlobalsData();\n\n\t\t// Run action\n\t\t$this->getControllerAction();\n\t}", "public function start()\n {\n // For example you can check Auth\n }", "public function setMain(): void;", "public function __construct() {\n $this->start();\n }", "static function start() {\n self::instance()->klein->dispatch(self::instance()->request);\n exit;\n }", "public static function start($name = null): void {\n\t\tif (! isset ( self::$sessionInstance )) {\n\t\t\tself::$sessionInstance = Startup::getSessionInstance ();\n\t\t}\n\t\tself::$sessionInstance->start ( $name );\n\t}", "public function __construct()\n {\n $this->start();\n }", "public function __construct()\n {\n $this->start();\n }", "public static function main(){\n\t\t\t\n\t\t}", "public function main()\n\t{\n\t}", "public function main()\r\n {\r\n \r\n }", "public function startSession() {}", "public function fileStart(): void;", "function run() {\n\t\techo $this->name . \" runs like crazy </br>\";\n\t}", "abstract public function getStart();", "public static function run() {\n\t}", "public abstract function Main();", "public function start()\n {\n // Este módulo requiere a un usuario logueado\n $this -> setRequireUser( true );\n }", "public function start() {\n $cmd = sprintf(\"./control.sh start %s -game %s -ip %s -port %d -maxplayers %d -map %s -rcon %s\", $this->sid, $this->gameId, $this->ip, $this->port, $this->maxplayers, $this->map, $this->rcon);\n ssh($cmd, $this->host);\n DB::get()->query(\"UPDATE `servers` SET `status` = 1 WHERE `serverID` = '\" . $this->serverId . \"'\");\n }", "public function run() {\n $this->init();\n $this->welcome();\n $this->setMark();\n $this->startGame();\n }", "public function start()\n\t{\n\t\t$this->startTimer = microtime(TRUE);\n\t}", "public function start()\n {\n // Announces all Zadachki to the console\n $this->announceZadachki();\n\n // Gets the desired Zadachka to reshi\n $zadachkaNumber = $this->getZadachkaNumber();\n\n // Announces the desired Zadachka's Uslovie\n $this->announceUslovie($zadachkaNumber);\n\n $zadachka = null;\n $options = null;\n\n switch ($zadachkaNumber) {\n // Insert Employee\n case 2:\n $zadachka = new SecondCommand($this->getDatabase());\n break;\n\n // Insert an Email\n case 3:\n $zadachka = new ThirdCommand($this->getDatabase());\n $options = array('Email');\n break;\n\n // Insert a Phone\n case 4:\n $zadachka = new ThirdCommand($this->getDatabase());\n $options = array('Phone');\n break;\n\n // List an Employee\n case 5:\n $zadachka = new FourthCommand($this->getDatabase());\n break;\n }\n\n try {\n $zadachka->execute($options);\n } catch (\\Exception $exception) {\n exit($exception->getMessage());\n }\n }", "function Start();", "public function start()\n\t{\n\t\t// reset first, will start automaticly after a full reset\n\t\t$this->data->directSet(\"resetNeeded\", 1);\n\t}", "public function start(int $start): void;", "public function main()\n {\n\n }", "function METHOD_hello()\n {\n $this->sendTerminal('This is a Hello World :)');\n\n }", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}" ]
[ "0.74539465", "0.74165285", "0.74165285", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.7260622", "0.72568196", "0.7251976", "0.71854526", "0.7181124", "0.7181124", "0.70306396", "0.70305", "0.7030239", "0.7030239", "0.7029537", "0.70289695", "0.70289695", "0.70289695", "0.70289695", "0.70289695", "0.70289695", "0.69027317", "0.69027317", "0.69027317", "0.6835777", "0.67527884", "0.67435783", "0.66802514", "0.6567855", "0.65258145", "0.6384509", "0.63274443", "0.6300772", "0.62720054", "0.6235332", "0.6230118", "0.6228218", "0.61907864", "0.6148596", "0.61420655", "0.61293817", "0.60863596", "0.6048351", "0.6036503", "0.60140413", "0.593253", "0.5930257", "0.59264714", "0.58856267", "0.5882121", "0.58579445", "0.58551925", "0.58467203", "0.5830723", "0.5830723", "0.5824586", "0.58204454", "0.581549", "0.58143675", "0.57969546", "0.57885844", "0.57842916", "0.5784216", "0.5782759", "0.57682276", "0.57674223", "0.5764044", "0.57610184", "0.57549196", "0.57480395", "0.57199144", "0.5713416", "0.5712153", "0.5706957", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634", "0.5704634" ]
0.0
-1
Drop the temporary table, if it is required.
public function drop() { if ($this->isRequired()) { $db = Database::getDatabaseConnection(); $db->exec($this->getDropQuery()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function dropTempTable(){\r\n $sql = <<<EOT\r\n DROP TABLE %s\r\nEOT;\r\n \r\n $sql = sprintf($sql, $this->userId); \r\n return mysql_query( $sql );\r\n }", "public function dropTMPTable() {\r\n $query = \"DROP TABLE IF EXISTS tmp_notes;\";\r\n return $this->query($query);\r\n }", "function drop_temp_table ($table_name) {\n\tglobal $cxn;\n\n\t$errArr=init_errArr(__FUNCTION__);\n\ttry\n\t{\n\t\t// Sql String\n\t\t$sqlString = \"DROP TEMPORARY TABLE IF EXISTS \" . $cxn->real_escape_string($table_name) ;\n\t\t// Bind variables\n\t\t$stmt = $cxn->prepare($sqlString);\n\t\t$stmt->execute();\n\t}\n\tcatch (mysqli_sql_exception $err)\n\t{\n\t\t// Error settings\n\t\t$err_code=1;\n\t\t$err_descr=\"Error dropping table: \" . $table_name;\n\t\tset_errArr($err, $err_code, $err_descr, $errArr);\n\t}\n\t// Return Error code\n\t$errArr[ERR_AFFECTED_ROWS] = $cxn->affected_rows;\n\t$errArr[ERR_SQLSTATE] = $cxn->sqlstate;\n\t$errArr[ERR_SQLSTATE_MSG] = $cxn->error;\n\treturn $errArr;\n}", "private function _createTemporaryTable(){\n\n $tempTable = $this->getTemporaryTablename();\n $this->_liquetDatabase->query(\"DROP TABLE IF EXISTS {$tempTable}\")->run();\n $this->_liquetDatabase->query(\"CREATE TEMPORARY TABLE {$tempTable} LIKE {$this->_tablename}\")->run();\n\n return $tempTable;\n }", "public function dropTMPNoteTable() {\r\n #$this->pdo->exec(\"UNLOCK TABLES tmp_notes write;\");\r\n $query = \"DROP TABLE IF EXISTS tmp_notes;\";\r\n return $this->query($query);\r\n }", "protected static function dropTable(): void\n {\n $pdo = static::getDb();\n $pdo->query('DROP TABLE IF EXISTS ' . Store\\MySQL::DEFAULT_TABLE);\n }", "public function dropTable()\n\t{\n\t\t$table = $this->getTableName();\n\n\t\t// Does the table exist?\n\t\tif (blx()->db->getSchema()->getTable('{{'.$table.'}}'))\n\t\t{\n\t\t\tblx()->db->createCommand()->dropTable($table);\n\t\t}\n\t}", "public function dropTestTable()\n {\n try {\n $this->_db->query('DROP TABLE IF EXISTS galette_test');\n Analog::log('Test table successfully dropped.', Analog::DEBUG);\n } catch (\\Exception $e) {\n Analog::log(\n 'Cannot drop test table! ' . $e->getMessage(),\n Analog::WARNING\n );\n }\n }", "private function hasCreateTemporaryTablePrivilege() {\n $con = DB::connection();\n $nam = uniqid();\n $qry = sprintf('create temporary table %s (id tinyint not null primary key)', $nam);\n $res = $con->query($qry);\n if ($res) {\n $qry = sprintf('drop table %s', $nam);\n $con->query($qry);\n }\n return $res;\n }", "public function dropTemporaryTable(string $schemaName, string $tableName): void\n {\n $sql = sprintf('drop table `%s`.`%s`', $schemaName, $tableName);\n\n $this->executeNone($sql);\n }", "function my_shutdown() {\n global $tmpfile, $dbh, $sth1, $sth2, $sth3, $sth4, $sth5, $sth6, $res;\n\n switch ($dbh->phptype) {\n case 'ibase':\n /*\n * Interbase doesn't allow dropping tables that have result\n * sets still open.\n */\n $dbh->freePrepared($sth1);\n $dbh->freePrepared($sth2);\n $dbh->freePrepared($sth3);\n $dbh->freePrepared($sth4);\n $dbh->freePrepared($sth5);\n $dbh->freePrepared($sth6);\n $dbh->freeResult($res->result);\n break;\n }\n\n $dbh->setErrorHandling(PEAR_ERROR_RETURN);\n drop_table($dbh, 'phptest');\n\n unlink($tmpfile);\n}", "static function kill_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbConn = DB::getConn();\n\t\t\t$dbName = $dbConn->currentDatabase();\n\t\t\tif($dbName && DB::query(\"SHOW DATABASES LIKE '$dbName'\")->value()) {\n\t\t\t\t// echo \"Deleted temp database \" . $dbConn->currentDatabase() . \"\\n\";\n\t\t\t\t$dbConn->dropDatabase();\n\t\t\t}\n\t\t}\n\t}", "static function kill_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbConn = DB::getConn();\n\t\t\t$dbName = $dbConn->currentDatabase();\n\t\t\tif($dbName && DB::getConn()->databaseExists($dbName)) {\n\t\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t\t// be reset whenever the database is killed\n\t\t\t\tforeach(ClassInfo::subclassesFor('DataExtension') as $class) {\n\t\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t\t}\n\n\t\t\t\t// echo \"Deleted temp database \" . $dbConn->currentDatabase() . \"\\n\";\n\t\t\t\t$dbConn->dropDatabase();\n\t\t\t}\n\t\t}\n\t}", "private function createTempTable()\n\t{\n\t\t// generate a temp table name\n\t\t$this->tempTable = 'crawl_index_temp';\n\n\t\t// ensure the temp table doesnt exist\n\t\t$sql = sprintf('DROP TABLE IF EXISTS %s', $this->tempTable);\n\t\tmysql_query($sql, $this->db);\n\n\t\t// create the table and give an exclusive write lock\n\t\t$sql = sprintf('CREATE TEMPORARY TABLE %s (page_id INT(10) UNSIGNED NOT NULL) ENGINE=MEMORY', $this->tempTable);\n\t\tmysql_query($sql, $this->db);\n\t}", "public function destroy()\n\t{\n\t\treturn $this->_adapter->dropTable($this->_identifier);\n\t}", "public function deleteTable() {\n global $database;\n $database->query('DROP TABLE IF EXISTS `'.$this->getTableName().'`');\n if ($database->is_error()) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n return true;\n }", "protected function tearDown()\n\t {\n\t\tunset($this->object);\n\n\t\t$conn = $this->getConnection();\n\t\t$db = $conn->getConnection();\n\t\t$db->exec(\"DROP TABLE IF EXISTS `MySQLdatabase`;\");\n\n\t\tunset($GLOBALS[\"errstr\"]);\n\t\tunset($GLOBALS[\"stuckerror\"]);\n\t }", "public function dropTableIfExists(string $table)\n {\n echo \" > dropping $table if it exists ...\";\n $time = microtime(true);\n $this->db->createCommand()\n ->dropTableIfExists($table)\n ->execute();\n echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . \"s)\\n\";\n }", "public static function drop()\n {\n global $wpdb;\n $tableName = static::getTableName($wpdb->prefix);\n\n $sql = \"DROP TABLE IF EXISTS $tableName;\";\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n $wpdb->query($sql);\n \\delete_option($tableName . '_version');\n }", "protected function tearDown(): void\n {\n $this->_connection->dropTable($this->_tableName);\n $this->_connection->resetDdlCache($this->_tableName);\n $this->_connection = null;\n }", "function dropTable($table);", "public static function uninstall() {\n $sql = 'DROP TABLE IF EXISTS `'.self::tableName.'`;';\n db_query($sql);\n }", "public static function dropTables()\n\t{\n\t}", "public function testDrop()\n {\n // make sure all tables were created\n $this->fixture->setup();\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n $this->assertEquals(6, \\count($tables));\n\n // remove all tables\n $this->fixture->drop();\n\n // check that all tables were removed\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n $this->assertEquals(0, \\count($tables));\n }", "private function deleteTemporaryFiles()\n {\n foreach ($this->temp as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n $this->temp = [];\n }", "public function uninitialize()\n {\n $table_name = $this->get_table_name();\n $sql = \"DROP TABLE IF EXISTS $table_name;\";\n\n if (!is_null($this->wpdb)) {\n $this->wpdb->query($sql);\n }\n }", "public function dropTable($table, $waitTillFinish = false)\n {\n $result = $item = $this->query(array('TableName' => $table), 'deleteTable');\n if ($waitTillFinish) {\n $this->client->waitUntilTableNotExists(array('TableName' => $table));\n }\n return $result;\n\n }", "public function destroy()\n {\n $db = XenForo_Application::get('db');\n $db->query('DROP TABLE `' . self::DB_TABLE . '`');\n }", "function cleanTemporaryDirectory($tmpTopdir, $tmpdir, $tmpfile)\n{\n global $tmpCreated;\n $deletedir = NULL;\n\n /* if this script created tmp directory, delete tmp directory */\n if ($tmpCreated) {\n $deleteDir = $tmpTopdir;\n } else {\n $deleteDir = $tmpdir;\n unlink($tmpfile);\n }\n\n deleteDirectory($deleteDir);\n}", "public function safeDown()\n {\n $this->dropTable($this->tableName);\n }", "static function empty_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t// be reset whenever the database is cleaned out\n\t\t\tforeach(array_merge(ClassInfo::subclassesFor('DataExtension'), ClassInfo::subclassesFor('DataObject')) as $class) {\n\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t}\n\t\t}\n\t}", "function cleanupTmp() {\n // try to delete all the tmp files we know about.\n foreach($this->tmpFilesCreated as $file) {\n if(file_exists($file)) {\n $status = unlink($file);\n }\n }\n $this->tmpFilesCreated = array();\n // try to completely delete each directory we created.\n $dirs = array_reverse($this->tmpDirsCreated);\n foreach($dirs as $dir) {\n if(file_exists($dir)) {\n $this->recursiveRmdir($dir);\n }\n }\n $this->tmpDirsCreated = array();\n }", "public function drop_table($table, $if_exists=true){\n\t\tif($if_exists){\n\t\t\tif($this->table_exists($table)){\n\t\t\t\treturn $this->query(\"DROP TABLE $table\");\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->query(\"DROP TABLE $table\");\n\t\t}\n\t}", "public function drop_table($table, $if_exists=true){\n\t\tif($if_exists){\n\t\t\tif($this->table_exists($table)){\n\t\t\t\treturn $this->query(\"DROP TABLE $table\");\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->query(\"DROP TABLE $table\");\n\t\t}\n\t}", "public function removeTemporary();", "public static function doDrop() {\n\t\t$conn = new wgConnector();\n\t\treturn (bool) $conn->drop(self::TABLE_NAME);\n\t}", "public static function doDrop() {\n\t\t$conn = new wgConnector();\n\t\treturn (bool) $conn->drop(self::TABLE_NAME);\n\t}", "public static function doDrop() {\n\t\t$conn = new wgConnector();\n\t\treturn (bool) $conn->drop(self::TABLE_NAME);\n\t}", "public static function doDrop() {\n\t\t$conn = new wgConnector();\n\t\treturn (bool) $conn->drop(self::TABLE_NAME);\n\t}", "public function afterTearDown()\n {\n $this->schema()->dropIfExists('users');\n $this->schema()->dropIfExists('friends');\n $this->schema()->dropIfExists('posts');\n $this->schema()->dropIfExists('comments');\n $this->schema()->dropIfExists('photos');\n $this->schema()->dropIfExists('invalid_kids');\n $this->schema()->dropIfExists('profiles');\n }", "protected function RetDropTable() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: Table not properly provided in QueryHelper.\");\n }\n\n $isTemp = isset($this->\n addArgs['istemp']) && $this->\n addArgs['istemp'] ? \" TEMPORARY\" : \"\";\n\n $exists = isset($this->\n addArgs['exists']) && $this->\n addArgs['exists'] ? \" IF EXISTS\" : \"\";\n\n return \"DROP{$isTemp} TABLE{$exists} `{$this->\n tables[0]}`;\";\n }", "protected function tearDown()\n {\n //clear out any tables we populated\n $this->adapter->query('DELETE FROM ' . RUCKUSING_TS_SCHEMA_TBL_NAME);\n }", "protected function tearDown(): void\n {\n $this->schema()->drop('users');\n $this->schema()->drop('users_created_at');\n $this->schema()->drop('users_updated_at');\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function unlinkTempFiles() {}", "public function unlinkTempFiles() {}", "public function drop_table($table_name) {\n return static ::execute('DROP TABLE IF EXISTS ' . self::quote_table_name($table_name));\n }", "public function tearDown()\n {\n $this->schema()->drop('users');\n $this->schema()->drop('users32');\n $this->schema()->drop('usersb');\n $this->schema()->drop('posts');\n $this->schema()->drop('posts32');\n $this->schema()->drop('postsb');\n $this->schema()->drop('rolesb');\n $this->schema()->drop('roles32');\n $this->schema()->drop('user32_role32');\n $this->schema()->drop('userb_roleb');\n }", "private function delete_tables()\n {\n global $wpdb;\n\n // this needs to occur at this level, and not in the\n foreach ($this->tables as $tablename) {\n $sql = 'DROP TABLE IF EXISTS ' . $tablename;\n $wpdb->query($sql);\n }\n }", "public function destroy() {\n $this->connection->schema()->dropTable($this->mapTable);\n $this->connection->schema()->dropTable($this->messageTable);\n }", "protected function tearDown() {\n try {\n if ($this->dbh != null) {\n if (!$this->dbh->query('DROP TABLE users')) {\n $this->fail('Couldn\\'t teardown db. Query didn\\'t succeed');\n }\n }\n } catch (PDOException $ex) {\n $this->fail('Couldn\\'t teardown db ('. $ex->getMessage() .')');\n }\n }", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "public static function cleanTempStorage() {\n unset($_SESSION[self::$appSessionName][self::$storageName]);\n }", "function Sql_Table_Drop($table=\"\")\n {\n if ($this->Sql_Table_Exists($table)>0)\n {\n $this->QueryDB\n (\n $this->Sql_Table_Drop_Query($table)\n );\n $this->AddMsg(\"Table \".$table.\" has been dropped\");\n }\n }", "private function clear_dummy_data()\n {\n $this->adapter->query('DELETE FROM ' . RUCKUSING_TS_SCHEMA_TBL_NAME);\n }", "function cleanTmpfile($tempfile) {\n\t\tif (file_exists($tempfile)) {\n\t\t\tunlink($tempfile);\n\t\t}\n\t}", "function DropTable_UserDetails($dbhandle)\n{\n $logger = LoggerSingleton::GetInstance();\n $logger->LogInfo(\"DropTable_UserDetails : enter\");\n\n global $UserDetailsTable_Name;\n\n $query = \"DROP TABLE $UserDetailsTable_Name\";\n $status = $dbhandle->query($query);\n\n if(false == $status)\n {\n $logger->LogError(\"DeleteTable_UserDetails : Unable to Delete table - \n $dbhandle->error\"); \n }\n\n $logger->LogInfo(\"DeleteTable_UserDetails : Status - $status\");\n return $status;\n}", "function tptn_recreate_tables() {\n\tglobal $wpdb;\n\n\t$table_name = $wpdb->base_prefix . 'top_ten';\n\t$table_name_daily = $wpdb->base_prefix . 'top_ten_daily';\n\t$table_name_temp = $table_name . '_temp';\n\t$table_name_daily_temp = $table_name_daily . '_temp';\n\n\t$wpdb->hide_errors();\n\n\t// 1. create temporary tables with the data.\n\t$wpdb->query( \"CREATE TEMPORARY TABLE {$table_name_temp} SELECT * FROM $table_name;\" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t$wpdb->query( \"CREATE TEMPORARY TABLE {$table_name_daily_temp} SELECT * FROM $table_name_daily;\" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\n\t// 2. Drop the tables.\n\t$wpdb->query( \"DROP TABLE $table_name\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\t$wpdb->query( \"DROP TABLE $table_name_daily\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\n\t// 3. Run the activation function which will recreate the tables.\n\ttptn_single_activate();\n\n\t// 4. Reinsert the data from the temporary table.\n\t$sql = \"\n\tINSERT INTO `$table_name` (postnumber, cntaccess, blog_id) (\n\t\tSELECT\n\t\t\tpostnumber,\n\t\t\tcntaccess,\n\t\t\tblog_id\n\t\tFROM `$table_name_temp`\n\t);\n\t\";\n\n\t$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching\n\n\t$sql = \"\n\tINSERT INTO `$table_name_daily` (postnumber, cntaccess, dp_date, blog_id) (\n\t\tSELECT\n\t\t\tpostnumber,\n\t\t\tcntaccess,\n\t\t\tdp_date,\n\t\t\tblog_id\n\t\tFROM `$table_name_daily_temp`\n\t);\n\t\";\n\n\t$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching\n\n\t// 5. Drop the temporary tables.\n\t$wpdb->query( \"DROP TABLE $table_name_temp\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\t$wpdb->query( \"DROP TABLE $table_name_daily_temp\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\n\t$wpdb->show_errors();\n}", "public function drop() {\n try {\n $this->db->exec(\"DROP TABLE `\" . $this->table . \"`\");\n return new DynamicTable($this->table, $this->db);\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "protected function tearDown()\n {\n $this->deleteTemporaryFiles();\n }", "public function deleteTables()\n {\n $db = Core::$db;\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_forms\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_form_placeholders\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_form_templates\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_templates\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_sets\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_placeholders\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_placeholder_opts\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_resources\");\n $db->execute();\n }", "function CreateTemporaryTable($tableName, $tableDefinition)\n{\n $stmt = SQL_CREATE_TEMPORARY_TABLE . \" $tableName ($tableDefinition);\";\n return mysql_query($stmt);\n}", "function drop_table($name) {\n\t\t\t$name = trim($name);\n\t\t\tif (empty ($name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (empty ($this->CONN)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t#if ( mysql_query ( \"DROP TABLE IF EXISTS \" . $name, $this->CONN ) ) {\n\t\t\tif ($this->one_query(\"DROP TABLE IF EXISTS \".$name)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$this->error(\"error dropping table!\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function dropTable($table) {\r\n\r\n $this->database->rawQuery(\"DROP TABLE \".$this->database->prefix.$table);\r\n\r\n if($this->database->count >= 1)\r\n return TRUE;\r\n else\r\n return FALSE;\r\n }", "public function dropTable($table) {\n\t\t$this->getDbConnection()->createCommand()->dropTable($table);\n\t}", "function drop_table()\n {\n if ($this->GET('sure')) {\n $this->table->drop_table();\n $this->table->write();\n unset($this->table);\n $this->tables();\n return;\n }\n $this->displayHead();\n echo 'Do you really want to<br>drop table `' . $this->table->tablename() . '`?<p>';\n echo '<a class=\"danger\" href=\"' . $this->SELF . '?method=drop_table&table=' . $this->table->tablename() . '&sure=1\">Yes</a> | ';\n echo '<a href=\"' . $this->SELF . '?method=browse&table=' . $this->table->tablename() . '\">No</a>';\n }", "protected function removeTable($name) {\n // Try to remove, if already exist...\n try {\n $this->db()->query('drop table %c', $name);\n } catch (SQLStatementFailedException $ignored) {}\n }", "public function tearDown() {\r\n global $cfg;\r\n try {\r\n $dbConn = new mysqli(\r\n $cfg['db']['host'],\r\n $cfg['db']['user'],\r\n $cfg['db']['pass'],\r\n $cfg['db']['db']\r\n );\r\n }catch (Exception $e){\r\n throw new Exception(\"connection error\");\r\n }\r\n $sql = \"DROP TABLE `users`\";\r\n //run sql query\r\n $dbConn->query($sql);\r\n }", "function _create_tmp_table()\n {\n //$this->tmp_search_table = (string)'_'.$GLOBALS['B']->util->unique_crc32();\n $this->tmp_search_table = \"earchvetmp\";\n $sql = \"CREATE TEMPORARY TABLE {$this->tmp_search_table} (mid INT NOT NULL default 0)\";\n \n $result = $GLOBALS['B']->db->query($sql);\n \n if (DB::isError($result)) \n {\n trigger_error($result->getMessage().\"\\n\\nSQL: \".$sql.\"\\n\\nFILE: \".__FILE__.\"\\nLINE: \".__LINE__, E_USER_ERROR);\n return FALSE;\n }\n }", "function deleteTemp () : void {\n\tforeach(glob(_ROOT_PATH.'temp/*') as $file){\n\t\tunlink($file);\n\t}\n}", "public function dropTable()\n {\n try {\n $table = self::$table_name;\n $SQL = <<<EOD\n SET foreign_key_checks = 0;\n DROP TABLE IF EXISTS `$table`;\n SET foreign_key_checks = 1;\nEOD;\n $this->app['db']->query($SQL);\n $this->app['monolog']->addInfo(\"Drop table 'contact_communication_usage'\", array(__METHOD__, __LINE__));\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "private function uninstallSettingsTable()\n {\n return Db::getInstance()->Execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'backup_pro_settings`');\n }", "public function purgeUndoTable()\n\t{\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Truncate the table\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_undo\");\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the undo table', __METHOD__, TL_CRON);\n\t}", "public function __destruct() {\n if (file_exists($this->tempFile)) {\n unlink($this->tempFile);\n }\n }", "public function uninstall()\n {\n try {\n $this->db->query(\"DROP TABLE IF EXISTS `\".DB_PREFIX.$this->_table.\"`;\");\n } catch (Exception $e) {\n return false;\n }\n\n return true;\n }", "public function dropTable($table)\n {\n $this->getMigrator()->table($table)->drop();\n }", "function drop_table( $name )\n\t{\n\t\t$name = trim( $name );\n\t\tif ( empty( $name ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( empty( $this->CONN ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( mysql_query ( \"DROP TABLE IF EXISTS \" . $name, $this->CONN ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->error ( \"error dropping table!\" );\n\t\t\treturn false;\n\t\t}\n\t}", "function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "function sql_deleteTable() {\n global $database;\n $thisQuery = \"DROP TABLE \".TABLE_PREFIX.\"mod_dirlist\";\n $oldErrorReporting = error_reporting(0);\n $database->query($thisQuery);\n error_reporting($oldErrorReporting);\n if ($database->is_error()) {\n $this->errorPlace = 'sql_deleteTable()';\n $this->error = $database->get_error();\n return false; }\n else {\n return true; }\n }", "protected function tearDown(): void\n {\n $this->schema('default')->drop('users');\n }", "public function drop($table)\n {\n return $this->query('DROP TABLE IF EXISTS '.$this->prefix($table));\n }", "protected function _uninstall() {\n DB::q('DROP TABLE IF EXISTS !table', array('!table' => $this->table));\n\n return TRUE;\n }", "protected function _after()\n {\n $this->_adapter->execute('drop table if exists comments;\n drop table if exists posts_tags;\n drop table if exists posts;\n drop table if exists tags;\n drop table if exists profiles;\n drop table if exists credentials;\n drop table if exists people;\n ');\n parent::_after();\n }", "public function tearDown(): void\n {\n $this->schema($this->schemaName)->drop('users');\n $this->schema($this->schemaName)->drop('emails');\n $this->schema($this->schemaName)->drop('phones');\n $this->schema($this->schemaName)->drop('role_users');\n $this->schema($this->schemaName)->drop('roles');\n $this->schema($this->schemaName)->drop('permission_roles');\n $this->schema($this->schemaName)->drop('permissions');\n $this->schema($this->schemaName)->drop('tasks');\n $this->schema($this->schemaName)->drop('locations');\n $this->schema($this->schemaName)->drop('assignments');\n $this->schema($this->schemaName)->drop('jobs');\n\n Relation::morphMap([], false);\n\n parent::tearDown();\n }", "public function tearDown(): void\n {\n if ($this->connection->inTransaction()) {\n $this->connection->rollback();\n }\n\n $this->connection->execute('DROP TABLE `writers`');\n\n parent::tearDown();\n }", "function Drop_Table($id){\n\t\t$database=DatabaseName();\n\t\t$name='table_'.$id;$StudentID=getuserid();\n\t\tmysql_query(\"DELETE FROM `$database`.`filerating` WHERE `filerating`.`FileID` = $id\");\n\t\tmysql_query(\"DROP TABLE IF EXISTS `$database`.`$name`\");\t\t\n\t\tmysql_query(\"DELETE FROM `$database`.`keywords` WHERE `keywords`.`FileID` = $id\");\n\t\tmysql_query(\"DELETE FROM `$database`.`uploadinfo` WHERE `uploadinfo`.`FileID` = $id\");\n\t}", "public function deleteTable(){\n\t \n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('DELETE FROM wp_nouveautes_test WHERE datep_nouveaute > \"2014-04-13\"');\n\n\t\t$wpdb->query('DELETE FROM wp_custom_categories_test WHERE term_id > 247');\n\t\t\t\t \n\t\t$wpdb->query('TRUNCATE TABLE wp_subcategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_extracategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_updated');\n\t\t \t\t \n\t}", "public function uninstall(){\n MergeRequestComment::dropTable();\n MergeRequest::dropTable();\n CommitCache::dropTable();\n Repo::dropTable();\n Project::dropTable();\n }", "public function teardown()\n {\n if ($this->csvFile) {\n unlink($this->csvFile);\n $this->csvFile = null;\n }\n\n if ($this->photoZip) {\n unlink($this->photoZip);\n $this->photoZip = null;\n }\n }", "public function dropTable($table)\n {\n $this->db->createCommand()->dropTable($table)->execute();\n }", "protected function schedule_temp_backup_cleanup()\n {\n }", "public function dropTable($table) {\n\t\t$table = $this->tablePrefix . trim($table);\n\t\t$table = $this->quoteIdentifier($table);\n\t\t$schema = $this->getSchemaManager();\n\t\tif ($schema->tablesExist([$table])) {\n\t\t\t$schema->dropTable($table);\n\t\t}\n\t}", "public function dropTable($tableName)\r\n {\r\n }", "protected function tearDown() {\n\t\t$this->sql->Disconnect(__FILE__, __LINE__);\n\t\tsqlsolution_unlink_sqlite($this->sql);\n\t\t$this->sql = null;\n\t}", "public function dropTable($name)\n {\n $name = $this->filterName($name);\n if (!$this->isTablesExists($name)) {\n ech(\" Cannot delete table '{$name}' because it doesn't exists\\n\", 'red');\n }\n $sql = \"DROP TABLE IF EXISTS `{$name}`\";\n if ($this->execute($sql)) {\n ech(\" Table '{$name}' was deleted\\n\", 'green');\n } else {\n ech(\" Fail on deleting table '{$name}'\\n\", 'red');\n }\n }", "public function dropTable($table)\n\t{\n\t\t$sql = $this->connection->getQueryBuilder()->dropTable($table);\n\t\treturn $this->setSql($sql)->execute();\n\t}", "private function purgeTables()\n\t{\t\n\t\t$this->db->query(\"DELETE FROM categories\");\n\t\t$this->db->query(\"DELETE FROM album_art\");\n\t\t$this->db->query(\"TRUNCATE TABLE albums\");\n\t\t\n\t}", "function clear_table($table, $dbh)\n{\n\ttry {\n\t $dbh->beginTransaction();\n\n\t $stmt = $dbh->prepare(\"TRUNCATE TABLE $table\");\n\n\t $stmt->execute();\n\n\t $dbh->commit();\n\t} catch(PDOException $ex) {\n\t //Something went wrong rollback!\n\t $dbh->rollBack();\n\t echo $ex->getMessage();\n\t} \n}" ]
[ "0.7660268", "0.74637896", "0.71661884", "0.6887717", "0.666107", "0.6654272", "0.66523474", "0.6612747", "0.640355", "0.63735604", "0.6367994", "0.6219097", "0.6169896", "0.6132668", "0.6082148", "0.60454816", "0.6018862", "0.60093623", "0.59774476", "0.5969948", "0.59634435", "0.59514236", "0.5927013", "0.59121734", "0.585949", "0.5854083", "0.5829985", "0.5815338", "0.579882", "0.5788487", "0.57858115", "0.57826066", "0.57818687", "0.57818687", "0.5763984", "0.57611793", "0.57611793", "0.57611793", "0.57611793", "0.57559294", "0.57359093", "0.5724726", "0.57149845", "0.5686553", "0.5686553", "0.5686553", "0.56805056", "0.56803405", "0.5675925", "0.56562126", "0.56526953", "0.5645925", "0.56401396", "0.56274116", "0.5626366", "0.5607357", "0.55876845", "0.55814564", "0.557643", "0.5575574", "0.55654883", "0.556015", "0.5549352", "0.5547939", "0.55289656", "0.5520874", "0.5515116", "0.55107784", "0.55092937", "0.55081147", "0.55001444", "0.54952705", "0.5494104", "0.5476596", "0.5470752", "0.546972", "0.54674685", "0.54638046", "0.54624146", "0.5458576", "0.54501265", "0.5449134", "0.5447558", "0.54450744", "0.5438359", "0.5430635", "0.5420063", "0.5417608", "0.54153484", "0.5414717", "0.5414614", "0.5403635", "0.5403007", "0.54000497", "0.54000103", "0.53969824", "0.53905225", "0.53890675", "0.5383347", "0.5379279" ]
0.5501074
70
Read the options passed to the constructor and configure the instance.
abstract protected function readOptions(array $options);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(array $options = array())\n {\n $this->configure($options);\n }", "public function __construct($options)\n {\n //\n $options = array_merge($this->config, $options);\n foreach ($options as $key => $value) {\n $this->{$key} = $value;\n }\n $this->config = $options;\n }", "public function configureOptions();", "function __construct(){\n\t\t$this->options();\n\t}", "public function configure($options);", "protected function configure()\n {\n parent::configure();\n $this->options->mustHave('class');\n }", "public function __construct($options = array())\n\t{\n\t if ($options instanceof Zend_Config) {\n $options = $options->toArray();\n }\n \n $this->setOptions($options);\n\t}", "public function __construct($options) { }", "protected function configure($options = array(), $attributes = array())\n {\n \n }", "public function __construct($options = array()){ \r\n $this->setOptions($options);\r\n }", "public function configure(array $options)\n {\n }", "protected function configure(array $options)\n {\n }", "function __construct($options = null)\n {\n if ($options !== null)\n $this->optsData()->import($options);\n }", "public function __construct($options = array()) {\n $this->options = $options + $this->defaults;\n }", "public function __construct(array $options = array());", "public function __construct ($options = array())\n {\n if ($options instanceof Zend_Config) {\n $options = $options->toArray();\n }\n $this->_setSes($options);\n }", "protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('date_order', 'Y-m-d');\n $this->addOption('date', array());\n $this->addOption('time', array());\n $this->addOption('with_time', true);\n $this->addOption('format', '%date% %time%');\n }", "abstract public function configure();", "public function __construct($options = array()) {\n $this->setOptions($options);\n }", "protected function configure($options = array(), $attributes = array())\n {\n parent::configure($options, $attributes);\n\n $this->addOption('date_format', null);\n $this->addOption('php_date_format', null);\n $this->addOption('with_time', 'false');\n }", "protected function configure()\n {\n $this\n ->addOption('site', null, InputOption::VALUE_REQUIRED, 'Site ID')\n ->addOption('process', null, InputOption::VALUE_REQUIRED, 'Process ID', uniqid())\n ;\n }", "function __construct(array $options = array()) {\n\t\t$this->_options = $options;\n\t}", "protected function __construct($options)\n {\n parent::__construct($options);\n }", "function __construct(array $options=array()) {\n $this->options = $options + static::getDefaults();\n }", "public function __construct(array $options = []);", "protected function initOptions()\n {\n }", "function __construct($options = array()){\n\t\tparent::__construct($options);\n\t}", "protected function configureOptions(): void\n {\n }", "public function __construct($options = null);", "public function __construct($options = null);", "public function __construct($options)\n {\n parent::__construct($options);\n }", "public function __construct()\n {\n parent::__construct();\n\n // read from Options()\n $this->modelariumOptions = new Options();\n }", "protected function configure()\n {\n $this->setDescription('Sets the API settings on an instance.');\n $this->setHelp('Sets the API settings on an instance.');\n\n $this->addOption(\n 'instanceid',\n 'i',\n InputOption::VALUE_REQUIRED,\n 'The instanceid of the instance we are setting the property value for.'\n );\n\n $this->addArgument('settings', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'The API settings seperate values with spaces (in format key:value).');\n\n }", "public function __construct($options = array())\n {\n foreach($options as $key => $val)\n {\n switch($key)\n {\n case \"url\":\n $this->apiUrl = $val;\n break;\n case \"key\":\n $this->apiKey = $val;\n break;\n case \"secret\":\n $this->apiSecret = $val;\n break;\n case \"debug\":\n $this->apiDebug = $val;\n break;\n }\n }\n }", "public function __construct($settingsManager){\r\n // load all options\r\n $this->_config = $settingsManager->getOptions();\r\n }", "private function __construct($options = false)\n {\n $this->options = $options;\n }", "public function __construct(array $options = array())\n {\n }", "public function __construct($options = null)\n\t{\n\t\t$this->_config = new Syx_Config();\n\t\tif (is_string($options)) {\n\t\t\t$this->_config->load($options);\n\t\t} elseif (is_array($options)) {\n\t\t\t$this->_config->merge($options);\n\t\t} elseif (is_object($options) && method_exists($options, 'toArray')) {\n\t\t\t$this->_config->merge($options->toArray());\n\t\t}\n\n\t\t$options = $this->_config->toArray();\n\t\tif (!empty($options)) {\n\t\t\t$this->setOptions($options);\n\t\t}\n\t}", "public function __construct($options = array())\n {\n if (sizeof($options) > 0) {\n $this->setOptions($options);\n }\n }", "abstract protected function configure();", "abstract protected function configure();", "protected function configure($options = array(), $attributes = array())\n {\n $this->addRequiredOption('model');\n $this->addOption('add_empty', false);\n $this->addOption('method', '__toString'); \n $this->addOption('key_method', 'getPrimaryKey');\n $this->addOption('order_by', array(\"ZoneLeft\",\"ASC\"));\n $this->addOption('query_methods', array());\n $this->addOption('criteria', null);\n $this->addOption('connection', null);\n $this->addOption('multiple', false);\n // not used anymore\n $this->addOption('peer_method', 'doSelect');\n\n parent::configure($options, $attributes);\n }", "protected function configure() {\n\n /** @noinspection PhpUndefinedClassConstantInspection */\n $this->setName(static::NAME)\n ->setDescription($this->getDescription());\n\n if(method_exists($this,'getOptions')) {\n $this->setDefinition(\n new InputDefinition($this->getOptions())\n );\n }\n }", "public function __construct() {\n\t\t$this->ryte_option = $this->get_option();\n\t}", "protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('image', false);\n $this->addOption('config', '{}');\n $this->addOption('culture', '');\n\n parent::configure($options, $attributes);\n\n if ('en' == $this->getOption('culture'))\n {\n $this->setOption('culture', 'en');\n }\n }", "protected function configure()\n {\n $this\n ->addArgument('stores', InputArgument::IS_ARRAY | InputArgument::REQUIRED,\n 'A list of stores to re-encrypt.')\n ->addOption(\n 'new-profile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The new profile the current data is encrypted with.',\n null\n )\n ->addOption(\n 'offset',\n null,\n InputOption::VALUE_REQUIRED,\n 'Starting record',\n 0\n )\n ->addOption(\n 'limit',\n null,\n InputOption::VALUE_REQUIRED,\n 'Max records to process',\n null\n )\n ->addOption(\n 'batch-size',\n null,\n InputOption::VALUE_REQUIRED,\n 'Records per batch to process',\n 1\n );\n }", "public function __construct()\n {\n parent::__construct();\n $this->config = config($this->configName);\n }", "public function __construct() {\n\t\t$this->createCommandLineOptions();\n\t\t$this->dryRun = $this->commandLineOptions->hasOption(tx_mnogosearch_clioptions::DRYRUN);\n\t}", "public function __construct(Options $options) {\n\t\t$this->options($options);\n\t}", "public static function configure(){\n $args = func_get_args();\n $numArgs = func_num_args();\n\n switch ($numArgs) {\n case 1:{\n if (is_array($args[0])){\n self::configureWithOptions($args[0]);\n } else {\n self::configureWithDsnAndOptions($args[0]);\n }\n break;\n }\n case 2:{\n if (is_array($args[0])){\n self::configureWithOptions($args[0], $args[1]);\n } else {\n self::configureWithDsnAndOptions($args[0], $args[1]);\n }\n break;\n }\n case 3: {\n self::configureWithDsnAndOptions($args[0], $args[1], $args[2]);\n break;\n }\n }\n }", "public function __construct()\n {\n $this->options = [];\n }", "public function __construct( array $options )\n {\n $this->options = $options;\n }", "public function __construct()\n\t{\n\t\t$this->options = array(\n\t\t\t'class.first' => 'first',\n\t\t\t'class.last' => 'last',\n\t\t\t'class.single' => 'single',\n\t\t);\n\t}", "public function configure();", "private function __construct(array $options = [])\n {\n $this->fill($options);\n }", "public function __construct(array $options)\n {\n self::boot($options);\n }", "public function __construct( array $options = [] )\n {\n $this->mergeOptions( $options );\n }", "public function __construct() {\n\n $this->loadConfig();\n\n }", "protected function __construct() {\n $this->options = array();\n\n // Populate the magic values\n $this->set('esprit_core', __DIR__);\n\n $pathPieces = explode('/', __DIR__);\n if( count($pathPieces) > 0 )\n unset($pathPieces[count($pathPieces)-1]);\n $root = implode('/', $pathPieces);\n\n $this->set('esprit_root', $root);\n $this->set('esprit_commands', __DIR__ . DIRECTORY_SEPARATOR . 'commands');\n $this->set('esprit_views', __DIR__ . DIRECTORY_SEPARATOR . 'views' );\n $this->set('esprit_data', $root . DIRECTORY_SEPARATOR . 'data');\n }", "protected function configure()\n {\n $this->addArgument('name', InputArgument::REQUIRED, 'The name of the created component.');\n $this->addOption(\n 'force', 'f', InputOption::VALUE_NONE, \n 'If the component already exists its forced to the overrided.'\n );\n $this->addOption(\n 'constructor', 'c', InputOption::VALUE_NONE,\n 'Creates the new class with its constructor already defined.'\n );\n\n foreach ($this->options() as $opt) {\n $this->addOption(...$opt);\n }\n foreach ($this->arguments() as $arg) {\n $this->addArgument(...$arg);\n }\n }", "protected function configure()\n {\n $this->setName(static::NAME);\n $this->setDescription(static::DESCRIPTION);\n foreach (static::ARGUMENTS as $argment) {\n $this->addArgument(...$argment);\n }\n foreach (static::OPTIONS as $option) {\n $this->addOption(...$option);\n }\n $this->setHelperSet(new HelperSet([new QuestionHelper()]));\n }", "public function __construct( array $options = array() ) {\n\n $this->setOptions( $options );\n }", "protected function initConfig( $options = array() )\n {\n \n $configFile = require(ROOT_PATH . '/app/config/config.php');\n\n // Create the new object\n $config = new PhConfig($configFile);\n\n // Store it in the Di container\n // Settings cones from the include\n $this->di['config'] = $config;\n }", "public function __construct($options = array())\n {\n Options::required('secret_key', $options);\n\n parent::__construct($options);\n }", "public function __construct() {\n $this->config();\n parent::__construct();\n }", "protected function configure()\n {\n foreach ($this->getArguments() as $argument) {\n $this->addArgument($argument[0], $argument[1], $argument[2], $argument[3]);\n }\n\n foreach ($this->getOptions() as $option) {\n $this->addOption($option[0], $option[1], $option[2], $option[3], $option[4]);\n }\n }", "protected function __construct() {\n\t\t\t// Full path to main file\n\t\t\t$this->plugin_file= __FILE__;\n\t\t\t$this->plugin_dir = dirname( $this->plugin_file );\n\t\t\t$this->options = $this->get_saved_options();\n\t\t}", "public function __construct()\n {\n $this->optionsFile = null;\n }", "function __construct() {\n //invoke the init method of the config object in context\n $this->init();\n }", "protected function configure()\n {\n $this->addDatabaseConfig();\n $this->addVariantConfig();\n $this->addOption(\n 'override',\n null,\n InputOption::VALUE_NONE,\n 'Allow overriding an existing database'\n );\n $this->addOption(\n 'wait',\n 'w',\n InputOption::VALUE_NONE,\n 'Wait for the server to be ready'\n );\n $this->addOption(\n 'migrate',\n null,\n InputOption::VALUE_NONE,\n \"Do not fail if the database exists, but perform a\\nmigration, instead\"\n );\n }", "protected function configure()\n {\n $this->setName($this->command)->setDescription($this->text);\n\n $this->addArgument('name', InputArgument::REQUIRED, 'Name of the class');\n\n $optional = InputOption::VALUE_OPTIONAL;\n\n $this->addOption('path', null, $optional, 'Path for the file to be created', $this->path);\n\n $this->addOption('namespace', null, $optional, 'Namespace of the class', $this->namespace);\n\n $this->addOption('package', null, $optional, 'Name of the package', 'App');\n\n $author = 'Rougin Gutib <[email protected]>';\n\n $this->addOption('author', null, $optional, 'Name of the author', $author);\n }", "protected function configure(): void\n {\n $this->addArgument(\n 'issues',\n InputOption::VALUE_REQUIRED,\n 'Issues / Ticket numbers comma separated. (Eg. OP-1498,ONLINE-515)'\n );\n\n $this->addOption(\n 'from',\n 'df',\n InputOption::VALUE_OPTIONAL,\n 'Get work logs from date YYYY-MM-DD'\n );\n\n $this->addOption(\n 'to',\n 'dt',\n InputOption::VALUE_OPTIONAL,\n 'Get work logs to date YYYY-MM-DD'\n );\n }", "public function __construct($options = NULL)\n\t{\n\t $this\n\t \t->setOptions($options)\n\t \t->_init()\n\t ;\n\t}", "public function init() {\n //TODO override and put config intialization code here\n }", "public function __construct(array $options)\n {\n $this->options = $options;\n }", "public function __construct(array $options = array())\n {\n $available_options = array('cache_dir');\n foreach ($available_options as $name) {\n if (isset($options[$name])) {\n $this->$name = $options[$name];\n }\n }\n }", "public function __construct(array $options = array())\n {\n $available_options = array('cache_dir');\n foreach ($available_options as $name) {\n if (isset($options[$name])) {\n $this->$name = $options[$name];\n }\n }\n }", "public function __construct(array $options = array()) {\n $this->options = array_merge($this->options, $options);\n }", "protected function configure()\n {\n $this->addArgument(\n 'environment', InputArgument::REQUIRED | InputArgument::OPTIONAL, 'What environment to run the script in',\n 'production'\n );\n $this->_httpClient = new Client();\n }", "public function __construct() {\n\t\tparent::__construct();\n\n\t\t$this->aioseo_options = get_option( 'aioseop_options' );\n\n\t\t$this->import_metas();\n\t\t$this->import_ga();\n\t}", "protected function configure()\n\t{\n\t\t// $this->addArguments(array(\n\t\t// new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),\n\t\t// ));\n\n\t\t$this->addOptions(array(\n\t\t\t\tnew sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'),\n\t\t\t\tnew sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),\n\t\t\t\tnew sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'doctrine'),\n\t\t\t\t// add your own options here\n\t\t));\n\n\t\t$this->namespace = 'import_translation';\n\t\t$this->name = 'iceland_classifications_sectors';\n\t\t\n// \t\t$this->setCountryId(151);\n\t\t$this->setLang(\"en\");\n\n\t}", "protected function _construct()\n\t{\n\t\tparent::_construct();\n\n\t\t$data = array();\n\t\t\n\t\tforeach($this->_optionFields as $key) {\n\t\t\tif ($key !== '') {\n\t\t\t\t$key = '_' . $key;\n\t\t\t}\n\n\t\t\t$options = Mage::helper('wordpress')->getWpOption('wpseo' . $key);\n\t\t\t\n\t\t\tif ($options && ($options = unserialize($options))) {\n\t\t\t\tforeach($options as $key => $value) {\n\t\t\t\t\tif (strpos($key, '-') !== false) {\n\t\t\t\t\t\tunset($options[$key]);\n\t\t\t\t\t\t$options[str_replace('-', '_', $key)] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (is_array($options)) {\n \t\t\t\t$data = array_merge($data, $options);\n }\n\t\t\t}\n\t\t}\n\n\t\t$this->setData($data);\n\t}", "public final function make(): void\n {\n if (!$this->config) {\n parent::__construct([\n 'description' => $this->description ?: $this->description(),\n 'values' => $this->values ?: $this->values()\n ]);\n $this->setInstance($this);\n }\n }", "protected function configure($options = array(), $attributes = array())\r\n\t{\r\n\t\t$this->addOption('value');\r\n\t}", "public function __construct($options)\n {\n parent::__construct($options);\n\n if (isset($options[self::DI_KEY_AUTH])) {\n $this->authKey = $options[self::DI_KEY_AUTH];\n }\n }", "public function __construct ($options = null)\n\t{\n\t\t$this->setOptions($options);\n\t}", "protected function _construct()\n {\n $this->_init('bundle/option');\n }", "public function __construct($options)\n {\n // you want to retrieve.\n $this->config['method'] = 'GET';\n $this->config['route'] = '/Contacts/<bean_id>';\n \n // Note that I don't know what a valid bean id is for\n // your system. But you can use the ContactsList.php to get a valid bean id\n // then either update the route param. You cannot pass --bean_id in on the\n // command line when you set config['route'] the way you can when you use\n // config['routeMap'].\n \n $this->config['qs']['fields'] = array('first_name', 'last_name', 'phone_work');\n parent::__construct($options);\n }", "public function __construct(array $options = null) {\n\n }", "public function __construct($options){\n\t\tforeach($options as $k=>$v){\n\t\t\t$this->$k = $v;\n\t\t}\n\t}", "public function __construct(array $options = array())\n\t{\n\t\tparent::__construct($options);\n\t}", "public function __construct($options = array())\n\t{\n\t\tforeach ($options as $key => $value)\n\t\t{\n\t\t\tif (isset($this->{$key}))\n\t\t\t{\n\t\t\t\t$this->{$key} = $value;\n\t\t\t}\n\t\t}\n\t}", "public function __construct()\n\t{\n\t\t/**\n\t\t * sets basic options\n\t\t */\n\t\tself::$Options['booleans'] = ClassScope::Get_ConstantsValues('UniCAT\\I_UniCAT_Options_Booleans');\n\t\tself::$Options['scalars'] = ClassScope::Get_ConstantsValues(\"UniCAT\\I_UniCAT_Options_Scalars\");\n\t\tself::$Options['basics'] = ClassScope::Get_ConstantsValues(\"UniCAT\\I__UniCAT_Options_Basics\");\n\t\tself::$Options['code_export'] = ClassScope::Get_ConstantsValues(\"UniCAT\\I_UniCAT_Options_CodeExport\");\n\t\tself::$Options['file_writer'] = ClassScope::Get_ConstantsValues(\"UniCAT\\I_UniCAT_Options_FileWriter\");\n\t\tself::$Options['comments_position'] = ClassScope::Get_ConstantsValues(\"UniCAT\\I_UniCAT_Options_CommentsPosition\");\n\t}", "public function __construct()\n {\n parent::__construct();\n\n $this->data_types = collect();\n $this->loaders = collect();\n $loaderOption = new InputOption('loader', 'L', InputOption::VALUE_OPTIONAL, 'Run the specified loader');\n $this->getDefinition()->addOption($loaderOption);\n }", "public function init(array $options);", "public function __construct(array $options)\n {\n $this->options = $this->normalizeOptions($options);\n }", "protected function configure()\n {\n $this\n ->addArgument('stores', InputArgument::IS_ARRAY|InputArgument::REQUIRED, 'A list of stores to re-encrypt.')\n ->addOption(\n 'new-profile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The new profile the current data is encrypted with.',\n null\n )\n ;\n }", "public function __construct( Options_Data $options ) {\n\t\t$this->options = $options;\n\t}", "public static function configure(array $options): void\n {\n static::$options = $options;\n }", "public function __construct(array $options = array())\n {\n if($options) {\n $this->setOptions($options);\n }\n }", "function __construct($options = null) \r\n\t{ \r\n\t\tparent::__construct($options); \r\n\t}" ]
[ "0.7483959", "0.7468935", "0.7362276", "0.73135185", "0.72959083", "0.7284358", "0.72483337", "0.7150802", "0.71243566", "0.708592", "0.7069829", "0.7030918", "0.7017623", "0.70161074", "0.6977831", "0.6950639", "0.69310385", "0.691749", "0.68923455", "0.6875185", "0.6864456", "0.68641627", "0.6863581", "0.6853089", "0.6850826", "0.68388593", "0.6835562", "0.6824151", "0.67953557", "0.67953557", "0.67777926", "0.677635", "0.677304", "0.676086", "0.6756806", "0.67514277", "0.6743817", "0.6723799", "0.6722775", "0.6720837", "0.6720837", "0.6716242", "0.6688912", "0.66646826", "0.66545236", "0.6651533", "0.6623596", "0.6623221", "0.662279", "0.66062737", "0.65978354", "0.6597483", "0.65955323", "0.65894437", "0.6584496", "0.6581016", "0.65798587", "0.65766054", "0.65760374", "0.65513736", "0.6550277", "0.6548817", "0.654355", "0.6524891", "0.6524884", "0.6520647", "0.6517736", "0.6516769", "0.65072227", "0.64962804", "0.6483088", "0.6479173", "0.64773494", "0.6473073", "0.6464582", "0.646246", "0.646246", "0.64430624", "0.6442321", "0.64407825", "0.6436689", "0.64334613", "0.643288", "0.6431323", "0.6429451", "0.642692", "0.6415741", "0.64136773", "0.64101905", "0.64093536", "0.6408949", "0.6400677", "0.6389425", "0.63800144", "0.63763136", "0.63749814", "0.63724035", "0.637192", "0.63692343", "0.6364122", "0.63556504" ]
0.0
-1
Create the temporary table, if it is required.
private function create() { if ($this->isRequired()) { $db = Database::getDatabaseConnection(); $db->exec($this->getDropQuery()); $db->exec($this->getCreateQuery()); $this->populate($db); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _createTemporaryTable(){\n\n $tempTable = $this->getTemporaryTablename();\n $this->_liquetDatabase->query(\"DROP TABLE IF EXISTS {$tempTable}\")->run();\n $this->_liquetDatabase->query(\"CREATE TEMPORARY TABLE {$tempTable} LIKE {$this->_tablename}\")->run();\n\n return $tempTable;\n }", "private function createTempTable()\n\t{\n\t\t// generate a temp table name\n\t\t$this->tempTable = 'crawl_index_temp';\n\n\t\t// ensure the temp table doesnt exist\n\t\t$sql = sprintf('DROP TABLE IF EXISTS %s', $this->tempTable);\n\t\tmysql_query($sql, $this->db);\n\n\t\t// create the table and give an exclusive write lock\n\t\t$sql = sprintf('CREATE TEMPORARY TABLE %s (page_id INT(10) UNSIGNED NOT NULL) ENGINE=MEMORY', $this->tempTable);\n\t\tmysql_query($sql, $this->db);\n\t}", "function _create_tmp_table()\n {\n //$this->tmp_search_table = (string)'_'.$GLOBALS['B']->util->unique_crc32();\n $this->tmp_search_table = \"earchvetmp\";\n $sql = \"CREATE TEMPORARY TABLE {$this->tmp_search_table} (mid INT NOT NULL default 0)\";\n \n $result = $GLOBALS['B']->db->query($sql);\n \n if (DB::isError($result)) \n {\n trigger_error($result->getMessage().\"\\n\\nSQL: \".$sql.\"\\n\\nFILE: \".__FILE__.\"\\nLINE: \".__LINE__, E_USER_ERROR);\n return FALSE;\n }\n }", "function CreateTemporaryTable($tableName, $tableDefinition)\n{\n $stmt = SQL_CREATE_TEMPORARY_TABLE . \" $tableName ($tableDefinition);\";\n return mysql_query($stmt);\n}", "private function hasCreateTemporaryTablePrivilege() {\n $con = DB::connection();\n $nam = uniqid();\n $qry = sprintf('create temporary table %s (id tinyint not null primary key)', $nam);\n $res = $con->query($qry);\n if ($res) {\n $qry = sprintf('drop table %s', $nam);\n $con->query($qry);\n }\n return $res;\n }", "private function createDummyTable() {}", "private function _createTables()\r\n {\r\n return true;\r\n }", "protected abstract function createTestTable();", "public function createTable()\n\t{\n\t\tphpCAS::traceBegin();\n\n\t\t// initialize the PDO object for this method\n\t\t$pdo = $this->getPdo();\n\t\t$this->setErrorMode();\n\n\t\ttry {\n\t\t\t$pdo->beginTransaction();\n\n\t\t\t$query = $pdo->query($this->_createTableSQL());\n\t\t\t$query->closeCursor();\n\n\t\t\t$pdo->commit();\n\t\t}\n\t\tcatch(PDOException $e) {\n\t\t\t// attempt rolling back the transaction before throwing a phpCAS error\n\t\t\ttry {\n\t\t\t\t$pdo->rollBack();\n\t\t\t}\n\t\t\tcatch(PDOException $e) {}\n\t\t\tphpCAS::error('error creating PGT storage table: ' . $e->getMessage());\n\t\t}\n\n\t\t// reset the PDO object\n\t\t$this->resetErrorMode();\n\n\t\tphpCAS::traceEnd();\n\t}", "public function testTemporary()\n {\n $statement = (new CreateTable($this->mockConnection));\n $return = $statement->temporary();\n $array = $statement->toArray();\n\n $this->assertInstanceOf(CreateTable::class, $return);\n $this->assertEquals([\n 'temporary' => true,\n ], $array);\n }", "public function ensureTableExists()\n {\n $_tableName = DB_PREFIX . \"wr360product\";\n $sqlCreateTable = <<<SQL\nCREATE TABLE IF NOT EXISTS `$_tableName` (\n `product_id` INT NOT NULL ,\n `root_path` VARCHAR(255) NULL DEFAULT NULL ,\n `config_file_url` VARCHAR(255) NULL DEFAULT NULL ,\n `wr360_enabled` TINYINT(1) NOT NULL DEFAULT '1' ,\n PRIMARY KEY (`product_id`) )\nENGINE = MyISAM\nDEFAULT CHARACTER SET = utf8;\nSQL;\n\n $this->db->query($sqlCreateTable);\n }", "public function create_or_upgrade_tables() {\n\t\tif ( is_multisite() ) {\n\t\t\t$this->create_table( $this->ms_table );\n\t\t}\n\n\t\t$this->create_table( $this->table );\n\t}", "private function createNewTable() {\n //generate the create table statement\n $sql = \"create table $this->tableName(\";\n $comma = \"\";\n $keyNameList = [];\n foreach ($this->columns as $column /* @var $column DbColumn */) {\n $sql .= \" $comma $column->columnName $column->dataType $column->extraStuff\";\n $comma = \",\";\n if ($column->primaryKey === true) {\n $keyNameList[] = $column->columnName;\n }\n }\n //generate the primary key list, if any are present\n $primaryKeySql = \"\";\n if (count($keyNameList) > 0) {\n $primaryKeySql = \"primary key(\";\n $comma = \"\";\n foreach ($keyNameList as $keyName) {\n $primaryKeySql = \"$primaryKeySql $comma $keyName\";\n $comma = \",\";\n }\n $primaryKeySql = \",$primaryKeySql)\";\n }\n\n //constraints\n $cSql = \"\";\n //we are assuming that there is at least one table. otherwise, the query would fail anyway.\n $comma = \",\";\n foreach ($this->constraints as $c) {\n $cSql .= \" $comma\";\n switch ($c->constraintType) {\n case \"foreign key\":\n $cSql .= \" FOREIGN KEY($c->columnName) REFERENCES $c->referencesTableName($c->referencesColumnName)\";\n break;\n }\n }\n $sql = \"$sql $primaryKeySql $cSql)\";\n return DbManager::nonQuery($sql);\n }", "private function checkOrCreateTable(){\n $this->pdo->query(\"CREATE TABLE IF NOT EXISTS k_UserDean(wp_id BIGINT UNSIGNED PRIMARY KEY, dean_id BIGINT UNSIGNED);\");\n }", "function createTableToTemplates(){\n\n\tglobal $mysqli,$templatesTableName;\n\n\t$create=\"CREATE TABLE IF NOT EXISTS `$templatesTableName` (\n\t `id` int(8) NOT NULL AUTO_INCREMENT,\n\t `clienteName` varchar(100) NOT NULL,\n\t `method` text NOT NULL,\n\t `created` TIMESTAMP,\n\t PRIMARY KEY (`id`)\n\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1\";\t\n\n\tif (!$mysqli->query($create)) {\n\t\tshowErrors();\n\t}\n\treturn true;\n}", "private function prepareTables() {}", "function ensureUsersTable(){\n if($this->connection){\n // create table if it doesn't exist.\n $table = $this->getTableConstant();\n $query_createTable = \"CREATE TABLE IF NOT EXISTS $table (\n `id` INT(5) NOT NULL PRIMARY KEY AUTO_INCREMENT,\n `user` VARCHAR(20) NOT NULL,\n `password` VARCHAR(200) NOT NULL\n )\";\n // prepare the statement\n $statement = $this->connection->prepare($query_createTable);\n // execute the query\n $statement->execute();\n }\n }", "protected function generateTmpTable($firstLine)\n\t{\n\t\t$arrHeadline = $this->getHeadlines($firstLine);\n\n\t\t// Drop existing temp table\n\t\tif($this->Database->tableExists($this->tmpTbl))\n\t\t{\n\t\t\t$this->Database->executeUncached('DROP TABLE '.$this->tmpTbl);\n\t\t\t$this->msg('Table '.$this->tmpTbl.' dropped.','info');\n\t\t}\n\n\t\t// generate temp table\n\t\t$strQry = 'CREATE TABLE `'.$this->tmpTbl.'` (';\n \t\t$strQry .= '`id` int(10) unsigned NOT NULL auto_increment,';\n\t\tforeach($arrHeadline as $row)\n\t\t{\n\t\t\t$strQry .= '`'.$row.'` text NULL,';\n\t\t}\n\n\t\t$strQry .= 'PRIMARY KEY (`id`)';\n\t\t$strQry .= ') ENGINE=MyISAM DEFAULT CHARSET=utf8;';\n\n\t\t$this->Database->executeUncached($strQry);\n\t\t$this->msg('Table '.$this->tmpTbl.' created.','info');\n\t}", "private function populateDummyTable() {}", "protected function storeMappingTablePrepare(): void\n {\n // Create a temporary table with the mapper.\n $this->operationSqls[] = <<<'SQL'\n# Create a temporary table to map values.\nDROP TABLE IF EXISTS `_temporary_mapper`;\nCREATE TABLE `_temporary_mapper` LIKE `value`;\nALTER TABLE `_temporary_mapper`\n DROP `resource_id`,\n ADD `source` longtext COLLATE utf8mb4_unicode_ci\n;\nSQL;\n }", "private function _loadDataToTemporaryTable(){\n\n }", "function tptn_recreate_tables() {\n\tglobal $wpdb;\n\n\t$table_name = $wpdb->base_prefix . 'top_ten';\n\t$table_name_daily = $wpdb->base_prefix . 'top_ten_daily';\n\t$table_name_temp = $table_name . '_temp';\n\t$table_name_daily_temp = $table_name_daily . '_temp';\n\n\t$wpdb->hide_errors();\n\n\t// 1. create temporary tables with the data.\n\t$wpdb->query( \"CREATE TEMPORARY TABLE {$table_name_temp} SELECT * FROM $table_name;\" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t$wpdb->query( \"CREATE TEMPORARY TABLE {$table_name_daily_temp} SELECT * FROM $table_name_daily;\" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\n\t// 2. Drop the tables.\n\t$wpdb->query( \"DROP TABLE $table_name\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\t$wpdb->query( \"DROP TABLE $table_name_daily\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\n\t// 3. Run the activation function which will recreate the tables.\n\ttptn_single_activate();\n\n\t// 4. Reinsert the data from the temporary table.\n\t$sql = \"\n\tINSERT INTO `$table_name` (postnumber, cntaccess, blog_id) (\n\t\tSELECT\n\t\t\tpostnumber,\n\t\t\tcntaccess,\n\t\t\tblog_id\n\t\tFROM `$table_name_temp`\n\t);\n\t\";\n\n\t$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching\n\n\t$sql = \"\n\tINSERT INTO `$table_name_daily` (postnumber, cntaccess, dp_date, blog_id) (\n\t\tSELECT\n\t\t\tpostnumber,\n\t\t\tcntaccess,\n\t\t\tdp_date,\n\t\t\tblog_id\n\t\tFROM `$table_name_daily_temp`\n\t);\n\t\";\n\n\t$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching\n\n\t// 5. Drop the temporary tables.\n\t$wpdb->query( \"DROP TABLE $table_name_temp\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\t$wpdb->query( \"DROP TABLE $table_name_daily_temp\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\n\t$wpdb->show_errors();\n}", "public function create(array $inputs)\n\t{\n\t\t$this->Sale->crate_temp_table($inputs);\n\t}", "private function createTables()\n {\n $this->createConfigsTable();\n $this->createServersTable();\n $this->createSearchesTable();\n }", "public function createTemporaryTable(string $schemaName, string $tableName, array $auditColumns): void\n {\n $sql = new MySqlCompoundSyntaxCodeStore();\n $sql->append(sprintf('create table `%s`.`%s` (', $schemaName, $tableName));\n foreach ($auditColumns as $column)\n {\n $sql->append(sprintf('%s %s', $column['column_name'], $column['column_type']));\n if (end($auditColumns)!==$column)\n {\n $sql->appendToLastLine(',');\n }\n }\n $sql->append(')');\n\n $this->executeNone($sql->getCode());\n }", "public function createTable()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\tif ($app->isSite())\n\t\t{\n\t\t\techo 'Error creating DB table - Need to run this in admin area';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Factory::getUser();\n\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\techo 'Error creating DB table - You need to be superadmin user to exeacute this task';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$jinput = $app->input;\n\t\t$context = $jinput->get->get('context', '', 'cmd');\n\n\t\tif (empty($context))\n\t\t{\n\t\t\techo 'Error creating DB table - No context is passed';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$model = $this->getModel('indexer');\n\t\t$model->createTable($context);\n\t}", "abstract public function createTable();", "function maybe_create_table($table_name, $create_ddl)\n {\n }", "protected function ensureTableExists() {\n try {\n $database_schema = $this->connection->schema();\n $schema_definition = $this->schemaDefinition();\n $database_schema->createTable(static::TABLE_NAME, $schema_definition);\n }\n // If another process has already created the batch table, attempting to\n // recreate it will throw an exception. In this case just catch the\n // exception and do nothing.\n catch (DatabaseException $e) {\n }\n catch (\\Exception $e) {\n return FALSE;\n }\n return TRUE;\n }", "public function createTable() {\n global $database;\n $SQL = \"CREATE TABLE IF NOT EXISTS `\".self::getTableName().\"` ( \".\n \"`src_id` INT(11) NOT NULL AUTO_INCREMENT, \".\n \"`i18n_id` INT(11) NOT NULL DEFAULT '-1', \".\n \"`src_file` VARCHAR(64) NOT NULL DEFAULT '', \".\n \"`src_path` TEXT, \".\n \"`src_module` VARCHAR(64) NOT NULL DEFAULT '', \".\n \"`src_line` INT(11) NOT NULL DEFAULT '-1', \".\n \"`src_status` ENUM('ACTIVE','BACKUP') NOT NULL DEFAULT 'ACTIVE', \".\n \"`src_timestamp` TIMESTAMP, \".\n \"PRIMARY KEY (`src_id`), KEY (`i18n_id`, `src_module`)\".\n \" ) ENGINE=MyIsam AUTO_INCREMENT=1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci\";\n if (null == $database->query($SQL)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n return true;\n }", "function createTable() {\n print \"\\nCreate table: \".$dbtable.\"\\n\";\n if (createDB()) {\n print \"OK\\n\";\n }\n interceptExit();\n }", "function createTable($table){\n // Server Connection Information\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"T3mp12\";\n $dbname = \"temp\";\n \n // Create Connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n } \n\n $sql = \"CREATE TABLE IF NOT EXISTS `$table` (`ID` int(11) NOT NULL AUTO_INCREMENT, `CAMPUS` varchar(20) NOT NULL, `LOCATION` varchar(20) NOT NULL, `DATE` varchar(20) NOT NULL, `TIME` varchar(20) NOT NULL, `TEMP` int(20) NOT NULL, PRIMARY KEY (`ID`)) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8\";\n\n if ($conn->query($sql) === TRUE) {\n // echo \"New Table Created. <br>\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n\n //Close Connection\n $conn->close();\n}", "public static function maybe_create_table() {\n\t\tif ( ! function_exists( 'get_current_screen' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isset( get_current_screen()->id ) && false === strpos( get_current_screen()->id, 'page_smush' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tself::directory_smush_table();\n\t}", "private function _fillTmpTable()\n {\n $sql = new SqlStatement();\n $sql->select()\n ->from(array('p' => 'product'), array('p.*'));\n \n if ($this->subCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->innerJoin(array('cp' => 'category_path'), 'cp.category_id = p2c.category_id')\n ->where('cp.path_id = ?', array($this->subCategory));\n }\n elseif ($this->topCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->where('p2c.category_id = ?', array($this->topCategory));\n }\n \n $searchConditions = $this->_prepareSearchConditions();\n if (count($searchConditions)) {\n $sql->innerJoin(array('pd' => 'product_description'), 'pd.product_id = p.product_id')\n ->multipleWhere($searchConditions, 'OR');\n }\n \n $sql2 = new SqlStatement();\n $sql2->select(array(\n 'p.product_id',\n 'p.price',\n 'discount' => 'MIN(pd2.price)',\n 'special' => 'MIN(ps.price)',\n 'total' => 'AVG(rating)',\n //@fixed_tax\n //@percent_tax\n ))\n ->from(array('p' => $sql))\n ->innerJoin(array('p2s' => 'product_to_store'), 'p.product_id = p2s.product_id')\n ->where('p2s.store_id = ?', (int)$this->config->get('config_store_id'))\n ->where(\"p.status = '1'\")\n ->where('p.date_available <= NOW()')\n ->group(array('p.product_id'));\n \n if (count($this->aggregate)) {\n foreach ($this->aggregate as $type => $group) {\n foreach ($group as $groupId => $values) {\n $tblAlias = strtolower(substr($type, 0, 1)) . $groupId;\n $sql2->innerJoin(array($tblAlias => self::FILTERS_TABLE), 'p.product_id = ' . $tblAlias . '.product_id');\n $sql2->where($tblAlias . '.type = ?', array($type));\n $sql2->where($tblAlias . '.group_id = ?', array($groupId));\n if ($type !== 'STOCK_STATUS') {\n foreach ($values as $k => $val) {\n $values[$k] = '\\'' . $this->db->escape($val) . '\\'';\n }\n $sql2->where($tblAlias . '.value IN (' . implode(', ', $values) . ')');\n } else {\n $terms = array();\n foreach ($values as $stockSt) {\n if ($stockSt == self::$IN_STOCK_STATUS) {\n $terms[] = '(p.quantity > 0 OR p.stock_status_id = ' . self::$IN_STOCK_STATUS . ')';\n } else {\n $terms[] = '(' . $tblAlias . '.value = \\'' . $this->db->escape($stockSt) . '\\' AND p.quantity = 0)';\n }\n }\n\n $sql2->where('(' . implode(' OR ', $terms) . ')');\n }\n }\n }\n }\n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $vals = array();\n if (isset($this->aggregate['OPTION'])) {\n foreach ($this->aggregate['OPTION'] as $values) {\n $vals = array_merge($vals, $values);\n }\n }\n $on = count($vals) \n ? \"p.product_id = pov.product_id AND pov.option_value_id IN (\" . implode(',', $vals) . \")\" \n : \"p.product_id = pov.product_id\";\n \n $sql2->leftJoin(array('pov' => 'product_option_value'), $on)\n ->where('( (pov.quantity IS NULL AND p.quantity > 0) OR pov.quantity > 0 )');\n }\n \n $sql2->leftJoin(array('pd2' => 'product_discount'), \"pd2.product_id = p.product_id \n AND pd2.quantity = '1'\n AND (pd2.date_start = '0000-00-00' OR pd2.date_start < NOW())\n AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())\n AND pd2.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('ps' => 'product_special'), \"ps.product_id = p.product_id \n AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())\n AND (ps.date_start = '0000-00-00' OR ps.date_start < NOW())\n AND ps.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('r1' => 'review'), 'r1.product_id = p.product_id AND r1.status = 1');\n\n if ($this->config->get('config_tax')) {\n $sql2->select(array('fixed_tax', 'percent_tax'))\n ->leftJoin(array('tr1' => $this->subquery->fixedTax), 'tr1.tax_class_id = p.tax_class_id')\n ->leftJoin(array('tr2' => $this->subquery->percentTax), 'tr2.tax_class_id = p.tax_class_id');\n } else {\n $sql2->select(array('fixed_tax' => '0', 'percent_tax' => '0'));\n }\n\n $this->db->query('CREATE TEMPORARY TABLE ' . DB_PREFIX . self::RESULTS_TABLE . ' (PRIMARY KEY (`product_id`)) ' . $sql2);\n }", "function create_temptables($dbcon) {\n global $tmpdir;\n\n $tmp_redes_file = $tmpdir.\"/tmp_redes.csv\";\n $tmp_computador_file = $tmpdir.\"/tmp_computador.csv\";\n $tmp_uorg_file = $tmpdir.\"/tmp_uorg.csv\";\n $tmp_usb_file = $tmpdir.\"/tmp_usb.csv\";\n\n $dbcon->exec(\"DROP TABLE IF EXISTS tmp_redes\");\n $dbcon->exec(\"SELECT @s:=@s+1 id_rede, id_ip_rede, id_local INTO OUTFILE '$tmp_redes_file' FIELDS TERMINATED BY ';' ENCLOSED BY '\\\"' LINES TERMINATED BY '\\n' FROM redes, (SELECT @s:=0) AS s\");\n $dbcon->exec(\"CREATE TABLE tmp_redes (id_rede int(11) NOT NULL, id_ip_rede char(15) NOT NULL, id_local int(11), PRIMARY KEY (id_rede))\");\n $dbcon->exec(\"LOAD DATA INFILE '$tmp_redes_file' INTO TABLE tmp_redes FIELDS TERMINATED BY ';' ENCLOSED BY '\\\"' LINES TERMINATED BY '\\n'\");\n unlink($tmp_redes_file);\n\n $dbcon->exec(\"DROP TABLE IF EXISTS tmp_computador\");\n $dbcon->exec(\"SELECT @s:=@s+1 id_computador, id_so, te_node_address, te_ip INTO OUTFILE '$tmp_computador_file' FIELDS TERMINATED BY ';' ENCLOSED BY '\\\"' LINES TERMINATED BY '\\n' FROM computadores, (SELECT @s:=0) AS s\");\n $dbcon->exec(\"CREATE TABLE tmp_computador (id_computador int(11) NOT NULL, id_so int(11) NOT NULL, te_node_address char(17) NOT NULL, te_ip char(15) DEFAULT NULL, PRIMARY KEY (id_computador))\");\n $dbcon->exec(\"LOAD DATA INFILE '$tmp_computador_file' INTO TABLE tmp_computador FIELDS TERMINATED BY ';' ENCLOSED BY '\\\"' LINES TERMINATED BY '\\n'\");\n unlink($tmp_computador_file);\n\n $dbcon->exec(\"DROP TABLE IF EXISTS tmp_uorg\");\n $dbcon->exec(\"SELECT @s:=@s+1 id_uorg, t.id_uorg1, t.id_uorg1a, t.id_uorg2 INTO OUTFILE '$tmp_uorg_file' FIELDS TERMINATED BY ';' ENCLOSED BY '\\\"' LINES TERMINATED BY '\\n' FROM (SELECT u1.id_unid_organizacional_nivel1 AS id_uorg1, @s1:=NULL id_uorg1a, @s2:=NULL id_uorg2 FROM unid_organizacional_nivel1 u1 UNION ALL SELECT u1.id_unid_organizacional_nivel1 AS id_uorg1, u1a.id_unid_organizacional_nivel1a AS id_uorg1a, @s1:=NULL id_uorg2 FROM unid_organizacional_nivel1a u1a INNER JOIN unid_organizacional_nivel1 u1 ON (u1.id_unid_organizacional_nivel1=u1a.id_unid_organizacional_nivel1) UNION ALL SELECT u1.id_unid_organizacional_nivel1 AS id_uorg1, u1a.id_unid_organizacional_nivel1a AS id_uorg1a, u2.id_unid_organizacional_nivel2 AS id_uorg2 FROM unid_organizacional_nivel2 u2 INNER JOIN unid_organizacional_nivel1a u1a ON (u2.id_unid_organizacional_nivel1a=u1a.id_unid_organizacional_nivel1a) INNER JOIN unid_organizacional_nivel1 u1 ON (u1.id_unid_organizacional_nivel1=u1a.id_unid_organizacional_nivel1)) t, (SELECT @s:=0) AS s\");\n $dbcon->exec(\"CREATE TABLE tmp_uorg (id_uorg int(11) NOT NULL, id_uorg1 int(11) DEFAULT NULL, id_uorg1a int(11) DEFAULT NULL, id_uorg2 int(11) DEFAULT NULL, PRIMARY KEY (id_uorg))\");\n $dbcon->exec(\"LOAD DATA INFILE '$tmp_uorg_file' INTO TABLE tmp_uorg FIELDS TERMINATED BY ';' ENCLOSED BY '\\\"' LINES TERMINATED BY '\\n'\");\n unlink($tmp_uorg_file);\n\n $dbcon->exec(\"DROP TABLE IF EXISTS tmp_usb\");\n $dbcon->exec(\"SELECT COUNT(id_device) AS repeticao, @s:=@s+1 id_usb_device, id_device, id_vendor, nm_device INTO OUTFILE '$tmp_usb_file' FIELDS TERMINATED BY ';' ENCLOSED BY '\\\"' LINES TERMINATED BY '\\n' FROM usb_devices, (SELECT @s:=0) AS s GROUP BY id_device, id_vendor ORDER BY repeticao DESC, id_vendor, id_usb_device\");\n $dbcon->exec(\"CREATE TABLE tmp_usb (repeticao int(2) NOT NULL, id_usb_device int(11) NOT NULL, id_device char(5) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, id_vendor char(5) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, nm_device char(127) NOT NULL, PRIMARY KEY (id_usb_device))\");\n $dbcon->exec(\"LOAD DATA INFILE '$tmp_usb_file' INTO TABLE tmp_usb FIELDS TERMINATED BY ';' ENCLOSED BY '\\\"' LINES TERMINATED BY '\\n'\");\n unlink($tmp_usb_file);\n}", "public function create($fields, $withId = false, $tableName = \"\", $typeText = false, $index = '')\n\t{\n\t\tif (!$tableName)\n\t\t{\n\t\t\t$tableName = uniqid();\n\t\t}\n\t\t$this->tableName = 'temp_' . $tableName;\n\t\n\t\t//sanitize columns\n\t\t$this->setColumns($fields, $withId, $typeText);\n\t\n\t\t$fieldString = \"\";\n\t\tforeach ($this->columns as $col => $type)\n\t\t{\n\t\t\t$fieldString .= \",$col $type\";\n\t\t}\n\t\n\t\t$sql = \"CREATE TEMPORARY TABLE IF NOT EXISTS $this->tableName (\" . substr($fieldString, 1) . ' )';\t\n\t\t\\DB::statement($sql);\n\t\n\t\tif($index)\n\t\t{\n\t\t\t$sql = \"ALTER TABLE {$this->tableName} ADD INDEX ({$index})\";\n\t\t\t\\DB::statement($sql);\n\t\t}\n\t\treturn $this->tableName;\n\t}", "static function create_temp_db() {\n\t\trestore_error_handler();\n\t\t\n\t\t// Create a temporary database\n\t\t$dbConn = DB::getConn();\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\t\t$dbname = strtolower(sprintf('%stmpdb', $prefix)) . rand(1000000,9999999);\n\t\twhile(!$dbname || $dbConn->databaseExists($dbname)) {\n\t\t\t$dbname = strtolower(sprintf('%stmpdb', $prefix)) . rand(1000000,9999999);\n\t\t}\n\n\t\t$dbConn->selectDatabase($dbname);\n\t\t$dbConn->createDatabase();\n\n\t\t$st = new SapphireTest();\n\t\t$st->resetDBSchema();\n\t\t\n\t\t// Reinstate PHPUnit error handling\n\t\tset_error_handler(array('PHPUnit_Util_ErrorHandler', 'handleError'));\n\t\t\n\t\treturn $dbname;\n\t}", "public function initTable()\n\t{\n\t\t$this->db->exec(\"\n\t\t\tCREATE TABLE `cache` (\n\t\t\t `id` varbinary(255) NOT NULL,\n\t\t\t `data` longblob NOT NULL,\n\t\t\t `date_expire` datetime DEFAULT NULL,\n\t\t\t INDEX date_expire_idx (date_expire),\n\t\t\t PRIMARY KEY (`id`)\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\t\t\");\n\t}", "public function createTable() {\n global $database;\n $SQL = \"CREATE TABLE IF NOT EXISTS `\".self::getTableName().\"` ( \".\n \"`trans_id` INT(11) NOT NULL AUTO_INCREMENT, \".\n \"`i18n_id` INT(11) NOT NULL DEFAULT '-1', \".\n \"`trans_language` VARCHAR(2) NOT NULL DEFAULT 'EN', \".\n \"`trans_translation` TEXT, \".\n \"`trans_usage` ENUM('TEXT','MESSAGE','ERROR','HINT','LABEL','BUTTON') NOT NULL DEFAULT 'TEXT', \".\n \"`trans_type` ENUM('REGULAR','CUSTOM') NOT NULL DEFAULT 'REGULAR', \".\n \"`trans_status` ENUM('ACTIVE','BACKUP') NOT NULL DEFAULT 'ACTIVE', \".\n \"`trans_author` VARCHAR(64) NOT NULL DEFAULT '- unknown -', \".\n \"`trans_quality` FLOAT NOT NULL DEFAULT '0', \".\n \"`trans_is_empty` TINYINT NOT NULL DEFAULT '0', \".\n \"`trans_timestamp` TIMESTAMP, \".\"PRIMARY KEY (`trans_id`), KEY (`i18n_id`, `trans_language`)\".\n \" ) ENGINE=MyIsam AUTO_INCREMENT=1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci\";\n if (null == $database->query($SQL)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n return true;\n }", "public static function create_tables() {\n Site::create_table();\n Membership_Area::create_table();\n Restricted_Content::create_table();\n User::create_table();\n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '$this->table_name'\" ) == $this->table_name ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\tuser_id bigint(20) NOT NULL,\n\t\tusername varchar(50) NOT NULL,\n\t\temail varchar(50) NOT NULL,\n\t\tname mediumtext NOT NULL,\n\t\tproduct_count bigint(20) NOT NULL,\n\t\tsales_value mediumtext NOT NULL,\n\t\tsales_count bigint(20) NOT NULL,\n\t\tstatus mediumtext NOT NULL,\n\t\tnotes longtext NOT NULL,\n\t\tdate_created datetime NOT NULL,\n\t\tPRIMARY KEY (id),\n\t\tUNIQUE KEY email (email),\n\t\tKEY user (user_id)\n\t\t) CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( $this->table_name . '_db_version', $this->version );\n\t}", "function CreateTable($tableName, $tableDefinition)\n{\n $stmt = SQL_CREATE_TABLE . \" IF NOT EXISTS $tableName ($tableDefinition);\";\n return mysql_query($stmt);\n}", "protected function createTables()\n {\n $sql = $this->create_table;\n $this->connection->query($sql);\n\n // create again in schema 2\n $sql = str_replace($this->table, \"{$this->schema2}.{$this->table}\", $sql);\n $this->connection->query($sql);\n }", "protected function createTestTables()\n {\n $db = $this->getDb();\n\n $table = 'EmailTemplateAr';\n $columns = [\n 'id' => 'pk',\n 'name' => 'string',\n 'subject' => 'string',\n 'bodyHtml' => 'text',\n ];\n $db->createCommand()->createTable($table, $columns)->execute();\n\n $columns = [\n 'name' => 'TestActiveMessage',\n 'subject' => 'test subject',\n 'bodyHtml' => 'test body HTML',\n ];\n $db->createCommand()->insert($table, $columns)->execute();\n }", "function fillTable(): void\n{\n $sql = '\n SET autocommit=0; \n SET unique_checks=0;\n SET foreign_key_checks=0;\n INSERT INTO `products` (name, price, color) VALUES ' . generateTableData(1000001) . ';\n SET unique_checks=1;\n SET foreign_key_checks=1;\n COMMIT;\n ';\n\n DB::getInstance()->query($sql);\n}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\tname text NOT NULL,\n\t\t\tdate_created datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tstatus text NOT NULL,\n\t\t\tical_hash text NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}", "public function createUsersTable()\n {\n $query = \"CREATE TABLE IF NOT EXISTS users (\n id INT(4) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n firstname VARCHAR(30),\n lastname VARCHAR(30)\n )\";\n \n $this->execQuery($query);\n return true;\n }", "private function prepareSchema()\n {\n $connection = Yii::app()->db;\n if ($connection->schema->getTable($this->table)) {\n try {\n $this->dropTableIfExist($connection, $this->tableMemory);\n $connection->createCommand('CREATE TABLE ' . $connection->quoteTableName($this->tableMemory) . ' LIKE ' . $connection->quoteTableName($this->table) . ';')->execute();\n $connection->createCommand('ALTER TABLE ' . $connection->quoteTableName($this->tableMemory) . ' ENGINE=MEMORY;')->execute();\n return true;\n } catch (Exception $e) {\n $this->dropTableIfExist($connection, $this->tableMemory);\n Yii::log('Schema preparation error: ' . print_r($e->getMessage(), true), 'error', 'extensions.CodMtfs.Mtfs');\n }\n } else {\n Yii::log('Nothing to copy.', 'error', 'extensions.CodMtfs.Mtfs');\n }\n return false;\n }", "private function getTempTableName()\n\t{\n\t\treturn 'temp_moveDelinquentToCollectionsRework_application';\n\t}", "public function createTable( $table ) {\n\t\t$rawTable = $this->safeTable($table,true);\n\t\t$table = $this->safeTable($table);\n\n\t\t$sql = ' CREATE TABLE '.$table.' (\n \"id\" integer AUTO_INCREMENT,\n\t\t\t\t\t CONSTRAINT \"pk_'.$rawTable.'_id\" PRIMARY KEY(\"id\")\n\t\t )';\n\t\t$this->adapter->exec( $sql );\n\t}", "protected function createTable() {\n $this->db->initializeQuery();\n $query = \"\nCREATE TABLE `items` (\n`id`INTEGER,\n`name`TEXT,\n`price`REAL,\nPRIMARY KEY(`id`)\n);\n\";\n\n $r = $this->db->q->Expr($query)->execute($this->db->c);\n \n }", "public function create_temp_table(array $inputs)\n {\n if (empty($inputs['receiving_id'])) {\n if (empty($this->config->item('date_or_time_format'))) {\n $where = 'WHERE DATE(receiving_time) BETWEEN ' . $this->db->escape($inputs['start_date']) . ' AND ' . $this->db->escape($inputs['end_date']);\n } else {\n $where = 'WHERE receiving_time BETWEEN ' . $this->db->escape(rawurldecode($inputs['start_date'])) . ' AND ' . $this->db->escape(rawurldecode($inputs['end_date']));\n }\n } else {\n $where = 'WHERE receivings_items.receiving_id = ' . $this->db->escape($inputs['receiving_id']);\n }\n\n $this->db->query('CREATE TEMPORARY TABLE IF NOT EXISTS ' . $this->db->dbprefix('receivings_items_temp') .\n ' (INDEX(receiving_date), INDEX(receiving_time), INDEX(receiving_id))\n\t\t\t(\n\t\t\t\tSELECT \n\t\t\t\t\tMAX(DATE(receiving_time)) AS receiving_date,\n\t\t\t\t\tMAX(receiving_time) AS receiving_time,\n\t\t\t\t\treceivings_items.receiving_id,\n\t\t\t\t\tMAX(comment) AS comment,\n\t\t\t\t\tMAX(item_location) AS item_location,\n\t\t\t\t\tMAX(reference) AS reference,\n\t\t\t\t\tMAX(payment_type) AS payment_type,\n\t\t\t\t\tMAX(employee_id) AS employee_id, \n\t\t\t\t\titems.item_id,\n\t\t\t\t\tMAX(receivings.consignmenter_id) AS consignmenter_id,\n\t\t\t\t\tMAX(quantity_purchased) AS quantity_purchased,\n\t\t\t\t\tMAX(receivings_items.receiving_quantity) AS receiving_quantity,\n\t\t\t\t\tMAX(item_cost_price) AS item_cost_price,\n\t\t\t\t\tMAX(item_unit_price) AS item_unit_price,\n\t\t\t\t\tMAX(discount) AS discount,\n\t\t\t\t\tMAX(fee) AS fee,\n\t\t\t\t\tdiscount_type as discount_type,\n\t\t\t\t\treceivings_items.line,\n\t\t\t\t\tMAX(serialnumber) AS serialnumber,\n\t\t\t\t\tMAX(receivings_items.description) AS description,\n\t\t\t\t\tMAX(CASE WHEN receivings_items.discount_type = ' . PERCENT . ' THEN item_unit_price * quantity_purchased * receivings_items.receiving_quantity - item_unit_price * quantity_purchased * receivings_items.receiving_quantity * discount / 100 + item_unit_price * quantity_purchased * receivings_items.receiving_quantity * fee / 100 ELSE item_unit_price * quantity_purchased * receivings_items.receiving_quantity - discount + item_unit_price * quantity_purchased * receivings_items.receiving_quantity * fee / 100 END) AS subtotal,\n\t\t\t\t\tMAX(CASE WHEN receivings_items.discount_type = ' . PERCENT . ' THEN item_unit_price * quantity_purchased * receivings_items.receiving_quantity - item_unit_price * quantity_purchased * receivings_items.receiving_quantity * discount / 100 + item_unit_price * quantity_purchased * receivings_items.receiving_quantity * fee / 100 ELSE item_unit_price * quantity_purchased * receivings_items.receiving_quantity - discount + item_unit_price * quantity_purchased * receivings_items.receiving_quantity * fee / 100 END) AS total,\n\t\t\t\t\tMAX((CASE WHEN receivings_items.discount_type = ' . PERCENT . ' THEN item_unit_price * quantity_purchased * receivings_items.receiving_quantity - item_unit_price * quantity_purchased * receivings_items.receiving_quantity * discount / 100 + item_unit_price * quantity_purchased * receivings_items.receiving_quantity * fee / 100 ELSE item_unit_price * quantity_purchased * receivings_items.receiving_quantity - discount + item_unit_price * quantity_purchased * receivings_items.receiving_quantity * fee END) - (item_cost_price * quantity_purchased)) AS profit,\n\t\t\t\t\tMAX(item_cost_price * quantity_purchased * receivings_items.receiving_quantity ) AS cost\n\t\t\t\tFROM ' . $this->db->dbprefix('receivings_items') . ' AS receivings_items\n\t\t\t\tINNER JOIN ' . $this->db->dbprefix('receivings') . ' AS receivings\n\t\t\t\t\tON receivings_items.receiving_id = receivings.receiving_id\n\t\t\t\tINNER JOIN ' . $this->db->dbprefix('items') . ' AS items\n\t\t\t\t\tON receivings_items.item_id = items.item_id\n\t\t\t\t' . \"\n\t\t\t\t$where\n\t\t\t\t\" . '\n\t\t\t\tGROUP BY receivings_items.receiving_id, items.item_id, receivings_items.line\n\t\t\t)'\n );\n }", "public function test_create_table()\n\t{\n\t\t$handler = DB::handler( 'phpunit_sqlite' );\n\t\t\n\t\t$handler->run( \"DROP TABLE IF EXISTS people\" );\n\t\t\n\t\t$handler->run( \n\t\t\"CREATE TABLE people ( \n\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT, \n\t\t\tname VARCHAR, \n\t\t\tage INTEGER\n\t\t);\");\n\t}", "protected function RetCreateTable() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: Table not properly provided in QueryHelper.\");\n }\n\n $return = \"CREATE\";\n\n if ($this->\n temporary == 'T' ||\n $this->\n temporary == 'G') {\n\n $return .= \" TEMPORARY\";\n }\n\n $return .= \" TABLE\";\n\n if (isset($this->\n addArgs['notexists']) &&\n $this->\n addArgs['notexists'] === true) {\n\n $return .= \" IF NOT EXISTS\";\n }\n\n $columnsDefn = [];\n $primaryKeys = [];\n $indexes = [];\n $primaryKeysDefn = \"\";\n $indexesDefn = \"\";\n\n $indexesArr = $this->\n indexes;\n\n foreach ($this->\n columns as $column => $parms) {\n\n $parms['type'] = strtoupper($parms['type']);\n\n if (!isset($parms['type']) ||\n !is_string($parms['type']) ||\n !$parms['type']) {\n\n $parms['type'] = 'VARCHAR';\n\n $parms['length'] = !isset($parms['length']) ||\n !is_int($parms['length']) ||\n $parms['length'] < 1 ? 1 : $parms['length'];\n }\n\n $type = $parms['type'];\n\n if (isset($parms['length']) &&\n is_int($parms['length']) &&\n $parms['length'] > 0) {\n\n $type .= \"({$parms['length']})\";\n }\n\n $columnsDefn[$column] = \"`{$column}` {$type}\";\n\n if (isset($parms['isnull']) &&\n $parms['isnull'] === false) {\n\n $columnsDefn[$column] .= \" NOT null\";\n }\n\n if (isset($parms['autoincrement']) &&\n $parms['autoincrement'] === true) {\n\n $columnsDefn[$column] .= \" AUTO_INCREMENT\";\n }\n\n if (isset($parms['default']) &&\n $parms['default']) {\n\n if (isset($parms['default']['function']) &&\n $parms['default']['function']) {\n\n $columnsDefn[$column] .= \" DEFAULT {$parms['default']['function']}\";\n } else if (is_string($parms['default'])) {\n\n $columnsDefn[$column] .= \" DEFAULT '{$parms['default']}'\";\n }\n }\n\n if (isset($parms['primary']) &&\n $parms['primary'] === true) {\n\n $primaryKeys[] = $column;\n }\n\n if (isset($parms['unique']) &&\n $parms['unique'] === true) {\n\n $columnsDefn[$column] .= \" UNIQUE\";\n }\n\n if (isset($parms['index']) &&\n $parms['index'] === true) {\n\n $columnsDefn[$column] .= \" INDEX\";\n }\n\n if (isset($parms['referencetable']) &&\n isset($parms['referencecolumn']) &&\n is_string($parms['referencetable']) &&\n is_string($parms['referencecolumn'])) {\n\n $columnsDefn[$column] .= \" REFERENCES `{$parms['referencetable']}` (`{$parms['referencecolumn']}`)\";\n }\n\n if (isset($parms['check']) &&\n is_string($parms['check'])) {\n\n $indexesArr[] = array(\n 'indextype' => 'CH',\n 'check' => $parms['check']\n );\n }\n }\n\n if (count($primaryKeys) == 1) {\n\n $columnsDefn[$primaryKeys[0]] .= \" PRIMARY KEY\";\n } else if (count($primaryKeys) > 1) {\n\n $primaryKeysDefn = \", PRIMARY KEY (`\" . implode($primaryKeys, \"`, `\") . \"`)\";\n }\n\n foreach ($indexesArr as $index => $parms) {\n\n $indexDefn = \"\";\n $indexName = \"\";\n\n if (is_string($index)) {\n\n $indexName = \" `{$index}`\";\n }\n\n if (!isset($parms['indextype'])) {\n\n $parms['indextype'] = 'I';\n }\n\n $parms['indextype'] = strtoupper($parms['indextype']);\n\n switch ($parms['indextype']) {\n default:\n case 'I':\n $indexDefn .= \"INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'K':\n $indexDefn .= \"KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'U':\n $indexDefn .= \"UNIQUE{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'UK':\n $indexDefn .= \"UNIQUE KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'UI':\n $indexDefn .= \"UNIQUE INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FK':\n if (is_string($index)) {\n\n $indexDefn .= \"CONSTRAINT{$indexName} FOREIGN KEY (`\" . implode($parms['columns'], \"`, `\") . \"`) REFERENCES `{$parms['referencetable']}` (`\" . implode($parms['referencecolumns'], \"`, `\") . \"`)\";\n } else {\n\n $indexDefn .= \"FOREIGN KEY (`\" . implode($parms['columns'], \"`, `\") . \"`) REFERENCES `{$parms['referencetable']}` (`\" . implode($parms['referencecolumns'], \"`, `\") . \"`)\";\n }\n break;\n case 'FT':\n $indexDefn .= \"FULLTEXT{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FTK':\n $indexDefn .= \"FULLTEXT KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FTI':\n $indexDefn .= \"FULLTEXT INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'S':\n $indexDefn .= \"SPATIAL{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'SK':\n $indexDefn .= \"SPATIAL KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'SI':\n $indexDefn .= \"SPATIAL INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'CH':\n $indexDefn .= \"CHECK{$indexName} {$parms['check']}\";\n break;\n }\n\n $indexes[] = $indexDefn;\n }\n\n if (count($indexes)) {\n $indexesDefn = \", \" . implode($indexes, \", \");\n }\n\n $return .= \" `{$this->\n tables[0]}` (\" . implode($columnsDefn, \", \") . \"{$primaryKeysDefn}{$indexesDefn})\";\n\n return $return . \";\";\n }", "function _createCacheTable(){\n\t\t$res = mysql_query(\"create table IF NOT EXISTS `\".addslashes($this->tableName).\"`(\n\t\t\t`GenID` INT(11) auto_increment,\n\t\t\t`PageID` VARCHAR(64),\n\t\t\t`Language` CHAR(2),\n\t\t\t`UserID` VARCHAR(32),\n\t\t\t`Dependencies` TEXT,\n\t\t\t`LastModified` TIMESTAMP,\n\t\t\t`Expires` DateTime,\n\t\t\t`Data` LONGTEXT,\n\t\t\t`Data_gz` LONGBLOB,\n\t\t\t`Headers` TEXT,\n\t\t\tPRIMARY KEY (`GenID`),\n\t\t\tINDEX `LookupIndex` (`Language`,`UserID`,`PageID`)\n\t\t\t)\", $this->app->db());\n\t\tif ( !$res ){\n\t\t\treturn PEAR::raiseError('Could not create cache table: '.mysql_error($this->app->db()));\n\t\t}\t\n\t\t\n\t}", "public function create_missing_tables() {\n\n\t\t/* Create the network snippets table if it doesn't exist */\n\t\tif ( is_multisite() && ! self::table_exists( $this->ms_table ) ) {\n\t\t\t$this->create_table( $this->ms_table );\n\t\t}\n\n\t\t/* Create the table if it doesn't exist */\n\t\tif ( ! self::table_exists( $this->table ) ) {\n\t\t\t$this->create_table( $this->table );\n\t\t}\n\t}", "function createTable($mifix = \"\", $data_table, $params = array(), $debug = FALSE)\n\t\t{\n\t\t\t$c = new rex_sql;\n\t\t\t$c->debugsql = $debug;\n\t\t\t$c->setQuery('CREATE TABLE IF NOT EXISTS `'.$data_table.'` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY );');\n\n\t\t\t// Tabellenset in die Basics einbauen, wenn noch nicht vorhanden\n\t\t\t$c = new rex_sql;\n\t\t\t$c->debugsql = $debug;\n\t\t\t$c->setQuery('DELETE FROM rex_'.$mifix.'_table where table_name=\"'.$data_table.'\"');\n\t\t\t$c->setTable('rex_'.$mifix.'_table');\n\n\t\t\t$params[\"table_name\"] = $data_table;\n\t\t\tif(!isset($params[\"status\"])) { $params[\"status\"] = 1; }\n\t\t\tif(!isset($params[\"name\"])) { $params[\"name\"] = 'Tabelle \"'.$data_table.'\"'; }\n\t\t\tif(!isset($params[\"prio\"])) { $params[\"prio\"] = 100; }\n\t\t\tif(!isset($params[\"search\"])) { $params[\"search\"] = 0; }\n\t\t\tif(!isset($params[\"hidden\"])) { $params[\"hidden\"] = 0; }\n\t\t\tif(!isset($params[\"export\"])) { $params[\"export\"] = 0; }\n\n\t\t\tforeach($params as $k => $v) { $c->setValue($k, $v); }\n\t\t\t$c->insert();\n\n\t\t\treturn TRUE;\n\n\t\t}", "function createTables()\n {\n $sqls = $this->simplexmlObject->xpath(\"//table\");\n foreach($sqls as $sql) {\n try {\n $db = $this->getConnection();\n $db->exec($sql);\n $tablename = $sql->getName();\n print(\"Created $tablename table.\\n\");\n $this->closeConnection($db, $sql);\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }\n \n }", "protected function createTable() {\n\t\t$query = \"\n\t\tCREATE TABLE `items` (\n\t\t\t`id`\tINTEGER,\n\t\t\t`firstName`\tTEXT,\n\t\t\t`lastName`\tTEXT,\n\t\t\t`address`\tTEXT,\n\t\t\t'occupation' TEXT,\n\t\t\tPRIMARY KEY(`id`)\n\t\t);\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}", "public function createTable() {\n global $database;\n $SQL = \"CREATE TABLE IF NOT EXISTS `\".self::getTableName().\"` ( \".\n \"`lang_id` INT(11) NOT NULL AUTO_INCREMENT, \".\n \"`lang_iso` VARCHAR(2) NOT NULL DEFAULT 'nn', \".\n \"`lang_local` VARCHAR(64) NOT NULL DEFAULT '-undefined-', \".\n \"`lang_english` VARCHAR(64) NOT NULL DEFAULT '-undefined-', \".\n \"PRIMARY KEY (`lang_id`), KEY (`lang_iso`, `lang_english`)\".\n \" ) ENGINE=MyIsam AUTO_INCREMENT=1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci\";\n if (null == $database->query($SQL)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n return true;\n }", "function create()\n {\n $this->definitions['columns'] =& $this->columns;\n return $this->connection->create_table($this->name, $this->definitions);\n }", "protected function createMigrationTable()\n {\n $migration_table = $this->config_file->getMigrationTable();\n\n $resource = $this->db_adapter->query(\"\n CREATE TABLE $this->migration_table (\n file VARCHAR PRIMARY KEY,\n ran_at TIMESTAMP DEFAULT NOW()\n );\n \");\n }", "public function createSchemaTable();", "public function createTable(bool $dropTableIfExists = false) : bool {\n\t\tif ($dropTableIfExists) {\n\t\t\t$this->database->query('DROP TABLE if EXISTS ' . $this->tableNamePrefixed);\n\t\t}\n\n\t\t$query = 'CREATE TABLE ' . $this->tableNamePrefixed . ' (';\n\t\t$count = 1;\n\t\tforeach ($this->propertyProps as $propertyProp) {\n\t\t\t$query .= $this->helperQuery->getCreateQueryForProperty($propertyProp);\n\t\t\t$query .= $count < count($this->propertyProps) ? ',' : '';\n\t\t\t$count++;\n\t\t}\n\t\tif ($this->primaryKey) {\n\t\t\t$query .= ',PRIMARY KEY (' . $this->propertyMap[$this->primaryKey] . ')';\n\t\t}\n\t\t$query .= ' );';\n\n\t\t$this->database->query($query);\n\n\t\treturn true;\n\t}", "function postCreateTable(){\n\t}", "function createTable($objSchema);", "function create_receivings_items_temp_table()\n\t{\n\t\t$this->db->query(\"CREATE TEMPORARY TABLE IF NOT EXISTS \".$this->db->dbprefix('receivings_items_temp').\"\n\t\t(SELECT date(receiving_time) as receiving_date, \".$this->db->dbprefix('receivings_items').\".receiving_id, comment, item_location, invoice_number, payment_type, employee_id,\n\t\t\".$this->db->dbprefix('items').\".item_id, \".$this->db->dbprefix('receivings').\".supplier_id, quantity_purchased, \".$this->db->dbprefix('receivings_items').\".receiving_quantity,\n\t\titem_cost_price, item_unit_price, discount_percent, (item_unit_price*quantity_purchased-item_unit_price*quantity_purchased*discount_percent/100) as subtotal,\n\t\t\".$this->db->dbprefix('receivings_items').\".line as line, serialnumber, \".$this->db->dbprefix('receivings_items').\".description as description,\n\t\t(item_unit_price*quantity_purchased-item_unit_price*quantity_purchased*discount_percent/100) as total,\n\t\t(item_unit_price*quantity_purchased-item_unit_price*quantity_purchased*discount_percent/100) - (item_cost_price*quantity_purchased) as profit,\n\t\t(item_cost_price*quantity_purchased) as cost\n\t\tFROM \".$this->db->dbprefix('receivings_items').\"\n\t\tINNER JOIN \".$this->db->dbprefix('receivings').\" ON \".$this->db->dbprefix('receivings_items').'.receiving_id='.$this->db->dbprefix('receivings').'.receiving_id'.\"\n\t\tINNER JOIN \".$this->db->dbprefix('items').\" ON \".$this->db->dbprefix('receivings_items').'.item_id='.$this->db->dbprefix('items').'.item_id'.\"\n\t\tGROUP BY receiving_id, item_id, line)\");\n\t}", "protected function createCacheTables() {}", "function lti_maybe_create_db() {\n\tglobal $wpdb;\n\n\tget_lti_hash(); // initialise the remote login hash\n\n\t$wpdb->ltitable = $wpdb->base_prefix . 'lti';\n\tif ( lti_site_admin() ) {\n\t\t$created = 0;\n\t\tif ( $wpdb->get_var(\"SHOW TABLES LIKE '{$wpdb->ltitable}'\") != $wpdb->ltitable ) {\n\t\t\t$wpdb->query( \"CREATE TABLE IF NOT EXISTS `{$wpdb->ltitable}` (\n\t\t\t\t`id` bigint(20) NOT NULL auto_increment,\n\t\t\t\t`consumer_key` varchar(255) NOT NULL,\n\t\t\t\t`secret` varchar(255) NOT NULL,\n\t\t\t\t`active` tinyint(4) default '1',\n\t\t\t\tPRIMARY KEY (`id`)\n\t\t\t);\" );\n\t\t\t$created = 1;\n\t\t}\n\t\tif ( $created ) {\n\t\t\t?> <div id=\"message\" class=\"updated fade\"><p><strong><?php _e( 'LTI database table created.', 'wordpress-mu-lti' ) ?></strong></p></div> <?php\n\t\t}\n\t}\n\n}", "public function testTableIsCreated()\n {\n $this->assertFalse($this->connection->tableExists('insight_accounts'));\n $this->insight->getTableName('accounts');\n $this->assertTrue($this->connection->tableExists('insight_accounts'));\n }", "function createTable(){\n \n $conn = $this->connect();\n \n $sql = 'CREATE TABLE IF NOT EXISTS ' . $this->dbtable . \n\t\t\t\t\t'( codigo INTEGER NOT NULL AUTO_INCREMENT, email VARCHAR(100), CONSTRAINT pk_' . $this->dbtable . \n\t\t\t\t\t' PRIMARY KEY (codigo)) ENGINE=INNODB CHARSET=utf8';\n $ret = mysql_query( $sql, $conn);\n mysql_close( $conn );\n\t\t\treturn $ret;\n }", "public function createTable( $table ) {\n\t\t$idfield = $this->getIDfield($table, true);\n\t\t$table = $this->safeTable($table);\n\t\t$sql = \"\n CREATE TABLE $table ( $idfield INTEGER PRIMARY KEY AUTOINCREMENT )\n\t\t\t\t \";\n\t\t$this->adapter->exec( $sql );\n\t}", "public function createTable() {\n global $database;\n $SQL = \"CREATE TABLE IF NOT EXISTS `\".self::getTableName().\"` ( \".\n \"`i18n_id` INT(11) NOT NULL AUTO_INCREMENT, \".\n \"`i18n_key` TEXT, \".\n \"`i18n_description` TEXT, \".\n \"`i18n_status` ENUM('ACTIVE','BACKUP','IGNORE') NOT NULL DEFAULT 'ACTIVE', \".\n \"`i18n_last_sync` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', \".\n \"`i18n_timestamp` TIMESTAMP, \".\"PRIMARY KEY (`i18n_id`)\".\n \" ) ENGINE=MyIsam AUTO_INCREMENT=1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci\";\n if (null == $database->query($SQL)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n return true;\n }", "private function createDBTables(){\n\t\tif (!$this['db']->getSchemaManager()->tablesExist('bookings')){\n\t\t\t$this['db']->executeQuery(\"CREATE TABLE bookings (\n\t\t\t\tid INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tfirstName VARCHAR(40) NOT NULL,\n\t\t\t\tlastName VARCHAR(40) NOT NULL,\n\t\t\t\tphone VARCHAR(10) NOT NULL,\n\t\t\t\temail VARCHAR(20) DEFAULT NULL,\n\t\t\t\tbirthday DATE NOT NULL,\n\t\t\t\tstartDate DATE NOT NULL,\n\t\t\t\tendDate DATE NOT NULL,\n\t\t\t\tarrivalTime TIME DEFAULT NULL,\n\t\t\t\tadditionalInformation TEXT,\n\t\t\t\tnrOfPeople INT NOT NULL,\n\t\t\t\tpayingMethod VARCHAR(10) NOT NULL\n\t\t\t\t);\");\n\t\t}\n\t}", "private function createTemporaryFile()\n {\n return $this->temp[] = tempnam(sys_get_temp_dir(), 'sqon-');\n }", "static function create_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\t$dbname = 'tmpdb' . rand(1000000,9999999);\n\t\twhile(!$dbname || $dbConn->databaseExists($dbname)) {\n\t\t\t$dbname = 'tmpdb' . rand(1000000,9999999);\n\t\t}\n\t\t\n\t\t$dbConn->selectDatabase($dbname);\n\t\t$dbConn->createDatabase();\n\n\t\t$dbadmin = new DatabaseAdmin();\n\t\t$dbadmin->doBuild(true, false, true);\n\t\t\n\t\treturn $dbname;\n\t}", "public function createTable()\n {\n $this->dbInstance->query(\"CREATE TABLE IF NOT EXISTS Image\n (\n ImageID int NOT NULL AUTO_INCREMENT,\n Name varchar(255) NOT NULL,\n File varchar(255) NOT NULL,\n Thumb varchar(255) NOT NULL,\n uploadDate DATETIME DEFAULT CURRENT_TIMESTAMP,\n UserFK int,\n PRIMARY KEY (ImageID),\n FOREIGN KEY (UserFK) REFERENCES User(UserID) ON DELETE CASCADE\n )\n \");\n }", "function createTable($ctx){\r\n\t\t$create =\r\n 'CREATE TABLE IF NOT EXISTS `'.$ctx.'` ('.\r\n '`key` VARCHAR( 60 ) NOT NULL ,'.\r\n '`willExpireAt` int NOT NULL DEFAULT 0 ,'.\r\n\t\t'`lastModified` int NOT NULL DEFAULT 0, '.\r\n '`content` TEXT NULL ,PRIMARY KEY ( `key` ));';\r\n\r\n\t\tif(strlen($this->stm['before_create']) > 0 ){\r\n\t\t\t$this->db->Execute($this->stm['before_create'], array()) or die();\r\n\t\t}\r\n\t\t$dict = NewDataDictionary($this->db);\r\n\t\t$x = $dict->ExecuteSQLArray(array($create)) or die();\r\n\t\treturn $x;\r\n\t}", "public function createTable()\n {\n $sql = \"\n CREATE TABLE IF NOT EXISTS `\".self::TABLE.\"`(\n `migration` VARCHAR(20) NOT NULL,\n `up` VARCHAR(1000) NOT NULL,\n `down` VARCHAR(1000) NOT NULL\n ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;\n \";\n\n $this->adapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n }", "public function createTable($schema, $waitTillFinish = false)\n {\n $success = $this->query($schema, 'createTable');\n if ($waitTillFinish) {\n $this->client->waitUntilTableExists(array(\n 'TableName' => Assoc::get($schema, 'TableName')\n ));\n }\n return $success;\n\n }", "protected function createTables() {\n $foreignKeys = array();\n $this->sortTableQueue($this->_tableCreateQueue, $foreignKeys);\n foreach($this->_tableCreateQueue as $table => $fields) {\n $this->createTable($table, $fields);\n }\n foreach($foreignKeys as $table => $columns) {\n $this->useTable($table);\n foreach($columns as $column => $module) {\n $this->useColumn($column.\"_id\");\n $this->toForeignKey($module.\"_\".$column);\n }\n }\n $this->_tableCreateQueue = array();\n }", "private static function create_tables() {\n\t\t// phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.sqliteRemoved -- False positive.\n\t\tself::$dbo = new \\SQLite3( WP_CLI_SNAPSHOT_DB );\n\n\t\t// Create snapshots table.\n\t\t$snapshots_table_query = 'CREATE TABLE IF NOT EXISTS snapshots (\n\t\t\tid INTEGER,\n\t\t\tname VARCHAR,\n\t\t\tcreated_at DATETIME,\n\t\t\tbackup_type INTEGER DEFAULT 0,\n\t\t\tbackup_zip_size VARCHAR,\n\t\t\tPRIMARY KEY (id)\n\t\t);';\n\t\tself::$dbo->exec( $snapshots_table_query );\n\n\t\t// Create snapshot_extra_info table.\n\t\t$extra_info_table_query = 'CREATE TABLE IF NOT EXISTS snapshot_extra_info (\n\t\t\tid INTEGER,\n\t\t\tinfo_key VARCHAR,\n\t\t\tinfo_value VARCHAR,\n\t\t\tsnapshot_id INTEGER,\n\t\t\tPRIMARY KEY (id)\n\t\t);';\n\t\tself::$dbo->exec( $extra_info_table_query );\n\n\t\t// Create storage_credentials table.\n\t\t$storage_credentials_table_query = 'CREATE TABLE IF NOT EXISTS snapshot_storage_credentials (\n\t\t\tid INTEGER,\n\t\t\tstorage_service VARCHAR,\n\t\t\tinfo_key VARCHAR,\n\t\t\tinfo_value VARCHAR,\n\t\t\tPRIMARY KEY (id)\n\t\t);';\n\t\tself::$dbo->exec( $storage_credentials_table_query );\n\n\t}", "protected function createLoadTables()\n {\n // foreach table, replace it with an empty table\n $tables = $this->schema->getTables();\n foreach ($tables as $table) {\n $this->dbcon->replaceTable($table);\n\n $msg = \"Created table '\".$table->name.\"'\";\n\n // If this table uses the Lookup table, create a view\n if ($table->usesLookup === true) {\n $this->dbcon->replaceLookupView($table, $this->schema->getLookupTable());\n $msg .= '; Lookup table created';\n }\n\n $this->log($msg);\n }\n return true;\n }", "static function create_tables(){\n\t\t$tables = self::get_tables_name();\n\t\textract($tables);\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $cookie(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL,\n\t\t\t\taction varchar(30) NOT NULL\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $display(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL\t\t\t\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\tif(!function_exists('dbDelta')) :\n\t\t\tinclude ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tendif;\n\t\tforeach($sql as $s){\n\t\t\tdbDelta($s);\n\t\t}\n\t\t\n\t}", "function mmrpg_get_create_table_sql($table_name, $table_settings, $use_prod_if_available = false){\n if (!isset($table_settings['export_table']) || $table_settings['export_table'] !== true){ return false; }\n global $db, $table_def_sql_template;\n $table_name_string = \"`{$table_name}`\";\n if ($use_prod_if_available\n && defined('MMRPG_CONFIG_PULL_LIVE_DATA_FROM')\n && MMRPG_CONFIG_PULL_LIVE_DATA_FROM !== false){\n $prod_db_name = 'mmrpg_'.(defined('MMRPG_CONFIG_IS_LIVE') && MMRPG_CONFIG_IS_LIVE === true ? 'live' : 'local');\n $prod_db_name .= '_'.MMRPG_CONFIG_PULL_LIVE_DATA_FROM;\n $table_name_string = \"`{$prod_db_name}`.{$table_name_string}\";\n }\n $table_def_sql = $db->get_value(\"SHOW CREATE TABLE {$table_name_string};\", 'Create Table');\n $table_def_sql = preg_replace('/(\\s+AUTO_INCREMENT)=(?:[0-9]+)(\\s+)/', '$1=0$2', $table_def_sql);\n $table_def_sql = preg_replace('/^CREATE TABLE `/', 'CREATE TABLE IF NOT EXISTS `', $table_def_sql);\n $table_def_sql = rtrim($table_def_sql, ';').';';\n $final_table_def_sql = $table_def_sql_template;\n $final_table_def_sql = str_replace('{{TABLE_NAME}}', $table_name, $final_table_def_sql);\n $final_table_def_sql = str_replace('{{TABLE_DEF_SQL}}', $table_def_sql, $final_table_def_sql);\n return $final_table_def_sql;\n}", "public function ensureExists() {\n\t\t$sql = <<<SQL\nCREATE TABLE IF NOT EXISTS $this->tableName (\n id int(10) NOT NULL AUTO_INCREMENT,\n title varchar(300) NOT NULL UNIQUE,\n year int(4) NOT NULL,\n rating int(2),\n PRIMARY KEY (id));\n\n insert into $this->tableName(title, year, rating)\n values(\"The Maltese Falcon\", 1941, 10),\n (\"Felis Noir\", 2016, 8)\nSQL;\n\n\t\t$this->site->pdo()->query($sql);\n\t}", "function create_temporal_table($table)\n {\n $table = \"student_positions\";\n $sql = \"CREATE TABLE \" . $table . \" (\n id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n student VARCHAR(30) NOT NULL,\n studentid VARCHAR(30) NOT NULL,\n subject VARCHAR(30) NOT NULL,\n marks VARCHAR(50),\n position VARCHAR(50),\n theclass VARCHAR(50),\n stream VARCHAR(50),\n term VARCHAR(50),\n theyear VARCHAR(50),\n reg_date TIMESTAMP\n )\";\n $query = $this->db->query($sql);\n return $query;\n }", "function buildTempTableFromData($uniqueId){\n\t\t//require_once($_SERVER['DOCUMENT_ROOT'] .\"/inc/php/classes/sql_safe.php\" );\n\t\t//Grab first row\n\t\t if(!isset($this->data[0])){\n\t\t \tthrow new Exception(\"Bad Data Format. Foxpro report needs an array of arrays\");\n\t\t }\n\t\t$firstRow = $this->data[0];\n\t\t$columns = array_keys($firstRow);\n\n\t\t//See the excel sheet in project files for an explanation of this logic.\n\t\t$paramLimit = 1500; //sqlsrv max escaped params is 2100. driver will throw an error if you exceed 2100.\n\t\t$rowCount = count($this->data);\n\t\t$columnCount = count($this->data[0]);\n\t\tif($columnCount > $paramLimit){\n\t\t\tthrow new Exception(\"Cannot insert more columns than the parameter limit! Column Count = {$columnCount}. Parameter Limit = {$paramLimit}.\");\n\t\t}\n\t\t$paramTotal = $columnCount*$rowCount;\n\t\t$groupsNeeded = ceil($paramTotal/$paramLimit);\n\t\t$chunkSize = floor($rowCount/$groupsNeeded);\n\t\t$chunks = array_chunk($this->data,$chunkSize);\n\n\t\t$tableName = \"tmp_foxpro_autogen_\".$uniqueId;\n\n\t\t$columnSqlArray = array();\n\t\tforeach ($columns as $column) {\n\t\t\t$columnSqlArray[] = \"[{$column}] [varchar](MAX) NULL\";\n\t\t}\n\t\t$tableNameQuery = \"FWE_DEV..[{$tableName}]\";\n\t\t$createQuery = \"CREATE TABLE {$tableNameQuery} (\" . implode(\",\", $columnSqlArray) . \")\";\n\t\t$this->mssqlHelperInstance->query($createQuery);\n\n\t\t$dbClass = get_class($this->mssqlHelperInstance);\n\t\tif ($dbClass == 'mssql_helper') {\n\t\t\trequire_once($_SERVER['DOCUMENT_ROOT'] . '/inc/php/classes/sqlsrv_helper.php');\n\t\t\t$insertInstance = new sqlsrv_helper('m2m');\n\t\t} else {\n\t\t\t$insertInstance = $this->mssqlHelperInstance;\n\t\t}\n\n\t\tforeach($chunks as $chunk) {\n\n\t\t\t$insertSqlArray = array();\n\t\t\t$queryValues = array();\n\t\t\tforeach ($chunk as $row) {\n\t\t\t\t$values = array_values($row);\n\t\t\t\t$rowArray = array();\n\t\t\t\tforeach ($values as $value) {\n\t\t\t\t\t$rowArray[] = \"?\";\n\t\t\t\t\t$queryValues[] = (string)$value;\n\t\t\t\t}\n\t\t\t\t$insertSqlArray[] = \"(\" . implode(\",\", $rowArray) . \")\";\n\t\t\t}\n\t\t\t$insertQuery = \"INSERT INTO {$tableNameQuery} (\" . implode(\",\", $columns) . \") VALUES \" . implode(\",\", $insertSqlArray) . \"\";\n\n\t\t\t$insertInstance->query($insertQuery, $queryValues);\n\t\t}\n\t\t$this->tableName = $tableNameQuery;\n\t}", "protected function createTables()\n {\n $tablesCreated = false;\n\n if (Craft::$app->db->schema->getTableSchema(Page::tableName()) === null) {\n $tablesCreated = true;\n $this->createTable(Page::tableName(), [\n 'id' => $this->primaryKey(),\n 'url' => $this->string(255)->notNull()->unique(),\n 'password' => $this->string(),\n 'anonymous' => $this->boolean()->defaultValue(false),\n 'startDate' => $this->dateTime(),\n 'expiryDate' => $this->dateTime(),\n\n 'dateCreated' => $this->dateTime()->notNull(),\n 'dateUpdated' => $this->dateTime()->notNull(),\n 'uid' => $this->uid(),\n ]);\n }\n\n if (Craft::$app->db->schema->getTableSchema(Comment::tableName()) === null) {\n $tablesCreated = true;\n $this->createTable(Comment::tableName(), [\n 'id' => $this->primaryKey(),\n 'pageId' => $this->integer()->notNull(),\n 'content' => $this->text()->notNull(),\n 'target' => $this->text(),\n 'name' => $this->string(100),\n\n 'dateCreated' => $this->dateTime()->notNull(),\n 'dateUpdated' => $this->dateTime()->notNull(),\n 'uid' => $this->uid(),\n ]);\n }\n\n return $tablesCreated;\n }", "private function _createTable() {\n $query = \"\n CREATE TABLE `seo_metadata` (\n `metadata_id` int(11) NOT NULL auto_increment,\n `seo_id` char(60) NOT NULL,\n `seo_title` varchar(255) NOT NULL,\n `seo_description` varchar(255) NOT NULL,\n `seo_keyword` varchar(255) NOT NULL,\n PRIMARY KEY (`metadata_id`),\n KEY `id_idx` (`id`)\n )\";\n $this->getAdapter()->query( $query );\n }", "function plugin_customfields_create_data_table($itemtype) {\n global $DB;\n\n $table = plugin_customfields_table($itemtype);\n\n if (!TableExists($table)) {\n $sql = \"CREATE TABLE `$table` (\n `id` int(11) NOT NULL default '0',\n PRIMARY KEY (`id`)\n )ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3;\";\n $result = $DB->query($sql);\n return ($result ? true : false);\n }\n return true;\n}", "private function initializeStorage(): void\n\t{\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tclient_id TEXT NOT NULL,\n\t\t\t\tcreated TEXT,\n\t\t\t\tdeposit TEXT,\n\t\t\t\trate TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket_item (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tticket_id INTEGER NOT NULL,\n\t\t\t\tname TEXT,\n\t\t\t\ttip TEXT,\n\t\t\t\tstatus TEXT,\n\t\t\t\trate TEXT,\t\t\n\t\t\t\tdate_time TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\t}", "private function createIfNotExists()\n {\n $table = new Table('schema_migration');\n if ($this->info->isTableExists($table)) {\n return;\n }\n $primaryKey = new PrimaryKey(array('version'));\n $primaryKey->disableAutoIncrement();\n\n $table->addConstraint($primaryKey);\n $table\n ->addColumn(new BigIntegerColumn('version'))\n ->addColumn(new DateTimeColumn('created_at', array('nullable' => false, 'default' => 'now()')));\n $this->manipulation->create($table);\n }", "public function create($if_not_exists = false) {\n $db = DB::getInstance();\n\n $query = [];\n $query[] = 'CREATE TABLE';\n if ($if_not_exists) {\n $query[] = 'IF NOT EXISTS';\n }\n $query[] = $db->quoteIdentifier($this->prefix . $this->name);\n\n $fields = [];\n foreach ($this->fields as $item) {\n $fields[] = ' ' . $item;\n }\n foreach ($this->keys as $item) {\n $fields[] = ' ' . $item;\n }\n\n $query[] = \"(\\n\" . implode(\",\\n\", $fields) . \"\\n)\";\n\n return implode(' ', $query);\n }", "public function createTable($table, $file){\n if ($result = $this->query(\"SHOW TABLES LIKE '\".$table.\"'\")) {\n if($result->num_rows == 1) {\n // echo \"Table exists. Skipping Creating table. Moving on to insertion\";\n return true;\n }\n }\n\n $file = fopen($file,'r');\n $column = fgetcsv($file);\n for($i=0;$i<sizeof($column);$i++){\n $this->columnName = implode(\" varchar(20),\",$column);\n }\n $createTable = \"CREATE TABLE \".$table.\"(id INT(11) NOT NULL AUTO_INCREMENT ,\".$this->columnName.\" varchar(20), PRIMARY KEY (`id`))\";\n echo $createTable;\n if($this->query($createTable)){\n // echo \"Created \";\n return true;\n } else {\n // echo \"Not Created\".$this->error;\n return false;\n }\n }", "function prepareFavorites() {\n $engine = defined('DB_CAN_TRANSACT') && DB_CAN_TRANSACT ? 'InnoDB' : 'MyISAM';\n\n try {\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"favorites (\n parent_type varchar(50) DEFAULT NULL,\n parent_id int unsigned NULL DEFAULT NULL,\n user_id int(10) unsigned NULL DEFAULT NULL,\n UNIQUE favorite_object (parent_type, parent_id, user_id),\n INDEX user_id (user_id)\n ) ENGINE=$engine DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function table_check() {\n\t // check if tables exist then create if not\n\t global $wpdb;\n\t \n\t $required_tables = array (\n\t \"$wpdb->prefix\" . \"tr_ratting_data\",\n\t \"$wpdb->prefix\" . \"tr_characters\",\n\t \"$wpdb->prefix\" . \"tr_structures_income\",\n\t \"$wpdb->prefix\" . \"tr_pvp_chars_kills\",\n\t \"$wpdb->prefix\" . \"tr_users_chars\",\n\t )\n\t \n\t ;\n\t foreach ( $required_tables as $table ) {\n\t $val = $wpdb->get_var ( \"SHOW TABLES LIKE '$table'\" );\n\t if ($val == $table) {\n\t // exists//\n\t } else {\n\t // create non existing\n\t $this->create_table ( $table );\n\t }\n\t }\n\t}", "abstract public function create_table($table_name, $fields, $primary_key = TRUE);", "protected function _initsTable() {}", "public function createTable($tableName)\n {\n $query=\"CREATE TABLE \".$tableName.\" ( `productID` INT NOT NULL AUTO_INCREMENT , `product_name` VARCHAR(255) NOT NULL , `product_description` TEXT NOT NULL , `product_quantity` INT NOT NULL , `product_price` INT NOT NULL , `product_color` VARCHAR(255) NOT NULL , `product_status` INT NOT NULL , `product_picture` TEXT NOT NULL , `post_status` INT NOT NULL , `categoryID` INT NOT NULL , `subCategoryID` INT NOT NULL , `ownerID` INT NOT NULL , `owner_type` INT NOT NULL , `itID` INT NOT NULL , `c_date` DATETIME NOT NULL , PRIMARY KEY (`productID`)) ENGINE = InnoDB;\";\n $validate=$this->db->query($query);\n return $validate?true:false;\n }" ]
[ "0.80993193", "0.8074551", "0.7555095", "0.72110903", "0.71875465", "0.7073039", "0.6713941", "0.6545358", "0.6468905", "0.6385283", "0.63667935", "0.63387716", "0.6294396", "0.6292868", "0.6254112", "0.6241748", "0.6180995", "0.61631185", "0.61495966", "0.61235714", "0.6114315", "0.60968816", "0.6082624", "0.6046929", "0.60428077", "0.6034774", "0.6018813", "0.60183704", "0.60176164", "0.6012876", "0.59860367", "0.5972815", "0.5956826", "0.5956005", "0.59491676", "0.59476924", "0.59221214", "0.5908654", "0.590842", "0.5903387", "0.5902502", "0.59024197", "0.58727676", "0.58552516", "0.581503", "0.5795065", "0.5779267", "0.5772689", "0.5770955", "0.57692945", "0.5767859", "0.5766085", "0.5760937", "0.5746247", "0.5741204", "0.5719978", "0.57198286", "0.5712666", "0.5710644", "0.57101184", "0.5693072", "0.56818223", "0.56744754", "0.5666673", "0.56529576", "0.5638169", "0.562456", "0.56227535", "0.56147116", "0.5600872", "0.5590537", "0.5589601", "0.5589358", "0.5586248", "0.55861884", "0.55859", "0.5584693", "0.55818796", "0.5581238", "0.5571987", "0.55562013", "0.5541308", "0.5523922", "0.5520932", "0.55189794", "0.5516862", "0.55109936", "0.55103815", "0.55102754", "0.5507635", "0.550639", "0.5505227", "0.5504746", "0.54993737", "0.54932886", "0.54877174", "0.5482982", "0.5468927", "0.5465955", "0.5461735" ]
0.5479293
97
Display a listing of the resource.
public function index() { if(Auth::user()->type == 1){ $user = User::all(); return view('users.index')->with('user', $user); } else return redirect()->route('login'); }
{ "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 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 actionRestList() {\n\t $this->doRestList();\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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\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 index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\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 return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "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}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "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 $items = Item::all();\n return view('items::list_items',compact('items'));\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 // 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 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 showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\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 actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\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 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 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 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 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 $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { if(Auth::user()->type == 1) return view('users.create'); else return redirect()->route('login'); }
{ "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 $user) { if(Auth::user()->type == 1){ $user->create($request->merge(['password' => Hash::make($request->get('password'))])->all()); session()->flash('mensagem', 'Usuário inserido com sucesso!'); return redirect()->route('users.index'); } else return redirect()->route('login'); }
{ "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(User $user) { if(Auth::user()->type == 1){ $procedure = Procedure::all(); $test = Test::all(); return view('users.show')->with('user',$user)->with('procedures',$procedure)->with('tests',$test); } else return redirect()->route('login'); }
{ "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(User $user) { if(Auth::user()->type == 1) return view('users.edit')->with('user',$user); else return redirect()->route('login'); }
{ "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(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\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 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() {\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($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($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 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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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 $data = Restful::find($id);\n return view('restful.edit', compact('data'));\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 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.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, User $user) { if(Auth::user()->type == 1){ $pass = $request->get('password'); $user->update( $request->merge(['password' => Hash::make($request->get('password'))])->except([$pass ? '' : 'password'])); $user->save(); session()->flash('mensagem', 'Usuário atualizado com sucesseo!'); return redirect()->route('users.show',$user->id); } else return redirect()->route('login'); }
{ "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(User $user) { if(Auth::user()->type == 1){ $procedures = Procedure::all(); $tests = Test::all(); $bool = True; foreach ($procedures as $proc) if ($proc->user_id == $user->id) $bool = False; if($bool == True) foreach ($tests as $test) if ($test->user_id == $user->id) $bool = False; if($bool == True){ $user->delete(); session()->flash('mensagem', 'Usuário excluido com sucesso!'); return redirect()->route('users.index'); } else session()->flash('mensagem', 'Usuário possui exame ou proedimento e não pode ser excluido!'); return redirect()->route('users.index'); } else return redirect()->route('login'); }
{ "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
Is the plugin setup completed
public function is_set_up(): bool { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isWizardDone() {}", "function _init_plugin() {\n\t\tglobal $db, $apcms;\n\t\t\n\t\treturn true;\n\t}", "public function is_ready();", "public function inSetup()\n\t{\n\t\t$setupComplete = $this->config()->get('confirm_step') ? 3 : 2;\n\n\t\treturn ($this->get('setup_stage') < $setupComplete);\n\t}", "abstract function is_plugin_new_install();", "protected function isConfigurationComplete() {}", "public function isSetup()\n\t{\n\t\treturn $this->fileExists($this->rocketeer->getFolder('current'));\n\t}", "public function has_inited() {\n\t\treturn $this->doneInit;\n\t}", "public static function pluginsAreLoaded() {\n self::$_plugins_are_loaded = true;\n }", "public function test_plugin_isLoaded()\n {\n global $plugin_controller;\n $this->assertTrue(\n in_array(\n syntax_plugin_related::PLUGIN_NAME,\n $plugin_controller->getList()),\n syntax_plugin_related::PLUGIN_NAME . \" plugin is loaded\"\n );\n }", "public function qualifyAsFinished(): bool;", "public function hasSetupStep() {\n return true;\n }", "public function isFinished();", "function isReady()\n\t{\n\t\treturn ($this->getCompleteResult() !== false);\n\t}", "function ready()\n\t{\n\t\treturn $this->isReady();\n\t}", "public function isReady() {}", "public function isReady();", "public function isReady();", "protected function onFinishSetup()\n {\n }", "public function isFinished(): bool;", "public function isReadyToUse()\n {\n return true;\n }", "public function isSetup(): bool\n {\n return $this->setUp;\n }", "public function arePluginsLoaded()\n\t{\n\t\treturn $this->_pluginsLoaded;\n\t}", "function isReady();", "public function installPlugin()\n\t{\n\t\treturn true;\t\n\t}", "public function is_runnable()\n\t{\n\t\treturn $this->ext_config->cleanup_titania;\n\t}", "abstract function is_plugin();", "protected function isSetup(){\n \treturn isset($GLOBALS['setup']);\n }", "protected function isInitialInstallationInProgress() {}", "function pnFormInitializePlugins()\n {\n $this->pnFormInitializePlugins_rec($this->pnFormPlugins);\n\n return true;\n }", "public static function isReady() : bool {}", "public function isInitializeNeeded()\n {\n return true;\n }", "public function validate () {\n\t\treturn file_exists($this->pluginFile);\n\t}", "public function libraryOk(): bool;", "function plugin_is_active() {\n\t\treturn function_exists( 'jigoshop_init' ) || class_exists( 'JigoshopInit' );\n\t}", "public function moduleReady()\n {\n // Check API key\n if (!$this->getConfig('apikey')) {\n $this->adapter->log(MODX_LOG_LEVEL_ERROR, '[Commerce_Mailchimp] Unable to initialize. Missing MailChimp API key.');\n return false;\n }\n\n // Check list id\n if (!$this->getConfig('listid')) {\n $this->adapter->log(MODX_LOG_LEVEL_ERROR, '[Commerce_Mailchimp] Unable to initialize. Missing MailChimp List ID.');\n return false;\n }\n\n // Check address type\n $addressType = $this->getConfig('addresstype');\n if (!$addressType || ($addressType !== 'billing' && $addressType !== 'shipping')) {\n $this->adapter->log(MODX_LOG_LEVEL_ERROR, '[Commerce_Mailchimp] Unable to initialize. Address Type invalid. Either billing or shipping should be selected.');\n return false;\n }\n\n return true;\n }", "public function isInstallationCompleted()\n {\n return $this->_rootElement->find($this->successInstallText, Locator::SELECTOR_XPATH)->isVisible();\n }", "public function hasToBeInitialized(): bool\n {\n return static::INITIALIZE_PAYMENT;\n }", "protected function beforeActivation() {\n if (!self::checkPreconditions()) {\n ilUtil::sendFailure(\"Cannot activate plugin: Make sure that you have installed the CtrlMainMenu plugin and RouterGUI. Please read the documentation: http://www.ilias.de/docu/goto_docu_wiki_1357_Reporting_Plugin.html\", true);\n //throw new ilPluginException(\"Cannot activate plugin: Make sure that you have installed the CtrlMainMenu plugin and RouterGUI. Please read the documentation: http://www.ilias.de/docu/goto_docu_wiki_1357_Reporting_Plugin.html\");\n return false;\n }\n return true;\n }", "public function is_ready() {\n return $this->isready;\n }", "public function initialized()\n {\n return true;\n }", "public function install()\n {\n // initialisation successful\n return true;\n }", "function IsReady()\r\n\t{\r\n\t\treturn $this->IsConnected();\r\n\t}", "public static function initialize()\n {\n //Can be used to setup things before the execution of the action\n return true;\n }", "public function loaded() {\n\t\t$dependencies_loaded = true;\n\t\t$dependencies = $this->repo->dependencies;\n\t\t$plugin_name = $this->repo->name;\n\t\t// no required dependencies\n\t\tif( ! isset( $dependencies ) || ! is_array( $dependencies ) ) {\n\t\t\treturn $dependencies_loaded;\n\t\t}\n\t\t$theme = isset( $dependencies['theme'] ) ? $dependencies['theme'] : null;\n\t\t$plugins = isset( $dependencies['plugins'] ) ? $dependencies['plugins'] : [];\n\t\t// check theme dependency\n\t\tif( null !== $theme ) {\n\t\t\t$theme_data = wp_get_theme();\n\t\t\t$theme_name = $theme_data->get( 'Name' );\n\t\t\t$theme_template = $theme_data->get( 'Template' );\n\t\t\tif( $theme_template !== $theme && $theme_name !== $theme ) {\n\t\t\t\t$dependencies_loaded = false;\n\t\t\t\tself::$notices[] = \"The {$theme} theme must be activated for the {$plugin_name} plugin to be enabled.\";\n\t\t\t}\n\t\t}\n\t\t// check for plugin dependencies\n\t\tif( 0 < count( $plugins ) ) {\n\t\t\t$active_plugins = (array) get_option( 'active_plugins', array() );\n\t\t\tforeach( $plugins as $name => $path ) {\n\t\t\t\tif( ! in_array( $path, $active_plugins ) ) {\n\t\t\t\t\t$dependencies_loaded = false;\n\t\t\t\t\t$this->notices[] = \"The {$name} plugin must be active for the {$plugin_name} plugin to be enabled\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add notice to screen if dependencies are missing\n\t\tif( ! $dependencies_loaded ) {\n\t\t\tadd_action( 'admin_notices', array( $this, 'add_notice' ) );\n\t\t}\n\n\t\treturn $dependencies_loaded;\n\t}", "public function isComplete() {\n return $this->getDescription() == 'Done';\n }", "public function isCompleted();", "private function checkPlugin() {\n\n $check_version = !$this->input->getOption('without-plugin');\n\n if ($check_version) {\n $this->output->writeln(\n '<comment>' . __('Checking plugin version...') . '</comment>',\n OutputInterface::VERBOSITY_VERBOSE\n );\n\n $plugin = new Plugin();\n $plugin->checkPluginState('racks');\n\n if (!$plugin->getFromDBbyDir('racks')) {\n $message = __('Racks plugin is not part of GLPI plugin list. It has never been installed or has been cleaned.')\n . ' '\n . sprintf(\n __('You have to install Racks plugin files in version %s to be able to continue.'),\n self::RACKS_REQUIRED_VERSION\n );\n $this->output->writeln(\n [\n '<error>' . $message . '</error>',\n ],\n OutputInterface::VERBOSITY_QUIET\n );\n return false;\n }\n\n $is_version_ok = '1.8.0' === $plugin->fields['version'];\n if (!$is_version_ok) {\n $message = sprintf(\n __('You have to install Racks plugin files in version %s to be able to continue.'),\n self::RACKS_REQUIRED_VERSION\n );\n $this->output->writeln(\n '<error>' . $message . '</error>',\n OutputInterface::VERBOSITY_QUIET\n );\n return false;\n }\n\n $is_installable = in_array(\n $plugin->fields['state'],\n [\n Plugin::TOBECLEANED, // Can be in this state if check was done without the plugin dir\n Plugin::NOTINSTALLED, // Can be not installed if plugin has been cleaned in plugin list\n Plugin::NOTUPDATED, // Plugin 1.8.0 version has never been installed\n ]\n );\n if ($is_installable) {\n if ($this->input->getOption('update-plugin')) {\n $message = sprintf(\n __('Migrating plugin to %s version...'),\n self::RACKS_REQUIRED_VERSION\n );\n $this->output->writeln(\n '<info>' . $message . '</info>',\n OutputInterface::VERBOSITY_NORMAL\n );\n\n ob_start();\n $plugin->install($plugin->fields['id']);\n ob_end_clean();\n\n // Reload and check migration result\n $plugin->getFromDB($plugin->fields['id']);\n if (!in_array($plugin->fields['state'], [Plugin::TOBECONFIGURED, Plugin::NOTACTIVATED])) {\n $message = sprintf(\n __('Plugin migration to %s version failed.'),\n self::RACKS_REQUIRED_VERSION\n );\n $this->output->writeln(\n '<error>' . $message . '</error>',\n OutputInterface::VERBOSITY_QUIET\n );\n return false;\n }\n } else {\n $message = sprintf(\n __('Racks plugin data has to be updated to %s version. It can be done using the --update-plugin option.'),\n self::RACKS_REQUIRED_VERSION\n );\n $this->output->writeln(\n '<comment>' . $message . '</comment>',\n OutputInterface::VERBOSITY_QUIET\n );\n return false;\n }\n }\n\n $is_state_ok = in_array(\n $plugin->fields['state'],\n [\n Plugin::ACTIVATED, // Should not be possible as 1.8.0 is not compatible with 9.3\n Plugin::TOBECONFIGURED, // Should not be possible as check_config of plugin returns always true\n Plugin::NOTACTIVATED,\n ]\n );\n if (!$is_state_ok) {\n // Should not happens as installation should put plugin in awaited state\n throw new LogicException('Unexpected plugin state.');\n }\n }\n\n $rack_tables = [\n 'glpi_plugin_racks_itemspecifications',\n 'glpi_plugin_racks_others',\n 'glpi_plugin_racks_othermodels',\n 'glpi_plugin_racks_racks',\n 'glpi_plugin_racks_racks_items',\n 'glpi_plugin_racks_rackmodels',\n 'glpi_plugin_racks_racktypes',\n 'glpi_plugin_racks_rackstates',\n 'glpi_plugin_racks_roomlocations',\n ];\n $missing_tables = false;\n foreach ($rack_tables as $table) {\n if (!$this->db->tableExists($table)) {\n $this->output->writeln(\n '<error>' . sprintf(__('Racks plugin table \"%s\" is missing.'), $table) . '</error>',\n OutputInterface::VERBOSITY_QUIET\n );\n $missing_tables = true;\n }\n }\n if ($missing_tables) {\n $this->output->writeln(\n '<error>' . __('Migration cannot be done.') . '</error>',\n OutputInterface::VERBOSITY_QUIET\n );\n return false;\n }\n\n return true;\n }", "function test_init_action_is_run() {\n\t}", "protected function hasCompleted()\r\n {\r\n return !(bool)$this->getExpectedStep();\r\n }", "public function isDone(){\n\t\treturn $this->done;\n\t}", "public function isComplete()\n {\n $interfaceCount = $this->device->interfaces()->count(); //get number of interfaces\n \n $testCount = \\App\\Test::count(); //get number of tests\n \n $expectedResultCount = $testCount * $interfaceCount;\n \n return ($expectedResultCount == $this->results()->count());\n }", "public function isReady()\n {\n return $this->isReady;\n }", "public static function arePluginsLoaded() {\n return self::$_plugins_are_loaded;\n }", "public function initializePlugin() {\n return $this->initialize;\n }", "function finished() {\n\t\treturn $this->tries && ( ( $this->ready() && ! $this->hasSteps() ) || ! $this->needed() );\n\t}", "function wpdc_check_active(){ \r\n\r\n // plugin is ok\r\n // do the actions and filters\r\n\t\t\tadd_action( 'admin_menu',\t'wpdc_my_add_plugin_admin_page'); // the function to show the plugin settings page\r\n }", "public function plugin_is_configured() {\n\t\treturn isset( $this->settings->client_id, $this->settings->base_uri ) && $this->settings->client_id && $this->settings->base_uri;\n\t}", "function isInitialized();", "public function checkIfSetupRan()\r\n {\r\n $select = $this->table_gateway->getAdapter()\r\n ->getDriver()->getConnection()\r\n ->execute(\"SHOW TABLES LIKE 'admins'\");\r\n\r\n\r\n if ($select->count() > 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "private function is_required_plugin_installed() {\n\t\trequire_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t$requvired_plugin_list = array(\n\t\t\t'rest-api/plugin.php',\n\t\t\t'butterbean/butterbean.php',\n\t\t);\n\t\tforeach ( $requvired_plugin_list as $plugin ) {\n\t\t\tif ( ! is_plugin_active( $plugin ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function isReady()\n {\n return ( $this->_stateManager->getState() === self::STATE_READY );\n }", "function isComplete()\n {\n return $this->complete;\n }", "public function is_plugin_installed() {\n\t\trequire_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\t$plugins = get_plugins();\n\n\t\treturn ! empty( $plugins[ self::PLUGIN_SLUG ] );\n\t}", "function isComplete()\r\n {\r\n return $this->_complete;\r\n }", "protected function is_plugin_installed($plugin)\n {\n }", "public function onInstall() {\n\t\tglobal $conf;\n\n\t\treturn true;\n\n\t}", "public function isDone()\n {\n return $this->result == self::RESULT_DONE;\n }", "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn is_plugin_active( 'revslider/revslider.php' );\n\t}", "public function plugin_setup() {\n\n\t\t//Get plugin Data information\n\t\tif ( ! function_exists( 'get_plugin_data' ) ) {\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t}\n\t\t$plugin_data = get_plugin_data( __FILE__ );\n\n\t\t//Get Option\n\t\tself::$option = get_option( 'wp_online_pub_opt' );\n\n\t\t//Get Plugin Version\n\t\tself::$plugin_version = $plugin_data['Version'];\n\n\t\t//Set Variable\n\t\tself::$plugin_url = plugins_url( '', __FILE__ );\n\t\tself::$plugin_path = plugin_dir_path( __FILE__ );\n\n\t\t//Set Text Domain\n\t\t$this->load_language( 'wp-onlinepub' );\n\n\t\t//Load Composer\n\t\tinclude_once dirname( __FILE__ ) . '/vendor/autoload.php';\n\n\t\t//set plugin option\n\t\tnew \\WP_OnlinePub\\Gravity_Form();\n\t\tnew \\WP_OnlinePub\\Ticket();\n\t\tnew \\WP_OnlinePub\\Admin_Setting_Api();\n\t\tnew \\WP_OnlinePub\\Admin_Page();\n\t\tnew \\WP_OnlinePub\\Front();\n\t\tnew \\WP_OnlinePub\\Payment();\n\t\tnew \\WP_OnlinePub\\Ajax();\n\n\t\t//Test Service\n\t\tif ( isset( $_GET['test'] ) ) {\n\t\t\t//self::send_mail('admin', 'عنوان ایمیل','matn email test');\n\t\t\t//exit;\n\t\t}\n\t}", "private function init()\n {\n return true;\n }", "public function initialize(): bool;", "public function isReady()\n {\n return $this->status === 'message_ok';\n }", "public function init(): bool\n {\n return true;\n }", "public function isInitialised();", "function is_plugin_update() {\n\t\t\treturn ! $this->is_plugin_new_install();\n\t\t}", "public function isInitialized() {\n return true;\n }", "function _isInstalled()\n\t{\n\t\t$success = false;\n\t\t\n\t\tjimport('joomla.filesystem.file');\n\t\tif (JFile::exists(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_phplist'.DS.'defines.php')) \n\t\t{\n\t\t\t// Check the registry to see if our Tienda class has been overridden\r\n\t\t\tif ( !class_exists('Phplist') )\r\n\t\t\t\tJLoader::register( \"Phplist\", JPATH_ADMINISTRATOR.DS.\"components\".DS.\"com_phplist\".DS.\"defines.php\" );\r\n\t\t\tif ( !class_exists('PhplistConfigPhplist') )\r\n\t\t\t\tJLoader::register( \"PhplistConfigPhplist\", JPATH_ADMINISTRATOR.DS.\"components\".DS.\"com_phplist\".DS.\"defines.php\" );\r\n\t\t\t\t\n\t\t\t\n\t\t\tPhplist::load( 'PhplistHelperNewsletter', 'helpers.newsletter' );\n\t\t\tPhplist::load( 'PhplistHelperMessage', 'helpers.message' );\n\t\t\tPhplist::load( 'PhplistHelperEmail', 'helpers.email' );\n\t\t\tPhplist::load( 'PhplistHelperPhplist', 'helpers.phplist' );\n\t\t\tPhplist::load( 'PhplistHelperConfigPhplist', 'helpers.configphplist' );\n\t\t\t\n\t\t\t$success = true;\n\t\t}\n\t\t\n\t\tif ($success == true) {\n\t\t\t// Also check that DB is setup\n\t\t\t$database = PhplistHelperPhplist::getDBO();\n\t\t\tif (!isset($database->error)) \n\t\t\t{\n\t\t\t\t$success = true;\n\t\t\t}\n\t\t}\n\t\treturn $success;\n\t}", "abstract public function isComplete();", "public function isReady() {return $this->m_bReady;}", "private function _init() {\n\t\t$ok = false;\n\t\tif (wgSystem::isSave() || wgSystem::isApply()) {\n\t\t\t$mand = true;\n\t\t\tif ($mand) {\n\t\t\t\t$ok = (bool) self::doSaveConfigFile();\n\t\t\t\tif ($ok) wgError::add('configsaved', 2);\n\t\t\t\telse wgError::add('cantsave');\n\t\t\t}\n\t\t}\n\t\treturn $ok;\n\t}", "public function plugin_info()\n {\n }", "public function is_running_config() {\n\t\treturn isset( $this->config ) && count( $this->config ) > count( self::$must_have_plugins );\n\t}", "function _loadPluginData()\r\t{\r\t\t//$this->_db->setQuery( $query );\r\t\t$ext = $this->_ext;\r\t\tif(!isset($this->_installed->$ext)) {\r\t\t\t$this->loadInstalledPlugins();\r\t\t}\r\t\tif(isset($this->_installed->$ext)) $this->_data = $this->_installed->$ext;\r\r\t\treturn (boolean)$this->_data;\r\t}", "public function plugin_construction() {\t\r\n\t\r\n\t}", "protected function canLoad()\n\t{\n\t\t$v = version_compare($this->getVersion(),$this->getConfigValue('plugin_current_version')); \n\t\t//first, check if this instance is the latest one, or not\n\t\tif($v < 0) return false;\n\t\t\t \n\t\t//save the latest version, for later reference\n\t\tif($v > 0 )\n\t\t\t$this->setConfigValue('plugin_current_version',$this->getVersion());\n\t\t\t\n\t\treturn true;\n\t}", "public function isReady()\n {\n if ($this->client) {\n return true;\n }\n\n return false;\n }", "function acf_is_plugin_active()\n{\n}", "protected function hasStarted()\r\n {\r\n return isset($this->_session[$this->_stepsKey]);\r\n }", "public function isComplete()\n {\n return $this->status == 'success';\n }", "public function isCompleted(): bool\n {\n return ($this->progress_error + $this->progress_ok) >= \\count($this->state->getSourceStates());\n }", "protected function isImportDatabaseDone() {}", "public static function isInitialized(): bool {\n return self::$initialized;\n }", "public function isReady()\n {\n if( $this->_status === FALSE )\n {\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n }", "function isPluginInstalled( $pPackagePluginGuid ){\n\t\treturn !is_null( $this->getInstalledPluginConfig( $pPackagePluginGuid ) );\n\t}", "public function isAllPluginsLoaded()\n {\n return null !== $this->collAllPlugins;\n }", "public function initialize()\n {\n return true;\n }", "public function test_is_ready() {\n global $CFG;\n $this->resetAfterTest(true);\n $user = $this->getDataGenerator()->create_user();\n $this->setUser($user);\n set_config('enabled', 1, 'factor_nosetup');\n set_config('enabled', 1, 'tool_mfa');\n\n // Capability Check.\n $this->assertTrue(\\tool_mfa\\manager::is_ready());\n // Swap to role without capability.\n $this->setGuestUser();\n $this->assertFalse(\\tool_mfa\\manager::is_ready());\n $this->setUser($user);\n\n // Enabled check.\n $this->assertTrue(\\tool_mfa\\manager::is_ready());\n set_config('enabled', 0, 'tool_mfa');\n $this->assertFalse(\\tool_mfa\\manager::is_ready());\n set_config('enabled', 1, 'tool_mfa');\n\n // Upgrade check.\n $this->assertTrue(\\tool_mfa\\manager::is_ready());\n $CFG->upgraderunning = true;\n $this->assertFalse(\\tool_mfa\\manager::is_ready());\n unset($CFG->upgraderunning);\n\n // No factors check.\n $this->assertTrue(\\tool_mfa\\manager::is_ready());\n set_config('enabled', 0, 'factor_nosetup');\n $this->assertFalse(\\tool_mfa\\manager::is_ready());\n set_config('enabled', 1, 'factor_nosetup');\n }", "public function init_plugin()\n {\n }", "public function runCallback()\n\t{\n\t\t$state = $this->getStateVariables();\n\n\t\t$rawDataPost = JRequest::get('POST', 2);\n\t\t$rawDataGet = JRequest::get('GET', 2);\n\t\t$data = array_merge($rawDataGet, $rawDataPost);\n\n\t\t$dummy = $this->getPaymentPlugins();\n\n\t\t$app = JFactory::getApplication();\n\t\t$jResponse = $app->triggerEvent('onAKPaymentCallback',array(\n\t\t\t$state->paymentmethod,\n\t\t\t$data\n\t\t));\n\t\tif(empty($jResponse)) return false;\n\n\t\t$status = false;\n\n\t\tforeach($jResponse as $response)\n\t\t{\n\t\t\t$status = $status || $response;\n\t\t}\n\n\t\treturn $status;\n\t}" ]
[ "0.6861064", "0.6831777", "0.67802274", "0.6754576", "0.67099196", "0.66854805", "0.6636629", "0.6586644", "0.658527", "0.6569339", "0.6536532", "0.6526906", "0.65144515", "0.6492525", "0.6489012", "0.6482505", "0.6474489", "0.6474489", "0.6452685", "0.6444868", "0.6420836", "0.64156055", "0.64010733", "0.639232", "0.6372812", "0.6369305", "0.6331727", "0.631161", "0.6244589", "0.61997044", "0.615658", "0.61505806", "0.6148367", "0.61481655", "0.614687", "0.61146915", "0.61087686", "0.6095429", "0.6074879", "0.6074609", "0.6068835", "0.6049434", "0.60461736", "0.6033066", "0.60253996", "0.60140055", "0.6012947", "0.60123515", "0.6011267", "0.59772015", "0.5977112", "0.59634423", "0.59483707", "0.59396774", "0.59083444", "0.5899586", "0.5898993", "0.5895691", "0.58940506", "0.5891031", "0.587795", "0.58766395", "0.5867372", "0.5856465", "0.5855716", "0.5850189", "0.5845388", "0.58376974", "0.58353674", "0.58232915", "0.58208895", "0.58140916", "0.58138037", "0.58102566", "0.58073837", "0.58042735", "0.58025473", "0.5789708", "0.5781452", "0.578019", "0.57697994", "0.5764537", "0.5748643", "0.57438374", "0.5741237", "0.57390714", "0.57377404", "0.5734107", "0.5729859", "0.5727966", "0.5722696", "0.5721323", "0.5720787", "0.57183176", "0.57168067", "0.5713655", "0.571232", "0.57088953", "0.5704506", "0.57044685" ]
0.6129868
35
Subscribe the current page to receive notifications about events
public function subscribe(\context $context, string $component, string $area, int $itemid): void { // TODO currently disregards arguments. global $PAGE, $USER, $DB; if (!$this->is_set_up() || !isloggedin() || isguestuser() || self::$initialised) { return; } $context = \context_user::instance($USER->id); $fromid = (int)$DB->get_field_sql("SELECT max(id) FROM {" . self::TABLENAME . "} WHERE contextid = ?", [$context->id]); $url = new \moodle_url('/admin/tool/realtime/plugin/phppoll/poll.php'); $PAGE->requires->js_call_amd('realtimeplugin_phppoll/realtime', 'init', [$USER->id, self::get_token(), $fromid, $url->out(false), $this->get_delay_between_checks()]); self::$initialised = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getSubscribedEvents();", "public static function getSubscribedEvents();", "public function getSubscribedEvents();", "public function subscribes();", "protected function _subscribeToEngineEvents()\n {\n $controller = $this->getController();\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array(\n 'callback' => array( $this, 'onEndOfFax' ),\n 'options' => array( 'autoRemove' => 'before' )\n )\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::FAXPAGE,\n array( 'callback' => array( $this, 'onFaxPage' ) )\n );\n }", "public function track_extensions_page() {\n\t\t// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification\n\t\t$event = 'extensions_view';\n\t\t$properties = array(\n\t\t\t'section' => empty( $_REQUEST['section'] ) ? '_featured' : wc_clean( wp_unslash( $_REQUEST['section'] ) ),\n\t\t);\n\n\t\tif ( ! empty( $_REQUEST['search'] ) ) {\n\t\t\t$event = 'extensions_view_search';\n\t\t\t$properties['search_term'] = wc_clean( wp_unslash( $_REQUEST['search'] ) );\n\t\t}\n\t\t// phpcs:enable\n\n\t\tWC_Tracks::record_event( $event, $properties );\n\t}", "public function subscribe();", "public static function getSubscribedEvents()\n {\n echo 'Test';\n }", "public function subscribeEvents()\n {\n $this->subscribeEvent('Enlight_Controller_Front_StartDispatch', 'onStartDispatch');\n }", "public function onEvent();", "protected function registerEvents(): void\n {\n Event::listen(MessageLogged::class, function (MessageLogged $e) {\n if( app()->bound('current-context') )\n app('current-context')->log((array)$e);\n });\n }", "public function getEventSubscriber();", "public function subscription();", "public function subscribe()\r\n {\r\n /* Fire our meta box setup function on the post editor screen. */\r\n add_action('load-post.php', array(\r\n $this,\r\n 'setup'\r\n ));\r\n add_action('load-post-new.php', array(\r\n $this,\r\n 'setup'\r\n ));\r\n }", "private function subscribeEvents()\n {\n // Subscribe the needed event for less merge and compression\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n\n $this->subscribeEvent(\n 'Shopware_Controllers_Widgets_Emotion_AddElement',\n 'onEmotionAddElement'\n );\n\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend',\n 'onPostDispatchFrontend'\n );\n }", "public function subscribe($events) {\n $events->listen('view.make', 'GrahamCampbell\\BootstrapCMS\\Subscribers\\NavigationSubscriber@onViewMake', 5);\n $events->listen('navigation.main', 'GrahamCampbell\\BootstrapCMS\\Subscribers\\NavigationSubscriber@onNavigationMainFirst', 8);\n $events->listen('navigation.main', 'GrahamCampbell\\BootstrapCMS\\Subscribers\\NavigationSubscriber@onNavigationMainSecond', 5);\n $events->listen('navigation.main', 'GrahamCampbell\\BootstrapCMS\\Subscribers\\NavigationSubscriber@onNavigationMainThird', 2);\n $events->listen('navigation.bar', 'GrahamCampbell\\BootstrapCMS\\Subscribers\\NavigationSubscriber@onNavigationBar', 2);\n }", "public function subscribe(): void\n {\n foreach (static::$eventHandlerMap as $eventName => $handler) {\n $this->events->listen($eventName, [$this, $handler]);\n }\n }", "function eventon_create_pages() {\n\n\t// Events Main page\n eventon_create_page( esc_sql( _x( 'events', 'page_slug', 'eventon' ) ), 'eventon_events_page_id', __( 'Events', 'eventon' ), '' );\n\n}", "public function eventsAction()\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 $event = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if (isset($event['userData']) && $event['userData'] instanceof Users) {\n $this->di->setShared('userData', $event['userData']);\n }\n\n //lets fire the event\n $this->events->fire($event['event'], $event['source'], $event['data']);\n\n $this->log->info(\n \"Notification ({$event['event']}) - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::EVENTS, $callback);\n }", "public function send_events()\n {\n }", "public function testComAdobeCqCommercePimImplPageEventListener()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.commerce.pim.impl.PageEventListener';\n\n $crawler = $client->request('POST', $path);\n }", "public static function events();", "public function subscribe($events) {\n /* Publication */\n //$events->listen('publication.save', 'PublicationObserver@onPublicationSave');\n// $events->listen('publication.addImage', 'PublicationObserver@onPublicationAddImage');\n// $events->listen('publication.deleteImage', 'PublicationObserver@onPublicationDeleteImage');\n $events->listen('publication.change', 'PublicationObserver@onPublicationChange');\n\n //$events->listen('user.logout', 'CacheHandler@onUserLogout');\n }", "public function viewEvents();", "public function subscribe(Dispatcher $events)\n {\n $events->listen('page.resetChildrenUri', 'TypiCMS\\Modules\\Pages\\Events\\ResetChildren@resetChildrenUri');\n }", "public function subscribe(): void;", "public function attachEvents();", "public function attachEvents();", "protected static function events()\n {\n foreach (self::fetch('app/events', false) as $file) {\n Bus::need($file);\n }\n //\n Event::register();\n }", "public function events()\n {\n $eventdata = $this->Event->find('all', \n array(\n 'order' => array('Event.time' => 'DESC'),\n 'condition' => array('type' => 'Event')\n ));\n \n $this->set('events', $eventdata);\n \n $this->assignUserToView($this->Auth->user('id'));\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Info');\n }", "public function subscribe($events)\n {\n $events->listen('public_views.created', 'Cms\\Events\\Crud\\PublicViewsEventHandler@onCreate');\n $events->listen('public_views.updated', 'Cms\\Events\\Crud\\PublicViewsEventHandler@onUpdate');\n $events->listen('public_views.deleted', 'Cms\\Events\\Crud\\PublicViewsEventHandler@onDelete');\n }", "public function listen() {\n add_filter( \"the_content\", array($this, \"theContent\"));\n add_filter( \"the_title\", array($this, \"theTitle\"));\n }", "public function onPublishPage($data) {\n return $this->worker()->onPublishPage($data);\n }", "public function subscribe($events)\n {\n $events->listen(\n 'Coyote\\Events\\WikiWasSaved',\n 'Coyote\\Listeners\\WikiListener@onWikiSave'\n );\n\n $events->listen(\n 'Coyote\\Events\\WikiWasDeleted',\n 'Coyote\\Listeners\\WikiListener@onWikiDelete'\n );\n }", "static function getSubscribedEvents() {\n $events[KernelEvents::VIEW][] = array('onHtmlFragment', 100);\n $events[KernelEvents::VIEW][] = array('onHtmlPage', 50);\n\n return $events;\n }", "public function indexAction() {\n $this->view->events = $this->_events->getEventsAdmin($this->_getParam('page'));\n }", "public function registerEvents() {\n $this->cx->getEvents()->addEvent('model/expired');\n $this->cx->getEvents()->addEvent('model/terminated');\n $this->cx->getEvents()->addEvent('model/payComplete');\n }", "function notify_onchange_from_plugin($oPage)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif ($oPage->exists())\n\t\t\t{\n\t\t\t\t$this->initHandlers();\n\t\t\t\t\n\t\t\t\t//execute the handler (if any) for this translation file\n\t\t\t\tforeach (self::$asSync as $sHandlerClassName)\n\t\t\t\t{\n\t\t\t\t\t$oHandler = new $sHandlerClassName();\n\t\t\t\t\t\n\t\t\t\t\tif ($oHandler->exportPageIfHandled($oPage))\n\t\t\t\t\t{\n\t\t\t\t\t\t//handler found\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(AnwException $e){}\n\t}", "public function subscribe($events) {\n $events->listen('view.make', 'GrahamCampbell\\BootstrapCMS\\Subscribers\\CoreSubscriber@onViewMake');\n }", "public function subscribe($events)\n {\n $events->listen('backend.sidebar.menu.getSideMenu.before', 'Mods\\Blog\\Events\\MenuEventSubscriber@addMenu');\n }", "public function getSubscribedEvents()\n {\n return ['postLoad'];\n }", "private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }", "public function observe() {}", "function on_start(){\n //$userID = $u->getUserID();\n \n //print \"runnin\";\n //$cartEventClassName = 'ScottcAffiliateRelation';\n //$cartEventClassPath = 'packages/scottc_affiliates/libraries/affiliate_relation.php';\n $eventClassName = 'AffiliateGateway';\n $eventClassPath = 'packages/affiliate_gateway/libraries/affiliate_gateway.php';\n \n define(\"ENABLE_APPLICATION_EVENTS\", true);\n \n Events::extend('on_start', $eventClassName, 'eventOnStart', $eventClassPath, $_GET);\n //Events::extend('on_page_view', 'AffiliateGateway', 'eventOnStart', 'packages/affiliate_gateway/libraries/affiliate_gateway.php');\n \n // if($_GET){\n // Loader::library('affiliate_relation',SCOTTECOMAFFILATESPACKAGEHANDLE);\n // $har = new ScottcAffiliateRelation($_GET);\n // }\n }", "protected function registerEventListener()\n {\n $subscriber = $this->getConfig()->get('audit-trail.subscriber', AuditTrailEventSubscriber::class);\n $this->getDispatcher()->subscribe($subscriber);\n }", "public static function get_subscribed_events() {\r\n\t\treturn [\r\n\t\t\t'wp_head' => [ 'preload_fonts' ],\r\n\t\t];\r\n\t}", "public function handleSubscriptionEvent(object $message): void;", "function event_poll_page_handler($page) {\n\n\telgg_load_library('elgg:event_poll');\n\t$page_type = $page[0];\n\tswitch ($page_type) {\t\t\n\t\tcase 'add':\n\t\tcase 'edit':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_page_content_edit($page_type,$page[1]);\n\t\t\tbreak;\n\t\tcase 'vote':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_page_content_vote($page[1]);\n\t\t\tbreak;\n\t\tcase 'schedule':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_page_content_schedule($page[1]);\n\t\t\tbreak;\n\t\tcase 'list':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_page_content_list($page[1]);\n\t\t\tbreak;\n\t\tcase 'get_times_dropdown':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_times_dropdown();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn FALSE;\n\t}\n\treturn TRUE;\n}", "public function getSubscribedEvents()\n {\n return [\n 'App\\Model\\Authentication\\UserAuthenticator::onLoggedIn'\n ];\n }", "public function run()\n {\n // Attach CSS and JS files of the plugin to chat window.\n $dispatcher = EventDispatcher::getInstance();\n $dispatcher->attachListener(Events::PAGE_ADD_CSS, $this, 'attachCssFiles');\n $dispatcher->attachListener(Events::PAGE_ADD_JS, $this, 'attachJsFiles');\n $dispatcher->attachListener(Events::PAGE_ADD_JS_PLUGIN_OPTIONS, $this, 'attachPluginOptions');\n }", "public function subscribe(Dispatcher $events): void\n {\n $events->listen('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n $events->listen('wp_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('login_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('admin_init', [$this, 'enqueueEditorAssets']);\n }", "public function subscribe(Dispatcher $events): void\n {\n $events->listen('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n $events->listen('wp_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('login_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('admin_init', [$this, 'enqueueEditorAssets']);\n }", "public function onReady() {\n\t\t$appInstance = $this; // a reference to this application instance for ExampleWebSocketRoute\n\t\t\\PHPDaemon\\WebSocket\\WebSocketServer::getInstance()->addRoute('ExamplePubSub', function ($client) use ($appInstance) {\n\t\t\treturn new ExamplePubSubWebSocketRoute($client, $appInstance);\n\t\t});\n\t\t$this->sql = \\PHPDaemon\\Clients\\MySQLClient::getInstance();\n\t\t$this->pubsub = new \\PHPDaemon\\PubSub();\n\t\t$this->pubsub->addEvent('usersNum', \\PHPDaemon\\PubSubEvent::init()\n\t\t\t\t\t\t\t\t\t\t\t\t ->onActivation(function ($pubsub) use ($appInstance) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t \\PHPDaemon\\Daemon::log('onActivation');\n\t\t\t\t\t\t\t\t\t\t\t\t\t if (isset($pubsub->event)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \\PHPDaemon\\Timer::setTimeout($pubsub->event, 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t return;\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t $pubsub->event = setTimeout(function ($timer) use ($pubsub, $appInstance) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $appInstance->sql->getConnection(function ($sql) use ($pubsub) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!$sql->connected) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t return;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $sql->query('SELECT COUNT(*) `num` FROM `dle_users`', function ($sql, $success) use ($pubsub) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $pubsub->pub(sizeof($sql->resultRows) ? $sql->resultRows[0]['num'] : 'null');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $timer->timeout(5e6); // 5 seconds\n\t\t\t\t\t\t\t\t\t\t\t\t\t }, 0);\n\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t ->onDeactivation(function ($pubsub) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t if (isset($pubsub->event)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \\PHPDaemon\\Timer::cancelTimeout($pubsub->event);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t);\n\t}", "public function subscribe(Events $events)\n\t{\n\t\t$events->listen('crud::saved', array($this, 'onSaved'));\n\t}", "public function on_page_view() {\n\t\tif (method_exists(self::$_library, \"on_page_view\")) {\n\t\t\tself::$_library->on_page_view();\n\t\t}\n\t}", "public static function listen() {\n\t\tif ( filter_has_var( INPUT_GET, 'xml_notification' ) || filter_has_var( INPUT_GET, 'xml_notifaction' ) ) {\n\t\t\t$data = file_get_contents( 'php://input' );\n\n\t\t\t$xml = Pronamic_WP_Util::simplexml_load_string( $data );\n\n\t\t\tif ( ! is_wp_error( $xml ) ) {\n\t\t\t\t$notification = Pronamic_WP_Pay_Gateways_IDealBasic_XML_NotificationParser::parse( $xml );\n\n\t\t\t\t$purchase_id = $notification->get_purchase_id();\n\n\t\t\t\t$payment = get_pronamic_payment_by_meta( '_pronamic_payment_purchase_id', $purchase_id );\n\n\t\t\t\tif ( $payment ) {\n\t\t\t\t\t$payment->set_transaction_id( $notification->get_transaction_id() );\n\t\t\t\t\t$payment->set_status( $notification->get_status() );\n\n\t\t\t\t\tPronamic_WP_Pay_Plugin::update_payment( $payment );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function testComDayCqWcmCoreImplEventPageEventAuditListener()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.core.impl.event.PageEventAuditListener';\n\n $crawler = $client->request('POST', $path);\n }", "function getPublishChangeEvents() {\n\t\treturn array('updateSidebar');\n\t}", "protected function getPage_SubscriberService()\n {\n return $this->services['page.subscriber'] = new \\Victoire\\Bundle\\PageBundle\\EventSubscriber\\PageSubscriber($this->get('router'), $this->get('victoire_page.user_callable'), 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity\\\\User', $this->get('victoire_view_reference.builder'), $this->get('victoire_view_reference.repository'));\n }", "public function register_notifications();", "public static function getSubscribedEvents()\n {\n return array(\n AvisotaMessageEvents::POST_RENDER_MESSAGE_CONTENT => array(\n array('injectGA', -500),\n ),\n\n GetOperationButtonEvent::NAME => array(\n array('prepareButton'),\n ),\n\n BuildDataDefinitionEvent::NAME => array(\n array('injectGALegend'),\n ),\n );\n }", "public function manage_events()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n \n $allRsvps = $this->Event->EventsUser->find('all');\n $this->set('rsvps', $allRsvps);\n \n $this->EventHelper(); \n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }", "public function subscribe($events)\n {\n $events->listen(\n MicroblogSaved::class,\n 'Coyote\\Listeners\\MicroblogListener@onMicroblogSave'\n );\n\n $events->listen(\n MicroblogDeleted::class,\n 'Coyote\\Listeners\\MicroblogListener@onMicroblogDelete'\n );\n }", "public function getSubscribedEvents()\n {\n return array(Events::postLoad);\n }", "public static function getSubscribedEvents()\n {\n return array(\n 'Enlight_Controller_Dispatcher_ControllerPath_Widgets_SwagBrowserLanguage' => 'onGetFrontendController',\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend' => 'onPostDispatchFrontend'\n );\n }", "public function onSinglePageLoaded(array &$pageData)\n {\n $this->triggerEvent('get_page_data', array(&$pageData, $pageData['meta']));\n }", "function dispatch_wiki_page_notification($page_id, $type)\n{\n require_lang('wiki');\n\n $page_name = get_translated_text($GLOBALS['SITE_DB']->query_select_value('wiki_pages', 'title', array('id' => $page_id)));\n $_the_message = get_translated_text($GLOBALS['SITE_DB']->query_select_value('wiki_pages', 'description', array('id' => $page_id)));\n\n $_view_url = build_url(array('page' => 'wiki', 'type' => 'browse', 'id' => $page_id), get_page_zone('wiki'), null, false, false, true);\n $view_url = $_view_url->evaluate();\n $their_displayname = $GLOBALS['FORUM_DRIVER']->get_username(get_member(), true);\n $their_username = $GLOBALS['FORUM_DRIVER']->get_username(get_member());\n\n require_code('notifications');\n\n $subject = do_lang($type . '_WIKI_PAGE_SUBJECT', $page_name, $their_displayname, $their_username, get_site_default_lang());\n $message_raw = do_notification_lang($type . '_WIKI_PAGE_BODY', comcode_escape($their_displayname), comcode_escape($page_name), array(comcode_escape($view_url), $_the_message, comcode_escape($their_username)), get_site_default_lang());\n\n dispatch_notification('wiki', strval($page_id), $subject, $message_raw);\n}", "public function registerEvents()\n {\n $this->subscribeEvent(\n 'Shopware_Controllers_Widgets_Emotion_AddElement',\n 'onEmotionAddElement'\n );\n\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Widgets_Campaign',\n 'extendsEmotionTemplates'\n );\n\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n\n /**\n * Subscribe to the post dispatch event of the emotion backend module to extend the components.\n */\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Emotion',\n 'onPostDispatchBackendEmotion'\n );\n }", "public static function initHooks() {\n\t\t$m = self::pw('modules')->get('DpagesMpo');\n\n\t\t$m->addHook('Page(pw_template=purchase-orders-invoices)::apInvoiceUrl', function($event) {\n\t\t\t$event->return = self::invoiceUrl($event->arguments(0));\n\t\t});\n\n\t}", "function eventclass_offeraride()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "public static function getSubscribedEvents()\n {\n return array(\n BackofficeEvents::DASHBOARD => 'addDashboardTab',\n );\n }", "public static function getSubscribedEvents()\n {\n return array(\n GetFormDataControllerEvent::NAME => array(\n array('getFormDataNewsController')\n )\n );\n }", "public function subscribe($events)\n {\n $events->listen(\n 'Coyote\\Events\\PostWasSaved',\n 'Coyote\\Listeners\\PostListener@onPostSave'\n );\n\n $events->listen(\n 'Coyote\\Events\\PostWasDeleted',\n 'Coyote\\Listeners\\PostListener@onPostDelete'\n );\n }", "protected function listen() {\n\t\t// Sanity check\n\t\tif ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'timezone-settings' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update request?\n\t\tif ( isset( $_GET['timezone-update'] ) ) {\n\t\t\t$updater = new Tribe__Events__Admin__Timezone_Updater;\n\t\t\t$updater->init_update();\n\t\t}\n\t}", "public function subscribe($event)\n {\n $event->listen('eloquent.saved: Setting', 'App\\Observers\\SettingObserver@saved');\n }", "function newsletters_subscribe_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-subscribe.php\" );\r\n }", "function registerPages() {\n\t \\Idno\\Core\\site()->addPageHandler('\\_known/callback', '\\IdnoPlugins\\Known\\Pages\\Callback');\n\t // Register admin settings\n\t \\Idno\\Core\\site()->addPageHandler('admin/known', '\\IdnoPlugins\\Known\\Pages\\Admin');\n\t // Register settings page\n\t \\Idno\\Core\\site()->addPageHandler('account/known', '\\IdnoPlugins\\Known\\Pages\\Account');\n\n\t /** Template extensions */\n\t // Add menu items to account & administration screens\n\t \\Idno\\Core\\site()->template()->extendTemplate('admin/menu/items', 'admin/known/menu');\n\t \\Idno\\Core\\site()->template()->extendTemplate('account/menu/items', 'account/known/menu');\n\t}", "public static function getSubscribedEvents()\n {\n return array(\n AvisotaMessageEvents::RENDER_MESSAGE_CONTENT => array(\n array('renderContent'),\n ),\n );\n }", "public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }", "public function getSubscribedEvents()\n {\n return [FeedFacade::FEED_EVENT];\n }", "public function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\t'Nette\\Application\\Application::onStartup' => 'appStartup',\n\t\t\t'Nette\\Application\\Application::onRequest' => 'appRequest',\n\t\t];\n\t}", "public function track_helper_connection_start() {\n\t\tWC_Tracks::record_event( 'extensions_subscriptions_connect' );\n\t}", "public function subscribe($events)\n {\n $events->listen('mailActivateAccount', 'App\\Listeners\\MailEventHandler@mailActivateAccount');\n $events->listen('mailActivatedAccount', 'App\\Listeners\\MailEventHandler@mailActivatedAccount');\n $events->listen('mailPasswordReminder', 'App\\Listeners\\MailEventHandler@mailPasswordReminder');\n }", "protected function registerEvents(): void\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "public function testEventCanBeSubscribedToAndCanBePublished()\n\t{\n\t\tConfig::set('history::bus.driver', 'memory');\n\n\t\t$expected = false;\n\n\t\tBus::subscribe('TestEvent', function($event) use (&$expected)\n\t\t{\n\t\t\t$expected = $event->data == 'Hello World!';\n\t\t});\n\n\t\tBus::publish(new TestEvent);\n\n\t\t$this->assertTrue($expected);\n\t}", "private function init_nopriv_event_listeners() {\n\t\t// add_action('wp_ajax_nopriv_example_action', [$this, 'example_function']);\n\t}", "public function subscription(): EventSubscription;", "public static function eventSubscriptions() : iterable;", "protected function registerEvents()\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "public function subscribe($event)\n\t{\n\t\t$event->listen('stats.startedGame', 'MovBizz\\Statistics\\Stats@increaseStartedGames');\n\t\t$event->listen('stats.producedMovies', 'MovBizz\\Statistics\\Stats@increaseProducedMovies');\n\t\t$event->listen('stats.lotteryWinnings', 'MovBizz\\Statistics\\Stats@increaseLotteryWinnings');\n\t\t$event->listen('stats.drugUse', 'MovBizz\\Statistics\\Stats@increaseDrugUse');\n\t\t// money spent\n\t\t// money spent on ads\n\t\t// award winnings\n\t\t// money income\n\t\t// highest lottery win\n\t\t// highest income\n\t\t// highest costs\n\t}", "public function getSubscribedEvents()\n {\n return [InvitedNewUserToTenancy::class => ['whenInvitedNewUserToTenancy']];\n }", "public function onBeforeMakeFeedDocumentPage($event) {\n\t\t$this->raiseEvent('onBeforeMakeFeedDocumentPage', $event);\n\t}", "public static function __events () {\n \n }", "public function registerEvents()\n {\n if (!empty($this->clientEvents)) {\n $js = [];\n foreach ($this->clientEvents as $event => $handle) {\n $handle = new JsExpression($handle);\n $js[] = \"$({$this->var}).on('{$event}', {$handle});\";\n }\n $this->getView()->registerJs(implode(PHP_EOL, $js));\n }\n }", "public function register() {\n\t\tadd_action( 'admin_init', [ $this, 'schedule_event' ] );\n\t\tadd_action( $this->get_event_name(), [ $this, 'process' ] );\n\n\t\t$this->plugin_file = plugin_basename( dirname( dirname( __DIR__ ) ) . '/amp.php' );\n\t\tadd_action( \"network_admin_plugin_action_links_{$this->plugin_file}\", [ $this, 'add_warning_sign_to_network_deactivate_action' ], 10, 1 );\n\t\tadd_action( 'plugin_row_meta', [ $this, 'add_warning_to_plugin_meta' ], 10, 2 );\n\t}", "public static function getSubscribedEvents() {\n $events[KernelEvents::REQUEST][] = array('redirectAnon');\n return $events;\n }", "public function subscribe(Dispatcher $events)\n {\n $events->listen(\n [\n 'App\\EventSourcing\\Events\\Merchant\\LoggedIn',\n 'App\\EventSourcing\\Events\\Merchant\\SignedUp',\n ],\n 'App\\EventSourcing\\Listeners\\UserListener@handle'\n );\n }", "public function onAlternativePage();", "public function subscribe($events)\n {\n $events->listen(\n DocumentUploaded::class,\n self::PATH . 'documentUploaded'\n );\n }" ]
[ "0.6532305", "0.6532305", "0.6413435", "0.6231928", "0.6195051", "0.61842126", "0.61089206", "0.60895973", "0.60868955", "0.6048607", "0.60123914", "0.60042155", "0.5969719", "0.5968984", "0.59584755", "0.5953914", "0.5948487", "0.5944528", "0.59079957", "0.58785325", "0.5843137", "0.5829312", "0.5769522", "0.5762694", "0.576098", "0.57531136", "0.5736043", "0.5736043", "0.573477", "0.5733974", "0.57267267", "0.5714563", "0.570957", "0.570307", "0.56781393", "0.56617", "0.5658219", "0.5648524", "0.56472194", "0.56294435", "0.5619776", "0.56086427", "0.5606836", "0.5598809", "0.5584403", "0.55831546", "0.55749816", "0.5572713", "0.5570751", "0.5569619", "0.5550008", "0.5550008", "0.5547952", "0.55368435", "0.55303764", "0.55192256", "0.55187035", "0.55078214", "0.5474999", "0.546234", "0.5452021", "0.5447959", "0.5435125", "0.5433983", "0.543361", "0.54308903", "0.5419191", "0.5417636", "0.54117334", "0.5399162", "0.5387679", "0.53747696", "0.5373358", "0.53721684", "0.5370779", "0.53701144", "0.5357797", "0.5356976", "0.53552717", "0.5324295", "0.5322486", "0.5322183", "0.53094226", "0.5302772", "0.52972245", "0.52861094", "0.52844256", "0.52769995", "0.5273684", "0.5272471", "0.5270823", "0.52703494", "0.52688444", "0.5259458", "0.52522224", "0.52441365", "0.522828", "0.52260625", "0.52193147", "0.5218703", "0.5218279" ]
0.0
-1
Notifies all subscribers about an event
public function notify(\context $context, string $component, string $area, int $itemid, ?array $payload = null): void { global $DB; $time = time(); $DB->insert_record(self::TABLENAME, [ 'contextid' => $context->id, 'component' => $component, 'area' => $area, 'itemid' => $itemid, 'payload' => json_encode($payload ?? []), 'timecreated' => $time, 'timemodified' => $time, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSubscribedEvents();", "public static function getSubscribedEvents();", "public static function getSubscribedEvents();", "public function notify()\n {\n $eventName = $this->getEventName();\n if (empty($this->observers[$eventName])) {\n $observerNames = Model::factory('Observer')->getByEventName($eventName);\n foreach ($observerNames as $observerName) {\n $this->observers[$eventName][] = new $observerName();\n }\n }\n if (!empty($this->observers[$eventName])) {\n foreach ($this->observers[$eventName] as $observer) {\n $observer->update($this);\n }\n }\n }", "public function subscribe(): void\n {\n foreach (static::$eventHandlerMap as $eventName => $handler) {\n $this->events->listen($eventName, [$this, $handler]);\n }\n }", "function notify($event) {\r\n\t\tif ( count($this->_listeners) > 0 ) {\r\n\t\t\tif ( false ) $listener = new ftpClientObserver();\r\n\t\t\tforeach ( $this->_listeners as $id => $listener ) {\r\n\t\t\t\t$listener->notify($event);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function notify($event, $subject = null, $params = array());", "public function collectSubscribers();", "function sendEvent( $event )\n {\n Event_Manager::notify( $event );\n }", "public static function getSubscribedEvents()\n {\n echo 'Test';\n }", "static public function getSubscribedEvents()\n {\n return array(\n MauticEventTrigger::TRIGGERUPDATE => array('onPerformTest', 0)\n );\n }", "public function notify() {\n // Updates all classes subscribed to this object\n foreach ($this->observers as $obs) {\n $obs->update($this);\n }\n }", "protected function _subscribeToEngineEvents()\n {\n $controller = $this->getController();\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array(\n 'callback' => array( $this, 'onEndOfFax' ),\n 'options' => array( 'autoRemove' => 'before' )\n )\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::FAXPAGE,\n array( 'callback' => array( $this, 'onFaxPage' ) )\n );\n }", "public function eventsAction()\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 $event = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if (isset($event['userData']) && $event['userData'] instanceof Users) {\n $this->di->setShared('userData', $event['userData']);\n }\n\n //lets fire the event\n $this->events->fire($event['event'], $event['source'], $event['data']);\n\n $this->log->info(\n \"Notification ({$event['event']}) - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::EVENTS, $callback);\n }", "public function getSubscribedEvents()\n {\n return array(\n 'postPersist',\n \t'postFlush',\n 'onFlush'\n );\n }", "public static function getSubscribedEvents()\n {\n // event can be dispatch with dispatcher in a controller ...\n return [\n 'user.update' => 'updateUser'\n ];\n }", "public function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\tEvents::onFlush\n\t\t];\n\t}", "public static function eventSubscriptions() : iterable;", "public function subscribe($events)\n {\n $events->listen('Illuminate\\Mail\\Events\\MessageSending', self::class.'@onSending');\n }", "public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }", "public static function getSubscribedEvents()\n {\n return [\n FOSUserEvents::REGISTRATION_CONFIRM => [\n ['onRegistrationConfirm', -10],\n ],\n ];\n }", "public function broadcastOn()\n {\n return ['RecordChanges'];\n }", "public function notify($event, $params)\n {\n $observers = $this->getObservers();\n\n if (isset($observers[$event])) {\n foreach ($observers[$event] as $observer) {\n $observer->setTriggeredEvent($event);\n $observer->setTriggeredEventParams($params);\n $observer->setBag($this->getBag());\n $observer->run();\n }\n }\n }", "public function send_events()\n {\n }", "public function getSubscribedEvents()\n {\n return [\n 'onFlush',\n 'postPersist',\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postUpdate,\n ];\n }", "public function broadcastEvent(\\Montage\\Event\\Event $event);", "public function notify()\n\t{\n\t\tforeach ($this->observers as $obs)\n\t\t{\n\t\t\t$obs->update($this);\n\t\t}\n\t}", "public function subscribe($events) {\n /* Publication */\n //$events->listen('publication.save', 'PublicationObserver@onPublicationSave');\n// $events->listen('publication.addImage', 'PublicationObserver@onPublicationAddImage');\n// $events->listen('publication.deleteImage', 'PublicationObserver@onPublicationDeleteImage');\n $events->listen('publication.change', 'PublicationObserver@onPublicationChange');\n\n //$events->listen('user.logout', 'CacheHandler@onUserLogout');\n }", "public function notify(){\n foreach ($this->observers as $observer){\n $observer->update();\n }\n }", "function notify()\n {\n foreach ($this->observers as $observer) {\n $observer->update($this);\n }\n }", "public function notify()\n {\n foreach ($this->observers as $value) {\n $value->update($this);\n }\n }", "public function getSubscribedEvents()\n {\n return [\n 'App\\Model\\Facades\\ListingsFacade::onListingSharing'\n ];\n }", "public function getSubscribedEvents()\n {\n return array('onFlush', 'loadClassMetadata');\n }", "public function notify() {\n\t\tforeach($this->_observers as $key => $val) {\n\t\t\t$val->update($this);\n\t\t}\n\t}", "public function subscribe($events)\n {\n $events->listen(\n 'App\\Events\\Subscriber\\Created',\n 'App\\Listeners\\SubscriberSubscriber@sendVerification'\n );\n }", "public function notify() {\n $this->observers->rewind();\n while($this->observers->valid()) {\n $object = $this->observers->current();\n // dump($object);die;\n $object->update($this);\n $this->observers->next();\n }\n }", "public function getSubscribedEvents(): array\n {\n return [\n Events::onFlush\n ];\n }", "public static function getSubscribedEvents()\n {\n return [NotificationEvent::NAME => ['handleNotificationEvent', self::getPriority()]];\n }", "public function getSubscribedEvents()\n {\n return [\n 'postPersist',\n 'postUpdate',\n 'preRemove',\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n 'postPersist',\n 'postUpdate',\n 'preRemove',\n ];\n }", "function notify()\n {\n foreach ($this->observers as $obKey => $obValue) {\n $obValue->update($this);\n }\n }", "public function handleSubscriptionEvent(object $message): void;", "public static function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\tMeetupEvents::MEETUP_JOIN\t=> 'onUserJoins',\n\t\t\tKernelEvents::TERMINATE\t\t=> 'generatePreferences'\n\t\t];\n\t}", "public function getSubscribedEvents()\n {\n return array(\n 'prePersist',\n 'preUpdate'\n );\n }", "public function notify()\n {\n foreach ($this->observers as $observer) {\n $observer->update();\n }\n }", "public function getSubscribedEvents(): array\n {\n return [\n 'postPersist',\n 'preUpdate',\n 'preRemove',\n ];\n }", "public static function getSubscribedEvents() {\n return [];\n }", "public function getSubscribedEvents()\n {\n return [\n 'App\\Model\\Authentication\\UserAuthenticator::onLoggedIn'\n ];\n }", "public function notify()\r\n {\r\n foreach( $this->observers as $observer )\r\n $observer->update( $this );\r\n\r\n }", "public static function getSubscribedEvents()\n {\n return [\n TheliaEvents::ORDER_UPDATE_STATUS => ['implementInvoice', 100]\n ];\n }", "function notify($eventID, $param1 = array(), &$param2 = null, &$param3 = null, &$param4 = null, &$param5 = null, &$param6 = null, &$param7 = null, &$param8 = null, &$param9 = null)\n {\n $this->logNotifier($eventID, $param1, $param2, $param3, $param4, $param5, $param6, $param7, $param8, $param9);\n\n $observers = &$this->getStaticObserver();\n if (is_null($observers)) {\n return;\n }\n foreach ($observers as $key => $obs) {\n // identify the event\n $actualEventId = $eventID;\n $matchMap = [$eventID, '*'];\n\n // Adjust for aliases\n\n // if the event fired by the notifier is old and has an alias registered\n $hasAlias = $this->eventIdHasAlias($obs['eventID']);\n if ($hasAlias) {\n // then lookup the correct new event name\n $eventAlias = $this->substituteAlias($eventID);\n // use the substituted event name in the list of matches\n $matchMap = [$eventAlias, '*'];\n // and set the Actual event to the name that was originally attached to in the observer class\n $actualEventId = $obs['eventID'];\n }\n // check whether the looped observer's eventID is a match to the event or alias\n if (!in_array($obs['eventID'], $matchMap)) {\n continue;\n }\n\n // Notify the listening observers that this event has been triggered\n\n $methodsToCheck = [];\n // Check for a snake_cased method name of the notifier Event, ONLY IF it begins with \"NOTIFY_\" or \"NOTIFIER_\"\n $snake_case_method = strtolower($actualEventId);\n if (preg_match('/^notif(y|ier)_/', $snake_case_method) && method_exists($obs['obs'], $snake_case_method)) {\n $methodsToCheck[] = $snake_case_method;\n }\n // alternates are a camelCased version starting with \"update\" ie: updateNotifierNameCamelCased(), or just \"update()\"\n $methodsToCheck[] = 'update' . self::camelize(strtolower($actualEventId), true);\n $methodsToCheck[] = 'update';\n\n foreach($methodsToCheck as $method) {\n if (method_exists($obs['obs'], $method)) {\n $obs['obs']->{$method}($this, $actualEventId, $param1, $param2, $param3, $param4, $param5, $param6, $param7, $param8, $param9);\n continue 2;\n }\n }\n // If no update handler method exists then trigger an error so the problem is logged\n $className = (is_object($obs['obs'])) ? get_class($obs['obs']) : $obs['obs'];\n trigger_error('WARNING: No update() method (or matching alternative) found in the ' . $className . ' class for event ' . $actualEventId, E_USER_WARNING);\n }\n }", "public function getEventSubscriber();", "public function subscribe($events)\n {\n $events->listen('mailActivateAccount', 'App\\Listeners\\MailEventHandler@mailActivateAccount');\n $events->listen('mailActivatedAccount', 'App\\Listeners\\MailEventHandler@mailActivatedAccount');\n $events->listen('mailPasswordReminder', 'App\\Listeners\\MailEventHandler@mailPasswordReminder');\n }", "public function subscribe($events)\n {\n foreach ($this->events as $event => $action) {\n $events->listen($event, BadgeSubscriber::class . '@' . $action);\n }\n }", "public function notify()\n {\n foreach ($this->_observers as $observer) {\n $observer->update($this);\n }\n }", "public function subscribes();", "function notifyEvent( $eventType, $args )\n {\n $event = new Event( $eventType, $args );\n $this->sendEvent( $event );\n }", "public function getSubscribedEvents()\n {\n return [InvitedNewUserToTenancy::class => ['whenInvitedNewUserToTenancy']];\n }", "public function subscribe();", "public function getSubscribedEvents()\n {\n return ['prePersist', 'preUpdate'];\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postFlush,\n Events::preRemove\n ];\n }", "protected function listenForEvents()\n {\n $callback = function ($event) {\n foreach ($this->logWriters as $writer) {\n $writer->log($event);\n }\n };\n\n $this->events->listen(JobProcessing::class, $callback);\n $this->events->listen(JobProcessed::class, $callback);\n $this->events->listen(JobFailed::class, $callback);\n $this->events->listen(JobExceptionOccurred::class, $callback);\n }", "public function subscribe($events) {\n $events->listen(\n 'App\\Events\\LockUserAccount',\n 'App\\Listeners\\AdminActionsSubscriber@onAccountLocked'\n );\n\n $events->listen(\n 'App\\Events\\AutoClearOldEvents',\n 'App\\Listeners\\AdminActionsSubscriber@onAutoClearOldEvents'\n );\n\n $events->listen(\n 'App\\Events\\AdminUpdateUserDetail',\n 'App\\Listeners\\AdminActionsSubscriber@onAdminUpdateUserDetail'\n );\n\n $events->listen(\n 'App\\Events\\AdminUpdateUserPassword',\n 'App\\Listeners\\AdminActionsSubscriber@onAdminUpdateUserPassword'\n );\n\n $events->listen(\n 'App\\Events\\AdminUpdateJobTitle',\n 'App\\Listeners\\AdminActionsSubscriber@onAdminUpdateJobTitle'\n );\n\n $events->listen(\n 'App\\Events\\InstitutionEvent',\n 'App\\Listeners\\AdminActionsSubscriber@onInstitutionUpdated'\n );\n }", "function notify($event)\n {\n return;\n }", "public function triggerEvent($event) {\r\n\t\tif (!isset($this->eventListener[$event])) return void;\r\n\t\t\r\n\t\tforeach($this->eventListener[$event] as $listener) {\r\n\t\t\t$listener->listen($event);\r\n\t\t}\r\n\t}", "public function subscribe($events)\n {\n $events->listen(\n 'App\\Events\\UserSignUp',\n 'App\\Listeners\\SendMailSubscriber@onUserSignUp'\n );\n\n $events->listen(\n 'App\\Events\\UserPasswordReset',\n 'App\\Listeners\\SendMailSubscriber@onUserResetPassword'\n );\n }", "public function testGetSubscribedEvents()\n {\n $listener = new UploaderListener($this->adapter, $this->driver, $this->storage, $this->injector);\n $events = $listener->getSubscribedEvents();\n\n $this->assertTrue(in_array('prePersist', $events));\n $this->assertTrue(in_array('preUpdate', $events));\n $this->assertTrue(in_array('postLoad', $events));\n $this->assertTrue(in_array('postRemove', $events));\n }", "public function subscribe($events)\n {\n\n foreach($this->actions as $action){\n $events->listen(\n 'RoiUp\\Zoom\\Events\\Meeting\\\\MeetingRegistrant' . $action,\n self::class . '@onRegistrant' . $action\n );\n }\n\n }", "public static function getSubscribedEvents()\n {\n return array(\n GetFormDataControllerEvent::NAME => array(\n array('getFormDataNewsController')\n )\n );\n }", "public static function getSubscribedEvents(): array {\n return [\n Events::PRODUCT_DELETE => 'onProductDeleted',\n ];\n }", "public static function getSubscribedEvents()\n {\n return [\n FOSUserEvents::REGISTRATION_INITIALIZE => [\n ['disableUser', 0],\n ],\n FOSUserEvents::REGISTRATION_SUCCESS => [\n ['registrationFlashMessage', 0],\n ],\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postPersist,\n Events::postUpdate,\n// Events::preUpdate,\n ];\n\n }", "protected function notifyAll()\n\t{\n\t\t$this->notifyBorrowers();\n\t\t$this->notifyLenders();\n\t}", "public function subscribe($events)\n {\n $events->listen(\n AttendanceCreated::class,\n 'App\\Listeners\\NotificationListener@onAttendanceCreated'\n );\n\n $events->listen(\n MarkCreated::class,\n 'App\\Listeners\\NotificationListener@onMarkCreated'\n );\n\n }", "public function subscribe($events)\n {\n \t$events->listen(\n \t\t\\Config::get('detr.event_detr.event_sentmail_order'), \n \t\t'DeTrFunc\\EventDetrSendMailSubcriber@onSentOrderStatusMail'\n \t);\n\n $events->listen(\n \\Config::get('detr.event_detr.event_sentmail_notify_order'), \n 'DeTrFunc\\EventDetrSendMailSubcriber@onSentOrderNotifyMail'\n );\n }", "private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }", "public function subscribe(): void;", "public function subscribe($events)\n {\n $events->listen(\n DocumentUploaded::class,\n self::PATH . 'documentUploaded'\n );\n }", "protected static function events()\n {\n foreach (self::fetch('app/events', false) as $file) {\n Bus::need($file);\n }\n //\n Event::register();\n }", "private function registerSubscribers()\n {\n $extensions = $this->dataGridFactory->getExtensions();\n\n foreach ($extensions as $extension) {\n $extension->registerSubscribers($this);\n }\n }", "public static function getSubscribedEvents()\n {\n return [\n TheliaEvents::ORDER_BEFORE_PAYMENT => ['sendOrderConfirmationEmail', 129]\n ];\n }", "public function getSubscribedEvents()\n {\n return [Events::postPersist];\n }", "public function subscribe(Events $events)\n\t{\n\t\t$events->listen('crud::saved', array($this, 'onSaved'));\n\t}", "public function listeners($event);", "public static function getSubscribedEvents()\n {\n return [\n SubscriptionController::USER_SUBSCRIBED => 'onUserSubscribed',\n ];\n }", "public static function getSubscribedEvents()\n {\n return [\n SetMessageStatusEvent::NAME => 'onSetMessageStatus',\n ];\n }", "protected function registerEvents(): void\n {\n Event::listen(MessageLogged::class, function (MessageLogged $e) {\n if( app()->bound('current-context') )\n app('current-context')->log((array)$e);\n });\n }", "public function getSubscribedEvents()\n {\n return array(\n 'prePersist',\n 'preUpdate',\n 'loadClassMetadata'\n );\n }", "public function getSubscribedEvents(): array\n\t{\n\t\treturn [Events::postPersist];\n\t}", "public static function getSubscribedEvents()\n {\n return array(\n Constants::OMNIPAY_REQUEST_BEFORE_SEND => array('onOmnipayRequestBeforeSend', self::PRIORITY),\n Constants::OMNIPAY_RESPONSE_SUCCESS => array('onOmnipayResponseSuccess', self::PRIORITY),\n Constants::OMNIPAY_REQUEST_ERROR => array('onOmnipayRequestError', self::PRIORITY),\n );\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postUpdate,\n Events::postPersist,\n Events::preRemove\n ];\n }", "protected function event($event)\n {\n if(isset($this->events)) {\n $this->events->dispatch($event);\n }\n }", "public function eventMethod1()\n {\n // some code here...\n\n $this->notify(\"action1\");\n }", "public function getSubscribedEvents()\n {\n return array(Events::postLoad);\n }", "function notify($event)\n {\n if(SWConfig::read_values('statuswolf.debug'))\n {\n $this->loggy = new KLogger(ROOT . 'app/log/', KLogger::DEBUG);\n }\n else\n {\n $this->loggy = new KLogger(ROOT . 'app/log/', KLogger::INFO);\n }\n\n $this->auth_log_messages[] = $event;\n\n $this->loggy->logDebug(json_encode($this->auth_log_messages));\n }", "public static function getSubscribedEvents()\n {\n return [\n Events::COUPON_ADDED => ['resetDealPurchasables', 1],\n Events::COUPON_REMOVED => ['resetDealPurchasables', 1]\n ];\n }", "public function getSubscribedEvents()\n {\n return [FeedFacade::FEED_EVENT];\n }", "public function subscribe(Dispatcher $events)\n {\n $events->listen(\n [\n 'App\\EventSourcing\\Events\\Merchant\\LoggedIn',\n 'App\\EventSourcing\\Events\\Merchant\\SignedUp',\n ],\n 'App\\EventSourcing\\Listeners\\UserListener@handle'\n );\n }", "public function notify(string $event, $data) : int ;", "public function getSubscribedEvents()\n {\n return [\n 'prePersist',\n 'postPersist',\n 'preUpdate',\n 'postLoad',\n ];\n }" ]
[ "0.6881964", "0.68304497", "0.68304497", "0.6528684", "0.64321876", "0.6346694", "0.62639666", "0.62577", "0.60844386", "0.6082462", "0.60796475", "0.60774523", "0.6075026", "0.60479605", "0.6014135", "0.60022146", "0.5993497", "0.59899515", "0.58989495", "0.58987933", "0.5897988", "0.5875417", "0.5866968", "0.58650297", "0.5862048", "0.5859001", "0.58552265", "0.58498055", "0.5837579", "0.58243316", "0.5818174", "0.58108974", "0.5808351", "0.5783077", "0.57780445", "0.57770455", "0.5757508", "0.5757066", "0.57559496", "0.57535875", "0.57535875", "0.57433546", "0.5738384", "0.57357216", "0.5734622", "0.57329667", "0.5731136", "0.572113", "0.57197696", "0.57187724", "0.5712301", "0.57109624", "0.57070124", "0.57014924", "0.5697564", "0.56949544", "0.568588", "0.567909", "0.5664083", "0.5659678", "0.56526256", "0.56505966", "0.5648457", "0.56430924", "0.564", "0.5616741", "0.5602227", "0.559723", "0.5596288", "0.5584572", "0.55815357", "0.55652285", "0.5564494", "0.5557276", "0.55572325", "0.55541044", "0.55478233", "0.55436707", "0.5541883", "0.5539471", "0.5532082", "0.5525426", "0.55215734", "0.5517994", "0.5517733", "0.5516304", "0.5515396", "0.5514813", "0.5509101", "0.5506249", "0.54994977", "0.5497281", "0.54923975", "0.5491773", "0.5486821", "0.54812187", "0.5480257", "0.547452", "0.5464261", "0.5462966", "0.546038" ]
0.0
-1
Get token for current user and current session
public static function get_token() { global $USER; $sid = session_id(); return self::get_token_for_user($USER->id, $sid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserToken()\n {\n return !is_null($this->authToken) ? $this->authToken : $this->cookieHelper->getRequestCookie('auth');\n }", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "function get_token()\n\t{\n\t\treturn session_id();\n\t}", "public static function getToken() {\n return session(\"auth_token\", \"\");\n }", "function token(){\n return Request::session('internal_token');\n}", "public function userByToken();", "abstract protected function retrieveSessionToken() ;", "public function getSessionAuthToken();", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "public function getSessionToken()\n {\n return $this->provider->accessToken;\n }", "public function getToken()\n {\n return $this->getApplication()->getSecurityContext()->getToken();\n }", "public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}", "public function getToken()\n {\n return $this->getSecurityContext()->getToken();\n }", "public function get_current_user_token() {\n\t\t$user_id = $this->current_user->ID;\n\n\t\t$user_token = get_option( 'livechat_user_' . $user_id . '_token' );\n\t\tif ( ! $user_token ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn $user_token;\n\t}", "private function getCurrentToken() {\n\t\tif(isset($_GET) && isset($_GET['token'])) {\n\t\t\t$sToken = $_GET['token'];\n\t\t} else {\n\t\t\techo $this->_translator->error_token;\n\t\t\texit();\n\t\t}\n\t\treturn $sToken;\n\t}", "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "public function currentToken()\n {\n return $this->requestWithErrorHandling('get', '/api/current-token');\n }", "public function getAuthenticationTokenContext();", "public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }", "public function GetToken($data){ \n \n return $this->token;\n \n }", "public function getSessionToken()\n\t{\n\t\treturn \\Session::get('google.access_token');\n\t}", "public function getCurrentToken()\n {\n return $this->current_token;\n }", "public function getToken()\n {\n // if the user isn't authenticated simply return null\n $services = $this->services;\n if (!$services->get('permissions')->is('authenticated')) {\n return null;\n }\n\n // if we don't have a token; make one\n $session = $services->get('session');\n $container = new SessionContainer(static::CSRF_CONTAINER, $session);\n if (!$container['token']) {\n $session->start();\n $container['token'] = (string) new Uuid;\n $session->writeClose();\n }\n\n return $container['token'];\n }", "public function getToken() {\n return $this->accessToken;\n }", "public function actionGetToken() {\n\t\t$token = UserAR::model()->getToken();\n\t\t$this->responseJSON($token, \"success\");\n\t}", "function getUserFromToken() {\n\t\treturn $this->_storage->loadUserFromToken();\n\t}", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "public function obtainCurrentToken(): Token\n {\n if (null === $this->currentToken || ! $this->currentToken->isValid()) {\n $this->currentToken = $this->authenticate();\n }\n return $this->currentToken;\n }", "public function getCurrentToken() : string\n {\n return $this->request->headers->get('auth-token') ?? '';\n }", "public function getToken()\n {\n return $this->accessToken;\n }", "function token(): string\n\t\t{\n\t\t\treturn session()->getToken();\n\t\t}", "function getToken() {\n\t\n\t$u_token = (isset($_SESSION['cms']['u_token']) && $_SESSION['cms']['u_token'] > '' ) ? $_SESSION['cms']['u_token'] : '';\n\treturn $u_token;\n}", "function wp_get_session_token()\n {\n }", "protected function getCurrentUser()\n {\n $user = null;\n if (!is_null($this->tokenStorage->getToken())) {\n $user = $this->tokenStorage->getToken()->getUser();\n }\n\n return $user;\n }", "public function getToken() {\n return $this->token;\n }", "private function use_token()\n\t\t{\n\t\t\tif (!isset($_COOKIE['auth_token']) || isset($_SESSION['token_used']))\n\t\t\t\treturn false;\n\n\t\t\t$_SESSION['token_used'] = true;\n\t\t\t$token = explode(';', $_COOKIE['auth_token']);\n\t\t\t$user = $this->users->getUser(null, null, $token[0]);\n\n\t\t\tif (!$user)\n\t\t\t\treturn false;\n\n\t\t\tswitch($this->token_validate($user, $token))\n\t\t\t{\n\t\t\t\tcase -1:\n\t\t\t\t\treturn false;\n\n\t\t\t\tcase 0:\n\t\t\t\t\t$this->grant_token($user, $this->get_token($user));\n\t\t\t\t\t$_SESSION['verified'] = false;\n\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t$_SESSION['state'] = $this->multifactor ? AUTH_MULTIFACTOR : AUTH_NONE;\n\t\t\t\t\treturn $user;\n\n\t\t\t\tcase 1:\n\t\t\t\t\t$_SESSION['verified'] = true;\n\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t$_SESSION['state'] = $this->users->getState($user);\n\t\t\t\t\treturn $user;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "protected function generateSessionToken() {}", "public function token()\n {\n $token = null;\n if (!empty(getallheaders()['Authorization'])) {\n $token = getallheaders()['Authorization'];\n }\n\n if (!$token) {\n $token = $this->request->query->get('token');\n }\n\n if (!$token) {\n throw new \\Exception(\"'token' is required in URL or header Authorization\");\n }\n\n return $token;\n\n }", "public function get_token() {\n\t\treturn $this->token;\n\t}", "public function token()\n {\n if ($this->accessToken === null) {\n $this->initToken();\n }\n return $this->accessToken;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n $this->generateNewToken(128);\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "public function getToken ()\n {\n return $this->token;\n }", "function getRequestToken() {\n\t\t$r = $this->oAuthRequest ( $this->requestTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "private function getToken()\r\n\t{\r\n\t\treturn $this->app['config']->get('hipsupport::config.token');\r\n\t}", "public function getToken() {\n return $this->token;\n }", "protected function getToken()\n {\n if (!$this->isStateless()) {\n $temp = $this->request->getSession()->get('oauth.temp');\n\n return $this->server->getTokenCredentials(\n $temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')\n );\n } else {\n $temp = unserialize($_COOKIE['oauth_temp']);\n\n return $this->server->getTokenCredentials(\n $temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')\n );\n }\n }", "private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}", "public function currentGameToken();", "public function getUser()\n {\n return $this->getToken()->getUser();\n }", "public function getAuthenticatedUser()\n {\n return JWTAuth::parseToken()->authenticate();\n }", "abstract protected function getUserByToken($token);", "private function getCurrentUser() {\n try {\n\n if (! $user = JWTAuth::parseToken()->authenticate()) {\n return response()->json(['user_not_found'], 404);\n }\n\n } catch (Tymon\\JWTAuth\\Exceptions\\TokenExpiredException $e) {\n\n return response()->json(['token_expired'], $e->getStatusCode());\n\n } catch (Tymon\\JWTAuth\\Exceptions\\TokenInvalidException $e) {\n\n return response()->json(['token_invalid'], $e->getStatusCode());\n\n } catch (Tymon\\JWTAuth\\Exceptions\\JWTException $e) {\n\n return response()->json(['token_absent'], $e->getStatusCode());\n }\n\n return $user;\n }", "public function getToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return '';\n }\n return $this->requestToken->getToken();\n }", "public function getUserToken()\r\n\t{\r\n\t\t$headers = $this->getAllHeaders();\r\n\r\n\t\tif (!isset($headers[\"Token\"]) || empty($headers[\"Token\"]))\r\n\t\t\treturn false;\r\n\r\n\t\treturn $headers[\"Token\"];\r\n\t}", "public function getToken()\n {\n $value = $this->getParameter('token');\n $value = $value ?: $this->httpRequest->query->get('token');\n return $value;\n }", "public function getToken() {\n\t\treturn $this->token;\n\t}", "public function LoginToken_get()\n {\n $tokenData['user_id'] = '1';\n $tokenData['role'] = 'admin';\n $tokenData['first_name'] = 'Al';\n $tokenData['last_name'] = 'Mobin';\n $tokenData['phone'] = '+8801921040960';\n $jwtToken = $this->tokenHandler->GenerateToken($tokenData);\n $token = $jwtToken;\n echo json_encode(array('Token'=>$jwtToken));\n }", "function user_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['user_verify_token'] = $token;\n return $token;\n }", "public function getToken(): TokenInterface;", "public function getToken(): TokenInterface;", "private function getToken(): ?string\n {\n $request = $this->requestStack->getCurrentRequest();\n\n $token = null;\n\n\n if (null !== $request) {\n $token = $request->headers->get('token', null);\n }\n\n $this->token = $token;\n\n return $token;\n }", "public static function get_session_token()\n {\n $session = Session::instance();\n $token = $session->get(self::$SESSION_TOKEN_NAME);\n if (!$token) {\n $token = text::random('alnum', 16);\n self::set_session_token($token);\n }\n return $token;\n }", "function get_user_id_from_token()\n {\n $jwt_token = \\Core\\Http\\Request::getTokenFromHeader();\n $container = \\Core\\Container::getInstance();\n $session_id = $container->get('session')->get('session_id');\n $token_array = (array) $container->get('jwt')::decode($jwt_token, $session_id, array('HS256'));\n\n return $token_array['id'];\n }", "public function getToken()\n {\n return $this->controller->getToken();\n }", "public function auth()\n {\n if ($this->validate()) {\n $token = new Token();\n $token->user_id = $this->getUser()->id;\n $token->generateToken(time() + 3600 * 24);\n\n if ($token->save()) {\n $token::deleteAll(['and', 'user_id = :user_id', ['not in', 'token', $token->token]],\n [':user_id' => $token->user_id]);\n\n return $token;\n }\n }\n\n return null;\n }", "public function getTokenAuth()\n {\n \treturn $this->_token_auth;\n }", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "private function checkToken()\n {\n\t\ttry {\n\t\t\t$user = JWTAuth::GetJWTUser();\n\t\t\t$this->token = JWTAuth::CheckJWTToken($user->id);\n return $user;\n } catch (\\UnexpectedValueException $e) {\n return $this->sendResponse($e->getMessage());\n }\n }", "public function getToken()\n\t{\n\t\treturn $this->token;\n\t}", "public function getToken() {\n\t\treturn $this->_token;\n\t}", "public function getToken() {\n\t\treturn $this->jwt;\n\t}", "public function getSessionAuthTokenName();", "public function ssoGetToken($token)\n {\n $apiEndpoint = '/1/session/'.$token;\n $apiReturn = $this->runCrowdAPI($apiEndpoint, \"GET\", array());\n if ($apiReturn['status'] == '200') {\n return $apiReturn['data']['token'];\n }\n return null;\n }" ]
[ "0.7511241", "0.7504436", "0.7504436", "0.75041944", "0.75041944", "0.74776256", "0.7458744", "0.742556", "0.7403113", "0.7247412", "0.7232093", "0.72083265", "0.7151412", "0.71220917", "0.7072392", "0.7066118", "0.7050692", "0.7050453", "0.70492166", "0.7034856", "0.700692", "0.70013607", "0.6999547", "0.6995768", "0.69874686", "0.6965191", "0.6961545", "0.69587237", "0.695867", "0.69470316", "0.69470316", "0.69470316", "0.69470316", "0.6915378", "0.68968", "0.68857795", "0.68141663", "0.6791294", "0.6789162", "0.67669696", "0.6759203", "0.67575425", "0.6756236", "0.6754431", "0.675269", "0.67458844", "0.67373204", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.67177683", "0.6715597", "0.6715597", "0.6708334", "0.6707581", "0.6703616", "0.66820616", "0.66806704", "0.6679434", "0.6677096", "0.6675217", "0.6669332", "0.66692317", "0.66544455", "0.66407186", "0.6635919", "0.66226685", "0.66224045", "0.662117", "0.6616314", "0.6614341", "0.6608944", "0.6608944", "0.65993583", "0.6588146", "0.6584016", "0.6576969", "0.65679115", "0.6567853", "0.6563903", "0.6563903", "0.6563903", "0.6563903", "0.6561181", "0.6559818", "0.6558252", "0.6556278", "0.65257746", "0.65242445" ]
0.80625516
0
Get token for a given user and given session
protected static function get_token_for_user(int $userid, string $sid) { return substr(md5($sid . '/' . $userid . '/' . get_site_identifier()), 0, 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_token() {\n global $USER;\n $sid = session_id();\n return self::get_token_for_user($USER->id, $sid);\n }", "public function userByToken();", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "abstract protected function retrieveSessionToken() ;", "public function getSessionAuthToken();", "public static function getToken() {\n return session(\"auth_token\", \"\");\n }", "abstract protected function getUserByToken($token);", "protected function generateSessionToken() {}", "function get_token()\n\t{\n\t\treturn session_id();\n\t}", "public function getToken(string $userToken): ?Token;", "function token(){\n return Request::session('internal_token');\n}", "public function getSessionToken()\n\t{\n\t\treturn \\Session::get('google.access_token');\n\t}", "public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }", "function wp_get_session_token()\n {\n }", "public function receiveUserToken(User $user, $password);", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "function get_user_id_from_token()\n {\n $jwt_token = \\Core\\Http\\Request::getTokenFromHeader();\n $container = \\Core\\Container::getInstance();\n $session_id = $container->get('session')->get('session_id');\n $token_array = (array) $container->get('jwt')::decode($jwt_token, $session_id, array('HS256'));\n\n return $token_array['id'];\n }", "public function getSessionToken()\n {\n return $this->provider->accessToken;\n }", "private function use_token()\n\t\t{\n\t\t\tif (!isset($_COOKIE['auth_token']) || isset($_SESSION['token_used']))\n\t\t\t\treturn false;\n\n\t\t\t$_SESSION['token_used'] = true;\n\t\t\t$token = explode(';', $_COOKIE['auth_token']);\n\t\t\t$user = $this->users->getUser(null, null, $token[0]);\n\n\t\t\tif (!$user)\n\t\t\t\treturn false;\n\n\t\t\tswitch($this->token_validate($user, $token))\n\t\t\t{\n\t\t\t\tcase -1:\n\t\t\t\t\treturn false;\n\n\t\t\t\tcase 0:\n\t\t\t\t\t$this->grant_token($user, $this->get_token($user));\n\t\t\t\t\t$_SESSION['verified'] = false;\n\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t$_SESSION['state'] = $this->multifactor ? AUTH_MULTIFACTOR : AUTH_NONE;\n\t\t\t\t\treturn $user;\n\n\t\t\t\tcase 1:\n\t\t\t\t\t$_SESSION['verified'] = true;\n\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t$_SESSION['state'] = $this->users->getState($user);\n\t\t\t\t\treturn $user;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "function getUserFromToken() {\n\t\treturn $this->_storage->loadUserFromToken();\n\t}", "function retrieveUserByAccessToken($accessToken);", "private function get_token($user)\n\t\t{\n\t\t\treturn $user->id . ';' . $this->ip_lock($this->getAuthToken($user)) . ';' . $_SERVER['REMOTE_ADDR'];\n\t\t}", "public function getToken()\n {\n // if the user isn't authenticated simply return null\n $services = $this->services;\n if (!$services->get('permissions')->is('authenticated')) {\n return null;\n }\n\n // if we don't have a token; make one\n $session = $services->get('session');\n $container = new SessionContainer(static::CSRF_CONTAINER, $session);\n if (!$container['token']) {\n $session->start();\n $container['token'] = (string) new Uuid;\n $session->writeClose();\n }\n\n return $container['token'];\n }", "function curl_getToken($login, $password)\n{\n $url = set_url('auth');\n $postRequest = \"grant_type=password&username={$login}&password={$password}\";\n\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, $postRequest);\n curl_setopt($cURLConnection, CURLOPT_USERPWD, otomoto_api());\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n\n $apiResponse = json_decode(curl_exec($cURLConnection));\n\n curl_close($cURLConnection);\n\n $_SESSION['token'] = $apiResponse->access_token;\n}", "public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}", "private function checkToken()\n {\n\t\ttry {\n\t\t\t$user = JWTAuth::GetJWTUser();\n\t\t\t$this->token = JWTAuth::CheckJWTToken($user->id);\n return $user;\n } catch (\\UnexpectedValueException $e) {\n return $this->sendResponse($e->getMessage());\n }\n }", "public static function get_session_token()\n {\n $session = Session::instance();\n $token = $session->get(self::$SESSION_TOKEN_NAME);\n if (!$token) {\n $token = text::random('alnum', 16);\n self::set_session_token($token);\n }\n return $token;\n }", "public function getUserToken()\n {\n return !is_null($this->authToken) ? $this->authToken : $this->cookieHelper->getRequestCookie('auth');\n }", "function user_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['user_verify_token'] = $token;\n return $token;\n }", "private function getUserFromAccessToken($token) {\n\t\t$clientId = $this->getClientIdFromAccessToken($token);\n\t\t$user = $this->dm->getRepository('MongoDocs\\User')->findOneByApiClientId($clientId);\n\t\treturn $user;\n\t}", "function get_user_session()\n{\n\tif (!isset($_SESSION))\n\t{ \n\t session_start();\n\t} \n\t\n\t$sessions = array();\n\t\t\t\n\t$sessions['login_token'] \t= $_SESSION['login_token'];\n\t$sessions['firstname'] \t\t= $_SESSION['firstname'];\n\t$sessions['lastname'] \t\t= $_SESSION['lastname'];\n\t$sessions['id'] \t\t\t\t= $_SESSION['id'];\n\t$sessions['username'] \t\t= $_SESSION['username'];\n\t\n\treturn $sessions;\n}", "function apiToken($session_uid)\n{\n $key=md5('SITE_KEY'.$session_uid);\n return hash('sha256', $key);\n}", "public function getSessionKey(TokenInterface $token);", "public static function find_token_for_user($user) {\n\t\tif(is_null($user) OR str::e($user)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif(!is_object($user)) {\n\t\t\t$user = new Model_User($user);\n\t\t}\n\t\t\n\t\t$data = self::db()->where('user_token_user_id', $user->id)->get('user_tokens')->row_array();\n\t\tif($data === FALSE) {\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\t$token = new Model_UserToken(NULL, FALSE);\n\t\t\t$token->set($data);\n\t\t\treturn $token;\n\t\t}\n\t}", "public function getSessionAuthTokenName();", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "public function findBySessionToken($sessionToken)\n {\n $userSession = $this->getEntityManager()\n ->createQuery(\n 'SELECT us.id, us.ip, us.session_token, us.created, us.updated\n FROM Tickit\\UserBundle\\Entity\\UserSession us\n WHERE us.session_token LIKE :session_token'\n )\n ->setParameter('session_token', $sessionToken)\n ->execute();\n\n return $userSession;\n }", "public function createToken(Session $session): Token {\n\n // Genero TokenID\n $tokenPart1 = md5($session->getLoginId());\n $tokenPart2 = md5(time());\n\n $tokenId = (substr($tokenPart1,0,strlen($tokenPart1)/2)) .\n (substr($tokenPart2, strlen($tokenPart2)/2, strlen($tokenPart2)/2));\n\n $check = $this->getORM()->find(Token::class, $tokenId);\n\n while ($check instanceof Token) {\n $tokenPart2 = md5(time());\n $tokenId = (substr($tokenPart1,0,strlen($tokenPart1)/2)) .\n (substr($tokenPart2, strlen($tokenPart2)/2, strlen($tokenPart2)/2));\n $check = $this->getORM()->find(Token::class, $tokenId);\n }\n\n $login = $this->getORM()->find(Login::class, $session->getLoginId());\n\n // Genero il JWT\n $session->setTokenId($tokenId);\n $jwt = $session->getJWT($this->privateKeyFile);\n\n\n $token = new Token();\n $token->setTokenId($tokenId)\n ->setData($jwt)\n ->setLogin($login)\n ->setCreationDate($session->getAccess())\n ->setExpireDate($session->getExpire());\n\n try {\n $this->getORM()->persist($token);\n $this->getORM()->flush();\n return $token;\n }catch( Exception $ex ){\n throw new Exception('Error during Token generation:' . $ex->getMessage());\n }\n }", "function getLoggedInUser($token)\n\t{\n\t\tglobal $db;\n\t\t$userId = $this->GetUserIdByToken($token);\n\t\tif(isset($userId))\n\t\t{\n\t\t\t$user = $db->smartQuery(array(\n\t\t\t\t\t'sql' => \"SELECT userid, email, isAdmin FROM `user` WHERE `userid`=:userId;\",\n\t\t\t\t\t'par' => array('userId' => $userId),\n\t\t\t\t\t'ret' => 'fetch-assoc'\n\t\t\t));\n\t\t\treturn $user;\n\t\t}\n\t\treturn (object)array(\"error\" => \"user not found\");\n\t}", "public function actionToken(){\n try{\n $params = Yii::$app->request->post();\n\n $user = $this->auth($params['username'], $params['password']);\n if ($user === null){\n throw new UnauthorizedHttpException('Wrong username or password');\n }\n $response['success'] = true;\n $response['token'] = User::findByUsername($user->username)->auth_key;\n $response['id'] = $user->id;\n } catch (\\Exception $e){\n throw $e;\n }\n return $response;\n }", "protected function __token($user, $pass){\n $response = $this->cURL->post($this->endpoint . '/' . $this->args['oauth'],\n $vars = array('client_id' => $this->clientID, 'client_secret' => $this->clientSecret, 'grant_type' => 'password','password' => $pass,'username' => $user));\n if($response->headers['Status-Code'] == 401){\n throw new RuntimeException($response->body);\n return 0;\n }\n $res = json_decode($response->body, TRUE);\n $_SESSION['access_token'] = $this->access_token = $res['access_token'];\n return $this->access_token;\n }", "protected function getUser($token)\r\n {\r\n $userInfo = $this->getUserInfo($token);\r\n return $userInfo[static::CACHE_PART_USER_OBJECT];\r\n }", "protected function _getAuthToken($username)\n {\n $session = new Session();\n //session->get('token');\n $token = md5(uniqid(rand(), true));\n $session->set('token', $token);\n $session->set('username', $username);\n return $token;\n }", "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "private function get_session()\n\t\t{\n\t\t\t$auto = $this->use_token();\n\n\t\t\tglobal $user;\n\t\t\tif ($user)\n\t\t\t\treturn (object)['id' => $user->id, 'name' => $user->name, 'state' => $_SESSION['state']];\n\t\t\telse if ($auto)\n\t\t\t\treturn (object)['id' => $auto->id, 'name' => $auto->name, 'state' => $_SESSION['state']];\n\t\t\telse\n\t\t\t\treturn (object)['id' => null, 'name' => null, 'state' => 0];\n\t\t}", "private function getAuthToken(Authenticatable $user, AuthorizationHeaderToken $token): AuthToken\n {\n return AuthToken::where('user_id', '=', $user->getAuthIdentifier())\n ->where('token', '=', $token->getToken())\n ->first();\n }", "public function getToken(): TokenInterface;", "public function getToken(): TokenInterface;", "public function ssoGetToken($token)\n {\n $apiEndpoint = '/1/session/'.$token;\n $apiReturn = $this->runCrowdAPI($apiEndpoint, \"GET\", array());\n if ($apiReturn['status'] == '200') {\n return $apiReturn['data']['token'];\n }\n return null;\n }", "function getToken() {\n $user_agent = $_SERVER[\"HTTP_USER_AGENT\"];\n //Test if it is a shared client\n if (!empty($_SERVER['HTTP_CLIENT_IP'])){\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n //Is it a proxy address\n }elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }else{\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n //echo \"sesion:\" . $_SESSION[\"tokenH\"] . \"client:\" . md5($ip . \":\" . $user_agent); \n return md5($ip . \":\" . $user_agent); \n }", "function retrieveSession()\n{\n if (isset($_SESSION['access_token'])) {\n $response['oauth_token'] = $_SESSION['access_token'];\n $response['oauth_token_secret'] = $_SESSION['oauth_token_secret'];\n if(isset($_SESSION['session_handle'])) \n $response['oauth_session_handle'] = $_SESSION['session_handle'];\n return $response;\n } else {\n return false;\n }\n}", "public function findUserByToken(Request $request, Token $token): ?User;", "public function actionGetToken() {\n\t\t$token = UserAR::model()->getToken();\n\t\t$this->responseJSON($token, \"success\");\n\t}", "public function GetToken($data){ \n \n return $this->token;\n \n }", "public function get_access_token() {\r\n\t\t$session = $_SESSION['auth_baidu']['last_key'];;\r\n\t\tif (isset ( $session ['access_token'] )) {\r\n\t\t\treturn $session ['access_token'];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function getUserTokens();", "public function actionToken()\n {\n\n $access_token = null;\n\n $message = array();\n\n if (\\Yii::$app->request->post()) {\n\n if (!\\Yii::$app->user->identity || !\\Yii::$app->user->identity || \\Yii::$app->user->isGuest) {\n\n $username = isset(\\Yii::$app->request->post()['username']) && \\Yii::$app->request->post()['username'] ? \\Yii::$app->request->post()['username'] : null;\n\n $password = isset(\\Yii::$app->request->post()['password']) && \\Yii::$app->request->post()['password'] ? \\Yii::$app->request->post()['password'] : null;\n\n if ($username && $password) {\n $user = User::findOne(['username' => $username, 'password_hash' => $password]);\n\n if ($user->validate()) {\n //log this user in if the identity is verified\n \\Yii::$app->user->login($user);\n\n $user->access_token = \\Yii::$app->security->generateRandomString();\n\n $user->auth_key = \"_8jwIF7Os8s_lLXNxYFW24fgfCg1x-2E\";\n\n $user->save();\n\n $message[] = $user;\n\n } else {\n //add error message\n $message[] = \"Wrong login credentials\";\n }\n\n } else {\n $message[] = \"Must provide username and password\";\n }\n } else {\n $message[] = \"you are already logged in\";\n }\n }\n\n\n return $message;\n\n }", "function getToken() {\n\t\n\t$u_token = (isset($_SESSION['cms']['u_token']) && $_SESSION['cms']['u_token'] > '' ) ? $_SESSION['cms']['u_token'] : '';\n\treturn $u_token;\n}", "protected function get_access_token() {\n global $SESSION;\n if (isset($SESSION->{self::SESSIONKEY})) {\n return $SESSION->{self::SESSIONKEY};\n }\n return null;\n }", "private static function getFromSession()\n {\n if (empty($_SESSION['current_user'])) {\n // No user in session, create one.\n $entityClassName = static::ENTITIES_CLASS_NAME;\n $user = new $entityClassName(array(\n 'source' => 'cookie',\n ));\n self::setCurrent($user);\n } else {\n Logger::get()->debug('Found user in session.');\n // Regenerate session ID every SESSION_DURATION minutes.\n if (time() > ($_SESSION['timestamp'] + + self::SESSION_DURATION)) {\n Logger::get()->debug('Regenerated session ID.');\n session_regenerate_id();\n }\n }\n\n return $_SESSION['current_user'];\n }", "public function getToken(Request $request)\n {\n $email = $request->input('username');\n $password = $request->input('password');\n //checking if user exists\n $user = User::where('email', $email)->get();\n if ($user->count() > 0) {\n $user = $user[0];\n if (Hash::check($password, $user->password)) {\n $role = $user->app_role;\n\n $oauth_client = DB::table('oauth_clients')->where('password_client', 1)->first();\n $request->request->add([\n 'grant_type' => 'password',\n 'client_id' => $oauth_client->id,\n 'client_secret' => $oauth_client->secret,\n 'scope' => '*',\n ]);\n $tokenRequest = Request::create(\n '/oauth/token',\n 'post'\n );\n return Route::dispatch($tokenRequest);\n\n// $temp = Route::dispatch($tokenRequest);\n// return $temp->expires_in;\n// return Carbon::parse($temp->expires_in)->toDateTimeString();\n } else {\n //type = 2 => incorrect passowrd\n return [\n 'error' => '2',\n 'errorType' => 'auth'];\n }\n } else {\n //type= 1 => no such user exists\n return [\n 'error' => '1',\n 'errorType' => 'auth'];\n }\n }", "private static function get_current_user_id() {\r\n\t\t//print_r($_SESSION);\r\n\t\t$mysqli = Database::connection();\r\n\t\tif (!isset($_SESSION['user_id']) || !is_numeric($_SESSION['user_id'])) {\r\n\t\t\t//Check for a cookie\r\n\t\t\tif (!empty($_COOKIE['token']) && is_numeric($_COOKIE['user_id'])) {\r\n\t\t\t\t$token = $_COOKIE['token'];\r\n\t\t\t\t$user_id = $_COOKIE['user_id'];\r\n\t\t\t\t$sql = \"SELECT token FROM users WHERE user_id = '$user_id'\";\r\n\t\t\t\t$result = $mysqli->query($sql)\r\n\t\t\t\tor die($mysqli->error);\r\n\t\t\t\tif ($result->num_rows == 1) {\r\n\t\t\t\t\t//Attempt to verify the token\r\n\t\t\t\t\t$token_hashed = mysqli_fetch_row($result)[0];\r\n\t\t\t\t\t$verify = password_verify($token, $token_hashed);\r\n\t\t\t\t\tif ($verify) {\r\n\t\t\t\t\t\t//Create the session again\r\n\t\t\t\t\t\t$_SESSION['user_id'] = $user_id;\r\n\t\t\t\t\t\treturn $user_id;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\treturn 'None';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn 'None';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn 'None';\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn $_SESSION['user_id'];\r\n\t\t}\r\n\t}", "public function get_user()\n {\n $token = $this->CI->input->get_request_header('Authorization', TRUE);\n $token_json = base64_decode($token);\n $token = json_decode($token_json);\n $userid = $token->userId;\n $username = $token->userName;\n return ['id'=>$userid,'name'=>$username];\n }", "private function getoken()\n {\n $data=[\n \"username\"=> $this->chronos_user,\n \"password\"=> $this->chronos_password\n ];\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.'login/');\n $client->setMethod(\\Zend_Http_Client::POST);\n $client->setHeaders(['Content-Type: application/json', 'Accept: application/json']);\n $client->setRawData(json_encode($data));\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $token_data=json_decode($string);\n if (property_exists($token_data,'non_field_errors')) {\n return false;\n }else{\n return $token_data->token;\n }\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos Product save helper', [\"error\"=>$e->getMessage()]);\n return false;\n }\n }", "public function sendToken(User $user): string;", "public function getRequestByToken($token)\n {\n return $this->createQueryBuilder('r')\n ->join('r.user', 'u')\n ->addSelect('u')\n ->where('r.token = :token')->setParameter('token', $token)\n ->getQuery()\n ->getOneOrNullResult();\n }", "function get_user_by_device_token($device_token)\n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE `device_token`='$device_token'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n if ($q['result'])\n {\n return $q['result'];\n }\n else\n {\n $q1['query'] = \"SELECT * FROM `device_tokens` WHERE `device_token`='$device_token'\";\n $q1['run'] = $conn->query($q1['query']);\n $q1['result'] = $q1['run']->fetch_assoc();\n \n return $q1['result'];\n }\n\n}", "function genera_token ($user, $profile)\r\n{\r\n\t$token = \"\";\r\n\r\n\t/* Aqui estaria el algoritmo para la generacion\r\n\tdel token */\r\n\r\n\treturn $token;\r\n}", "public function token()\n {\n return $this->hasMany('UserSessionToken', 'id_user');\n }", "public function get_client_token($user, $timestamp, $custom_data = false )\n\t{\n\t\tif($custom_data == true)\n\t\t{\n\t\t\t$token = hash_hmac($this->settings['encryption'], $this->settings['project_id'] . $user . $timestamp . $custom_data, $this->settings['secret_key'], false );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$token = hash_hmac($this->settings['encryption'], $this->settings['project_id'] . $user . $timestamp, $this->settings['secret_key'], false );\n\t\t}\n\n return $token;\n\t}", "function verifyToken() {\n $retVal = array(\"userid\"=>\"\",\"retState\"=>\"\");\n $headerarray = getallheaders();\n $authtoken = $headerarray[\"Authorization\"];\n\n //next we verity in the token table\n $tokenCheck = TokenQuery::create()->findOneByToken($authtoken);\n if($tokenCheck == \"\"){\n echo \"invalid token\";\n $retVal[\"retState\"] = false;\n }else{\n //check token expiration\n if($tokenCheck->getExpires()-time() > -1){\n echo \"token expired\";\n $retVal[\"retState\"] = false;\n }else{\n //lets get userid\n $retVal[\"userid\"] = $tokenCheck->getUserid();\n $retVal[\"retState\"] = true;\n }\n }\n return $retVal;\n}", "function verifyToken() {\n $retVal = array(\"userid\"=>\"\",\"retState\"=>\"\");\n $headerarray = getallheaders();\n $authtoken = $headerarray[\"Authorization\"];\n\n //next we verity in the token table\n $tokenCheck = TokenQuery::create()->findOneByToken($authtoken);\n if($tokenCheck == \"\"){\n echo \"invalid token\";\n $retVal[\"retState\"] = false;\n }else{\n //check token expiration\n if($tokenCheck->getExpires()-time() > -1){\n echo \"token expired\";\n $retVal[\"retState\"] = false;\n }else{\n //lets get userid\n $retVal[\"userid\"] = $tokenCheck->getUserid();\n $retVal[\"retState\"] = true;\n }\n }\n return $retVal;\n}", "public function getToken($token)\n {\n return $this->_em->createQuery(\"\n SELECT ct, u, g\n FROM EIPHRBundle:ChatToken ct\n JOIN ct.user u\n JOIN ct.game g\n WHERE ct.value = :value\n AND ct.validUntil > :ctime\n \")\n ->setParameter(':value', $token)\n ->setParameter(':ctime', time())\n ->getOneOrNullResult();\n }", "public function LoginToken_get()\n {\n $tokenData['user_id'] = '1';\n $tokenData['role'] = 'admin';\n $tokenData['first_name'] = 'Al';\n $tokenData['last_name'] = 'Mobin';\n $tokenData['phone'] = '+8801921040960';\n $jwtToken = $this->tokenHandler->GenerateToken($tokenData);\n $token = $jwtToken;\n echo json_encode(array('Token'=>$jwtToken));\n }", "function getLoginToken() {\n\tglobal $endPoint;\n\n\t$params1 = [\n\t\t\"action\" => \"query\",\n\t\t\"meta\" => \"tokens\",\n\t\t\"type\" => \"login\",\n\t\t\"format\" => \"json\"\n\t];\n\n\t$url = $endPoint . \"?\" . http_build_query( $params1 );\n\n\t$ch = curl_init( $url );\n\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $ch, CURLOPT_COOKIEJAR, \"cookie.txt\" );\n\tcurl_setopt( $ch, CURLOPT_COOKIEFILE, \"cookie.txt\" );\n\n\t$output = curl_exec( $ch );\n\tcurl_close( $ch );\n\n\t$result = json_decode( $output, true );\n\treturn $result[\"query\"][\"tokens\"][\"logintoken\"];\n}", "public function getAuthenticationTokenContext();", "public function generateToken(){\n //if(empty($_SESSION['token']) && (empty($_SESSION['tokenAge']) || (time() - (int)$_SESSION['tokenAge']) > (int)$this->maxAge)){\n if(function_exists('random_bytes')){\n $_SESSION['token'] = bin2hex(random_bytes(32));\n }elseif(function_exists('mcrypt_create_iv')){\n $_SESSION['token'] = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM));\n }else{\n $_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(32));\n }\n $_SESSION['tokenAge'] = time();\n //} \n }", "abstract protected function getUserByToken($token): array;", "public function getToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return '';\n }\n return $this->requestToken->getToken();\n }", "public function getToken($user_id)\n {\n $url = $this->url . '/user/assign/token';\n\n $postData = json_encode([\n \"authCode\" => $user_id\n ]);\n\n $url = $url . '?' . $this->getParam([], $postData);\n\n $data = [\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'app_key' => $this->key\n ],\n 'body' => $postData\n ];\n $result = $this->urlpost($url, $data);\n if (isset($result['success']) and $result['success'] == 1) {\n $token_key = 'token_' . $user_id;\n $this->redis->set($token_key, $result['data']['token']);\n }\n return $result['data']['token'];\n }", "function login_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['login_token'] = $token;\n return $token;\n }", "function VerifyToken($token, $user_id = NULL, $username = NULL)\r\n{\r\n //token and user_id/username required\r\n if(!isset($token) || !(isset($user_id) || isset($username)))\r\n {\r\n throw new Exception(\"Token and user_id or username required\");\r\n }\r\n $user_id = !empty($user_id) ? $user_id : '';\r\n $username = !empty($username) ? $username : '';\r\n\r\n $dbh = new PDOConnection();\r\n $sth = $dbh->prepare('SELECT id,last_login FROM users WHERE token = :token AND (id = :id OR username = :username)');\r\n $sth->bindParam(':token', $token);\r\n $sth->bindParam(':id', $user_id, PDO::PARAM_INT);\r\n $sth->bindParam(':username', $username);\r\n if(!$sth->execute())\r\n {\r\n throw new Exception($sth->errorInfo()[2]);\r\n }\r\n $row = $sth->fetch(PDO::FETCH_ASSOC);\r\n if(VerifyLastLogin($row['last_login']) === FALSE)\r\n {\r\n return FALSE;\r\n }\r\n\r\n return $row['id'];\r\n}", "function get_token_from_device_tokens_table($user_id)\n{\n global $conn;\n $device_tokens = array(); \n $q['query'] = \"SELECT device_token FROM `device_tokens` WHERE `user_id`='$user_id'\";\n $q['run'] = $conn->query($q['query']);\n while($q['result'] = $q['run']->fetch_assoc())\n {\n array_push($device_tokens, $q['result']['device_token']);\n }\n\n return $device_tokens;\n}", "public function getAuthenticatedUser()\n {\n try {\n if ( !$user = JWTAuth::parseToken()->authenticate() ) {\n return response()->json(['user_not_found'], 404);\n }\n } catch ( TokenExpiredException $e ) {\n return response()->json(['token_expired'], $e->getStatusCode());\n } catch ( TokenInvalidException $e ) {\n return response()->json(['token_invalid'], $e->getStatusCode());\n } catch ( JWTException $e ) {\n return response()->json(['token_absent'], $e->getStatusCode());\n }\n\n // The token is valid and we have found the user via the sub claim\n return $user;\n }", "function getToken($username, $password) {\n // Make sure global salts are accessable\n global $salt1, $salt2;\n\n return getSingleValue(\"SELECT `cookie` FROM `private_users` WHERE LOWER(`username`) =LOWER('\" . escape(trim($username)) . \"') AND `firetruck` =MD5(CONCAT('$salt1', '\" . escape($password) . \"', '$salt2')) LIMIT 0, 1\");\n }", "public function get_current_user_token() {\n\t\t$user_id = $this->current_user->ID;\n\n\t\t$user_token = get_option( 'livechat_user_' . $user_id . '_token' );\n\t\tif ( ! $user_token ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn $user_token;\n\t}", "public function getLoginToken(GetUserTokenRequest $request)\n {\n $crudGTemporalModuleTokenService = new CrudGTemporalModuleTokenService();\n $response = $crudGTemporalModuleTokenService->getLoginToken($request);\n\n if ($response['status'] === 'success') {\n return response()->json($response, 200);\n }\n\n return response()->json($response, $response['http_status_code']);\n }", "function get_user()\n{\n$response = $GLOBALS['http']->request('GET', '/api/users/@me', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $_SESSION['auth_token']\n ]\n]);\n\n$responseBody = $response->getBody(true); \n$response = json_decode($responseBody, true);\n$_SESSION['username'] = $response['username'];\n$_SESSION['discrim'] = $response['discriminator'];\n$_SESSION['user_id'] = $response['id'];\n$_SESSION['user_avatar'] = $response['avatar'];\n}", "public function getToken()\n {\n return $this->em\n ->getRepository('InnmindAppBundle:ResourceToken')\n ->findOneBy([\n 'uuid' => $this->token,\n 'uri' => $this->uri\n ]);\n }", "public function findUserByToken($token)\r\n {\r\n $user = $this->DB->fetchAssoc('select * from user where token = ?',array($token));\r\n return $user;\r\n }", "function token(): string\n\t\t{\n\t\t\treturn session()->getToken();\n\t\t}", "public function user()\n {\n if (!$this->user) {\n $identifier = $this->getToken();\n $this->user = $this->provider->retrieveByToken($identifier, '');\n }\n return $this->user;\n }", "public static function getUser() {\n return session(\"auth_user\", null);\n }", "public function PedirToken($nick){\n \n if ($this->SesionIniciada()){ //Verificamos que el usuario este logueado ya. \n $PeticionToken= new Token();\n if (isset($this->token)){ // si el usuario ya tiene asignado un token\n\n if(!$PeticionToken->ValidarToken($this->token)){ // Si el token se vencio\n\n $this->token= $PeticionToken->ObtenerToken($this->nick,$this->getIP); // Se asigna un nuevo token\n }\n }\n else{\n\n $this->token= $PeticionToken->ObtenerToken($this->nick,$this->getIP);// Se le asigna un token por primera vez\n }\n\n return $this->GetToken();\n \n }\n else{\n \n return 'No se le puede asignar un token porque no ha iniciado sesion.';\n }\n }", "public function getAuthenticatedUser()\n {\n try {\n\n if (! $user = JWTAuth::parseToken()->authenticate()) {\n return response()->json(['user_not_found'], 404);\n }\n\n } catch (Tymon\\JWTAuth\\Exceptions\\TokenExpiredException $e) {\n\n return response()->json(['token_expired'], $e->getStatusCode());\n\n } catch (Tymon\\JWTAuth\\Exceptions\\TokenInvalidException $e) {\n\n return response()->json(['token_invalid'], $e->getStatusCode());\n\n } catch (Tymon\\JWTAuth\\Exceptions\\JWTException $e) {\n\n return response()->json(['token_absent'], $e->getStatusCode());\n\n }\n\n // the token is valid and we have found the user via the sub claim\n return response()->json(compact('user'));\n }" ]
[ "0.75608796", "0.7308376", "0.71972877", "0.71972877", "0.7197129", "0.7197129", "0.7192714", "0.6860065", "0.6629688", "0.65534323", "0.6546784", "0.65112436", "0.6476217", "0.64008385", "0.6380964", "0.6334149", "0.62898797", "0.6284626", "0.6271744", "0.62714434", "0.6270503", "0.6264842", "0.62457156", "0.62454736", "0.62336814", "0.6194016", "0.6189735", "0.618561", "0.61678666", "0.6160818", "0.6114732", "0.61129636", "0.6092426", "0.6078618", "0.60785306", "0.6066512", "0.60626245", "0.6046147", "0.6045286", "0.6045286", "0.6045286", "0.6045286", "0.60343623", "0.6030977", "0.60277045", "0.6022041", "0.60183704", "0.59857845", "0.59832865", "0.5974342", "0.59449023", "0.59357387", "0.59312356", "0.59312356", "0.5901345", "0.58877254", "0.58840996", "0.5867694", "0.58668756", "0.5866466", "0.5865497", "0.5861852", "0.58549774", "0.58521897", "0.5851296", "0.58427024", "0.58418286", "0.58249164", "0.5822107", "0.5809429", "0.58072954", "0.58057374", "0.5804039", "0.5802123", "0.57913715", "0.5786709", "0.57848555", "0.57848555", "0.5784455", "0.5778258", "0.5776793", "0.576508", "0.5759308", "0.5750365", "0.57486755", "0.57439417", "0.5742968", "0.57372427", "0.5736923", "0.57283777", "0.5723264", "0.5722978", "0.5721614", "0.57184446", "0.5710299", "0.5704079", "0.5696402", "0.569133", "0.5688915", "0.5685578", "0.568109" ]
0.0
-1
Validate that a token corresponds to one of the users open sessions
public static function validate_token(int $userid, string $token) { global $DB; $sessions = $DB->get_records('sessions', ['userid' => $userid]); foreach ($sessions as $session) { if (self::get_token_for_user($userid, $session->sid) === $token) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validateTokens()\n {\n $whoami = $this->getJson('/ping/whoami');\n if (isset($whoami['authenticated']) && $whoami['authenticated'])\n {\n syslog(LOG_DEBUG, \"Monzo: Token is still valid\");\n return true;\n }\n else\n {\n return false;\n }\n }", "public function isValidSession(string $token):bool;", "protected function checkSessionToken() {}", "public function isTokenValid() {\n if (!isset($_SESSION['token']) || $this->_token != $_SESSION['token'])\n \n\t\t\t$this->_errors[] = 'invalid submission';\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }", "function isTokenValid($token){\n if(!empty($_SESSION['tokens'][$token])){\n unset($_SESSION['tokens'][$token]);\n return true;\n }\n return false;\n}", "function checkToken($token){\n\t\tif(checkTimeout($token)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\tif(isset($_SESSION[$token])){\n\t\t\t\tif($_SESSION[$token] == $_GET['token']){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function validate_token() {\n\n global $token;\n\n // If the user passed a username and password in this request\n // and did not login via a session, then token validation is not\n // necessary, so return true.\n if (defined('API_USERNAME')) {\n return true;\n }\n\n // If the token does not exist in the session,\n // or the passed token does not match the token from the session,\n // then this might be a CSRF attack so respond with an error.\n if (\n ($_SESSION['software']['token'] == '')\n || ($token != $_SESSION['software']['token'])\n ) {\n respond(array(\n 'status' => 'error',\n 'message' => 'Invalid token.'));\n }\n}", "static function tokenGatekeeper() {\n $token = getInput(\"token\");\n $session_token = Cache::get(\"token\", \"session\");\n if ($token == $session_token) {\n return true;\n }\n return false;\n }", "public function checkToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return false;\n }\n if (!isset($this->data['access_token'])) {\n return false;\n }\n return $this->requestToken->getToken() === $this->data['access_token'];\n }", "private function token_validate($user, $token)\n\t\t{\n\t\t\t// Token hash the user should have from the IP the cookie was given to\n\t\t\t$tok1 = $this->ip_lock($this->getAuthToken($user), $token[2]);\n\n\t\t\t// Token hash the user should have now\n\t\t\t$tok2 = $this->ip_lock($this->getAuthToken($user));\n\n\t\t\t// Token hash the user sent\n\t\t\t$tok3 = $token[1];\n\n\t\t\tif ($tok1 != $tok3)\n\t\t\t\treturn -1; // Invalid token, user session key changed, or cookie was edited\n\n\t\t\treturn $tok2 == $tok3 ? 1 : 0;\n\t\t}", "public static function validToken()\r\n {\r\n $header = apache_request_headers();\r\n if(!isset($_SESSION['CSRF_TOKEN']) || !isset($header['CSRF_TOKEN']) || $header['CSRF_TOKEN'] != $_SESSION['CSRF_TOKEN']){\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public static function check_token($token)\r\n {\r\n if ($token == $_SESSION['token'])\r\n return true;\r\n\r\n return false;\r\n }", "function checkToken() {\n\t\t\t// Split the token up again to make sure the first 40 chars are the same (TOKEN)\n\t\t\t$splitToken = substr($this->tokenFromCookie, 0, 40);\n\t\t\t\n\t\t\t// Split the token up again to make sure the second 40 chars are the same (ZIPPED)\n\t\t\t$splitZipped = substr($this->tokenFromCookie, 40, 40);\n\t\t\t\n\t\t\t// Unzip the second 40 chars\n\t\t\t$result = $this->unzip($splitZipped);\n\n\t\t\t// Check if the sha of the zipped portion matches the token.\n\t\t\t// If so, no one has messed with the token\n\t\t\tif(strcmp($splitToken, sha1($splitZipped) == 0)) {\n\t\t\t\t// Grab all data from unzip\n\t\t\t\t$ip = base_convert($result[0], IP_ADDRESS, 10);\n\t\t\t\t$time = base_convert($result[1], REQUEST_TIME, 10);\n\t\t\t\t$user = $result[2];\n\t\t\t\t$random = $result[3];\n\t\t\t\t$expires = substr($this->tokenFromCookie, 80, strlen($this->tokenFromCookie));\n\n\t\t\t\t// Check if token is expired after one hour\n\t\t\t\tif(time() - $expires <= 3600) {\n\t\t\t\t\tif(strpos($_SERVER['REMOTE_ADDR'], \":\") !== false) {\n\t\t\t\t\t\t$userIpAddImp = implode(explode(\":\", $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\t}\n\t\t\t\t\telseif(strpos($_SERVER['REMOTE_ADDR'], \".\") !== false) {\n\t\t\t\t\t\t$userIpAddImp = implode(explode(\".\", $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Check if userIp is the same as when s/he originally logged in\n\t\t\t\t\t$validity = (strcmp($ip, $userIpAddImp) == 0) ? true : false;\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\t$validity = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$validity = false;\n\t\t\t}\n\t\t\t\n\t\t\treturn $validity;\n\t\t}", "public static function hasValidToken() {\n $requestHeaders = Rock::getHeaders();\n\n if (array_key_exists(Config::get('JWT_HEADER'), $requestHeaders) === true) {\n try {\n $decoded = (array)Firebase\\JWT\\JWT::decode($requestHeaders[Config::get('JWT_HEADER')], Config::get('JWT_KEY'), [Config::get('JWT_ALGORITHM')]);\n } catch (Exception $e) {\n return false;\n }\n\n $depth = 1;\n $result = Moedoo::select('user', [Config::get('TABLES')['user']['pk'] => $decoded['id']], null, $depth);\n $included = Moedoo::included(true);\n\n if (count($result) === 1) {\n $user = $result[0];\n $userGroup = $included['user_group'][$user['user_group']];\n\n if ($user['user_status'] === false) {\n //-> user suspended\n return false;\n } elseif (is_null($user['user_group']) === true) {\n //-> user doesn't belong to a user-group\n return false;\n } elseif ($userGroup['user_group_status'] === false) {\n //-> user-group has been suspended\n return false;\n }\n\n return $user;\n }\n\n return false;\n }\n\n return false;\n }", "public function validate ( $token ) { return $this->server->token2uid( $token ) > 0; }", "function token_exist($token): bool\r\n{\r\n\tglobal $DATABASE;\r\n\t\r\n\ttoken_invalidate();\r\n\t\r\n\tif($token == NULL) return false;\r\n\t\r\n\tforeach($DATABASE->execute_query(\"SELECT token FROM `logged_in`\") as $value)\r\n\t\tif(strcmp($value[0], $token) == 0)\r\n\t\t\treturn true;\r\n\t\r\n\treturn false;\r\n}", "function is_valid_token($request)\n\t{\n\t\tif (!isset($request->token) || empty($request->token))\n\t\t\treturn [FALSE, ['message' => F::lang('err_token_invalid')]];\n\t\t// else\n\t\t\t// $request->token = urldecode($request->token);\n\t\t\n\t\tif ($request->agent == 'android') {\n\t\t\t$token = ['android_token' => $request->token];\n\t\t}\n\t\tif ($request->agent == 'ios') {\n\t\t\t$token = ['ios_token' => $request->token];\n\t\t}\n\t\tif ($request->agent == 'web') {\n\t\t\t$token = ['web_token' => $request->token];\n\t\t}\n\t\t\n\t\t$ci = &get_instance();\n\t\t$ci->load->model('auth_model');\n\t\t$row = $ci->auth_model->get_token($token);\n\t\tif (!$row)\n\t\t\treturn [FALSE, ['message' => F::lang('err_token_invalid')]];\n\n\t\tif ($request->agent == 'android') {\n\t\t\t$token = $row->android_token;\n\t\t\t$token_exp = $row->android_token_expired;\n\t\t}\n\t\tif ($request->agent == 'ios') {\n\t\t\t$token = $row->ios_token;\n\t\t\t$token_exp = $row->ios_token_expired;\n\t\t}\n\t\tif ($request->agent == 'web') {\n\t\t\t$token = $row->web_token;\n\t\t\t$token_exp = $row->web_token_expired;\n\t\t}\n\t\t\n\t\tif ($request->token != $token)\n\t\t\treturn [FALSE, ['result' => NULL, 'message' => F::lang('err_token_invalid')]];\n\t\t\n\t\tif ($token_exp < date('Y-m-d H:i:s'))\n\t\t\treturn [FALSE, ['result' => NULL, 'message' => F::lang('err_token_expired')]];\n\t\t\n\t\treturn [TRUE, ['result' => $row, 'message' => NULL]];\n\t}", "public static function check($token) \n{\n // set the `$tokenKey variable` by calling `get method` on `Config object`\n $tokenKey = Config::get('session.tokenKey'); // returns string\n\n /* checks whether `token` KEY exists in the `$_SESSION[] array` AND\n `form's token value` is equal to `token VALUE` in the `$_SESSION[] array` */\n if(Session::exists($tokenKey) && $token == Session::get($tokenKey)) {\n Session::delete($tokenKey);\n return true;\n }\n\n return false;\n}", "function validToken($name, $referer, $time)\n{\n\tif(isset($_SESSION[$name.'Token']) && isset($_SESSION[$name.'Token_time']) && isset($_POST['token']))\n\t\tif($_SESSION[$name.'Token']===$_POST['token'])\n\t\t\tif($_SESSION[$name.'Token_time']>=(time()-$time))\n\t\t\t\tif($_SERVER['HTTP_REFERER']==$referer)\n\t\t\t\t\treturn true;\n\treturn false;\n}", "function verify_form_token($form) {\n\t// Check if a session is started and a token is transmitted,\n\t// if not return an error\n\tif(!isset($_SESSION[$form.'_token'])) {\n\t\treturn false;\n\t}\n\n\t// Check if the form is sent with token in it\n\tif(!isset($_POST['token'])) {\n\t\treturn false;\n\t}\n\n\t// Compare the tokens against each other if they are still the same\n\tif ($_SESSION[$form . '_token'] !== $_POST['token']) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "function verifyFormToken($form) {\n\n\t\t// check if a session is started and a token is transmitted, if not return an error\n\tif(!isset($_SESSION[$form.'_token'])) {\n\t\treturn false;\n\t\t}\n\n\t// check if the form is sent with token in it\n\tif(!isset($_POST['token'])) {\n\t\treturn false;\n\t\t}\n\n\t// compare the tokens against each other if they are still the same\n\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\n\t\treturn false;\n\t\t}\n\n\treturn true;\n}", "public function ssoTokenExists() {\n if ($this->httpSession != null && array_key_exists('maestrano', $this->httpSession)) {\n return true;\n }\n\n return false;\n }", "public function token_is_valid() {\n $token = $this->ci->input->post(\"token\");\n\n $this->ci->load->helper(\"access\");\n return check_token($token);\n }", "function media_theplatform_mpx_check_token() {\n if (!media_theplatform_mpx_variable_get('token')) {\n return FALSE;\n }\n // If idleTimeout date has passed, signIn again.\n if (media_theplatform_mpx_variable_get('date_idletimeout') < time()) {\n // Expire the current token.\n media_theplatform_mpx_expire_token();\n // Retrieve and return new token.\n return media_theplatform_mpx_signin();\n }\n else {\n return TRUE;\n }\n}", "function verifyToken() {\n $retVal = array(\"userid\"=>\"\",\"retState\"=>\"\");\n $headerarray = getallheaders();\n $authtoken = $headerarray[\"Authorization\"];\n\n //next we verity in the token table\n $tokenCheck = TokenQuery::create()->findOneByToken($authtoken);\n if($tokenCheck == \"\"){\n echo \"invalid token\";\n $retVal[\"retState\"] = false;\n }else{\n //check token expiration\n if($tokenCheck->getExpires()-time() > -1){\n echo \"token expired\";\n $retVal[\"retState\"] = false;\n }else{\n //lets get userid\n $retVal[\"userid\"] = $tokenCheck->getUserid();\n $retVal[\"retState\"] = true;\n }\n }\n return $retVal;\n}", "function verifyToken() {\n $retVal = array(\"userid\"=>\"\",\"retState\"=>\"\");\n $headerarray = getallheaders();\n $authtoken = $headerarray[\"Authorization\"];\n\n //next we verity in the token table\n $tokenCheck = TokenQuery::create()->findOneByToken($authtoken);\n if($tokenCheck == \"\"){\n echo \"invalid token\";\n $retVal[\"retState\"] = false;\n }else{\n //check token expiration\n if($tokenCheck->getExpires()-time() > -1){\n echo \"token expired\";\n $retVal[\"retState\"] = false;\n }else{\n //lets get userid\n $retVal[\"userid\"] = $tokenCheck->getUserid();\n $retVal[\"retState\"] = true;\n }\n }\n return $retVal;\n}", "protected function check_tok($token)\r\n {\r\n if (isset($_SESSION['token']) && $token === $_SESSION['token'])\r\n {\r\n unset($_SESSION['token']);\r\n return true;\r\n }\r\n return false;\r\n }", "function verifyFormToken($form) {\r\n\t\t\r\n\t\t// check if a session is started and a token is transmitted, if not return an error\r\n\t\tif(!isset($_SESSION[$form.'_token'])) { \r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// check if the form is sent with token in it\r\n\t\tif(!isset($_POST['token'])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// compare the tokens against each other if they are still the same\r\n\t\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function validate($token)\n {\n if(!empty($token))\n {\n $decrypted = $this->crypt->decrypt($this->crypt->decryptBase64($token));\n $pieces = explode('|', $decrypted);\n if(count($pieces) === 3)\n {\n $user = Users::findFirstByUsername(strtolower($pieces[0]));\n if(is_object($user))\n {\n $stored_tokens = $user->getTokens(array('order' => 'created desc'));\n $stored_token = (count($stored_tokens) > 0 ? $stored_tokens[0] : null);\n if(!is_null($stored_token))\n {\n $vhash = hash_hmac('sha256', strtolower($user->username) . '|' . $stored_token->created, $this->crypt->decryptBase64($stored_token->secret_key), false);\n $received = trim($pieces[2]);\n if(strlen($vhash) === strlen($received))\n {\n $same = true;\n for($i = 0; $i < strlen($vhash); $i++)\n {\n if($vhash[$i] !== $received[$i])\n {\n $same = false;\n break;\n }\n }\n if($same)\n {\n return $user;\n }\n }\n }\n }\n }\n }\n return false;\n }", "public function tokenIsValid()\n\t{\n\n\t\t$invitation = UserInvitation::find($this->token);\n\n\t\tif(empty($invitation))\n\t\t{\n\t\t\t$this->errors->add(\"code\", \"We couldn't find your invitation\");\n\t\t\treturn null;\n\t\t}\n\n\t\tif(! $invitation->codeIsActive() )\n\t\t{\n\t\t\t$this->errors->add(\"code\", \"This code is inactive!\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif(! $invitation->codeIsActive() )\n\t\t{\n\t\t\t$this->errors->add(\"code\", \"This code is inactive!\");\n\t\t\treturn false;\n\t\t}\n\n\t\n\t\treturn $invitation;\n \n\t}", "private function checkOAuthTokenPresence()\n {\n $client = $this->getOAuthClient();\n \n if (!$client->getOAuthToken() || !$client->getOAuthTokenSecret()) {\n throw new FatException('One or more OAuth tokens were not found.');\n }\n \n return true;\n }", "function testToken($db, $user_id, $user_token) {\n\n $SELECT_TOKEN = \"SELECT user_token FROM user WHERE user_id = ? AND user_token_dead >= ?\";\n $canDoRequest = false; //Par defaut, il ne peut pas faire de requetes\n\n if (!is_null($user_id) AND !is_null($user_token)) {\n\n $resultats = $db->prepare($SELECT_TOKEN);\n $resultats->execute(array($user_id, date('Y-m-j h:i:s')));\n $row = $resultats->fetch(PDO::FETCH_OBJ);\n\n if (!is_null($row->user_token) AND $user_token == $row->user_token) {\n $canDoRequest = true;\n }\n $resultats->closeCursor();\n }\n\n return $canDoRequest;\n}", "private static function isAccessLoginTokenValid($token)\n {\n if (empty($token)) {\n return false;\n }\n $expire = 10;//Validate on 10s\n $parts = explode('_', $token);\n $timestamp = (int)end($parts);\n return $timestamp + $expire >= time();\n }", "function verifiyToken($username, $token) {\n $SECRET_KEY = 'Med1a_Cube$Even7';\n $splittedToken = split(\":\", $token);\n $token = $splittedToken[0];\n $timestamp = $splittedToken[1];\n\n $hash = sha1($username . $SECRET_KEY . $timestamp);\n $deltaTime = time() - $timestamp;\n\n if($deltaTime < 60 && $hash == $timestamp) {\n return true;\n }\n\n return false;\n}", "public function isTokenValid($token)\n {\n $pdo = static::getDB();\n\n $sql = \"select token, to_char(otp_last_date, 'YYYY-MM-DD HH24:MI:SS') as otp_last_date from users where email = :email\";\n $result = $pdo->prepare($sql);\n $result->execute([$this->email]);\n\n $result = $result->fetchObject();\n\n if($result->TOKEN !== $token){\n return false;\n }\n $currentTime = strtotime(Extra::getCurrentDateTime());\n $time = strtotime($result->OTP_LAST_DATE);\n\n $diff_in_seconds = ($currentTime - $time);\n\n // 7 days\n if($diff_in_seconds > 604800){\n return false;\n }\n return true;\n }", "public function validateToken($token, $maxAge = 300){\n $this->maxAge = $maxAge;\n if($token != $_SESSION['token'] || ((time() - (int)$_SESSION['tokenAge']) > (int)$this->maxAge)){\n return false;\n }else{\n unset($_SESSION['token'], $_SESSION['tokenAge']);\n return true;\n }\n }", "public function validateToken()\n {\n $user = auth()->user();\n $token = $user->token();\n $profileIds = [];\n $userProfiles = UserProfile::where(['user_id' => $user->id])->get(['profile_id']);\n\n foreach ($userProfiles as $profile) {\n $profileIds[] = $profile->profile_id;\n }\n\n return response()->json([\n 'message' => 'Usuário autenticado com sucesso!',\n 'data' => [\n 'token' => [\n 'profile_id' => $token->profile_id,\n 'expires_at' => Carbon::parse(\n $token->expires_at\n )->toDateTimeString()\n ],\n 'user' => User::find($user->id, ['login', 'name', 'email', 'last_access', 'created_at']),\n 'profiles' => Profile::whereIN('id', $profileIds)->get(['id', 'noun', 'description'])\n ]\n ]);\n }", "private function use_token()\n\t\t{\n\t\t\tif (!isset($_COOKIE['auth_token']) || isset($_SESSION['token_used']))\n\t\t\t\treturn false;\n\n\t\t\t$_SESSION['token_used'] = true;\n\t\t\t$token = explode(';', $_COOKIE['auth_token']);\n\t\t\t$user = $this->users->getUser(null, null, $token[0]);\n\n\t\t\tif (!$user)\n\t\t\t\treturn false;\n\n\t\t\tswitch($this->token_validate($user, $token))\n\t\t\t{\n\t\t\t\tcase -1:\n\t\t\t\t\treturn false;\n\n\t\t\t\tcase 0:\n\t\t\t\t\t$this->grant_token($user, $this->get_token($user));\n\t\t\t\t\t$_SESSION['verified'] = false;\n\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t$_SESSION['state'] = $this->multifactor ? AUTH_MULTIFACTOR : AUTH_NONE;\n\t\t\t\t\treturn $user;\n\n\t\t\t\tcase 1:\n\t\t\t\t\t$_SESSION['verified'] = true;\n\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t$_SESSION['state'] = $this->users->getState($user);\n\t\t\t\t\treturn $user;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "function verifyFormToken($form) {\n\t\tif (!isset($_SESSION[$form . '_token'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// check if the form is sent with token in it\n\t\tif (!isset($_POST['token'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// compare the tokens against each other if they are still the same\n\t\tif ($_SESSION[$form . '_token'] !== $_POST['token']) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function hasToken();", "public function validateSessToken($obj_id, $token) {\n\n $query = \"SELECT sid FROM user_sessions\n WHERE oid = :objId\n AND token = :token\";\n\n $data = Array(\":objId\" => $obj_id, \":token\" => $token);\n\n $res = \\Models\\Database::getInstance()->fetchAll($query, $data);\n\n if ($res != 0) {\n return 1;\n } else {\n return 0;\n }\n }", "protected function serverSideValidateToken($token): bool\n {\n $facebook = $this->getFacebookApi();\n try {\n $response = $facebook->get('/me', $token);\n } catch (FacebookResponseException $exception) {\n return $this->handleFacebookException($exception);\n } catch (FacebookSDKException $exception) {\n return $this->handleFacebookException($exception);\n }\n $user = $response->getGraphUser();\n return $user->getId() == $this->getFieldIfExists(self::FACEBOOK_IDENTITY_STRING);\n }", "public function sessionIsValid()\n {\n return $this->authClient->sessionIsValid();\n }", "public function oauthRequestTokenVerify($token)\n {\n\t $sql = 'SELECT request_token FROM oauth_request_tokens\n WHERE request_token = ' . $this->db->escape($token) . '\n AND authorised_user_id IS NULL';\n $query = $this->db->query($sql);\n\n $result = $query->result();\n if(count($result) > 0) {\n return true;\n }\n return false;\n }", "function csrf_token_is_valid() {\n\tif(isset($_POST['csrf_token'])) {\n\t\t$user_token = $_POST['csrf_token'];\n\t\t$stored_token = $_SESSION['csrf_token'];\n\t\treturn $user_token === $stored_token;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function validate_database_login_session() {\n $user_id = $this->auth->session_data[$this->auth->session_name['user_id']];\n $session_token = $this->auth->session_data[$this->auth->session_name['login_session_token']];\n\n $sql_where = array(\n $this->auth->tbl_col_user_account['id'] => $user_id,\n $this->auth->tbl_col_user_account['suspend'] => 0,\n $this->auth->tbl_col_user_session['token'] => $session_token\n );\n\n // If a session expire time is defined, check its valid.\n if ($this->auth->auth_security['login_session_expire'] > 0)\n {\n $sql_where[$this->auth->tbl_col_user_session['date'].' > '] = $this->database_date_time(-$this->auth->auth_security['login_session_expire']);\n }\n\n $query = $this->db->from($this->auth->tbl_user_account)\n ->join($this->auth->tbl_user_session, $this->auth->tbl_join_user_account.' = '.$this->auth->tbl_join_user_session)\n ->where($sql_where)\n ->get();\n\n ###+++++++++++++++++++++++++++++++++###\n\n // User login credentials are valid, continue as normal.\n if ($query->num_rows() == 1)\n {\n // Get database session token and hash it to try and match hashed cookie token if required for the 'logout_user_onclose' or 'login_via_password_token' features.\n $session_token = $query->row()->{$this->auth->database_config['user_sess']['columns']['token']};\n $hash_session_token = $this->hash_cookie_token($session_token);\n\n // Validate if user has closed their browser since login (Defined by config file).\n if ($this->auth->auth_security['logout_user_onclose'])\n {\n if (get_cookie($this->auth->cookie_name['login_session_token']) != $hash_session_token)\n {\n $this->set_error_message('login_session_expired', 'config');\n $this->logout(FALSE);\n return FALSE;\n }\n }\n // Check whether to unset the users 'Logged in via password' status if they closed their browser since login (Defined by config file).\n else if ($this->auth->auth_security['unset_password_status_onclose'])\n {\n if (get_cookie($this->auth->cookie_name['login_via_password_token']) != $hash_session_token)\n {\n $this->delete_logged_in_via_password_session();\n return FALSE;\n }\n }\n\n // Extend users login time if defined by config file.\n if ($this->auth->auth_security['extend_login_session'])\n {\n // Set extension time.\n $sql_update[$this->auth->tbl_col_user_session['date']] = $this->database_date_time();\n\n $sql_where = array(\n $this->auth->tbl_col_user_session['user_id'] => $user_id,\n $this->auth->tbl_col_user_session['token'] => $session_token\n );\n\n $this->db->update($this->auth->tbl_user_session, $sql_update, $sql_where);\n }\n\n // If loading the 'complete' library, it extends the 'lite' library with additional functions,\n // however, this would also runs the __construct twice, causing the user to wastefully be verified twice.\n // To counter this, the 'auth_verified' var is set to indicate the user has already been verified for this page load.\n return $this->auth_verified = TRUE;\n }\n // The users login session token has either expired, is invalid (Not found in database), or their account has been deactivated since login.\n // Attempt to log the user in via any defined 'Remember Me' cookies.\n // If the \"Remember me' cookies are valid, the user will have 'logged_in' credentials, but will have no 'logged_in_via_password' credentials.\n // If the user cannot be logged in via a 'Remember me' cookie, the user will be stripped of any login session credentials.\n // Note: If the user is also logged in on another computer using the same identity, those sessions are not deleted as they will be authenticated when they next login.\n else\n {\n $this->delete_logged_in_via_password_session();\n return FALSE;\n }\n }", "public function validateToken(string $token): bool {\n $findToken = (new UserTokenModel())->findByToken($token);\n if (!$findToken) {\n return false;\n }\n\n $expirationDate = $findToken->expires_at;\n $dateNow = (new DateTime(\"Now\"))->format(\"Y-m-d H:i:s\");\n\n //checks if token is expired:\n if ($dateNow > $expirationDate) {\n //remove expired token from table:\n $findToken->destroy();\n return false;\n }\n\n return true;\n }", "public function validateRefreshToken()\n {\n try {\n\n // Try to get token from header\n $token = $this->getBearerToken();\n \n // let's check if refreshToken is valid\n $refreshToken = JWT::decode($token, API_REFRESH_TOKEN_KEY, [''.API_ALGORITHM.'']);\n \n //print_r($refreshToken);\n $db = new Database();\n $this->database = $db->connect(); \n \n $tokenType = TOKEN_TYPE_REFRESH;\n \n try {\n $sql = $this->database->prepare(\"SELECT UserId, \n Token FROM \n tokens WHERE \n Token = :token AND \n TokenType = :tokentype\");\n $sql->bindParam(\":token\", $token);\n $sql->bindParam(\":tokentype\", $tokenType);\n $sql->execute();\n $dbToken = $sql->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $this->throwException(DATABASE_ERROR, \"Database select error.\");\n }\n \n //print_r($tokens);\n \n // if there is no any results from db return that there is no matchign refresh token\n if (!is_array($dbToken)) {\n $this->response(NO_MATCHING_REFRESH_TOKEN, \"No matching refresh token found.\"); \n }\n \n // Not needed, JWT::decode should throw an exception before this\n if ($refreshToken->exp < time()) {\n $this->throwException(REFRESH_TOKEN_ERROR, \"dsadsa\");\n }\n \n //print_r($dbToken);//debug\n \n //if validation has passed all above we still have to check if user is not disabled\n $sql = null;\n try {\n $sql = $this->database->prepare(\"SELECT Id, Disabled FROM users WHERE Id = :id\");\n $sql->bindParam(\":id\", $dbToken['UserId']);\n $sql->execute();\n $user = $sql->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $this->throwException(DATABASE_ERROR, \"Database select error.\");\n }\n \n if ($user['Disabled'] == 1 ) {\n $this->response(USER_IS_DISABLED, \"This user is disabled.\");\n }\n \n // if refreshToken is valid. Let's generate new Tokens. Both tokens are always generated, \n // so it is enough to call generateTokens\n $this->generateTokens($dbToken['UserId'], $refreshToken->exp);\n \n } catch (Exception $e) {\n //close db connection\n //$this->database->disconnect();\n $this->throwException(REFRESH_TOKEN_ERROR, \"RefreshToken: \".$e->getMessage());\n }\n }", "function csrf_token_is_valid()\r\n{\r\n if (isset($_POST['csrf_token'])) {\r\n $user_token = $_POST['csrf_token'];\r\n $stored_token = $_SESSION['csrf_token'];\r\n return $user_token === $stored_token;\r\n }\r\n\r\n return false;\r\n}", "public static function hasToken(Request $request);", "public function accessTokenValid()\n {\n return $this->expireTime > time();\n }", "public function validate()\n {\n // generate Token String\n $idTokenString = $this->getTokenString($this->_key);\n return ($idTokenString == $this->_tokenString);\n }", "public function validateUserIfEX() {\n\t\t\treturn self::$ErrorUserHasToken;\n\t\t}", "public function getUserValidateToken($token)\n {\n $userTokenExist = DB::select('select * from al_token_user where token = \"' . $token . '\"');\n return $userTokenExist;\n }", "public function validate($token);", "private function tokenExist() {\n if (!$this->webhook->token) {\n // throw an exception\n $this->missingEx('token');\n }\n }", "function validateActivationToken($token,$lostpass=NULL)\r\n{\r\n\tglobal $db,$db_table_prefix;\r\n\t\r\n\tif($lostpass == NULL) $sql = \"SELECT ActivationToken FROM \".$db_table_prefix.\"Users WHERE Active = 0 AND ActivationToken ='\".$db->sql_escape(trim($token)).\"' LIMIT 1\";\r\n\telse \t\t\t $sql = \"SELECT ActivationToken FROM \".$db_table_prefix.\"Users WHERE Active = 1 AND ActivationToken ='\".$db->sql_escape(trim($token)).\"' AND LostPasswordRequest = 1 LIMIT 1\";\r\n\t\r\n\tif(returns_result($sql) > 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "function isTokenValid($id, $token)\n\t{\n\t\t$sql = 'SELECT users.id FROM users WHERE users.token = \\''.$token.'\\'';\n\n\t\ttry{\n\t\t\t$db= new db();\n\t\t\t$db = $db->connectionDB();\n\t\t\t$result = $db->query($sql);\n\t\t\t$users = $result ->fetchAll(PDO::FETCH_OBJ);\n\n\t\t\tif(count($users) > 0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}catch(PDOException $e)\n\t\t{\n\t\t\t$response = array(\"code\" => \"500\", \"data\" => $e->getMessage());\n\t\t\tprint_r($response);\n\t\t}\n\t\t$result = null;\n\t\t$db = null;\n}", "public function hasAccessToken();", "function checkLoggedIn(){\n\tif(isset($_SESSION['access_token']))return true;\n\telse return false;\n}", "public function isAccessTokenValid(): bool\n {\n // getAccessToken returns the accessTokenSession field in this class if present, or the access_token from session.\n $accessTokenSession = $this->getAccessTokenSession();\n\n return $accessTokenSession && Carbon::createFromTimestamp($accessTokenSession->expires_at)\n ->gt(Carbon::now());\n }", "protected function user_has_tokens() {\n\n\t\t$token_count = 0;\n\n\t\tif ( $this->get_gateway()->tokenization_enabled() && is_user_logged_in() ) {\n\n\t\t\tforeach ( $this->get_gateway()->get_payment_tokens_handler()->get_tokens( get_current_user_id() ) as $token ) {\n\n\t\t\t\t// skip this token if it's not a PayPal account\n\t\t\t\tif ( ! $token->is_paypal_account() ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$token_count++;\n\t\t\t}\n\t\t}\n\n\t\treturn $token_count > 0;\n\t}", "public function verifyFormToken($form)\n\t{\n\t\tif (!isset($_SESSION[$form.'_token'])) {\n\t\t\treturn false;\n\t\t}\n \n\t\t// check if the form is sent with token in it\n\t\tif (!isset($_POST['token'])) {\n\t\t\treturn false;\n\t\t}\n \n\t\t// compare the tokens against each other if they are still the same\n\t\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\n\t\t\treturn false;\n\t\t}\n \n\t\treturn true;\n\t}", "function checkAuthToken() {\n if ( !isset( $_POST['authToken'] ) || $_POST['authToken'] != $_SESSION['authToken'] ) {\n logout();\n return false;\n } else {\n return true;\n }\n}", "function _attempt_get_valid_token($user_levels=NULL) {\n\n if (isset($_COOKIE['trongatetoken'])) {\n $user_tokens[] = $_COOKIE['trongatetoken'];\n }\n\n if (isset($_SESSION['trongatetoken'])) {\n $user_tokens[] = $_SESSION['trongatetoken'];\n }\n\n if (!isset($user_tokens)) {\n return false;\n } else {\n\n if (!isset($user_levels)) {\n $user_levels_type = '';\n } else {\n $user_levels_type = gettype($user_levels);\n }\n\n switch ($user_levels_type) {\n case 'integer':\n //allow access for ONE user level type\n $token = $this->_execute_sql_single($user_tokens, $user_levels);\n break;\n case 'array':\n //allow access for MORE THAN ONE user level type\n $token = $this->_execute_sql_multi($user_tokens, $user_levels);\n break;\n default:\n //allow access for AND user level type\n $token = $this->_execute_sql_default($user_tokens);\n break;\n }\n\n return $token;\n\n }\n\n }", "function __validToken($token_created_at) {\n $expired = strtotime($token_created_at) + 86400;\n $time = strtotime(\"now\");\n if ($time < $expired) {\n return true;\n }\n return false;\n }", "public function verifyToken($clientId, $token);", "static function validateToken($tokenString) {\n\t\t$token = \\App::model('user/token');\n\t\t$token->load(['token = ?', $tokenString]);\n\t\tif($token->get('id')) {\n\t\t\tif(strtotime($token->get('expires_at')) > time()) {\n\t\t\t\treturn $token->get('user_id');\n\t\t\t} else {\n\t\t\t\t$token->delete();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function verifyToken ($token) {\n $result = array(\n \"isValid\" => false,\n \"userId\" => \"\",\n \"expiredAt\" => \"\",\n );\n $token = Token::where('token', $token)\n ->where('expired_at', '>', Carbon::now()->timestamp)\n ->first();\n $expiredAt = Arr::get($token, 'expired_at', null);\n\n if ($expiredAt != null) {\n $result[\"isValid\"] = true;\n $result[\"userId\"] = $token->user_id;\n $result[\"expiredAt\"] = Carbon::createFromTimestamp($expiredAt)->toIso8601String();\n }\n\n return $result;\n\n }", "public function validateTokenOwnership($token, $timestamp, $session_token = '') {\n\t\t$required_token = $this->generateActionToken($timestamp, $session_token);\n\n\t\treturn _elgg_services()->crypto->areEqual($token, $required_token);\n\t}", "public function requireValidToken($msg = 'Cross site request forgery detected. Request aborted!', $token = null) {\n\t\tif (is_null($token))\n\t\t\t$token = $this->createToken();\n\n\t\t$tokenName = is_array($token) ? $token['name'] : $token;\n\n\t\tif (Flight::request()->data[$tokenName] != $_SESSION[$tokenName])\n\t\t\tFlight::halt(403, $msg);\n\n\t\treturn true;\n\t}", "function validateActivationToken($token, $lostpass = NULL) {\n global $mysqli, $db_table_prefix;\n if ($lostpass == NULL) {\n $stmt = $mysqli->prepare(\"SELECT active\n\t\t\tFROM \" . $db_table_prefix . \"users\n\t\t\tWHERE active = 0\n\t\t\tAND\n\t\t\tactivation_token = ?\n\t\t\tLIMIT 1\");\n } else {\n $stmt = $mysqli->prepare(\"SELECT active\n\t\t\tFROM \" . $db_table_prefix . \"users\n\t\t\tWHERE active = 1\n\t\t\tAND\n\t\t\tactivation_token = ?\n\t\t\tAND\n\t\t\tlost_password_request = 1 \n\t\t\tLIMIT 1\");\n }\n $stmt->bind_param(\"s\", $token);\n $stmt->execute();\n $stmt->store_result();\n $num_returns = $stmt->num_rows;\n $stmt->close();\n\n if ($num_returns > 0) {\n return true;\n } else {\n return false;\n }\n}", "public static function check($token){\n\t\t$tokenName = Config::get('session/token_name');\t\t\t\t\t\t\t\t\n\n\t\tif(Session::exists($tokenName) && $token === Session::get($tokenName)){\t\t// Checkif the token supplied by the form is equal to the session token.\n\t\t\tSession::delete($tokenName);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Return false if none of the above is true.\n\t}", "protected function verify_token($request)\n {\n $header = $request->getHeaders();\n $token = $header['Authorization'][0];\n try{\n $current_user = $this->getDecodeJwt($token, getenv(\"APP_KEY\"));\n return (array)$current_user->data;\n }\n catch (\\Exception $e){\n return false;\n \n }\n }", "function VerifyToken($token, $user_id = NULL, $username = NULL)\r\n{\r\n //token and user_id/username required\r\n if(!isset($token) || !(isset($user_id) || isset($username)))\r\n {\r\n throw new Exception(\"Token and user_id or username required\");\r\n }\r\n $user_id = !empty($user_id) ? $user_id : '';\r\n $username = !empty($username) ? $username : '';\r\n\r\n $dbh = new PDOConnection();\r\n $sth = $dbh->prepare('SELECT id,last_login FROM users WHERE token = :token AND (id = :id OR username = :username)');\r\n $sth->bindParam(':token', $token);\r\n $sth->bindParam(':id', $user_id, PDO::PARAM_INT);\r\n $sth->bindParam(':username', $username);\r\n if(!$sth->execute())\r\n {\r\n throw new Exception($sth->errorInfo()[2]);\r\n }\r\n $row = $sth->fetch(PDO::FETCH_ASSOC);\r\n if(VerifyLastLogin($row['last_login']) === FALSE)\r\n {\r\n return FALSE;\r\n }\r\n\r\n return $row['id'];\r\n}", "private static function verify_token( $token, $timestamp )\n\t{\n\t\tif ( $token == self::create_token( $timestamp ) ) {\n\t\t\t$time = time();\n\t\t\tif ( $time > ($timestamp + 3) && $time < ($timestamp + 5*60) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function hasToken(){\n return $this->_has(2);\n }", "public function hasToken(){\n return $this->_has(2);\n }", "public function CheckValidToken($token=\"\"){\n\t\tif($token){\n\t\t\t try {\n\t\t\t\t $decoded = JWT::decode($token, JWTKEY, array('HS256'));\n\t\t\t\t $aVars=array(\n\t\t\t\t\t\t\"msg\" => \"Access granted.\",\n\t\t\t\t\t\t\"data\" => $decoded->data,\n\t\t\t\t\t\t\"status\" => 1\n\t\t\t\t\t);\n\t\t\t }catch (Exception $e){\n\t\t\t\t$aVars=array(\n\t\t\t\t\t\"msg\" => \"Access denied.\",\n\t\t\t\t\t\"status\" => 0,\n\t\t\t\t\t\"error\" => $e->getMessage()\n\t\t\t\t);\n\t\t\t}\n\t\t}else{\n\t\t\t$aVars=array(\"status\"=>0,\"msg\"=>\"Token Invalid\");\n\t\t}\n\n\t\treturn $aVars;\n\t}", "function valid_token($token = NULL)\n\t{\n\t\t$this->db->from('user_forgot_password');\n\t\t$this->db->where('token', $token);\n\t\t$token = $this->db->get();\n\n\t\tif ($token->num_rows() === 1)\n\t\t{\n\t\t\treturn $token->row_array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "private function validateTokenRequest(): bool\n {\n $validator = new Validator([\n 'required' => ':attribute — обязательное поле.',\n 'numeric' => ':attribute — поле должно содержать только цифры.',\n ]);\n\n $validator->addValidator('plain', new PlainRule());\n\n $validation = $validator->make([\n 'shop_id' => $this->getRouteParam('id'),\n 'secret_key' => $this->http_request->query->get('secret_key'),\n ], [\n 'shop_id' => 'required|numeric',\n 'secret_key' => 'required|plain',\n ]);\n\n $validation->setAliases([\n 'shop_id' => 'Идентификатор магазина',\n 'secret_key' => 'Секретный ключ',\n ]);\n\n $validation->validate();\n\n if ($validation->fails()) {\n $errors = $validation->errors()->toArray();\n\n foreach ($errors as $key => $error) {\n foreach ($error as $message) {\n $this->errors[] = [\n 'code' => 'invalid-field',\n 'message' => $message,\n 'field' => $key,\n ];\n }\n }\n\n return false;\n }\n\n return true;\n }", "public static function check($token) {\r\n\t\t$tokenName = Config::get('session/token_name');\r\n\r\n\t\tif (Session::exists($tokenName) && $token === Session::get($tokenName)) {\r\n\t\t\tSession::delete($tokenName);//dont need it any more\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "protected function _checkAuthToken($token)\n {\n $session = new Session();\n if ($session->get('token') === $token) {\n return true;\n }\n return false;\n }", "public function validateToken($token)\n {\n if (isset($_SESSION['MFW_csrf-token']) && $_SESSION['MFW_csrf-token'] == $token) {\n return true;\n }\n\n return false;\n }", "public function validateToken($token)\n\t{\n\t\t$valid = false;\n\t\t$passwordResetInfo = $this->entityManager->getRepository('BugglMainBundle:PasswordResetInfo')->findOneBy(array('token' => $token));\n\t\tif(!is_null($passwordResetInfo) and $token != ''){\n\t\t\t$valid = strtotime($passwordResetInfo->getTokenExpiration()->format('Y-m-d H:i:s')) >= strtotime(date('Y-m-d H:i:s'));\n\t\t}\n\n\t\treturn $valid;\n\t}", "public function validateToken($token)\n\t{\n\t\t//get user from password_resets table\n\t\t$user = User::whereNotNull('password_resets.token')\n\t\t\t->join('password_resets', 'users.email', '=', 'password_resets.email')->first();\n\n\t\t//validate user\n\t\tif ($this->broker()->tokenExists($user, $token)) {\n\t\t\treturn response()->json(['isValid' => true, 'token' => $token, 'user' => $user], 200);\n\t\t}\n\t\treturn response()->json(['code' => 500, 'message' => 'Invalid Token ID', 'error' => []], 500);\n\t}", "public static function checkValidateToken(array $decodedToken): bool {\n $expired_at = new \\DateTime($decodedToken['expired_at']);\n\n //Get actually time\n $now = new \\DateTime();\n\n //Check date validity\n return ($expired_at < $now);\n }", "public static function validToken($db, $token,$username=null){\n $r = false;\n\t\t $sql = \"SELECT a.Username\n\t\t\t FROM user_auth a \n INNER JOIN user_data b ON a.Username = b.Username\n \t\t\tWHERE b.StatusID = '1' AND a.RS_Token = :token AND a.Expired > current_timestamp;\";\n\t \t$stmt = $db->prepare($sql);\n\t\t $stmt->bindParam(':token', $token, PDO::PARAM_STR);\n \t\tif ($stmt->execute()) {\t\n if ($stmt->rowCount() > 0){\n if ($username == null){\n $r = true;\n } else {\n $single = $stmt->fetch();\n\t\t\t\t\t if ($single['Username'] == strtolower($username)){\n $r = true;\n }\n } \n } \t \t\n\t \t} \t\t\n\t\t return $r;\n \t\t$this->db = null;\n }", "function isLoggedIn($token){\n\t\tglobal $db;\n\t\tglobal $Student;\n\t\t$session = $this->GetUserIdByToken($token);\n\t\tif($session!=null)\n\t\t{\n\t\t\t$Student->UpdateActiveDate($session);\n\t\t\treturn true;\n\t\t}\n\t\telse return (object)array(\"error\" => \"token not found\");\n\t}", "public function validateAccessToken()\n {\n try {\n \n // Try to get token from header\n $token = $this->getBearerToken();\n //echo(\"TOKEN: \" .$token.\"\\n\"); //debug\n $payload = JWT::decode($token, API_ACCESS_TOKEN_KEY, [''.API_ALGORITHM.'']);\n \n //moved SQL connection from __construct(). At least do not make so many connections to database. \n try {\n $db = new Database();\n $this->database = $db->connect();\n $sql = $this->database->prepare(\"SELECT Id, Disabled FROM users WHERE Id = :id\");\n $sql->bindParam(\":id\", $payload->userId);\n $sql->execute();\n $user = $sql->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $this->throwException(DATABASE_ERROR, \"Database select error.\");\n }\n if (!is_array($user)) {\n $this->response(INVALID_USER_PASS, \"This user is not found in our database\");\n }\n \n if ($user['Disabled'] == 1 ) {\n $this->response(USER_IS_DISABLED, \"This user is disabled.\");\n }\n \n // if validated correctly lets set \n \n $this->user->setUserId($payload->userId);\n //$this->userId = $payload->userId;\n \n } catch (Exception $e) {\n //close db connection\n //$this->database->disconnect();\n $this->throwException(ACCESS_TOKEN_ERROR, \"AccessToken: \".$e->getMessage());\n }\n //close db connection\n //$this->database->disconnect();\n \n }", "public function testInvalidToken()\n {\n $this->sessionInfo['logged_in'] = true;\n $this->sessionInfo['token'] = 'foo';\n\n $this->session($this->sessionInfo);\n\n $response = $this->call('GET', '/api/user');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $decoded = json_decode($response->getContent());\n\n $this->assertEquals('error', $decoded->status);\n }", "private function validateAccessToken() {\n $this->userID = $this->facebook->getUser();\n }", "function validate_token($token, $procedure, $expiry = 5)\n\t{\n\t\t// parsing passed token, checking proper syntax\n\t\tif (is_array($strings = explode(\"\\n\", $token)))\n\t\t{\n\t\t\t[$token_time, $token_proc] = explode('|', $strings[0]);\n\t\t\t$token_mac = $strings[1];\n\n\t\t\t// something's wrong with the input\n\t\t\tif (!$token_time || !$token_proc || !$token_mac)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// recalculating MAC\n\t\t$new_mac = hash('sha1', $this->engine->db->system_seed . $this->sid . $token_time . $token_proc);\n\n\t\t// validating conditions. exact order is crucial!\n\t\tif ($token_mac !== $new_mac)\n\t\t{\n\t\t\t// MAC mismatch\n\t\t\treturn false;\n\t\t}\n\t\telse if ($token_proc !== $procedure)\n\t\t{\n\t\t\t// procedure mismatch\n\t\t\treturn false;\n\t\t}\n\t\telse if (time() > ($expiry * 60 + $token_time))\n\t\t{\n\t\t\t// token expired\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "function verifyAuth()\n\t{\n\t\tsanitizeRequest($_POST);\n\t\tsanitizeRequest($_GET);\n\t\t\n\t\t$currentUser = UserService::getInstance()->getCurrentUser();\n\t\tif (!$currentUser || !$currentUser->getSessionId()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$payload = JWT::decode($currentUser->getSessionId(), SERVER_KEY, array('HS256'));\n\t\t\t$sessionId = UserService::getInstance()->getSessionId($currentUser->getId());\n\t\t\tif ($sessionId === $currentUser->getSessionId() &&\n\t\t\t\t\t$currentUser->getId() === $payload->id &&\n\t\t\t\t\t$currentUser->getEmail() === $payload->email) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\tif ($currentUser->isRemember() && $e->getMessage() === 'Expired token') {\n\t\t\t\t$currentUser->extendSession();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public function hasToken(){\n return ( $this->token and $this->token->isValid() );\n }", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "public function isRoundValid(\\Gems_Tracker_Token $token);", "static function isValid($user, $token){\n\n\t\t$verificationToken = self::get(\"user = $user->id AND token = '$token'\");\n\t\tif($verificationToken && time() - strtotime($verificationToken->createdOn) + $verificationToken->lifespan > 0){\n\n\t\t\t$result = true;\n\t\t\t$verificationToken->delete();\n\t\t}\n\t\telse{\n\n\t\t\t$result = false;\n\t\t}\n\t\treturn $result;\n\t}", "public function hasTokenExpired()\n {\n $tokenTimestamp = $this->flagManager->getFlagData(self::TOKEN_RECEIVED_TIMESTAMP);\n if ($tokenTimestamp !== null) {\n $date = (new \\DateTime())->getTimestamp();\n $validity = $this->flagManager->getFlagData(self::TOKEN_EXPIRES_IN_FLAG_NAME);\n return $date > $tokenTimestamp + $validity - self::TOKEN_VALIDITY_MARGIN_IN_SECONDS;\n }\n return true;\n }" ]
[ "0.7138659", "0.7073425", "0.70706797", "0.68861073", "0.68379134", "0.6732971", "0.6685813", "0.66849786", "0.66340303", "0.6626468", "0.65715295", "0.6565846", "0.6525567", "0.65193975", "0.648188", "0.64607877", "0.6453079", "0.64377916", "0.64368755", "0.64333266", "0.64118373", "0.638201", "0.63536006", "0.6353093", "0.63482136", "0.63482136", "0.633777", "0.6324968", "0.631294", "0.6301128", "0.6276647", "0.6256657", "0.6256457", "0.6250952", "0.62505347", "0.6246356", "0.62415606", "0.62409955", "0.6225583", "0.6219544", "0.62193835", "0.6208626", "0.6205144", "0.6201477", "0.62000227", "0.6193725", "0.61766493", "0.6136968", "0.6125629", "0.6120366", "0.611457", "0.6111682", "0.6107377", "0.61020947", "0.6092074", "0.6087679", "0.6076353", "0.605499", "0.6036479", "0.60305387", "0.6023873", "0.60201544", "0.60146034", "0.6011372", "0.6006854", "0.5973183", "0.5972174", "0.596948", "0.5964299", "0.59579957", "0.59545034", "0.59540963", "0.5954059", "0.595271", "0.59448946", "0.5923468", "0.5915455", "0.5911974", "0.5911974", "0.59054047", "0.5903712", "0.59033525", "0.589461", "0.5889341", "0.58857924", "0.5884299", "0.5878648", "0.5866321", "0.585498", "0.5854803", "0.58527535", "0.5852245", "0.5844817", "0.5842136", "0.5840975", "0.5829883", "0.5826661", "0.58257776", "0.58246136", "0.5815369" ]
0.6250838
34
Get all notifications for a given user
public function get_all(int $userid, int $fromid = 0): array { // TODO currently only retrieves events for the current user context. global $DB; $events = $DB->get_records_select(self::TABLENAME, 'contextid = :contextid AND id > :fromid', ['contextid' => \context_user::instance($userid)->id, 'fromid' => $fromid], 'id', 'id, contextid, component, area, itemid, payload'); array_walk($events, function(&$item) { $item->payload = @json_decode($item->payload, true); $context = \context::instance_by_id($item->contextid); $item->context = ['id' => $context->id, 'contextlevel' => $context->contextlevel, 'instanceid' => $context->instanceid]; unset($item->contextid); }); return $events; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserNotifications($user);", "public function notifications($user_id)\n\t{\n\t\t$repo = App::make(NotificationRepository::class);\n\n\t\treturn $repo->user($user_id);\n\t}", "public function findNotifications($userId);", "public function notifications()\n {\n $notifications = $this->get(\"/api/v1/conversations?as_user_id=sis_user_id:mtm49\");\n return $notifications;\n }", "public function getNotifications()\n {\n return $this->hasMany(Notification::className(), ['user_id' => 'id']);\n }", "final public function get_notifications() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"SELECT notification_id, message, user_id, type, a_href, read_status, date_notified\r\n\t\t\tFROM `notifications`\r\n\t\t\tWHERE read_status = '\" . NotificationFactory::UNREAD . \"'\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\t$notifications = array();\r\n\t\t\twhile ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\r\n\t\t\t\t$notification = '<a href=\"' . $row['a_href'] . '\">' . $row['message'] . '</a>';\r\n\t\t\t\tarray_push($notifications, $notification);\r\n\t\t\t}\r\n\t\t\treturn $notifications;\r\n\t\t}\r\n\t}", "public function fetch(int $user_id)\n\t{\n\t\t// load Model\n\t\t$this->Notifications = TableRegistry::get('Notifications');\n\n\t\t// get Notifications\n\t\t$notifications = $this->Notifications->find()\n\t\t\t->limit(4)\n\t\t\t->where(['user_id' => $user_id])\n\t\t\t->order(['created'=>'DESC'])\n\t\t\t->toList();\n\t\t\n\t\treturn $notifications;\n\t}", "public function getUserNotifications($id){\n $user = User::query()->findOrFail($id);\n $notifications = Notification::query()->where('to_user_id', $user->_id)->get();\n $unreadNotifications = Notification::query()->where('to_user_id', $user->_id)->where('is_read', false)->get()->count();\n return Response::raw(200, array_merge([\"notifications\" => $notifications->toArray()], [\"unread_notifications\" => $unreadNotifications]));\n }", "function GetNotifications($uid=false,$last_notification=false){\n\n\t$query_=$last_notification?\" and `id`> {$last_notification}\":\"\";\n\n\t$notifications = NotificationsModel::model()->findAll(\"`to` =\".helpers::uid($uid).$query_.\" order by `time` desc limit 10\");\n\n\tif($notifications!=NULL){\n\n\t//get user controller\n\t$user_c=Helpers::get_controller(USERS);\n\n\tforeach ($notifications as $k=>$notification){\n\n\t$notifications[$k]->user = $user_c->GetUserById($notification->from);\n\n\t}\n\n\n\t}\n\n\n\treturn $notifications==null?array():$notifications;\n\n\t}", "public function queryAll($userId){\r\n\t\t$sql = 'SELECT * FROM notifications WHERE user_id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($userId);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function get_all_notifications($user_id, $page, $offset)\n {\n return $this->db->where('user_id', $user_id)\n ->limit($page, $offset)->order_by('id', 'desc')\n ->get('notifications')->result();\n }", "public function all()\n {\n return $this->jsonData(Auth::user()->notifications);\n }", "public function findNotifications($userId)\n {\n return array_map(function ($data) {\n\n return $this->createNotificationInstance($data);\n\n }, $this->getAllNotificationsQuery($userId)->all($this->db));\n }", "public function mainApiNotifications(User $user)\n {\n \treturn $user->unreadNotifications;\n }", "public function getNotification($user)\n {\n return $user->notifications->filter(function ($item) use ($user) {\n return $item->type == 'Musonza\\Chat\\Notifications\\MessageSent' &&\n $item->data['message_id'] == $this->id &&\n $item->data['conversation_id'] == $this->conversation_id &&\n $item->notifiable_id == $user->id;\n })->first();\n }", "function get_notifications($userID){\n\t\t\t$query = \"SELECT notifications.notifications_id, notifications.notif_type, notifications.content, notifications.sender_id, notifications.time, notifications.read_message, user.name, userphoto.original_photo FROM notifications INNER JOIN user ON notifications.sender_id = user.user_id LEFT JOIN userphoto ON notifications.sender_id = userphoto.user_id WHERE notifications.user_id = '$userID'\";\n\t\t\treturn $this->db->query($query);\n\t\t}", "public static function fetchNotificationsByUser($paramUser){\n if(($paramUser instanceof User) == false) throw new IllegalArgumentException(\"Invalid argument, User object expected.\");\n $notifications = array();\n $rows = getDatabase()->query(\"SELECT `id`, `title`, `text`, `image`, `time` FROM `notifications` WHERE `userID` = %i\", $paramUser->getID());\n foreach($rows as $row){\n $notifications[count($notifications)] = array(\n \"notification\" => new OrongoNotification($row['title'], $row['text'], $row['image'], $row['time']),\n \"id\" => $row['id']\n );\n } \n return $notifications;\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 getNotifications($user_id,$page){\n $per_page = 10;\n if($page==0){\n $offset = 0;\n }else{\n $offset = $page*$per_page;\n }\n\n $readNotifications = DB::table('notifications')->where('user_id', $user_id)->update(array('status'=>'R'));\n $getData = DB::table('notifications')->where('user_id',$user_id)->offset($offset)->limit($per_page)->get();\n\n if(!$getData->isEmpty()){\n foreach ($getData as $key => $value) {\n $getData[$key]->timeago=$this->timeago($value->updated_at);\n }\n $getCount = DB::table('notifications')->where('user_id',$user_id)->where('status','U')->count();\n return response()->json(['data' => $getData,'count'=>$getCount]);\n \n }else{\n return response()->json(['data'=>array(),'message' => 'No Records Found'],200);\n }\n }", "static function getNotifications($application=\"all\", $userName=\"\"){\n $usr = (!$userName)? (self::getUser()) : ($userName);\n $result = Array();\n return $result;\n }", "public function index()\n {\n return response()->json(request()->user()->notifications);\n }", "public function getNotifications($username)\r\n\t{\r\n\t $query = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc(\"\r\n\t SELECT notifications.message,notifications.created_at FROM notifications WHERE notifications.recepient = '$username'\r\n\t ORDER BY notifications.created_at DESC LIMIT 3\r\n\t \");\r\n\t return $query;\r\n\t}", "public function get_notification_list($user_id)\n {\n\n $where_cond = '(notification_to_id=\"'.$user_id.'\" AND notification_status!=3)';\n\n $this->db->select('n.notification_id,n.notification_type,n.navigate_id,CONCAT(u.user_fullname,\" \",n.notification_message) as notification_message,n.notification_status,n.notification_created_date');\n $this->db->from('hs_notifications n');\n $this->db->join('hs_users u','u.user_id=n.notification_from_id','left');\n\n $model_data = $this->db->where($where_cond)->order_by('notification_id desc')->get()->result_array();\n\n return $model_data;\n }", "public function showAllNotifications()\n {\n return view('intern.notifications.allnotifications')\n ->withUser(auth()->user())\n ->withNotifications(auth()->user()->notifications()->paginate(10));\n }", "public static function getPollNotifications($user, $mark_unread = true) {\n\t\t$notifications = Model_Notification::factory('notification')\n\t\t\t->where('to', '=', $user)\n\t\t\t->and_where('unread', '=', '1')\n\t\t\t->find_all();\n\t\t\t\n\t\t$notifications_array = array();\n\t\t\n\t\tforeach($notifications as $notification) {\n\t\t\t$notifications_array[] = $notification->jsonify();\n\t\t}\n\t\t\n\t\tself::updateUnread($notifications_array);\n\t\t\n\t\treturn array(\"notifications\" => $notifications_array);\n\t}", "function getAllEventNotifications($user_id){\n\t\t\t\t\t\n\t\t\t$sql =\" select ef.id,ef.friend_id,e.user_id,e.event_id,u.user_name as UserName,\n\t\t\t\t\t\tu.image as UserImage,e.event_name,e.event_type,e.description,\n\t\t\t\t\t\tef.status from `events` as e ,event_friends as ef\n\t\t\t\t\t\tleft join users as u on u.user_id = ef.user_id\n\t\t\t\t\t\twhere e.event_id = ef.event_id\n\t\t\t\t\t\tand ef.friend_id = '\".$user_id.\"'\n\t\t\t\t\t\tand e.create_type = 'events'\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tand (ef.status = 'start')\n\t\t\t\t\t\tgroup by e.event_id\n\t\t\t\t\t\torder by e.event_id desc\n\t\t\t\t\t\tlimit 0,2 \";\n\t\t$query = $this->db->query($sql);\t\n\t\t$data = $query->result_array();\n\t\treturn $data;\n\t\t\n\t}", "function user_get_all_notifications($reciever_uid){\n\t\t$queryText = 'Select user_notifications.sender_uid, user_notifications.reciever_uid, user_notifications.message_tag, user_notifications.message, user_notifications.time,\n\t\t\tuser_accounts.first_name as sender_first_name, user_accounts.last_name as sender_last_name\n\t\t\tFROM user_notifications INNER JOIN user_accounts WHERE reciever_uid = :reciever_uid ORDER BY time DESC';\n\t\t\n\t\t$query = $this->connection->prepare($queryText);\n\t\t$query->execute(array(':reciever_uid'=>$reciever_uid));\n\t\t\n\t\treturn $query;\n\t}", "public function getAll($userId) {\n $res = $this->db\n ->where('idUser', $userId)\n ->get('Notification')\n ->result_array();\n\n $count = count($res);\n for ($i = 0; $i < $count; $i++) {\n $res[$i]['storage'] = 'seen';\n }\n\n return $res;\n }", "public function fetchNotification($user_id){\n $c_db = $_ENV['db_database'];\n $ap_db = $_ENV['ap_database'];\n\n $this->db->select(\n $c_db.'.chat_tbl.*,'.\n $ap_db.'.users.last_name,'.\n $ap_db.'.users.first_name,'.\n $ap_db.'.users.middle_name'\n );\n $this->db->from($c_db.'.chat_tbl');\n $this->db->join($c_db.'.results_tbl',$c_db.'.results_tbl.token = '.$c_db.'.chat_tbl.results_token','left');\n $this->db->join($ap_db.'.users',$ap_db.'.users.idusers = '.$c_db.'.chat_tbl.adviser_id','left');\n $this->db->where($c_db.'.results_tbl.added_by', $user_id);\n $this->db->where($c_db.'.chat_tbl.sender', '1');\n $this->db->where($c_db.'.chat_tbl.read', '0');\n $this->db->group_by($c_db.'.chat_tbl.results_token'); \n $this->db->order_by($c_db.\".chat_tbl.timestamp\", \"desc\");\n \n return $this->db->get()->result_array();\n }", "public function findAllNotificationsForOneUser($userId)\n {\n $query = $this->createQueryBuilder('n')\n ->select('n.id, n.idEntityType, n.message, n.createdAt, n.entityType')\n ->join('AppBundle:Reading_notification' ,'r')\n ->addSelect('r.isRead, r.id')\n ->where('r.notifiedUser = ?1')\n ->andWhere('n.id = r.notification')\n ->setParameter(1, $userId)\n ->getQuery()->getResult();\n return $query;\n }", "public function getNotifications(HRUser $user, HRGame $game, $page = 1) {\n return $this->_em->createQuery(\"\n SELECT n\n FROM EIPHRBundle:HRNotification n\n WHERE n.game = :game\n AND n.user = :user\n ORDER BY n.time DESC\n \")->setParameters(array(\n ':user' => $user->getId(),\n ':game' => $game->getId()\n ))\n ->setFirstResult(($page-1) * 40)\n ->setMaxResults(40)\n ->getResult();\n }", "public function getNotifications(Request $request)\n {\n $data = json_decode($request->getContent());\n $user_id = $data->user_id;\n\n $n = Notification::where('user_id',$user_id)->where('status',true)->get();\n\n return response()->json($n);\n }", "public function getNotificationsForUser($type)\n {\n $type == 'like' ? $typeNotification = NotificationEnum::LIKE_POST : ($type == 'comment' ? $typeNotification = NotificationEnum::COMMENT_POST : $typeNotification = NotificationEnum::FOLLOW_USER);\n $column = $this->model->fillable;\n $column[] = 'id as uuid';\n $notifications = $this->model->select($column)->whereNotifiableId(Auth::user()->id)->whereNotifiableType(NotificationEnum::MODEL_USER)->whereType($typeNotification);\n $updatenotifications = $notifications->update([\n 'view_at' => Carbon::now()\n ]);\n\n return $notifications->orderBy('created_at', 'DESC');\n }", "function getUnsentNotifications($userId) {\n\t\treturn $this->_conn->arrayQuery(\"SELECT id, userid, objectid, type, title, body FROM notifications WHERE userid = :userid AND NOT SENT\",\n array(\n ':userid' => array($userId, PDO::PARAM_INT)\n ));\n\t}", "public function getAll()\n\t{\n\t\t$msgs = Message::findByUser($this->getUser());\n\t\t$this->updateQueryTime();\n\t\treturn $msgs;\n\t}", "function get_all_notifications()\n {\n $this->db->order_by('id_notification', 'desc');\n return $this->db->get('notifications')->result_array();\n }", "public function getNotificationAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $qb = $em->createQueryBuilder();\n $result = $qb->select('n.id, n.type, n.levelCode, n.levelDescription,'\n . 'n.priority, n.priorityCode, n.title, n.description,'\n . 'n.isActive, n.statusRead, n.createdAt, n.createdAtDate, n.createdAtTime')\n ->from('ESERVMAINProfileBundle:EservVUserNotification', 'n')\n ->where('n.fosUserId = :uid')\n ->setParameter('uid', $this->get('security.context')->getToken()->getUser()->getId())\n ->orderBy('n.createdAt','DESC')\n ->addOrderBy('n.priorityOrder', 'DESC') \n ->getQuery()\n ;\n \n $FormattedQuery = $this->container->get('core_function_services')->GetOutputFormat($result, 'array');\n\n return $this->render('ESERVMAINProfileBundle:UserNotification:view.html.twig', array(\n 'notifications' => $FormattedQuery, \n )); \n\n }", "public function getNotifications()\n {\n $notifications = AllRequests::getNotifications();\n return view('userprofile.notifications')->with(array('notifications'=>$notifications));\n }", "static function get_newNotificationByUser($userId) {\r\n\t\tglobal $db;\r\n \r\n $userId = $db->escape_string($userId);\r\n \r\n $query = \"SELECT * FROM `notification`, `user_has_notification` WHERE user_has_notification.User_id = ? AND user_has_notification.Notification_id = notification.Notification_id AND user_has_notification.Seen = 0\";\r\n \r\n $statement = $db->prepare($query);\r\n\t\t\r\n\t\tif ($statement == FALSE) {\r\n\t\t\tdisplay_db_error($db->error);\r\n\t\t}\r\n \r\n $statement->bind_param(\"i\", $userId);\r\n \r\n $statement->execute();\r\n \r\n $result = $statement->get_result();\r\n \r\n if ($result == FALSE) {\r\n display_db_error($db->error);\r\n }\r\n \r\n $notifications = array();\r\n \r\n while ($row = $result->fetch_assoc()) {\r\n $notifications[] = $row;\r\n }\r\n \r\n $statement->close();\r\n \r\n return $notifications;\r\n\t}", "public function getUserMessagesAll(User $user)\n {\n }", "function GetUnreadNotifications($uid=false,$last_notification=false){\n\n\t$query_=$last_notification?\" and `id`> {$last_notification}\":\"\";\n\n\t$notifications = NotificationsModel::model()->findAll(\"`to` =\".helpers::uid($uid).$query_.\" and `seen`='0' order by `time` desc\");\n\n\tif($notifications!=NULL){\n\n\t//get user controller\n\t$user_c=Helpers::get_controller(USERS);\n\n\tforeach ($notifications as $k=>$notification){\n\n\t$notifications[$k]->user = $user_c->GetUserById($notification->from);\n\n\n\t}\n\n\n\t}\n\n\n\treturn $notifications==null?array():$notifications;\n\n\t}", "public function notifications()\n {\n return $this->morphMany(DatabaseNotification::class, 'notifiable')->orderBy('created_at', 'desc');\n }", "public function getNotifications($filter = array('enabled' => 1), $paginator = false)\n {\n return $this->em->getRepository('App:Notification')\n ->findRecordsByFilter(\n $filter, \n $this->application_crud->getSortColumn('application_notification_sort'), \n $this->application_crud->getSortOrder('application_notification_sort_orderBy'),\n $paginator\n );\n }", "function getUserNotification( $id ) {\n\tglobal $ftsdb;\n\t$data = [];\n\n\t$results = $ftsdb->select( DBTABLEPREFIX . \"notifications\",\n\t\t\"id = :id\",\n\t\tarray(\n\t\t\t\":id\" => $id,\n\t\t) );\n\tif ( count( $results ) == 0 ) {\n\t\t$data = $results[0];\n\t}\n\t$results = null;\n\n\treturn $data;\n}", "public function getNotificationRecipients(User $user)\n {\n // All participants in project should get notification,\n // except comment author.\n return $this->participants\n ->filter(function ($participant) use ($user) {\n return $participant->id != $user->id;\n });\n\n }", "public function index(User $user)\n {\n $userNotifications = $user->notifications->where('type','App\\Notifications\\BookingNotification')->sortByDesc('created_at');\n\n $notifications = array();\n $ids = array();\n foreach ($userNotifications as $notification) {\n $booking_id = $notification->data['booking_id'];\n if (!in_array($booking_id, $ids)) {\n array_push($ids, $booking_id);\n array_push($notifications, $notification);\n }\n }\n return response()->json($notifications, 200);\n }", "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 getNotifications()\n {\n return $this->hasMany(Notification::className(), ['task_id' => 'id']);\n }", "public function getNotifications(NotificationRequest $request)\n\t{\n\t\t$record_per_page = $request->item_per_page ?? PaginateType::PAGINATE_DEFAULT_PER_PAGE;\n\t\t$notification = $this->iNotificationRepository->getNotifications(Auth::user()->id, false, $record_per_page);\n\t\tif (!$notification)\n\t\t\tthrow new RecordNotFoundException(trans('api/notification.notification_not_found'));\n\n\t\t$read_notification = $notification->where('is_read', false)->pluck('id')->toArray();\n\t\t// update the status to read\n\t\t$this->iNotificationRepository->updateReadNotificationsStatus($read_notification);\n\t\treturn NotificationResource::collection($notification);\n\t}", "public function getUnreadNotifications( $user, $type ) {\n\t\t$dbr = MWEchoDbFactory::getDB( DB_SLAVE );\n\t\t$res = $dbr->select(\n\t\t\tarray( 'echo_notification', 'echo_event' ),\n\t\t\tarray( 'notification_event' ),\n\t\t\tarray(\n\t\t\t\t'notification_user' => $user->getId(),\n\t\t\t\t'notification_bundle_base' => 1,\n\t\t\t\t'notification_read_timestamp' => null,\n\t\t\t\t'event_type' => $type,\n\t\t\t\t'notification_event = event_id'\n\t\t\t),\n\t\t\t__METHOD__\n\t\t);\n\n\t\t$eventIds = array();\n\t\tforeach ( $res as $row ) {\n\t\t\t$eventIds[$row->notification_event] = $row->notification_event;\n\t\t}\n\n\t\treturn $eventIds;\n\t}", "public function getUserNotifications($where, array $markers = []);", "public function notifications($organiser_id)\n {\n $organiser = Organiser::scope()->findOrFail($organiser_id);\n return $organiser->unreadNotifications()->limit(10)->get()->toArray();\n }", "public function usernotificationlist() {\n \n return view('user_notification/userNotificationList');\n }", "public function index()\n {\n $from_date_request = request('from_date');\n $from_date = \\Carbon\\Carbon::parse($from_date_request)\n ->toDateTimeString();\n\n $paginated_notifications = getAuthUser()->notifications()\n ->when($from_date_request?true:false,\n function ($query) use ($from_date) {\n return $query->where('created_at', '<=', $from_date);\n }\n )->latest()\n ->simplePaginate(config('consts.notifications_per_page'));\n\n return response()->json([\n 'notifications' => $paginated_notifications\n ]);\n }", "protected function getAllNotificationsQuery($userId)\n {\n return (new Query())\n ->from($this->notificationsTable)\n ->where([\n 'user_id' => $userId,\n 'is_deleted' => 0,\n ])\n ->orderBy($this->notificationOrder);\n }", "public function allUnreadForUser($userId);", "public function allUnreadForUser($userId);", "public function getNotifications($notifyUserID, $offset = 0, $limit = 30) {\n $this->activityQuery(false);\n $this->fireEvent('BeforeGetNotifications');\n $result = $this->SQL\n ->where('NotifyUserID', $notifyUserID)\n ->limit($limit, $offset)\n ->orderBy('a.ActivityID', 'desc')\n ->get();\n $result->datasetType(DATASET_TYPE_ARRAY);\n\n self::getUsers($result->resultArray());\n Gdn::userModel()->joinUsers(\n $result->resultArray(),\n ['ActivityUserID', 'RegardingUserID'],\n ['Join' => ['Name', 'Photo', 'Email', 'Gender']]\n );\n $this->calculateData($result->resultArray());\n\n return $result;\n }", "function getAllRouteEventNotifications($user_id){\n\t\t\t\t\n\t\t$sql =\t\"select e.user_id,e.event_id,u.user_name as UserName,\n\t\t\t\t\tu.image as UserImage,e.event_name,e.event_type,e.description,\n\t\t\t\t\tef.status from `events` as e ,event_friends as ef\n\t\t\t\t\t\n\t\t\t\t\tleft join users as u on u.user_id = ef.user_id\n\t\t\t\t\twhere e.event_id = ef.event_id\n\t\t\t\t\t\n\t\t\t\t\tand ef.friend_id = '\".$user_id.\"' \n\t\t\t\t\t\n\t\t\t\t\tand (ef.status = 'start')\n\t\t\t\t\tgroup by e.event_id\n\t\t\t\t\torder by e.event_id desc limit 0,2\";\n\t\t\t\t\n\t\t\t\t\n\t\t$query = $this->db->query($sql);\t\n\t\t$data = $query->result_array();\n\t\treturn $data;\n\t\t\t\t\n\t}", "public function getNotificationById($id) {\n $sql = 'SELECT * FROM notifications WHERE idNotifications = ?';\n $sqlQuery = new SqlQuery($sql);\n $sqlQuery->set($id);\n return $this->getList($sqlQuery);\n }", "public function notifications(Request $request)\n {\n $userLogged = auth()->user();\n $notifications = $userLogged->unreadNotifications;\n return response()->json(array('data' => $notifications), 200);\n }", "public function getUserNotificationAction(Request $request)\n {\n $read = $request->get('read', 'Y');\n $notif_service = new \\ESERV\\MAIN\\ProfileBundle\\Services\\ProfileBundleUserNotificationsService($this->getDoctrine()->getManager(), $this->container);\n \n $notifications = $notif_service->getAllNotifications();\n $read_notifications = array();\n $unread_notifications = array();\n \n foreach($notifications as $key => $notif){\n if($notif['statusRead'] == 'Y'){\n array_push($read_notifications, $notif);\n }else{\n array_push($unread_notifications, $notif);\n }\n }\n \n $results_array = array(\n 'all_notifications' => $notifications,\n 'notifications' => $read === 'Y' ? $read_notifications : $unread_notifications,\n 'new_notif_count' => count($unread_notifications)\n );\n\n if ($request->isXmlHttpRequest()) {\n return new \\Symfony\\Component\\HttpFoundation\\JsonResponse($results_array);\n } else { \n return $results_array;\n }\n }", "public function notifications($param = 0)\n\t{\n\t\t$where = (!$param) ? $this->session->userdata('user')->ID_user : $param;\n\t\t$query = $this->db->query(\"\n\t\t\tSELECT tb_notifications.*, tb_users.* FROM tb_notifications\n\t\t\tLEFT JOIN tb_users ON tb_notifications.sender_user_id = tb_users.ID_user\n\t\t\tWHERE tb_notifications.receive_user_id = ? AND tb_notifications.read = 'false'\n\t\t\", array($where));\n\t\treturn $query->result();\n\t}", "public function user_notification(){\n $apiData = array();\n $this->loadModel('Post');\n $this->loadModel('Event');\n $this->loadModel('Notification');\n $id = $this->Auth->user('id');\n $notification = $this->Notification->getNotification($id);\n if(!empty($notification)) {\n $data = array();\n $keyValue = Hash::combine($notification ,'{n}.Notification.object_id','{n}.Notification.object_id','{n}.Notification.object_type');\n foreach ($keyValue as $key => $value) {\n switch($key){\n case OBJECT_TYPE_EVENT: \n $data[OBJECT_TYPE_EVENT] = $this->Event->getEventNotification(array_values($value));\n break;\n case OBJECT_TYPE_POST:\n $data[OBJECT_TYPE_POST] = $this->Post->getPostNotification(array_values($value));\n break;\n case OBJECT_TYPE_LEAVE:\n $data[OBJECT_TYPE_LEAVE] = $this->Leave->getLeaveNotification(array_values($value));\n break;\n case OBJECT_TYPE_BIRTHADAY:\n $data[OBJECT_TYPE_BIRTHADAY] = $this->Birthday->getBirthdayNotification(array_values($value));\n break;\n default:\n echo \"No information available for that day.\";\n break;\n }\n } \n }\n if(!empty($data)) {\n $apiData = $this->getFormatedData($notification, $data);\n }\n return $apiData;\n }", "public function read()\n {\n request()->user()->unreadNotifications()->update(['read_at' => now()]);\n\n return response()->json(request()->user()->notifications);\n }", "public function get()\n {\n $search = isset($_COOKIE['notifications']) ? json_decode($_COOKIE['notifications']) : (object)[];\n return [\n 'data' => Attachment::notificationSearch($search)->paginate(30),\n 'counts' => Attachment::notificationCounts($search),\n ];\n }", "public function viaNotificationChannels()\n {\n return UserNotificationChannel::with('notification_channel')->get()->filter(function ($item) {\n return $item->muted_at == null;\n })->pluck('notification_channel.name');\n }", "public function getAll()\n {\n $result = array();\n\n $query_data = $this->_getQuery();\n $url = $this->_getConfig()->getApiUrlPath().'/shops/'.$this->_getConfig()->getYapitalShopId().'/notifications';\n\n $this->getClient()->resetHttpClient();\n $response = $this->getClient()->restGet( $url, $query_data )->getBody();\n\n if ( $data = json_decode($response,1) )\n {\n\n if( isset( $data['payload'] ) && is_array( $data['payload']['notification'] ) )\n {\n foreach( $data['payload']['notification'] AS $payload ) {\n $notification = Mage::getModel('yapital/datatype_notification');\n /* @var $notification Codex_Yapital_Model_Datatype_Notification */\n\n $notification->importPayload( $payload );\n\n $result[] = $notification;\n }\n }\n\n }\n\n return $result;\n }", "public function findAllNotificationsForOneUser2($userId)\n {\n$query = $this->getEntityManager()->createQuery(\n'SELECT n, r, l FROM AppBundle:Notification n , AppBundle:Reading_notification as r , AppBundle:Lesson as l WHERE r.notification_id = n.id AND n.entityTypeId = l.id AND r.notifiedUser = :id)')\n->setParameter('id', $userId);\n}", "public function get_notification_get(){\n $notification = $this->model->getAllwhere('notification');\n\n $resp = array(\n 'rccode' => 1,\n 'message' => 'SUCCESS',\n 'notification' => (!empty($notification) ) ? $notification: [],\n );\n $this->response($resp);\n }", "public function getNotifications()\n {\n return $this->_notifications;\n }", "public function unread()\n {\n request()->user()->readNotifications()->update(['read_at' => null]);\n\n return response()->json(request()->user()->notifications);\n }", "function GetNotifications () {\n\t\treturn $this->notifications;\n\t}", "public function getNotifications($data, $limit){\n $page = $data['page'];\n $userLoggedIn = $this->user_obj->getUserName();\n $str = \"\";\n \n if($page == 1){\n // Start at the first post\n $start = 0;\n } else {\n // Starts where the last loaded posts were\n $start = ($page - 1) * $limit;\n }\n \n //Set viewed to yes for all notifications for that user.\n $set_viewed = $this->con->query(\"UPDATE notifications SET viewed='yes' WHERE user_to='$userLoggedIn'\");\n $data = $this->con->query(\"SELECT * FROM notifications WHERE user_to='$userLoggedIn' ORDER BY id DESC\");\n \n // If there are no notifications\n if($data->num_rows == 0){\n echo \"You don't have any notifications to load.\";\n\t\t\t return;\n }\n \n // The number of results checked\n $num_iterations = 0;\n \n // The number of results posted\n $count = 1;\n \n while($row = $data->fetch_array(MYSQLI_ASSOC)){\n // If the start position from last loads has not been reached yet\n if($num_iterations++ < $start)\n continue;\n \n // Once 5 notifications have been loaded, stop\n if($count > $limit){\n break;\n } else {\n $count++;\n }\n \n $user_from = $row['user_from'];\n\n \t\t\t$query = $this->con->query(\"SELECT * FROM users WHERE username='$user_from'\");\n \t\t\t$userData = $query->fetch_array(MYSQLI_ASSOC);\n \t\t\t\n \t\t\t// Calculate how long ago the notification was received\n \t\t\t$date_time_now = date(\"Y-m-d H:i:s\");\n $start_date = new DateTime($row['datetime']);\n $end_date = new DateTime($date_time_now);\n $interval = $start_date->diff($end_date);\n \n if($interval->y >= 1){\n if($interval->y == 1){\n $time_message = $interval->y.\" year ago\";\n } else {\n $time_message = $interval->y.\" years ago\";\n }\n } elseif($interval->m >= 1){\n if($interval->d == 0){\n $days = \" ago\";\n } else if($interval->d == 1){\n $days = $interval->d.\" day ago\";\n } else {\n $days = $interval->d.\" day ago\";\n }\n \n if($interval->m == 1){\n $time_message = $interval->m.\" month \".$days;\n } else {\n $time_message = $interval->m.\" months \".$days;\n }\n } else if($interval->d >= 1){\n if($interval->d == 1){\n $time_message = \"Yesterday\";\n } else{\n $time_message = $interval->d.\" days ago\"; \n }\n } else if($interval->h >= 1){\n if($interval->h == 1){\n $time_message = $interval->h.\" hour ago\";\n } else{\n $time_message = $interval->h.\" hours ago\";\n }\n } else if($interval->i >= 1){\n if($interval->i == 1){\n $time_message = $interval->i.\" minute ago\";\n } else {\n $time_message = $interval->i.\" minutes ago\";\n }\n } else {\n if($interval->s < 30){\n $time_message = \"Just now\";\n } else {\n $time_message = $interval->s.\" seconds ago\";\n }\n } \n \n // If this is yes, then this notification has been clicked on before.\n $opened = $row['opened'];\n \n // If the message is unopened, change background color slightly\n $style = ($opened == 'no') ? \"background-color: #DDEDFF;\" : \"\";\n \n $str .= \"<a href='\".$row['link'].\"'>\n <div class='resultDisplay resultDisplayNotification' style='\".$style.\"'>\n <div class='notificationsProfilePic'>\n <img src='\".$userData['profile_pic'].\"'>\n </div>\n <p class='timestamp_smaller' id='grey'>\".$time_message.\"</p>\".$row['message'].\" \n </div>\n </a>\";\n \n } // End of the while loop\n \n // If posts were loaded\n if($count > $limit){\n // Holds value of next page, it must stay hidden\n $str.=\"<input type='hidden' class='nextpageDropdownData' value='\".($page + 1).\n \"'><input type='hidden' class='noMoreDropdownData' value='false'>\";\n } else {\n // No more Notifications to load. Show 'Finished' message\n\t \t$str .= \"<input type='hidden' class='noMoreDropdownData' value='true'>\n\t \t<p style='text-align: center;'>No more notifications to load!</p>\";\n }\n \n echo $str;\n }", "public function get_all_notifications($id)\n {\n $this->db->where('invitacionInvitadoPersonalId', $id);\n $this->db->where('invitacionUsuarioPersonalId != ', $id);\n $this->db->where('invitacionPersonalStatus', '1');\n $query = $this->db->count_all_results('invitacionpersonal');\n return $query;\n }", "public function getnotifications(Request $request)\n {\n $unreadnotifications = Auth::user()->unreadNotifications;\n\n return response()->json(['success'=>true,'notifications'=>$unreadnotifications]);\n }", "public function getNotificationObjects($course_id, $since, $user_id) {\n }", "public function notifications() { return $this->notifications; }", "function getUsersToSend($notification){\n $users = array();\n $allTokens = $notification->getAllTokens(true);\n\n $conn = mysqli_connect(\"localhost:3306\", \"experjt1_program\", \"?qbdD_w__~hQ\", \"experjt1_itechdigi_sussexuni2017\");\n\n $sql = \"SELECT * FROM questionnaire_user\";\n $result = mysqli_query($conn,$sql);\n \n if(mysqli_num_rows($result) > 0 ){\n while ($row = mysqli_fetch_assoc($result)) {\n $notification->updateNotified($row['id']);\n if($row[\"notified\"] == 'not sent'){\n if(!in_array($row['user_id'], $users)){\n array_push($users, $row[\"user_id\"]);\n }\n }\n }\n }\n mysqli_close($conn);\n var_dump($users);\n return $users;\n}", "public function users()\n {\n return $this->belongsToMany('App\\User', 'user_notification');\n }", "public static function getNotificationsReceivers($id) {\n $notification = PushNotification::where('id', $id)->first();\n if (isset($notification)) {\n $notification = $notification->toArray();\n\n $title = $notification['title'];\n $message = $notification['message'];\n $type = $notification['type'];\n\n return PushNotification::where('title', $title)\n ->where('message', $message)\n ->where('type', $type)\n ->with(['userDetails'])\n ->paginate(config('constants.record_per_page'))\n ->toArray();\n }\n }", "public function notifications()\n {\n return $this->morphToMany(Notification::class, 'notifiable');\n }", "public function getListNotification(Request $request)\n {\n $user = auth('api')->user();\n if (isset($request->type) && $request->type == 'system') {\n $data = NotificatonResource::collection(\n Notification::where('type_notification', '=', NotificationCode::TYPE_SYSTEM)\n ->where('user_id', $user->id)\n ->orderBy('id', 'desc')\n ->paginate(20)\n );\n } else {\n $data = NotificatonResource::collection(\n Notification::where('type_notification', '=', NotificationCode::TYPE_FOLLOW)\n ->where('user_id', $user->id)\n ->orderBy('id', 'desc')\n ->paginate(20)\n );\n }\n\n if (count($data)) {\n return response()->json([\n 'code' => ResponseStatusCode::OK,\n 'data' => $data,\n ]);\n } else {\n return response()->json([\n 'code' => ResponseStatusCode::NO_CONTENT,\n 'message' => 'NO CONTENT',\n ]);\n }\n }", "public function getNotification() {\n $uid = $this->currentUser->id();\n $roles = $this->currentUser->getRoles(TRUE);\n $notification = [\n 'notificationList' => [],\n 'id' => [],\n 'unreadCount' => '0',\n 'totalCount' => '0',\n ];\n\n // Get the nids which are not as per role.\n $nid = !empty($roles) ? $this->getNotificationNode($uid, $roles[0], $this->getContentStateByRole($roles[0])) : '';\n if (!$nid) {\n return $notification;\n }\n\n $configuration = $this->config->get('block.block.opendevxnotificationblock');\n\n $query = $this->connection->select('notifications', 'n');\n $query->fields('n', ['id', 'entity_id', 'message', 'status']);\n $query->condition('n.entity_id', $nid, 'IN');\n if ($configuration->get('block_notification_type') != NULL\n && $configuration->get('block_notification_type') == 1) {\n // Skip current user updated content notification.\n $query->condition('n.uid', $uid, '<>');\n // Include current user update content.\n if ($configuration->get('block_notification_logs_display') == 0) {\n $query->condition('n.uid', $uid);\n }\n }\n // Get notification for moderate content.\n $query->condition('n.action', 'content_moderated');\n $query->orderBy('n.id', 'DESC');\n $res = $query->execute();\n\n while ($notificationResult = $res->fetchObject()) {\n if (!empty($notificationResult->message) && !in_array($notificationResult->entity_id, $notification['id'])) {\n $notification['notificationList'][] = [\n 'id' => $notificationResult->id,\n 'message' => $notificationResult->message,\n 'status' => $notificationResult->status,\n ];\n $notification['id'][] = $notificationResult->entity_id;\n if ($notificationResult->status == 0) {\n $notification['unreadCount'] = $notification['unreadCount'] + 1;\n }\n $notification['totalCount'] = $notification['totalCount'] + 1;\n }\n }\n\n return $notification;\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 via(User $notifiable)\n {\n return ($notifiable->disabled_notifications()->where('name', get_class($this))->get())\n ? [] : ['mail'];\n }", "public function getLastNotifications(HRUser $user, HRGame $game) {\n return $this->_em->createQuery(\"\n SELECT n\n FROM EIPHRBundle:HRNotification n\n WHERE n.game = :game\n AND n.user = :user\n ORDER BY n.time DESC\n \")->setParameters(array(\n ':user' => $user->getId(),\n ':game' => $game->getId()\n ))\n ->setMaxResults(10)\n ->getResult();\n }", "public static function notifications(): array\n {\n return [];\n }", "public function getNotifications()\n {\n $notifications = Notification::groupBy('count');\n\n return Datatables::of($notifications)\n ->editColumn('id', function ($notification) {\n return $notification->count;\n })\n ->editColumn('type', function ($notification) {\n if ($this->types->has($notification->type)) {\n return '<span class=\"label '.$this->types->get($notification->type).'\">'.$notification->type.'</span>';\n } else {\n return $notification->type;\n }\n })\n ->addColumn('actions', function ($notification) {\n $html = '<a href=\"'.url('notifications/view/'.$notification->count).'\" class=\"btn btn-sm btn-primary\" style=\"margin-right:5px\"><i class=\"fa fa-eye\"></i> View</a>'.\n '<a href=\"'.url('notifications/destroy/'.$notification->count).'\" data-button=\"delete\" class=\"btn btn-sm btn-danger\"><i class=\"fa fa-trash\"></i> Delete</a>';\n\n return $html;\n })\n ->make(true);\n }", "public function findInboxByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n JOIN m.recipientUsers r\n WHERE r = :user\n ORDER BY m.createdAt DESC\n '\n )\n ->setParameter('user', $user)\n ->getResult();\n }", "public function findByUser() {\n try \n {\n $params = $this->app->request()->params();\n $fields = array_to_json($params);\n\n //get request url parmameters\n $offset = isset($fields->offset) ? $fields->offset : 0;\n $limit = isset($fields->limit) ? $fields->limit : 7; \n $receiver = isset($fields->receiver) ? $fields->receiver : 'none'; \n\n $messages = Message::findByUser($offset, $limit, $receiver);\n\n //return finded users\n response_json_data($messages);\n }\n catch(Exception $e) \n {\n response_json_error($this->app, 500, $e->getMessage());\n }\n }", "public function getNotifications($data=array()){\n\t\t$where_filter = \"1 \";\n\t\t if(!empty($data['templatecategory_id'])){\n\t\t\t $where_filter = \"NT.templatecategory_id ='3'\";\n\t\t }\n\t\t$select = $this->_db->select()\n\t\t\t\t\t->from(array('NT'=>MAIL_NOTIFY_TYPES),array('ID'=>\"NT.notification_id\",'Name'=>'NT.notification_name','category_id'=>'NT.templatecategory_id'))\n\t\t\t\t\t ->where('NT.notification_staus =\"1\" AND '.$where_filter)\n\t\t\t\t\t->order('NT.notification_name ASC');\n\t\t\t\t\t\t//echo $select->__tostring();die;\n\t\treturn $this->getAdapter()->fetchAll($select);\n\t}", "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = NewsletterUserPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "public function getAllNotifcations(){\n $query = new Query(); // ADDED\n\n //This function returns all the trainer records that contain the name string\n //It ignores the distinction lowercase & uppercase.\n $sql = \"SELECT n.date_created, \n t.trainer_name,\n n.notification_id\n FROM Notifications AS n\n INNER JOIN (Trainers AS t)\n ON (n.trainer_id = t.trainer_id);\";\n\n $query->setSql($sql); // ADDED\n\n $res_container = $query->handleQuery(); // ADDED\n\n return $res_container; \n }", "public function allForUser($userId);", "public function allForUser($userId);", "public function messages_by_user_get() {\n\t\t$uid = $this->input->get('uid');\n\t\t$skip = $this->input->get('skip');\n\t\t$limit = $this->input->get('limit');\n\n\t\t$messages = $this->Messages_model->getMessagesByUserID($uid, $skip, $limit);\n\t\t\n\t\tforeach($messages as $key=>$value) {\n\t\t\t$id = $messages[$key]['_id']->{'$id'};\n\t\t\t$messages[$key]['_id'] = $id;\n\t\t}\n\t\t\n\t\t$this->response($messages);\n\t}", "public function fetchAllMessages()\n {\n return Chat::with('user')->get();\n }", "public function getIdByUser($usersid) {\n $sql = 'SELECT * FROM notifications WHERE idNotifications = ?';\n $sqlQuery = new SqlQuery($sql);\n $sqlQuery->set($usersid);\n return $this->getList($sqlQuery);\n }", "public function notifications()\n {\n return $this->hasMany(DatabaseNotification::class, 'type', 'name');\n }" ]
[ "0.85116464", "0.793193", "0.7621651", "0.7556292", "0.75395095", "0.75278044", "0.74975157", "0.74358374", "0.74211276", "0.7408459", "0.7382007", "0.7296537", "0.72359926", "0.72263914", "0.7201538", "0.7195933", "0.7119934", "0.71069485", "0.7101523", "0.70997894", "0.708331", "0.7004884", "0.6986715", "0.69811934", "0.69718665", "0.69380623", "0.6927561", "0.68923104", "0.68892425", "0.6875246", "0.6853959", "0.6849612", "0.6835941", "0.6805315", "0.6802478", "0.67831194", "0.6759947", "0.6721463", "0.671993", "0.67161363", "0.67073995", "0.6663789", "0.6663541", "0.6657456", "0.66570425", "0.6642158", "0.6635057", "0.6620358", "0.6612985", "0.66097057", "0.65994346", "0.6578991", "0.6566996", "0.6564988", "0.655223", "0.6538698", "0.6538698", "0.6531641", "0.6517391", "0.6507154", "0.6494417", "0.6491659", "0.6491296", "0.6484424", "0.64797163", "0.6419064", "0.6409941", "0.640214", "0.6399793", "0.6391092", "0.63832957", "0.63511586", "0.6343287", "0.63237536", "0.63144165", "0.6314131", "0.6300311", "0.6298729", "0.629372", "0.6293414", "0.62897986", "0.62780726", "0.62680066", "0.62673193", "0.62409973", "0.62409973", "0.6235479", "0.6232133", "0.62316334", "0.6224547", "0.6215301", "0.6211684", "0.62072533", "0.61884636", "0.6186311", "0.61477077", "0.61477077", "0.6131526", "0.6122951", "0.61184347", "0.61145014" ]
0.0
-1
Delay between checks (or between short poll requests), ms
public function get_delay_between_checks(): int { $period = get_config('realtimeplugin_phppoll', 'checkinterval'); return max($period, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function delay()\n {\n if (!isset($this->headers['x-rate-limit-reset'])) {\n exit('Rate limited, but no rate limit header found');\n }\n\n $delay = $this->headers['x-rate-limit-reset'] - time();\n\n if ($delay < 10) {\n $delay = 60 * 15; // 15 minute delay if the given delay seems unreasonably small (can be due to server time differences)\n }\n \n print \"\\n\";\n\n do {\n print \"\\r\\e[K\";\n printf('Sleeping for %d seconds', $delay--);\n sleep(1);\n } while ($delay);\n }", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "public function getDelayTime() {}", "public function waitWithBackoff()\n {\n $waitTime = $this->calculateSleepTime();\n if ($waitTime > 1000000) {\n sleep((int) ($waitTime / 1000000));\n } else {\n usleep($waitTime);\n }\n }", "public function wait($name, $delay = 30);", "public function __sleep();", "public static function getThrottleDelay() {}", "public function sleep();", "public function sleep() {}", "public function getDelay(): int;", "public static function sleep();", "private function _stepTimeout():void\n\t{\n\t\tif( $this->_timeout_queue[0]['call_at'] <= microtime( true ) )\n\t\t{\n\t\t\t[ 'task'=>$task, ]= array_shift( $this->_timeout_queue );\n\t\t\t\n\t\t\t$this->_runTask( $task );\n\t\t}\n\t\telse\n\t\t\tusleep( 1000 );\n\t}", "final public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "function __sleep(){\n\n\t\t}", "public function __sleep ();", "protected function sleep(){\n flush();\n $s = ($this->throttleTime == 1) ? '' : 's';\n $this->log(\"Request was throttled, Sleeping for \".$this->throttleTime.\" second$s\",'Throttle');\n sleep($this->throttleTime);\n }", "protected function delay()\n {\n sleep($this->transactionRestartDelay);\n }", "public function status($delay = FALSE);", "#[@test, @limit(time= 0.010)]\n public function timeouts() {\n $start= gettimeofday();\n $end= (1000000 * $start['sec']) + $start['usec'] + 1000 * 50; // 0.05 seconds\n do {\n $now= gettimeofday();\n } while ((1000000 * $now['sec']) + $now['usec'] < $end);\n }", "protected function limitCallRate()\n {\n if (!$this->callRateLimit) {\n return;\n }\n $now = microtime(true);\n $callIntervalActual = $now - $this->callTimeLast;\n $callIntervalNeeded = 1 / $this->callRateLimit;\n $callDelayNeeded = $callIntervalNeeded - $callIntervalActual;\n if ($callDelayNeeded > 0) {\n usleep($callDelayNeeded * 1000000); // Seconds to microseconds\n }\n $this->callTimeLast = $now;\n }", "public function testPollTimeOut() {\n $c = new _MockProviderCronRunner(50, 0.0001);\n $provider = $this->createMock(ProviderInterface::class);\n $polling = $this->createMock(PollingInterface::class);\n $provider->method('polling')->willReturn($polling);\n $polling->expects($this->once())->method('poll')->will($this->returnCallback(function () {\n usleep(101);\n return TRUE;\n }));\n $c->providers = [$provider];\n $start = microtime(TRUE);\n $c->poll();\n $this->assertLessThan(1, microtime(TRUE) - $start);\n }", "public function setTimeout($callback, $delay);", "private function checkApiRequestsLimit()\n {\n $tempTime = time() - $this->startTime;\n if($this->apiRequestsCount >= $this->apiRequestsLimit && $tempTime < $this->apiTimeLimit) {\n usleep(($this->apiTimeLimit - $tempTime)*1000000);\n $this->apiRequestsCount = 1;\n $this->startTime = time();\n } else {\n $this->apiRequestsCount++;\n }\n }", "private function _checkRateLimit()\n {\n if (empty(self::$_responseHeaders))\n {\n return;\n }\n\n // Default the $limit and $remaining values if not set in the last response header.\n /** @var int $limit */\n $limit = isset(self::$_responseHeaders[self::RATE_LIMIT])\n ? (int)self::$_responseHeaders[self::RATE_LIMIT]\n : self::DEFAULT_RATE_LIMIT;\n\n /** @var int $remaining */\n $remaining = isset(self::$_responseHeaders[self::RATE_LIMIT_REMAINING])\n ? (int)self::$_responseHeaders[self::RATE_LIMIT_REMAINING]\n : self::DEFAULT_RATE_LIMIT;\n\n // If no API calls have been made, no need to delay.\n if ($limit == $remaining)\n {\n return;\n }\n\n // If we are below 5% remaining, sleep for 0.50 seconds.\n if ($remaining / $limit < 0.05)\n {\n usleep(500000);\n return;\n }\n\n // If we are below 10% remaining, sleep for 0.25 seconds.\n if ($remaining / $limit < 0.1)\n {\n usleep(250000);\n }\n }", "function __sleep()\n {\n }", "public function timeout($ms);", "function monitor_slow_urls()\n{\n if (isset($_SERVER['REQUEST_TIME_FLOAT'])) {\n $time = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];\n $slow = ($time > floatval(get_value('monitor_slow_urls')));\n } else {\n $time = time() - $_SERVER['REQUEST_TIME'];\n $slow = ($time > intval(get_value('monitor_slow_urls')));\n }\n if ($slow) {\n require_code('urls');\n if (php_function_allowed('error_log')) {\n error_log('Over time limit @ ' . get_self_url_easy(true) . \"\\t\" . strval($time) . ' secs' . \"\\t\" . date('Y-m-d H:i:s', time()), 0);\n }\n }\n}", "public function poll()\n {\n }", "public function hasDelay()\n {\n global $conf;\n\n if (empty($this->date_delivery) && ! empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility\n\n $now = dol_now();\n $date_to_test = empty($this->date_delivery) ? $this->date_commande : $this->date_delivery;\n\n return ($this->statut > 0 && $this->statut < 4) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);\n }", "function get_delay_to_server($link, $data, $address) // Colorize: green\n { // Colorize: green\n $server_url = \"https://\" . $address . \"/rest/ping.php\"; // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $curl_multi = curl_multi_init(); // Colorize: green\n $curl_sessions = []; // Colorize: green\n // Colorize: green\n for ($i = 0; $i < 10; ++$i) // Colorize: green\n { // Colorize: green\n $curl_session = curl_init($server_url); // Colorize: green\n // Colorize: green\n curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, 10); // Colorize: green\n curl_setopt($curl_session, CURLOPT_HEADER, false); // Colorize: green\n curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); // Colorize: green\n curl_setopt($curl_session, CURLOPT_SSL_VERIFYHOST, 0); // Colorize: green\n curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); // Colorize: green\n // Colorize: green\n curl_multi_add_handle($curl_multi, $curl_session); // Colorize: green\n array_push($curl_sessions, $curl_session); // Colorize: green\n } // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $active = false; // Colorize: green\n // Colorize: green\n do // Colorize: green\n { // Colorize: green\n $status = curl_multi_exec($curl_multi, $active); // Colorize: green\n // Colorize: green\n if ($active) // Colorize: green\n { // Colorize: green\n curl_multi_select($curl_multi); // Colorize: green\n } // Colorize: green\n } while($active && $status == CURLM_OK); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $responses = []; // Colorize: green\n $ping_total = 0; // Colorize: green\n // Colorize: green\n foreach ($curl_sessions as $curl_session) // Colorize: green\n { // Colorize: green\n array_push($responses, curl_multi_getcontent($curl_session)); // Colorize: green\n $ping_total += curl_getinfo($curl_session, CURLINFO_TOTAL_TIME); // Colorize: green\n // Colorize: green\n curl_multi_remove_handle($curl_multi, $curl_session); // Colorize: green\n curl_close($curl_session); // Colorize: green\n } // Colorize: green\n // Colorize: green\n curl_multi_close($curl_multi); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n foreach ($responses as $response) // Colorize: green\n { // Colorize: green\n if ($response) // Colorize: green\n { // Colorize: green\n $response = json_decode($response, true); // Colorize: green\n // Colorize: green\n if ($response[\"status\"] != \"OK\") // Colorize: green\n { // Colorize: green\n $error_details = \"Invalid response from server \" . $server_url . \" : \" . json_encode($response); // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Request error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n } // Colorize: green\n else // Colorize: green\n { // Colorize: green\n $error_details = \"Failed to get response from server \" . $server_url; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Request error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n } // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n return round($ping_total * 100000); // Colorize: green\n }", "function http_throttle($sec = null, $bytes = null) {}", "public function pollFirst();", "private function updateOperation() {\n sleep(1);\n }", "public function __sleep()\n {\n }", "public function getDelayedTime()\n {\n $packet = $this->getPacket();\n\n if ($packet['delayed'] > 0) {\n return $packet['delayed'];\n }\n\n return -1;\n }", "public function delay(Command $command, $delay);", "protected function sleep(): void\n\t{\n\t\tusleep(static::SLEEP_TIME);\n\t}", "function timeoutHeartBeat()\n {\n if (3 == mt_rand(1, 7) && FALSE !== ($env = $this->getEnvironment())) {\n $env->tell($this->mChat[mt_rand(0, sizeof($this->mChat) - 1)]);\n }\n\n DpNpc::timeoutHeartBeat();\n }", "function delay(float|int $timeout): void\n {\n signal(fn (Closure $resume) => after($resume, (int) $timeout * 1000));\n }", "public function __sleep(){\n\n\t}", "public function sleep()\n {\n }", "protected function _waitAudioReinvite()\n {\n $this->_timer->reset();\n $this->_timer->setOptions( array( Streamwide_Engine_Timer_Timeout::OPT_DELAY => 1 ) );\n $this->_timer->addEventListener(\n Streamwide_Engine_Events_Event::TIMEOUT,\n array(\n 'callback' => array( $this, 'onAudioReinviteTimeout' ),\n 'options' => array( 'autoRemove' => 'before' )\n )\n );\n $this->_timer->arm();\n }", "public static function setThrottleDelay($seconds) {}", "public function timeout();", "public function check()\n {\n return time()%2==1; // condition\n }", "function Poll($secs=5)\n\t{\n\t\t$this->conn->fnExecute = false;\n\t\t//$this->conn->debug=1;\n\t\tif ($secs <= 1) $secs = 1;\n\t\techo \"Accumulating statistics, every $secs seconds...\\n\";flush();\n\t\t$arro = $this->PollParameters();\n\t\t$cnt = 0;\n\t\tset_time_limit(0);\n\t\tsleep($secs);\n\t\twhile (1) {\n\n\t\t\t$arr = $this->PollParameters();\n\n\t\t\t$hits = sprintf('%2.2f',$arr[0]);\n\t\t\t$reads = sprintf('%12.4f',($arr[1]-$arro[1])/$secs);\n\t\t\t$writes = sprintf('%12.4f',($arr[2]-$arro[2])/$secs);\n\t\t\t$sess = sprintf('%5d',$arr[3]);\n\n\t\t\t$load = $this->CPULoad();\n\t\t\tif ($load !== false) {\n\t\t\t\t$oslabel = 'WS-CPU%';\n\t\t\t\t$osval = sprintf(\" %2.1f \",(float) $load);\n\t\t\t}else {\n\t\t\t\t$oslabel = '';\n\t\t\t\t$osval = '';\n\t\t\t}\n\t\t\tif ($cnt % 10 == 0) echo \" Time \".$oslabel.\" Hit% Sess Reads/s Writes/s\\n\";\n\t\t\t$cnt += 1;\n\t\t\techo date('H:i:s').' '.$osval.\"$hits $sess $reads $writes\\n\";\n\t\t\tflush();\n\n\t\t\tif (connection_aborted()) return;\n\n\t\t\tsleep($secs);\n\t\t\t$arro = $arr;\n\t\t}\n\t}", "function sleep($time, LoopInterface $loop)\n{\n await(Timer\\resolve($time, $loop), $loop);\n}", "function delayTime($seconds) {\n\t$nano = time_nanosleep($seconds, 500000000);\n\n\tif ($nano === true) {\n\t\techo \"Slept for $seconds seconds, 0.5 microseconds.\\n\";\n\t} elseif ($nano === false) {\n\t\techo \"Sleeping failed.\\n\";\n\t} elseif (is_array($nano)) {\n\t\t$seconds = $nano['seconds'];\n\t\t$nanoseconds = $nano['nanoseconds'];\n\t\techo \"Interrupted by a signal.\\n\";\n\t\techo \"Time remaining: $seconds seconds, $nanoseconds nanoseconds.\";\n\t}\n}", "function wait_for_change($time_min){\n\techo \"Waiting for $time_min minutes.\";\n\twhile(true){\n\t\tsleep(60);\n\t\t$time_min--;\n\t\tif($time_min == 0)\n\t\t\tbreak;\n\t\techo \".\";\n\t}\t\t\n\techo \"\\n\";\n}", "public function iWaitForSeconds($arg1) {\n sleep($arg1);\n }", "protected function timeRetry(): int\n {\n return 300;\n }", "function wp_change_request_timeout($time) {\n return 10; //new number of seconds\n}", "function sleep_20000_micro() {\n tusleep(20000);\n}", "function sleep_50000_micro() {\n tusleep(50000);\n}", "public function wait_response($allowTimeout);", "private function limitCalls()\n {\n if ($this->lastCallTimestamp > 0) {\n $callsLimit = $this->shopifyClient->callLimit();\n $callsMade = $this->shopifyClient->callsMade();\n $callsLeft = $this->shopifyClient->callsLeft();\n\n Log::debug(\"ShopifyApi.limitCalls: callsLimit=$callsLimit, callsMade=$callsMade, callsLeft=$callsLeft\");\n $currentTimestamp = microtime(true);\n $deltaTimestamp = ($this->lastCallTimestamp > 0) ? $currentTimestamp - $this->lastCallTimestamp : 0;\n Log::debug(\"ShopifyApi.limitCalls: deltaTimestamp=$deltaTimestamp\");\n\n if ($callsLeft < 10) {\n Log::debug(\"ShopifyApi.limitCalls: DELTA < 10: wait 0.5 seconds\");\n usleep(500000);\n }\n } else {\n Log::debug(\"ShopifyApi.limitCalls: first call\");\n }\n $this->lastCallTimestamp = microtime(true);\n }", "public function retryUntil();", "public function update_requests() {\n\t\tif (!isset($_POST['time']) || !isset($_POST['hash'])) exit('0');\n\n\t\t// If the response is invalid return a zero response\n\t\t$received = $_POST['time'] . '|' . $_POST['hash'];\n\t\t$expected = $this->time_marker(hash('crc32', $this->required_delay), $_POST['time']);\n\t\tif ($received !== $expected) exit('0');\n\n\t\t// If response if premature return a zero response\n\t\t$now = time();\n\t\t$earliest = absint($_POST['time']) + $this->required_delay;\n\t\tif ($now < $earliest) exit('0');\n\n\t\t// Seems ok ... respond with new hash\n\t\t$response = hash('md5', $_POST['hash'] . $this->base_key);\n\t\texit($response);\n\t}", "function once(callable $callback, $delay);", "public function __mlmExpectingVerification($delay = null);", "public function getDelay(): int\n {\n return $this->delay;\n }", "public function getDelay(): int\n {\n return $this->delay;\n }", "public static function waitTime($time_Second=1){\n\t\tusleep($time_Second*1000000);\n\t}", "public function at($delay);", "public function iWait() {\n sleep(3);\n }", "public function floodControl($delay = 120)\n\t{\n\t\t\n\t\t// Get the users IP address\n\t\t$ip = $this->getRealIpAddr();\n\t\t\n\t\t// Is there a flood entry that meets the requirement for control?\n\t\t$select = \"SELECT `ip` \n\t\t\t\t\t\tFROM `floodcontrol`\n\t\t\t\t\t\tWHERE `ip` = '\".$ip.\"' \n\t\t\t\t\t\tAND (`time` + \".$delay.\") > \".time();\n\t\t\n\t\t$res \t= self::ex($select);\n\t\t\n\t\t// If yes return false - user will be controlled.\n\t\tif ($res) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\t$flood = \"REPLACE INTO `floodcontrol` ( `ip` , `time` ) \n\t\t\t\t\t\t\tVALUES ( '\".$ip.\"', \".time().\" );\";\n\t\t\tself::ex($flood);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "public function pollLast();", "public function getPollTimeout()\n {\n return $this->pollTimeout;\n }", "public function test_now_vs_then(){\n\t\n\t\t$listotron = new Listotron();\n\t\t$now = $listotron->getNOW();\n\t\tusleep(300);\n\t\t$listotron->updateNOW();\n\t\t$then = $listotron->getNOW();\n\n\t\t$this->assertNotEqual($now, $then);\n\t}", "static private function setTimer() {\n if(!self::$timer) {\n self::$timer = self::$loop->addPeriodicTimer(0, \\Closure::bind(function () {\n $this->tick();\n \n $queue = \\GuzzleHttp\\Promise\\queue();\n $handles = $this->handles;\n \n if($queue->isEmpty() && \\count($handles) === 0) {\n URLHelpers::stopTimer();\n }\n }, self::$handler, self::$handler));\n }\n }", "public function __sleep()\n {\n $lastConnection = $this->_isConnected;\n $this->disconnect(true);\n $this->_isConnected = $lastConnection;\n }", "public function wait($wait = -1) {}", "function sleep(float|int $timeout): void\n {\n signal(fn (Closure $resume) => Timer::after(fn (): mixed => $resume(), (int) $timeout * 1000));\n }", "protected function handleRateLimit(): void\n {\n if (!$this->isRateLimitEnabled() || !$this->requestTimestamp) {\n return;\n }\n\n /** @var DateTime $limitReset */\n $limitReset = $this->getApiCallLimits('reset');\n if (!$limitReset) {\n return;\n }\n\n $limitLeft = $this->getApiCallLimits('left') ?: 1;\n $secondsLeft = $limitReset->getTimestamp() - time();\n $rateLimitCycle = round(($secondsLeft / $limitLeft) * 1000);\n\n // Calculate in milliseconds the duration the API call took\n $duration = round(microtime(true) - $this->requestTimestamp, 3) * 1000;\n $waitTime = $rateLimitCycle - $duration;\n\n if ($waitTime > 0) {\n // Do the sleep for X microseconds (convert from milliseconds)\n usleep($waitTime * 1000);\n }\n }", "public function delay($time)\n {\n if (Event::fire(Event::JOB_DELAY, array($this, $time)) === false) {\n return false;\n }\n\n if(!$this->ensureUniqueness(false)) return false;\n\n if(method_exists($this->class, 'onQueue')) {\n $instance = $this->getInstance();\n if(!$instance->onQueue($this)) {\n return false;\n }\n }\n\n\n $this->redis->sadd(Queue::redisKey(), $this->queue);\n $status = $this->redis->zadd(Queue::redisKey($this->queue, 'delayed'), $time, $this->payload);\n\n if ($status < 1) {\n return false;\n }\n\n $this->setStatus(self::STATUS_DELAYED);\n $this->redis->hset(self::redisKey($this), 'delayed', $time);\n\n Stats::incr('delayed', 1);\n Stats::incr('delayed', 1, Queue::redisKey($this->queue, 'stats'));\n\n Event::fire(Event::JOB_DELAYED, array($this, $time));\n\n return true;\n }", "function still_on_time($extra_time = 15)\n{\n\tstatic $max_execution_time, $start_time;\n\n\t$time = explode(' ', microtime());\n\t$current_time = $time[0] + $time[1];\n\n\tif (empty($max_execution_time))\n\t{\n\t\t$max_execution_time = (function_exists('ini_get')) ? (int) @ini_get('max_execution_time') : (int) @get_cfg_var('max_execution_time');\n\n\t\t// If zero, then set to something higher to not let the user catch the ten seconds barrier.\n\t\tif ($max_execution_time === 0)\n\t\t{\n\t\t\t$max_execution_time = 50 + $extra_time;\n\t\t}\n\n\t\t$max_execution_time = min(max(10, ($max_execution_time - $extra_time)), 50);\n\n\t\t// For debugging purposes\n\t\t// $max_execution_time = 10;\n\n\t\tglobal $starttime;\n\t\t$start_time = (empty($starttime)) ? $current_time : $starttime;\n\t}\n\n\treturn (ceil($current_time - $start_time) < $max_execution_time) ? true : false;\n}", "function wp_ajax_heartbeat()\n {\n }", "public static function Sleep($ms) {\n\t\t\\usleep($ms * 1000.0);\n\t}", "protected function calculate_rate_limit_delay( $response, $headers ) {\n\n\t\treturn $response->get_rate_limit_estimated_time_to_regain_access( $headers ) * MINUTE_IN_SECONDS;\n\t}", "public function test_refreshMessageTimeout() {\n\n }", "function timeout() {\n $q = Doctrine_Query::create()\n ->update('Zim_Model_User u')\n ->set('u.timedout', '?', '1')\n ->where(\"u.updated_at <= ?\", date('Y-m-d H:i:s', time()- $this->getVar('timeout_period', 30)));\n $q->execute();\n return;\n }", "public static function sslRandPoll(): bool {}", "function ping($host, $port, $timeout) {\r\n $tB = microtime(true);\r\n $fP = fSockOpen($host, $port, $errno, $errstr, $timeout);\r\n if (!$fP) { return \"down\"; }\r\n $tA = microtime(true);\r\n return round((($tA - $tB) * 1000), 0).\" ms\";\r\n}", "function getEmailDelayTime($email) {\n // Get the general delay time\n $delayTime = $this->getProperty('FREEMAIL_DELAY', 0);\n // If it's 0, we can safely return this value regardless of the email address\n if ($delayTime == 0) {\n return 0;\n }\n // Now check whether the email address matches a blacklist rule in delay mode\n $match = FALSE;\n $emailBlacklist = $this->getBlacklistRules('email', FALSE, TRUE);\n foreach ($emailBlacklist as $id => $blacklistRule) {\n if ($blacklistRule['blacklist_delay'] == 0) {\n continue;\n }\n $rule = $this->convertFromSqlLikeValue($blacklistRule['blacklist_match']);\n // Strip whitespace\n $rule = trim($rule);\n // Convert current rule into valid regexp\n if ($rule[0] == '*') {\n $rule = ltrim($rule, '*');\n } else {\n $rule = '^'.$rule;\n }\n if ($rule[strlen($rule) - 1] == '*') {\n $rule = rtrim($rule, '*');\n } else {\n $rule = $rule.'$';\n }\n // Now do the check\n if (preg_match('~'.$rule.'~i', $email)) {\n $match = TRUE;\n break;\n }\n }\n if ($match) {\n return $delayTime * 60;\n }\n return 0;\n }" ]
[ "0.6671851", "0.6233737", "0.6233737", "0.6233737", "0.6233737", "0.6125437", "0.5979417", "0.5967411", "0.59566724", "0.5938162", "0.59212196", "0.59078735", "0.59006083", "0.5874492", "0.5859046", "0.58254164", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58224124", "0.5821766", "0.5821766", "0.5821766", "0.58213943", "0.5821348", "0.581297", "0.5808672", "0.5791359", "0.5781885", "0.57817286", "0.57296836", "0.569897", "0.56642485", "0.56536984", "0.5634017", "0.5585165", "0.5582868", "0.55542725", "0.55338734", "0.55295897", "0.5517759", "0.5507413", "0.5503652", "0.5474895", "0.5473813", "0.5458086", "0.5458005", "0.5442838", "0.5440256", "0.5435939", "0.5433895", "0.5415459", "0.5395288", "0.5393981", "0.5382393", "0.5365734", "0.53205144", "0.5269467", "0.5265822", "0.5262845", "0.5261821", "0.52596307", "0.5247129", "0.52338725", "0.5232035", "0.52309996", "0.5229261", "0.52243185", "0.52213603", "0.52117777", "0.52072567", "0.51641226", "0.51641226", "0.515673", "0.51472926", "0.51401883", "0.5132883", "0.51149535", "0.51149493", "0.51138586", "0.51103425", "0.5101343", "0.5099831", "0.50987494", "0.50957054", "0.5091909", "0.5088426", "0.5086971", "0.5085309", "0.5084886", "0.50823057", "0.50814724", "0.5065348", "0.5062483", "0.5058492" ]
0.68932927
0
Maximum duration for poll requests
public function get_request_timeout(): float { $duration = get_config('realtimeplugin_phppoll', 'requesttimeout'); return (isset($duration) && $duration !== false) ? (float)$duration : 30; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPollTimeout()\n {\n return $this->pollTimeout;\n }", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function pollLast();", "private static function get_timeout() {\n\t\t$timeout = absint( ini_get( 'max_execution_time' ) );\n\t\tif ( $timeout <= 1 ) {\n\t\t\t// allow for -1 or 0 for unlimited\n\t\t\t$timeout = 5000 * 1000;\n\t\t} elseif ( $timeout > 30 ) {\n\t\t\t$timeout = $timeout * 1000;\n\t\t} else {\n\t\t\t$timeout = 30000;\n\t\t}\n\t\treturn $timeout;\n\t}", "public function getTimeLimit(): int;", "public function getTimeLimit(): int;", "function rate_limit($key, $interval, $max, $error = 'Slow down a bit, yo.')\n{\n $unit = round(time() / $interval);\n $key .= '-'.$unit;\n $count = 0;\n\n if (apcu_exists($key)) {\n $count = apcu_fetch($key);\n if ($count >= $max) {\n throw new Exception($error);\n }\n }\n\n $count++;\n apcu_store($key, $count, $interval);\n\n return $count;\n}", "function rate_limit($key, $interval, $max, $error = 'Slow down a bit, yo.')\n{\n $unit = round(time() / $interval);\n $key .= '-'.$unit;\n $count = 0;\n\n if (apcu_exists($key)) {\n $count = apcu_fetch($key);\n if ($count >= $max) {\n throw new Exception($error);\n }\n }\n\n $count++;\n apcu_store($key, $count, $interval);\n\n return $count;\n}", "function loanExpire(){\n\tglobal $driver;\n\t$sql\t=\t\"SELECT loanduration FROM settings\"; //Retrieve the maximum days the loanee will be given before being flagged as a defaulter\n\tif($loanexpire\t=\t$driver->perform_request($sql)):\n\t\t$row\t=\t$driver->load_data($loanexpire);\n\t\t$maxdays\t=\t($row['loanduration']>0)?($row['loanduration']):30; //Retrieved loan duration\n\telse:\n\t\tdie('<p class=\"error\">ERROR Retrieving Loan duration.<br/>'.mysql_error().'</p>');\n\tendif;\n\treturn $maxdays; //The maximum days before loan is pushed to arrear\n}", "public function getRequestTimeOut() {\n return $this->requestTimeOut;\n }", "public function getTimeout()\n {\n return self::$timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout() {\r\n\t\treturn $this->timeout;\r\n\t}", "public function getTimeout()\n\t{\n\t\treturn $this->timeout;\n\t}", "public function getTimeout()\n {\n return ($this->container->getParameter('g4_timeout_reswebdefault'));\n }", "public function getTimeout(): int\n {\n return $this->timeout;\n }", "public function getTimeout() {\r\n return $this->timeout;\r\n }", "public function getTimeout()\n {\n return ($this->timeout / 1000000);\n }", "public function getTimeout()\n {\n return isset($this->timeout) ? $this->timeout : 0;\n }", "public function getMaxTasksPerSecondUnwrapped()\n {\n return $this->readWrapperValue(\"max_tasks_per_second\");\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->get(self::_TIMEOUT);\n }", "public function timeout()\n {\n return 300;\n }", "public function testPollTimeOut() {\n $c = new _MockProviderCronRunner(50, 0.0001);\n $provider = $this->createMock(ProviderInterface::class);\n $polling = $this->createMock(PollingInterface::class);\n $provider->method('polling')->willReturn($polling);\n $polling->expects($this->once())->method('poll')->will($this->returnCallback(function () {\n usleep(101);\n return TRUE;\n }));\n $c->providers = [$provider];\n $start = microtime(TRUE);\n $c->poll();\n $this->assertLessThan(1, microtime(TRUE) - $start);\n }", "function getRequestTimeout()\n {\n return $this->_props['RequestTimeout'];\n }", "public static function getTimeout()\n {\n return static::$timeout;\n }", "private function limitCalls()\n {\n if ($this->lastCallTimestamp > 0) {\n $callsLimit = $this->shopifyClient->callLimit();\n $callsMade = $this->shopifyClient->callsMade();\n $callsLeft = $this->shopifyClient->callsLeft();\n\n Log::debug(\"ShopifyApi.limitCalls: callsLimit=$callsLimit, callsMade=$callsMade, callsLeft=$callsLeft\");\n $currentTimestamp = microtime(true);\n $deltaTimestamp = ($this->lastCallTimestamp > 0) ? $currentTimestamp - $this->lastCallTimestamp : 0;\n Log::debug(\"ShopifyApi.limitCalls: deltaTimestamp=$deltaTimestamp\");\n\n if ($callsLeft < 10) {\n Log::debug(\"ShopifyApi.limitCalls: DELTA < 10: wait 0.5 seconds\");\n usleep(500000);\n }\n } else {\n Log::debug(\"ShopifyApi.limitCalls: first call\");\n }\n $this->lastCallTimestamp = microtime(true);\n }", "public function timeout()\n\t{\n\t\treturn $this->timeout;\n\t}", "public function getTimeoutValue() \r\n\t{\r\n\t\t$timeout = (int) Mage::getStoreConfig('ec/blocker/eventTimeout');\r\n\t\t\r\n\t\tif (!$timeout)\r\n\t\t{\r\n\t\t\t$timeout = 2000;\r\n\t\t}\r\n\t\t\r\n\t\treturn $timeout;\r\n\t}", "public function getTimeout()\n {\n return $this->Timeout;\n }", "public static function getMaxRequests()\n\t{\n\t\treturn MHTTPD::$config['Server']['keep_alive_max_requests'];\n\t}", "public function getTimeout()\n {\n return $this->_timeout;\n }", "public function getTimeout()\n {\n return $this->_timeout;\n }", "public function get_delay_between_checks(): int {\n $period = get_config('realtimeplugin_phppoll', 'checkinterval');\n return max($period, 200);\n }", "protected function get_maximum_execution_time() {\n\t\t_deprecated_function( __METHOD__, '2.1.1', 'ActionScheduler_Abstract_QueueRunner::get_time_limit()' );\n\n\t\t$maximum_execution_time = 30;\n\n\t\t// Apply deprecated filter\n\t\tif ( has_filter( 'action_scheduler_maximum_execution_time' ) ) {\n\t\t\t_deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' );\n\t\t\t$maximum_execution_time = apply_filters( 'action_scheduler_maximum_execution_time', $maximum_execution_time );\n\t\t}\n\n\t\treturn absint( $maximum_execution_time );\n\t}", "protected function limitCallRate()\n {\n if (!$this->callRateLimit) {\n return;\n }\n $now = microtime(true);\n $callIntervalActual = $now - $this->callTimeLast;\n $callIntervalNeeded = 1 / $this->callRateLimit;\n $callDelayNeeded = $callIntervalNeeded - $callIntervalActual;\n if ($callDelayNeeded > 0) {\n usleep($callDelayNeeded * 1000000); // Seconds to microseconds\n }\n $this->callTimeLast = $now;\n }", "public function timeout(): int\n {\n return $this->timeout;\n }", "protected function lockoutTime()\n {\n return Arr::get(static::$config, 'locked_for', 60);\n }", "public function getMakeApiCallTimeout()\n {\n $returnValue = 40; // default value\n $configValue = strval(Mage::getConfig()->getNode('stores/default/innobyte_payu_lite_make_api_call_timeout'));\n if (is_numeric($configValue) && $configValue >= 0) {\n $returnValue = intval($configValue);\n }\n return $returnValue;\n }", "public function getTimeout() {\n return $this->_timeout;\n }", "public function getHeartbeatTimeout()\n {\n return $this->heartbeatTimeout;\n }", "public function getTimeout(): float\n {\n }", "private function calculateVisibilityTimeout(): int\n {\n return max($this->workTimeout * 4, self::TIMEOUT_VISIBILITY_MIN);\n }", "private function checkApiRequestsLimit()\n {\n $tempTime = time() - $this->startTime;\n if($this->apiRequestsCount >= $this->apiRequestsLimit && $tempTime < $this->apiTimeLimit) {\n usleep(($this->apiTimeLimit - $tempTime)*1000000);\n $this->apiRequestsCount = 1;\n $this->startTime = time();\n } else {\n $this->apiRequestsCount++;\n }\n }", "function getTimeout() {\r\n\t\treturn ftp_get_option($this->_handle, FTP_TIMEOUT_SEC);\r\n\t}", "public function getHttpHeartbeatTimeout()\n {\n return $this->httpHeartbeatTimeout;\n }", "public function getTimeout(): ?int;", "function wp_change_request_timeout($time) {\n return 10; //new number of seconds\n}", "protected function checkMaxExecutionTime() {}", "function rlip_get_maxruntime() {\n $maxruntime = (int)ini_get('max_execution_time');\n $maxruntime -= 2; // TBD: MUST STOP BEFORE time limit is reached!\n //echo \"\\nrlip_get_maxruntime(b):{$maxruntime}\\n\";\n if ($maxruntime < RLIP_MAXRUNTIME_MIN) {\n $maxruntime = RLIP_MAXRUNTIME_MIN;\n }\n return $maxruntime;\n}", "public function getTimeOut()\n {\n return self::$timeOut;\n }", "public function poll()\n {\n }", "public function getMaxExecutionTime()\n\t{\n\t\tif(!isset($this->_maxExecutionTime)){\n\t\t\t$this->_maxExecutionTime = $this->dontHardcodeService->searchDontHardcodeByParamNameAndFilterName(__CLASS__,'maxExecutionTime',true);\n\t\t}\n\n\t\tif(is_numeric($this->_maxExecutionTime) && $this->_maxExecutionTime > 44){\n\t\t\treturn $this->_maxExecutionTime;\n\t\t}\n\t\telse{\n\t\t\treturn 120;\n\t\t}\n\t}", "public static function getMaxDuration()\n {\n $models = Call::find()->all();\n foreach ($models as $model) {\n $result[$model->id] = $model->time_finished - $model->time_connected;\n }\n\n return max($result);\n }", "public function getIdleTimeoutMs()\n {\n return $this->IdleTimeoutMs;\n }", "public function getServerFailureLimit()\n {\n return $this->serverFailureLimit;\n }", "public static function getAliveTimeout()\n\t{\n\t\treturn MHTTPD::$config['Server']['keep_alive_timeout'];\n\t}", "public function hasTimeLimitReached(): bool;", "public function getMaxRoundTripTime()\n {\n if (array_key_exists(\"maxRoundTripTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"maxRoundTripTime\"], \"\\DateInterval\") || is_null($this->_propDict[\"maxRoundTripTime\"])) {\n return $this->_propDict[\"maxRoundTripTime\"];\n } else {\n $this->_propDict[\"maxRoundTripTime\"] = new \\DateInterval($this->_propDict[\"maxRoundTripTime\"]);\n return $this->_propDict[\"maxRoundTripTime\"];\n }\n }\n return null;\n }", "public function getCallbackWaitInterval()\n {\n return $this->_callback_period_interval;\n }", "final public static function HpsSessionTimedOut()\n {\n return self::get(823);\n }", "public function getMaxTasksPerSecond()\n {\n return $this->max_tasks_per_second;\n }", "public function getConnectTimeout();", "public function get_request_duration()\n {\n }", "public function setMaxQueryTime($max)\n\t{\n\t\t$this->maxquerytime = $max;\n\t}", "private function chooseWaitTimeout(): int\n {\n if ($this->gracefulMaxExecutionDateTime) {\n $allowedExecutionDateInterval = $this->gracefulMaxExecutionDateTime->diff(new \\DateTime());\n $allowedExecutionSeconds = $allowedExecutionDateInterval->days * 86400\n + $allowedExecutionDateInterval->h * 3600\n + $allowedExecutionDateInterval->i * 60\n + $allowedExecutionDateInterval->s;\n\n if (!$allowedExecutionDateInterval->invert) {\n $allowedExecutionSeconds *= -1;\n }\n\n /*\n * Respect the idle timeout if it's set and if it's less than\n * the remaining allowed execution.\n */\n if ($this->getIdleTimeout()\n && $this->getIdleTimeout() < $allowedExecutionSeconds\n ) {\n $waitTimeout = $this->getIdleTimeout();\n } else {\n $waitTimeout = $allowedExecutionSeconds;\n }\n } else {\n $waitTimeout = $this->getIdleTimeout();\n }\n\n if (!is_null($this->getTimeoutWait()) && $this->getTimeoutWait() > 0) {\n $waitTimeout = min($waitTimeout, $this->getTimeoutWait());\n }\n return $waitTimeout;\n }", "public function getHeartbeatInterval(): int\n {\n }", "public function getAttackTimeout()\n {\n return $this->get(self::_ATTACK_TIMEOUT);\n }", "public function getReadTimeout(): float\n {\n }", "public function testUnlimitedExecutionTime()\n {\n $response = $this->http->send(\n new Request('GET', '/visit-counter.php?with_no_time_limit')\n );\n\n $this->assertSame('1', (string) $response->getBody());\n $this->assertCreatedNewSession($response);\n $this->assertSame(1, $this->redis->dbSize());\n }", "public function getVoiceActivityTimeout()\n {\n return $this->voice_activity_timeout;\n }", "function timeout() {\n $q = Doctrine_Query::create()\n ->update('Zim_Model_User u')\n ->set('u.timedout', '?', '1')\n ->where(\"u.updated_at <= ?\", date('Y-m-d H:i:s', time()- $this->getVar('timeout_period', 30)));\n $q->execute();\n return;\n }", "public function getTimeout()\n {\n return $this->getHttpClient()->getTimeout();\n }", "public function getTimeoutMinutes()\n {\n return $this->timeout_minutes;\n }", "function bump_request_timeout() {\n\t\treturn 60;\n\t}", "#[@test, @limit(time= 0.010)]\n public function timeouts() {\n $start= gettimeofday();\n $end= (1000000 * $start['sec']) + $start['usec'] + 1000 * 50; // 0.05 seconds\n do {\n $now= gettimeofday();\n } while ((1000000 * $now['sec']) + $now['usec'] < $end);\n }", "public function getRecvTimeout()\n {\n return $this->recvTimeout;\n }", "public function getRpcTimeout(): float\n {\n }", "public function getConnectionTimeout();", "public function getRateLimitRemaining(): int\n {\n return $this->httpClient->getRateLimitRemaining();\n }", "public function maxTries();", "public function getMaximumAttempts();", "protected function exceededRateLimit()\n {\n return $this->cache->get($this->config['keys']['requests']) > $this->config['limit'];\n }", "public function timeout() {\n\t\treturn null;\n\t}", "public function timeout();", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "#[@test, @limit(time= 1.0)]\n public function noTimeout() {\n }", "public function getRateLimitLimit(): int\n {\n return $this->httpClient->getRateLimitLimit();\n }", "public function getGracefulDecommissionTimeout()\n {\n return $this->graceful_decommission_timeout;\n }", "private function waitingLimit($number = null)\n {\n $instance = $this->getInstance($number);\n $instanceId = isset($instance[\"instance_id\"]) ? $instance[\"instance_id\"] : 0;\n $token = isset($instance[\"token\"]) ? $instance[\"token\"] : 0;\n\n $waiting = 0;\n\n if (!empty($instanceId) && !empty($token)) {\n // executing curl\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"https://api.chat-api.com/instance$instanceId/showMessagesQueue?token=$token\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 300,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_HTTPHEADER => array(\n \"content-type: application/json\",\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n curl_close($curl);\n\n if ($err) {\n // throw some error if you want\n } else {\n $result = json_decode($response, true);\n if (isset($result[\"totalMessages\"]) && is_numeric($result[\"totalMessages\"])) {\n $waiting = $result[\"totalMessages\"];\n }\n }\n\n }\n\n return $waiting;\n\n }", "function getTimeoutOption() {\r\n\t\treturn $this->getOptionsSet()->getOptions(self::OPTION_TIMEOUT, 20);\r\n\t}" ]
[ "0.7460187", "0.6587645", "0.6587645", "0.6587645", "0.6587645", "0.6587645", "0.6587645", "0.6419446", "0.62759453", "0.626986", "0.626986", "0.6221846", "0.6221846", "0.6194557", "0.61924845", "0.6152766", "0.6147983", "0.61414313", "0.61301637", "0.6120571", "0.611789", "0.61150384", "0.6095872", "0.6083268", "0.60812324", "0.60788924", "0.60788924", "0.60788924", "0.60788924", "0.60788924", "0.6053978", "0.60532904", "0.6030859", "0.60185915", "0.6018291", "0.60077703", "0.6002007", "0.5981153", "0.5969603", "0.5963446", "0.5959696", "0.5959696", "0.5940139", "0.59360343", "0.5919533", "0.5910189", "0.5901957", "0.5899602", "0.5888549", "0.5878541", "0.58744806", "0.5862291", "0.5844161", "0.5826757", "0.58259094", "0.5786968", "0.57858455", "0.5781801", "0.57811433", "0.57778776", "0.5775968", "0.57669", "0.57473713", "0.57234865", "0.5723392", "0.5720523", "0.57188493", "0.5718688", "0.5710759", "0.5697688", "0.5697348", "0.5673493", "0.5663514", "0.5662565", "0.56593674", "0.56383395", "0.5635801", "0.5632639", "0.56110847", "0.5604873", "0.55988765", "0.5596537", "0.55964243", "0.55957013", "0.556005", "0.5551198", "0.55490744", "0.55420387", "0.5538776", "0.55269444", "0.55178905", "0.55154216", "0.55134153", "0.5512048", "0.55027825", "0.54970866", "0.5492659", "0.5456172", "0.5443379", "0.5443254" ]
0.6283891
8
/ Fonction permettant d'obtenir la liste des stages d'une entreprise.
function get_process_applicants($internshipID) { include("mysql_connect.inc.php"); $sql = "SELECT * FROM `application` WHERE `InternshipID`= '$internshipID' ORDER BY `match` DESC "; $result = mysqli_query($link, $sql); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function Rechercher_Stages(){\n\t\t \t//connexion à la base de données\n\t\t \t$oMysqliLib = new MySqliLib();\n\t\t \t//requête de recherche du Document\n\t\t \t$sRequete = \"SELECT * FROM stages\";\t\t \t\t\n\t\t \t\n\t\t \t//exécuter la requête\n\t\t \t$oResult = $oMysqliLib->executer($sRequete); \n\t\t \t//récupérer le tableau des enregistrements\n\t\t \t$aStage= $oMysqliLib->recupererTableau($oResult);\n\t\t\t\n\t\t \t//retourner array contenant les stages\n\t\t \treturn $aStage;\t\n\t\t }", "function afficherstages(){\n\t\t$sql=\"SElECT * From stage\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function getIssueStages()\n\t{\n\t\t$stages = $this->issueStage->orderBy('order')->get()->toArray();\n\t\t$stages[ (count($stages) - 1) ]['is_last'] = true;\n\n\t\treturn $stages;\n\t}", "public function getStagesForWS() {}", "public static function version_stages(DataObject $object) {\n\t\t$stages = array();\n\t\t$versioned = $object->getExtensionInstance('Versioned');\n\t\tif ($versioned) {\n\t\t\t$stages = $versioned->getStages();\n\t\t}\n\t\treturn $stages;\n\t}", "public function get_stages_name();", "public function get_num_stages();", "protected function getStagesService() {}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $maitresDeStages = $em->getRepository('AppBundle:MaitresDeStage')->findAll();\n\n return $maitresDeStages;\n }", "public function doRevertToLive() {\n\t\tif($this->Fields()) {\n\t\t\tforeach($this->Fields() as $field) {\n\t\t\t\t$field->writeToStage('Live', 'Stage');\n\t\t\t}\n\t\t}\n\t\t\n\t\tparent::doRevertToLive();\n\t}", "public function getPreviousStages()\n {\n /* get active stage */\n $stages = $this->model->whereCompanyId($this->scope->id())\n ->whereActive(0)\n ->get();\n\n return ApiResponse::success([\n 'data' => $stages,\n ]);\n }", "public function updateStageMetadata()\n {\n $histories = $this->histories()->orderBy('created_at')->get();\n\n $stages = new stdClass();\n $assignees = new stdClass();\n $closing = new stdClass();\n $assignees_track = new stdClass();\n\n // Iterate history\n foreach ($histories as $history) {\n // All stages\n if ($history->stage_name) {\n $stage_name = $history->stage_name;\n $actor = $history->actor;\n $history_key = $history->key;\n $metadata = $history->metadata;\n // Track of created stages\n if ($history->status === 'created') {\n $stages->$stage_name = [\n 'stage_name' => $stage_name,\n 'actor' => $actor,\n 'history_key' => $history_key,\n 'actory_key' => $metadata['actor_key'],\n 'assignee_key' => $metadata['assignee_key'],\n 'assignee' => $metadata['assignee_name']\n ];\n\n // Create list of assignees and add track for faster retrival\n $assignee_key = $metadata['assignee_key'];\n $assignees->$assignee_key[$stage_name] = 'created';\n $assignees_track->$stage_name = $metadata['assignee_key'];\n } else if ($history->status === 'completed') {\n // If completed remove stages, and remove from assignees\n unset($stages->$stage_name);\n $assinee_key = $assignees_track->$stage_name;\n unset($assignees->$assinee_key[$stage_name]);\n }\n } else if (isset($history->metadata['candidacy_closing_reason'])) {\n // Track candidacy closing and add\n $actor = $history->actor;\n $actor_key = $history->metadata['actor_key'];\n $close_reason = $history->metadata['candidacy_closing_reason'];\n $history_key = $history->key;\n\n $closing->actor = $actor;\n $closing->actor_key = $actor_key;\n $closing->reason = $close_reason;\n $closing->history_key = $history_key;\n }\n }\n\n // Iterate assignee and remove if all assigned stages\n foreach ($assignees as $key => $val) {\n if (!$val) {\n unset($assignees->$key);\n }\n }\n\n $metadata = new stdClass();\n\n // Old keys remains as it is\n foreach ($this->metadata as $key => $value) {\n $metadata->$key = $value;\n }\n\n $metadata->assignees = $assignees;\n $metadata->stages = $stages;\n $metadata->closing = $closing;\n\n $this->metadata = $metadata;\n $this->save();\n }", "public function getListeStages($idSession){\n $serviceTuteur = new ServiceTuteur();\n $lesStages = $serviceTuteur->getListeStages($idSession);\n $uneSession = $serviceTuteur->getUneSession($idSession);\n return view('tuteur.listeStages', compact('lesStages', 'uneSession'));\n }", "public function getStage()\n {\n return $this->stage;\n }", "public function workflowsAction() {\n\t$workflows = new Workflows();\n\t$this->view->workflows = $workflows->getStageNames();\n\t}", "public function getStagesCount()\n {\n return $this->count(self::_STAGES);\n }", "public function run()\n {\n DB::table('stages')->delete();\n $json= File::get('database/data/stages.json');\n $data=json_decode($json);\n foreach ($data as $obj) {\n Stage::create(array(\n 'name' =>$obj->name\n ));\n }\n }", "public function refreshStageConvocados(){\n $contador=0;\n foreach($this->convocados as $convocado){\n if($convocado->updateStage())$contador++;\n }\n return $contador;\n }", "public function index()\n {\n $stages = Stage::all();\n return view('stages.index', compact('stages'));\n }", "public function reset()\n {\n $this->values[self::_OPENED_ACT_STAGE] = array();\n }", "public function getStage()\n {\n return $this->get(self::_STAGE);\n }", "public function stages(){\n return $this->belongsToMany('SimulatorOperation\\Stage')->withPivot('cabin_id')->withTimestamps();\n }", "public function getStagesForWSUser() {}", "public function calculateStageDate(){\n $rallyService = parent::getService('rally','rally');\n $teamService = parent::getService('team','team');\n $leagueService = parent::getService('league','league');\n \n $allRallies = $rallyService->getAllRallies();\n foreach($allRallies as $rally):\n $date = new DateTime($rally['date']);\n foreach($rally['Stages'] as $key => $stage):\n if($key!=0){\n $date->add(new DateInterval('PT15M'));\n }\n $stage->set('date',$date->format('Y-m-d H:i:s'));\n if($date->format('Y-m-d H:i:s')<date('Y-m-d H:i:s')){\n $stage->set('finished',1);\n }\n $stage->save();\n// var_dump($stage->toArray());exit;\n endforeach;\n endforeach;\n echo \"pp\";exit;\n }", "public function appendStages(Down_TbcStage $value)\n {\n return $this->append(self::_STAGES, $value);\n }", "public function getStageIndex()\n {\n return $this->get(self::_STAGE_INDEX);\n }", "public function ListStage($number = null){\n\t\tif($number == null){\n\t\t\t$query = \"SELECT recordID, clusterNumber, title, editedUser, editedDate FROM [STAGE CLUSTERS TABLE]\";\n\n\t\t\tif($rows = $this->SelectQueryHelper($query))\n\t\t\t\treturn array(\"results\" => $rows);\n\t\t\telse \n\t\t\t\treturn array(\"results\" => null);\n\t\t} else {\n\t\t\t$query = \"SELECT recordID FROM [STAGE CLUSTERS TABLE] WHERE clusterNumber = :clusterNumber\";\n\t\t\t$bindings = array(':clusterNumber' => $number);\n\t\n\t\t\tif($rows = $this->SelectQueryHelper($query, $bindings)){\n\t\t\t\t$recordID = $rows[0]['recordID'];\n\t\t\t\treturn array(\"results\" => $this->LoadClusterObject(\"Stage\", $recordID));\n\t\t\t} else \n\t\t\t\treturn array(\"results\" => null);\t\t\t\n\t\t}\n\t}", "public function index()\n {\n // could be problematic with a hell of a lot sprints...\n $allSprintes = \\Auth::user()->sprints;\n $active = $allSprintes->filter(fn ($s) => $s->is_active)->first();\n $prev = $allSprintes->filter(fn ($s) => $s->id === $active->previous_sprint_id)->first();\n $next = $allSprintes->filter(fn ($s) => $s->previous_sprint_id === $active->id)->first();\n\n return [\n [\n 'id' => $prev->id,\n 'last' => true,\n 'current' => false,\n 'next' => false,\n ],[\n 'id' => $active->id,\n 'last' => false,\n 'current' => true,\n 'next' => false,\n ],[\n 'id' => $next->id,\n 'last' => false,\n 'current' => false,\n 'next' => true,\n ]\n ];\n }", "function liste_stagesBIS($args) {\n // ------------\n\n $query = '\n SELECT DISTINCT m.co_modu,\n mp.module_alert,\n mp.module_printed,\n mp.prioritaire,\n mp.organisation,\n m.lib AS libm,\n d.co_disp,\n id_disp,\n d.lib AS libd,\n co_camp,\n co_andi,\n co_anmo,\n (select MIN(date) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=0) as dateD,\n (select MAX(date) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=0) as dateF,\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=0 AND convoc_sent=0) as nb_nea,\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND convoc_sent=1) as nb_s,\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=1) as nb_ea,\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND session_alert=1) as nb_sa,\n (select count({gbb_file}.fid) from {gbb_file} JOIN {file_managed} ON {file_managed}.fid={gbb_file}.fid Where co_modu=mp.co_modu AND co_degre=mp.co_degre AND status=1) as nb_pj\n FROM {gbb_gmodu} as m\n LEFT JOIN {gbb_gmodu_plus} as mp ON mp.co_modu=m.co_modu\n AND mp.co_degre=m.co_degre\n JOIN {gbb_gdisp} as d ON m.co_disp=d.co_disp\n AND m.co_degre=d.co_degre \n JOIN {gbb_gdire} as j ON m.co_modu=j.co_modu\n AND m.co_degre=j.co_degre \n WHERE d.co_degre IN (:codegre)\n AND id_disp LIKE :year\n ';\n $variables = array();\n $variables[':year'] = arg(1) . '%';\n $variables[':codegre'] = arg(2);\n\n if ( arg(4)=='' ) {\n // On récupère le co_resp par défaut.dans le profil du user connecté\n global $user;\n $qu = db_select('field_data_field_id_resp', 'u')\n ->condition('u.entity_id', $user->uid, '=')\n ->fields('u', array('field_id_resp_value'));\n $input = $qu->execute()->fetchField();\n } else {\n // L'URL ne la donne pas, donc la variable $co_resp est la valeur par défaut\n $input = arg(4);\n };\n\n // Si $input est numérique alors c'est bien un co_resp\n // Si $input est une chaine, alors c'est un nomu, il faut récupérer les co_resp correspondants\n if( $input == 'TOUS' ) {\n //echo $input.\" is String\";\n } elseif( preg_match('/[^0-9]/', $input) ) {\n //echo $co_resp.\" is String\";\n //$tabResp = array(\"2011\", \"1690\");\n $matches = array();\n $tabResp = db_select('gbb_gresp', 'c')\n ->fields('c', array('co_resp'))\n ->condition('nomu', '' . db_like($input) . '', 'LIKE')\n ->distinct()\n ->execute()->fetchCol();\n $variables[':coresp'] = $tabResp;\n //print_r($tabResp);\n $query .=' AND j.co_resp IN (:coresp) ';\n } else {\n //echo $co_resp.\" is Int\";\n $tabResp = array( $input);\n $variables[':coresp'] = $tabResp;\n $query .=' AND j.co_resp IN (:coresp) ';\n };\n\n\n\n $voirEnCours = (isset($_GET['voir_encours']))? (($_GET['voir_encours']==1)? TRUE : FALSE) : FALSE;\n\n if ($voirEnCours) {\n // les administratifs\n // voient seulement les stages qui ont\n // - OU module_alert = 1\n // - OU ( nb session_alert = 1 ) > 0\n // - OU ( nb de convoc_sent = 1 ) < (nb en_attente = 0 )\n $query .= '\n AND (\n mp.module_alert = 1\n OR\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND session_alert=1) > 0\n OR\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND convoc_sent=1) <\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=0)\n )\n ';\n }\n\n if (arg(3)!=0) {\n $query .= 'AND j.co_tres = :cotres ';\n $variables[':cotres'] = arg(3);\n };\n if (arg(5)!='0' && arg(5)!='') {\n $query .= 'AND d.co_orie = :coorie ';\n $variables[':coorie'] = arg(5);\n };\n\n if ( !isset($_GET['voir_ferme']) || $_GET['voir_ferme']==0 ) {\n $query .= 'AND co_anmo = \\'\\'';\n }\n \n $result = db_query($query, $variables);\n\n $liste = array();\n $libd_precedent= '';\n $rows = array();\n\n $header = array(\n 'col0' => array('data' => \"dispo\"), \n 'col1' => array('data' => \"status\"), \n 'col2' => array('data' => \"Le \" .\n format_date(time(), 'custom', 'l j F Y à H:i') .\n \", \" .\n $result->rowCount() .\n \" stages.\" \n ),\n 'col3' => array('data' => \"..\"), \n );\n\n foreach ($result as $r) {\n $m_ouvert_ou_ferme = ($r->co_anmo == '')? '' : 'Ferme';\n $options_comodu = array('attributes' => array('class' => array($m_ouvert_ou_ferme),\n 'id' => 'cool-id',\n ),\n 'html' => FALSE,\n );\n\n $d_ouvert_ou_ferme = ($r->co_andi == '')? '' : 'Ferme';\n\n $paf_ou_fil = ($r->co_camp == 'BS')? 'fil' : 'paf';\n $libd_class = ($r->co_camp == 'BS')? 'fil' : 'paf';\n $libd_class = ($r->libd == $libd_precedent)? \"gris\" : $libd_class;\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/flag_red.png',\n 'alt' => 'session_alert',\n 'title' => t('Alerte sur session'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $session_alert = ($r->nb_sa >0)? theme('image', $variables) . '<span class=\"nb_sa\">' . $r->nb_sa . '</span>'. '<span class=\"invisible\">></span> ' : '';\n\n $play = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/control_play_blue.png',\n 'alt' => 'session_alert',\n 'title' => t('session en route'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $NOT_en_attente = ($r->nb_nea >0)? theme('image', $play) . '<span class=\"nb_sa\">' . $r->nb_nea . '</span>'. '<span class=\"invisible\">></span> ' : '';\n\n $pause = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/control_pause.png',\n 'alt' => 'en_attente',\n 'title' => t('En attente'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $en_attente = ($r->nb_ea >0)? theme('image', $pause) . '<span class=\"nb_sa\">' . $r->nb_ea . '</span>' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/convoc_printed.gif',\n 'alt' => 'module_printed',\n 'title' => t('Imprimé'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $module_printed = ($r->module_printed && $voirEnCours)? theme('image', $variables) . ' ' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/flag_red.png',\n 'alt' => 'module_alert',\n 'title' => t('Alerte entre conseillers'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $module_alert = ($r->module_alert)? theme('image', $variables). '<span class=\"invisible\">></span> ' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/prioritaire.png',\n 'alt' => 'prioritaire',\n 'title' => t('Prioritaire'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $prioritaire = ($r->prioritaire)? theme('image', $variables) . '<span class=\"invisible\">!</span> ' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/convoc_sent.png',\n 'alt' => 'convoc_sent',\n 'title' => t('Convocations envoyées'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $convoc_sent = ($r->nb_s >0)? theme('image', $variables) . '<span class=\"nb_sa\">' . $r->nb_s . '</span>' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/attachement.gif',\n 'alt' => 'convoc_sent',\n 'title' => t('Fichier(s) attaché(s)'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $attachement = ($r->nb_pj > 0)? theme('image', $variables) . '<span class=\"nb_pj\">' . $r->nb_pj . '</span>' : '';\n\n $comments = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/comments.png',\n 'alt' => 'Organisation et dates de session',\n 'title' => t('Organisation et dates de session'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $comment = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/comment.png',\n 'alt' => 'Dates de session',\n 'title' => t('Dates de session'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $plus = ($r->organisation == '')? '' : '&nbsp;' . theme('image', $comments);\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/timer_green.png',\n 'alt' => 'Timer',\n 'title' => t('Première date dans plus de 15 jours'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n if (strtotime($r->dateD) < time()) { // le premier jour dépassé\n $variables['path']=drupal_get_path('module', 'gaiabb') . '/images/timer_red.png';\n $variables['title']=t('Première date dépassée');\n } elseif(strtotime($r->dateD) < time() + 1296000) { // le premier jour est dans moins de 15 jours.\n $variables['path']=drupal_get_path('module', 'gaiabb') . '/images/timer_orange.png';\n $variables['title']=t('Première date dans moins de 15 jours');\n };\n if (strtotime($r->dateF) < time()) { // le dernier jour jour dépassé donc formation finie\n $variables['path']=drupal_get_path('module', 'gaiabb') . '/images/timer_end.png';\n $variables['title']=t('Formation terminée');\n }\n $timer = theme('image', $variables);\n\n if (isset($r->dateD)) {\n if ($r->dateD==$r->dateF) {\n $dates = $timer . t(\"&nbsp;\" . strftime('%d/%m/%y', strtotime($r->dateD))) ; \n } else {\n $dates = $timer . t(\"&nbsp;\" . strftime('%d/%m/%y', strtotime($r->dateD)) . \"&rarr;\" . strftime('%d/%m/%y', strtotime($r->dateF)));\n };\n } else {\n $dates ='';\n };\n\n$formateurs ='';\n //if (user_access('unstable gaiabb')) {\n $qf = db_select('gbb_session', 's');\n $qf ->leftjoin('gbb_gresp_dafor', 'r', 'r.co_resp = s.co_resp AND r.co_degre=s.co_degre');\n $qf ->condition('s.co_degre', arg(2), '=')\n ->condition('s.co_modu', $r->co_modu, '=')\n ->fields('r', array('nomu', 'prenom'))\n ->fields('s', array('date', 'en_attente'));\n $fo = $qf->execute();\n $items = array();\n foreach ($fo as $f) {\n $items[] = (($f->en_attente)? theme('image', $pause) : '' ) . ' ' .\n $f->date . ' - ' . \n $f->prenom . ' ' . $f->nomu;\n };\n $formateurs = theme('item_list', array('items' => $items));\n//}\n\n/*$rows[] = array( \n 'col0' => array('data' => \n '<span class=\"invisible\">' . $paf_ou_fil . '*' . '</span> ' .\n '<span class=\"' .$paf_ou_fil . ' ' . $d_ouvert_ou_ferme . '\">[' . strtoupper($paf_ou_fil) . \"] \" . $r->id_disp . ' ' . t($r->libd) . '</span> '\n ),\n 'col1' => array('data' => \".\"\n ),\n 'col2' => array('data' => \".\"\n ),\n 'col3' => array('data' => \".\"\n ),\n 'col4' => array('data' => \".\"\n ),\n );\n*/\n $rows[] = array( \n 'col0' => array('data' => \n '<span class=\"invisible\">' . $paf_ou_fil . '*' . '</span> ' .\n '<span class=\"' .$paf_ou_fil . ' ' . $d_ouvert_ou_ferme . '\">[' . strtoupper($paf_ou_fil) . '' . $d_ouvert_ou_ferme . \"] \" . $r->id_disp . ' ' . t($r->libd) . '</span> '\n ),\n 'col1' => array('data' => \n $attachement .\n $module_printed .\n $convoc_sent .\n $session_alert .\n $NOT_en_attente .\n $en_attente .\n $module_alert .\n $prioritaire,\n 'class' => 'nowrap',\n ),\n 'col2' => array('data' =>\n l($r->co_modu, 'gest_module/' . arg(2) . '/' . $r->co_modu, $options_comodu) . ' ' .\n '<span class=\"' . $m_ouvert_ou_ferme . '\">' . $d_ouvert_ou_ferme . ' ' . t($r->libm) . $plus . '</span> ',\n ),\n 'col3' => array('data' => nl2br($r->organisation). $formateurs ,\n ),\n 'col4' => array('data' => $dates,\n ),\n );\n $libd_precedent = $r->libd;\n }\n $attributes = array('id' => 'table-id', 'class' => array('display'));\n return theme('table', array('rows' => $rows, 'attributes' => $attributes));\n}", "public function run()\n {\n $stages = [\n '1-этап',\n '2-этап',\n '1-сигальный экземпляр',\n '3-этап',\n '4-этап',\n '2-сигальный экземпляр',\n 'Замечание менеджера',\n '5-этап',\n 'Сдача на печать',\n 'Печать',\n 'Склад',\n 'Распечатать тех карту'\n ];\n\n for($i = 0; $i < count($stages); $i++) {\n Stage::firstOrCreate([\n 'name' => $stages[$i]\n ], [\n 'order' => $i + 1\n ]);\n }\n }", "function team_list()\n {\n }", "protected function resolveWorkspacesSetStageDependencies() {}", "public function set_next_stage() {\n\t\t$this->debug = [];\n\t\t$stage = $this->get_current_stage();\n\n\t\tif ( $stage ) {\n\t\t\t$stage = $this->get_next_stage( $stage );\n\n\t\t\t// Save next position\n\t\t\tif ( $stage ) {\n\t\t\t\t$this->set_stage( $stage );\n\t\t\t} else {\n\t\t\t\t$this->finish();\n\t\t\t}\n\t\t}\n\t}", "public function get_current_stage() {\n\t\treturn $this->stage;\n\t}", "public function removeStage()\n {\n if ($this->stageFilename !== null) {\n $finder = new Finder();\n $fs = new Filesystem();\n $imagePath = FRONTEND_FILES_PATH . '/festival/artists/files/stages';\n\n foreach ($finder->directories()->in($imagePath) as $directory) {\n $file = $directory . '/' . $this->stageFilename;\n\n if (is_file($file)) {\n $fs->remove($file);\n }\n }\n\n $this->stageFilename = null;\n\n return true;\n }\n\n return false;\n }", "public function usesStages()\n\t{\n\t\t$stages = $this->rocketeer->getStages();\n\n\t\treturn $this->usesStages and !empty($stages);\n\t}", "protected function stageToArray(&$metadata)\n {\n $metadata['stage'] = (array)$metadata['stage'];\n }", "public function hasStage(){\n return $this->_has(7);\n }", "private function inActiveCurrentStage()\n {\n $activeStage = $this->getJobAwardedStage();\n\n if ($activeStage) {\n $activeStage->active = 0;\n $activeStage->save();\n }\n }", "public function treeAction() {\n $request = Request::createFromGlobals();\n $stopped = $request->get('stopped');\n \n $folder = 'live';\n // $this->syncAction($folder);\n $dhtmlx = $this->container->get('arii_core.dhtmlx');\n $data = $dhtmlx->Connector('data');\n /* On prend l'historique */\n $Fields = array (\n '{spooler}' => 'sh.SPOOLER_ID', \n '{job_chain}' => 'sh.JOB_CHAIN',\n// '{order}' => 'sh.ORDER_ID',\n '{start_time}' => 'sh.START_TIME' );\n\n $sql = $this->container->get('arii_core.sql');\n $tools = $this->container->get('arii_core.tools');\n\n $qry = $sql->Select(array('sh.ORDER_ID','sh.HISTORY_ID','sh.SPOOLER_ID','sh.JOB_CHAIN','sh.START_TIME','sh.END_TIME','sh.STATE' ))\n .$sql->From(array('SCHEDULER_ORDER_HISTORY sh'))\n .$sql->Where($Fields)\n .$sql->OrderBy(array('sh.SPOOLER_ID','sh.JOB_CHAIN','sh.START_TIME desc')); \n \n $res = $data->sql->query( $qry );\n $Chains = $Orders = array();\n \n while ( $line = $data->sql->get_next($res) ) {\n $id = $line['HISTORY_ID'];\n $chain = \"/\".$line['SPOOLER_ID'].'/'.$line['JOB_CHAIN'];\n $dir = $chain.'/'.$line['ORDER_ID'];\n \n if (!isset($Chains[$chain])) {\n $key_files[$chain] = $chain;\n $Chains[$chain]=1; \n }\n \n if (isset($Orders[$dir])) continue;\n $Orders[$dir] = $line; \n \n // On ccompte les erreurs\n $key_files[$dir] = $dir;\n }\n \n // Prend on en compte les suspended ?\n $Fields = array (\n '{spooler}' => 'SPOOLER_ID', \n '{job_chain}' => 'PATH' /*,\n '{order}' => 'sh.ID'*/ );\n $qry = $sql->Select(array('SPOOLER_ID','PATH' ))\n .$sql->From(array('SCHEDULER_JOB_CHAINS'))\n .$sql->Where($Fields); \n\n $res = $data->sql->query( $qry );\n while ( $line = $data->sql->get_next($res) ) {\n $dir = '/'.$line['SPOOLER_ID'].'/'.$line['PATH'];\n \n $Chains[$dir]='STOPPED';\n }\n \n /*\n print_r($Info);\n exit();\n */\n \n $tools = $this->container->get('arii_core.tools');\n $tree = $tools->explodeTree($key_files, \"/\");\n \n $response = new Response();\n $response->headers->set('Content-Type', 'text/xml');\n $list = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>';\n $list .= \"<tree id='0'>\\n\";\n \n $list .= $this->Folder2XML( $tree, '', $Chains, $Orders );\n $list .= \"</tree>\\n\";\n $response->setContent( $list );\n return $response;\n }", "public static function stage(CandidateStage $stage): ?array\n {\n // has a decision been made at this stage?\n $decision = null;\n if ($stage->status != CandidateStage::STATUS_PENDING) {\n $decider = $stage->decider()->with('position')->first();\n\n $decision = [\n 'decider' => $decider ? [\n 'id' => $decider->id,\n 'name' => $decider->name,\n 'avatar' => ImageHelper::getAvatar($decider, 32),\n 'position' => (! $decider->position) ? null : [\n 'id' => $decider->position->id,\n 'title' => $decider->position->title,\n ],\n 'url' => route('employees.show', [\n 'company' => $decider->company,\n 'employee' => $decider,\n ]),\n ] : [\n 'id' => null,\n 'name' => $stage->decider_name,\n ],\n 'decided_at' => $stage->decided_at ? DateHelper::formatDate($stage->decided_at) : null,\n ];\n }\n\n return [\n 'id' => $stage->id,\n 'status' => $stage->status,\n 'decision' => $decision,\n ];\n }", "public static function workflowStates();", "public function getStage(): int\n {\n return self::STAGE;\n }", "private function _loadDeployableWorkflowStates()\n {\n static $deployableStateList = array();\n\n if(empty($deployableStateList)) {\n $stateList = $this->_config->getValue('workflowstates');\n foreach($stateList as $stateName => $stateConfig) {\n $isDeployable = array_key_exists('isDeployable', $stateConfig)\n && true === $stateConfig['isDeployable'];\n if($isDeployable) {\n $deployableStateList[] = $stateName;\n }\n }\n\n // Backwards compatibility, if no states are marked as deployable, all states are used\n $noStatesMarkedAsDeployable = empty($deployableStateList);\n if($noStatesMarkedAsDeployable) {\n $deployableStateList = array_keys($stateList);\n }\n }\n\n return $deployableStateList;\n }", "function monitor_list_statuses() {\n $query = \"select distinct(`wf_status`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_status'];\n }\n return $ret;\n }", "public function getStagedActions();", "public function getLaunchStage()\n {\n return $this->launch_stage;\n }", "public function getPostCommitHookList() {}", "public function addStagesToPost($post)\n {\n if (get_field('not_applicable', $post->ID) === true) {\n wp_delete_object_term_relationships($post->ID, 'stages');\n return $this;\n }\n //get current stages\n $this->currentStages = $this->getStagesFromPost($post);\n $this->currentStagesSlugs = wp_list_pluck($this->currentStages, 'slug');\n //determine new stages\n $this->updatedStages = $this->determineStagesFromAgeRange($post);\n sort($this->currentStagesSlugs);\n sort($this->updatedStagesSlugs);\n //apply changes to stages if needed.\n if ($this->currentStagesSlugs != $this->updatedStagesSlugs) {\n $ids = wp_list_pluck($this->updatedStages, 'term_id');\n wp_set_post_terms($post->ID, $ids, 'stages');\n }\n }", "public function run()\n {\n $project_ids = Projects::all()->pluck('id')->toArray();\n $threshold_ids = Thresholds::all()->pluck('id')->toArray();\n // 获取 Faker 实例\n $faker = app(Faker\\Generator::class);\n for ($i=1; $i<4 ; $i++){\n $s = 0;\n $projectsStages = factory(ProjectsStages::class)\n ->times(100)\n ->make()\n ->each(function ($projectsStage, $index)\n use ($project_ids,$threshold_ids, $faker,$i,&$s)\n {\n $start_date = '';\n $end_date = '';\n $stage_name = '';\n switch ($i){\n case 1:\n $stage_name.='阶段一';\n $month = rand(36,24);\n $start_date = date('Y-m-d',strtotime('-'.$month.' month'));\n $end_date = date('Y-m-d',strtotime('-'.$month+rand(1,11) .' month'));\n break;\n case 2:\n $stage_name.='阶段二';\n $month = rand(24,12);\n $start_date = date('Y-m-d',strtotime('-'.$month.' month'));\n $end_date = date('Y-m-d',strtotime('-'.$month+rand(1,11) .' month'));\n break;\n case 3:\n $stage_name.='阶段三';\n $month = rand(12,0);\n $start_date = date('Y-m-d',strtotime('-'.$month.' month'));\n $end_date = date('Y-m-d',strtotime('-'.$month+rand(1,11) .' month'));\n break;\n }\n $projectsStage->project_id = $project_ids[$s];\n $projectsStage->threshold_id = $faker->randomElement($threshold_ids);\n $projectsStage->stage_name = $stage_name;\n $projectsStage->start_date = $start_date;\n $projectsStage->end_date = $end_date;\n $projectsStage->stage = $i;\n $projectsStage->default = 1;\n $s+=1;\n });\n // 将数据集合转换为数组,并插入到数据库中\n ProjectsStages::insert($projectsStages->toArray());\n }\n\n }", "public function listaVisitantes(){\n \n }", "public function getStatusesList(){\n return $this->_get(1);\n }", "function getRoutesWithStage($stop_id){\n\t\t\t$routes_stops_ids = query(\"SELECT `route_id` FROM `tbl_route_stops` WHERE `stop_id` = ?\", $stop_id);\n\t\t\tforeach ($routes_stops_ids as $key => $routes_stops_id) {\n\t\t\t\t$routes_stops[] = $this->getRoute($routes_stops_id['route_id']);\n\t\t\t}\n\t\t\treturn $routes_stops;\n\t\t}", "function getStagePath() {\n\t\treturn $this->_stagePath;\n\t}", "public function reset()\n {\n $this->values[self::_NORMAL_STAGE_STARS] = array();\n $this->values[self::_ELITE_STAGE_STARS] = array();\n $this->values[self::_ELITE_DAILY_RECORD] = array();\n $this->values[self::_ELITE_RESET_TIME] = null;\n $this->values[self::_SWEEP] = null;\n $this->values[self::_ACT_DAILY_RECORD] = array();\n $this->values[self::_ACT_RESET_TIME] = null;\n }", "function getStageId() {\n\t\treturn $this->_stageId;\n\t}", "function update_start_stage( $conds = array() )\n\t{\n\n\t\t$sql = \"UPDATE rt_transactions_status SET start_stage = '0' WHERE id != '\". $conds['id'] .\"' \";\n\t\t\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query;\n\t\t\n\t}", "public function getOpenedActStageCount()\n {\n return $this->count(self::_OPENED_ACT_STAGE);\n }", "public function show(Exercise $exercise,Request $request)\n {\n $exercise = Exercise::with('stages')->find($exercise->id);\n //start exercise\n if($exercise->status==0){\n if(!$this->isStartedExercise()){\n try{ \n\n foreach ($exercise->stages as $stage) {\n $json = json_decode($stage->pivot->structure, JSON_PRETTY_PRINT);\n event(new \\App\\Events\\EventName($json));\n }\n $message['type'] = 'success';\n $message['status'] = Lang::get('messages.start_exercise');\n\n $exercise->status = 1;\n $exercise->save();\n return view('exercise.play',['message' => $message,\n 'exercise' => $exercise\n ]);\n }catch(\\Exception $e){\n $message['type'] = 'error';\n $message['status'] = Lang::get('messages.fail_exercise');\n return redirect('/exercise')->with('message',$message); \n }\n }else{\n $message['type'] = 'error';\n $message['status'] = Lang::get('messages.fail_exercise');\n return redirect('/exercise')->with('message',$message);\n }\n // finish exercise\n }else if($exercise->status==1){\n\n if($request->get('play')){\n $message['type'] = 'success';\n $message['status'] = Lang::get('messages.start_exercise');\n return view('exercise.play',['message' => $message,\n 'exercise' => $exercise\n ]);\n }\n if($request->get('restart')){\n $exercise->status = 0;\n $exercise->save();\n $this->killExercise($exercise,true);\n $message['type'] = 'success';\n $message['status'] = Lang::get('messages.restart_exercise');\n return redirect('/exercise')->with('message',$message); \n }\n\n\n $exercise->status = 2;\n $exercise->save();\n $this->killExercise($exercise);\n /*foreach ($exercise->stages as $stage) {\n $kill['idMesa'] = $stage->pivot->table_id; \n $kill['topic'] = 'KILL';\n event(new \\App\\Events\\RequestEvent($kill));\n }*/\n //dd($exercise->stages()->get()->first()->pivot->table_id);\n\n //$this->endLogExercise();\n //$this->endRecordExercise();\n\n $message['type'] = 'success';\n $message['status'] = Lang::get('messages.end_exercise');\n return redirect('/exercise')->with('message',$message);\n }else if($exercise->status==2){\n foreach ($exercise->stages as $stage) {\n $stage['user'] = User::with('Degree','Ascription')->find($stage->pivot->user_id);\n //$stage->users()->where('practice_user_pivot.exercise_id', 1);\n foreach ($stage->users->where('practice_user_pivot.exercise_id',2) as $item) {\n //dd($item);\n }\n /*foreach ($stage->practices as $practice) { \n foreach ($practice->users as $user) {\n \n } \n }*/\n }\n \n return view('exercise.show',['exercise' => $exercise]);\n }\n }", "abstract public function runStage($stage);", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('INHack20InventarioBundle:Estado')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $companyStatuses = $em->getRepository('AppBundle:CompanyStatus')->findBy(array('isDeleted' => false), array('position' => 'ASC'));\n\n return [\n 'companyStatuses' => $companyStatuses,\n ];\n }", "public function run()\n {\n $stage = new Stage();\n $stage->text = 'Waiting Approval';\n $stage->save();\n\n $stage = new Stage();\n $stage->text = 'Approved';\n $stage->save();\n }", "function getStageId() {\n\t\treturn $this->getData('stageId');\n\t}", "public function getStage(): TestStage;", "public function reset()\n {\n $this->values[self::_CUR_STAGE] = null;\n $this->values[self::_RESET_TIMES] = null;\n $this->values[self::_HEROES] = array();\n $this->values[self::_STAGES] = array();\n $this->values[self::_HIRE_HERO] = null;\n }", "public function index(Request $request)\n {\n $stages = $this->stageService->getCurrentStageById($request->user()->id);\n\n return $this->responseOK($stages);\n }", "public function getActionStagesAllowableValues()\r\n {\r\n return [\r\n self::ACTION_STAGES_BEFORE_COMPONENT_FIRST_START,\r\n self::ACTION_STAGES_AFTER_COMPONENT_FIRST_START,\r\n self::ACTION_STAGES_BEFORE_SCALE_IN,\r\n self::ACTION_STAGES_AFTER_SCALE_IN,\r\n self::ACTION_STAGES_BEFORE_SCALE_OUT,\r\n self::ACTION_STAGES_AFTER_SCALE_OUT,\r\n ];\r\n }", "public function getCurStage()\n {\n return $this->get(self::_CUR_STAGE);\n }", "public function GetProspectStages(GetProspectStages $parameters)\n {\n return $this->__soapCall('GetProspectStages', array($parameters));\n }", "public function get_states_list(){\n //echo '<pre>'; print_r($_POST);exit;\n $id = $this->input->post('id');\n $data['states'] = $this->videos_model->get_states_list($id);\n if($data['states']){\n $data['status'] = 0;\n }else{\n $data['status'] = 1;\n }\n //echo '<pre>'; print_r($states);exit;\n echo json_encode($data);\n }", "public function waitservicelistAction()\n {\n\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorid');\n\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryRst = $mbllApi->getWaitServiceList($floorId);\n\n if (!$aryRst || !$aryRst['result']) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n //service list info\n $waitServiceList = $aryRst['result']['list'];\n\n foreach ($waitServiceList as $key => $value) {\n $guest = Mbll_Tower_GuestTpl::getGuestDescription($value['tp']);\n //guest name\n $guestName = explode(\"|\", $guest['des']);\n $waitServiceList[$key]['name'] = $guestName[0];\n //need item\n $needItem = Mbll_Tower_ItemTpl::getItemDescription($value['ac']);\n $waitServiceList[$key]['ac_name'] = $needItem['name'];\n //mood picture\n $waitServiceList[$key]['moodPic'] = round($value['ha']/10)*10;\n\n $waitServiceList[$key]['ha_emoj'] = Mbll_Tower_Common::getMoodDesc($value['ha']);\n //leave time\n $waitServiceList[$key]['remain_hour'] = floor(($value['ot'] - $value['ct'])/3600);\n $waitServiceList[$key]['remain_minute'] = strftime('%M', $value['ot'] - $value['ct']);\n }\n\n $this->view->waitServiceList = $waitServiceList;\n $this->view->countService = count($waitServiceList);\n $this->view->floorid = $floorId;\n $this->render();\n }", "public function tree_backup_list() {\n global $db;\n\n return $db->fetch_table(\"SELECT * FROM `\".$this->table.\"_restore` ORDER BY STAMP DESC\");\n }", "public function getPreCommitHookList() {}", "function listTransitions($workflowId, $page = null, $rownums = null);", "public function listAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entities = $em->getRepository('BrasserieBundle:Brassin')->findBy([], ['lot' => 'ASC']);\r\n\r\n //$serializedEntities = $this->container->get('serializer')->serialize($entities, 'json');\r\n $serializer = SerializerBuilder::create()->build();\r\n //$serializedEntities = $serializer->serialize($entities, 'json', SerializationContext::create()->enableMaxDepthChecks());\r\n \r\n $serializedEntities = $serializer->serialize($entities, 'json', SerializationContext::create()->setGroups(array('list')));\r\n\r\n \r\n return new Response($serializedEntities);\r\n }", "public function unsetShipmentStage($index)\n {\n unset($this->shipmentStage[$index]);\n }", "function list_schedules_screen( $vars ) {\r\n $vars['schedules'] = $this->has_schedules();\r\n $vars['assignments'] = BPSP_Assignments::has_assignments();\r\n \r\n if( empty( $vars['schedules'] ) && empty( $vars['assignments'] ) )\r\n $vars['message'] = __( 'No schedules exist.', 'bpsp' );\r\n \r\n $vars['name'] = 'list_schedules';\r\n $vars['trail'] = array(\r\n __( 'Available Schedules', 'bpsp' ) => ''\r\n );\r\n return $vars;\r\n }", "public function getUserstage()\n {\n return $this->get(self::_USERSTAGE);\n }", "function getActiveGamesList () {\n\tglobal $bdd;\n\t$req = $bdd->prepare('\n\t\tSELECT *\n\t\tFROM parties\n\t\tORDER BY id_partie;\n\t');\n\t$req->execute();\n\t$list = array();\n\twhile ($row = $req->fetch()) {\n\t\t$list[] = array(\n\t\t\t'id_partie' => $row['id_partie'],\n\t\t\t'nom' => $row['nom'],\n\t\t\t'createur' => getLoginForPlayer($row['createur']),\n\t\t\t'date_debut' => $row['date_debut'],\n\t\t\t'date_fin' => $row['date_fin'],\n\t\t\t'partie_privee' => ($row['password'] === sha1('') || $row['password'] === NULL) ? 'NO' : 'YES',\n\t\t\t'players' => getListeJoueursPartie($row['id_partie'])\n\t\t);\n\t}\n\treturn $list;\n}", "public function resume(): array {\n\t\t\t\n\t\t\t$data =\n\t\t\t [\n\t\t\t\t'apartment' => $this->apartment,\n\t\t\t\t'stay' => [\n\t\t\t\t 'check_in' => $this->check_in->format('d-m-Y'),\n\t\t\t\t 'check_out' => $this->check_out->format('d-m-Y'),\n\t\t\t\t 'requests' => $this->special_requests\n\t\t\t\t],\n\t\t\t\t'pending_upgrades' => [],\n\t\t\t ];\n\t\t\tforeach ($this->bookedServices as $bookedService) {\n\t\t\t\t$data['pending_upgrades'][] = $bookedService->slug;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}", "public function offEmployeeSchedule() {\n \n $employeeLists = $this->EmployeesSchedules->find()\n ->contain('Employees')\n ->where([\n 'Employees.status' => 1, \n 'OR'=> [\n \"Employees.availability_status\" => 1,\n \"Employees.consult_availability_status\" => 1\n ]\n ])\n ->toArray();\n \n if(!empty($employeeLists)) {\n foreach ($employeeLists as $key => $val) {\n \n $timezone = !empty($val->timezone) ? $val->timezone : date_default_timezone_get();\n \n $schedule = json_decode($val->schedule, true);\n $consult_schedule = json_decode($val->consult_schedule, true);\n \n $date = date(\"Y-m-d\");\n $previousDate = date('Y-m-d', strtotime('-1 day'));\n \n if(!empty($schedule)) {\n \n date_default_timezone_set($timezone);\n \n $result = array_filter($schedule, function ($val) use ($date, $previousDate) {\n $compareDate = \\DateTime::createFromFormat('m-d-Y', $val);\n $utime = strtotime($compareDate->format('Y-m-d'));\n return $utime >= strtotime($previousDate) && $utime <= strtotime($date);\n }, ARRAY_FILTER_USE_KEY);\n \n if (! empty($result)) {\n $flag = 0;\n foreach ($result as $r_key => $r_val) {\n $compareDate = \\DateTime::createFromFormat('m-d-Y', $r_key);\n \n if($previousDate == $compareDate->format('Y-m-d')) {\n foreach ($r_val as $previous_key => $previous_val) {\n //pr($previous_val); die;\n $previousTime = explode('-', $previous_val['time']);\n \n $previousStartTime = date('H:i', strtotime(substr($previousTime[0], 0, -1) . ':00 ' . substr($previousTime[0], -1) . 'm'));\n $previousEndTime = date('H:i', strtotime(substr($previousTime[1], 0, -1) . ':00 ' . substr($previousTime[1], -1) . 'm'));\n \n if($previousStartTime > $previousEndTime) {\n // This means schedule is next day shift\n $r_val[0] = [\n 'service_team' => $previous_val['service_team'],\n //'time' => '0a-'.$previousTime[1]\n 'time' => $previous_val['time']\n ];\n } else {\n $flag = 1;\n }\n }\n if($flag) {\n continue;\n }\n }\n \n foreach ($r_val as $v_key => $v_val) {\n if (! empty($v_val['time'])) {\n $time = explode('-', $v_val['time']);\n \n $startTime = date('H:i', strtotime(substr($time[0], 0, -1) . ':00 ' . substr($time[0], -1) . 'm'));\n $endTime = date('H:i', strtotime(substr($time[1], 0, -1) . ':00 ' . substr($time[1], -1) . 'm'));\n \n $currentTime = date('H:i');\n \n $employee = $val->employee;\n \n if(strtotime($endTime) >= strtotime(date(\"H:i\")) && strtotime($endTime) <= strtotime(date(\"H:i\", strtotime('+10 minutes')))) {\n if(!empty($employee)) {\n $employee->availability_status = 0;\n $employee->working_time = '';\n $employee->dirty('modified', true);\n $this->Employees->save($employee);\n \n /* $this->HospitalsEmployees->deleteAll([\n 'employee_id' => $val->employee_id,\n 'hospital_id' => $val->hospital_id\n ]); */\n }\n }\n }\n }\n }\n }\n }\n \n if(!empty($consult_schedule)) {\n date_default_timezone_set($timezone);\n $consultResult = array_filter($consult_schedule, function ($val) use ($date, $previousDate) {\n $compareDate = \\DateTime::createFromFormat('m-d-Y', $val);\n $utime = strtotime($compareDate->format('Y-m-d'));\n return $utime >= strtotime($previousDate) && $utime <= strtotime($date);\n }, ARRAY_FILTER_USE_KEY);\n \n if (! empty($consultResult)) {\n $cFlag = 0;\n $departments = TableRegistry::get('Departments');\n \n foreach ($consultResult as $c_key => $c_val) {\n unset($c_val['service_team']);\n \n $compareDate = \\DateTime::createFromFormat('m-d-Y', $c_key);\n \n if($previousDate == $compareDate->format('Y-m-d')) {\n $i =0;\n foreach ($c_val as $previous_key => $previous_val) {\n $previousTime = explode('-', $previous_val['time']);\n \n $previousStartTime = date('H:i', strtotime(substr($previousTime[0], 0, -1) . ':00 ' . substr($previousTime[0], -1) . 'm'));\n $previousEndTime = date('H:i', strtotime(substr($previousTime[1], 0, -1) . ':00 ' . substr($previousTime[1], -1) . 'm'));\n \n if($previousStartTime > $previousEndTime) {\n // This means schedule is next day shift\n //pr($previous_val);\n $cFlag = 0;\n $c_val[$i] = [\n 'department' => $previous_val['department'],\n 'subdepartment' => $previous_val['subdepartment'],\n 'time' => $previous_val['time'],\n 'is_first_call' => $previous_val['is_first_call'],\n 'is_attending' => $previous_val['is_attending'],\n ];\n } else {\n $cFlag = 1;\n }\n $i++;\n }\n \n if($cFlag) {\n continue;\n }\n }\n \n foreach ($c_val as $v_key => $v_val) {\n // change status of employee\n \n if (! empty($v_val['time'])) {\n $time = explode('-', $v_val['time']);\n \n $startTime = date('H:i', strtotime(substr($time[0], 0, -1) . ':00 ' . substr($time[0], -1) . 'm'));\n $endTime = date('H:i', strtotime(substr($time[1], 0, -1) . ':00 ' . substr($time[1], -1) . 'm'));\n \n $currentTime = date('H:i');\n \n $employee = $val->employee;\n \n if(strtotime($endTime) >= strtotime(date(\"H:i\")) && strtotime($endTime) <= strtotime(date(\"H:i\", strtotime('+10 minutes')))) {\n if(!empty($employee)) {\n $employee->is_consult = 0;\n $employee->working_time = '';\n $employee->is_first_call = 0;\n $employee->is_attending = 0;\n $employee->consult_availability_status = 0;\n $employee->dirty('modified', true);\n $this->Employees->save($employee);\n \n /* $this->HospitalsEmployees->deleteAll([\n 'employee_id' => $val->employee_id,\n 'hospital_id' => $val->hospital_id\n ]); */\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }", "public function states() {\n\t\t$this->loadModel('Data.States');\n\t\t$states = $this->States->find('all')->toArray();\n\n\t\t$this->set(compact('states'));\n\t\t$this->set('_serialize', ['states']);\n\t}", "public function setStage($value)\n {\n return $this->set(self::_STAGE, $value);\n }", "public function get_reject_stage($given_data) {\n\t\ttry {\n\t\t\t$prevStage = $this->opp_sales->fetch_reject_stage($given_data['stage_id']);\n\t\t\tif ($prevStage == null) {\n\t\t\t\t$error = array('error' => 'Something went wrong in fetching predefined stage.', 'name' => '');\n\t\t\t\techo json_encode(array('errors' => array(0=>$error), 'status' => false));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$old_stage_owner = $this->opp_sales->fetch_owner_stage($prevStage, $given_data['opportunity_id']);\n\n\t\t\t//$old_stage_manger_owner = $this->opp_sales->fetch_reporting_manager($old_stage_owner);\n\t\t\t//$old_stage_manger_owner = $old_stage_manger_owner[0]->manager_id;\n\n\t\t\t$oppo_attr = $this->opp_common->fetch_oppoAttr($given_data['opportunity_id']);\n\t\t\tif ($oppo_attr == null) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\t$changed_attr = array();\n\t\t\t/*if ($oppo_attr[0]->numbers != $given_data['stage_numbers']) {\n\t\t\t\t$changed_attr['opportunity_numbers'] = $given_data['stage_numbers'];\n\t\t\t}*/\n\t\t\tif ($oppo_attr[0]->close_date != $given_data['stage_closed_date']) {\n\t\t\t\t$changed_attr['opportunity_date'] = $given_data['stage_closed_date'];\n\t\t\t}\n\t\t\t/*if ($oppo_attr[0]->value != $given_data['stage_value']) {\n\t\t\t\t$changed_attr['opportunity_value'] = $given_data['stage_value'];\n\t\t\t}*/\n\t\t\tif ($oppo_attr[0]->rate != $given_data['stage_rate']) {\n\t\t\t\t$changed_attr['opportunity_rate'] = $given_data['stage_rate'];\n\t\t\t}\n\t\t\tif ($oppo_attr[0]->score != $given_data['stage_score']) {\n\t\t\t\t$changed_attr['opportunity_score'] = $given_data['stage_score'];\n\t\t\t}\n\t\t\tif ($oppo_attr[0]->customer_code != $given_data['stage_customer_code']) {\n\t\t\t\t$changed_attr['opportunity_customer_code'] = $given_data['stage_customer_code'];\n\t\t\t}\n\t\t\tif ($oppo_attr[0]->priority != $given_data['stage_priority']) {\n\t\t\t\t$changed_attr['opportunity_priority'] = $given_data['stage_priority'];\n\t\t\t}\n\t\t\tif ($oppo_attr[0]->stage != $prevStage) {\n\t\t\t\t$changed_attr['opportunity_stage'] = $prevStage;\n\t\t\t}\n\t\t\t$changed_attr['stage_owner_id'] = $old_stage_owner;\n\t\t\t//$changed_attr['stage_manager_owner_id'] = $old_stage_manger_owner;\n\t\t\t$this->opp_common->updateOpportunity($changed_attr, $given_data['opportunity_id']);\n\n\n\t\t\t$log_trans_data = array(\n\t\t\t\t'mapping_id' => $given_data['mapping_id'],\n\t\t\t\t'opportunity_id'=> $given_data['opportunity_id'],\n\t\t\t\t'lead_cust_id' => $given_data['lead_cust_id'],\n\t\t\t\t'from_user_id'=> $given_data['user_id'],\n\t\t\t\t'to_user_id'=> $given_data['user_id'],\n\t\t\t\t'cycle_id' => $given_data['cycle_id'],\n\t\t\t\t'stage_id' => $given_data['stage_id'],\n\t\t\t\t'module' => 'sales',\n\t\t\t\t'action' => 'rejected',\n\t\t\t\t'timestamp'=> date('Y-m-d H:i:s'),\n\t\t\t\t'sell_type' => $given_data['sell_type'],\n\t\t\t\t'remarks' => $given_data['stage_remarks'],\n\t\t\t);\n\t\t\t$insert=$this->opp_common->map_opportunity(array(0 => $log_trans_data)); //log into transaction table as stage changed\n\n\t\t\treturn array('errors' => array(), 'status' => $insert);\n\t\t} catch (LConnectApplicationException $e) {\n\t\t\techo $this->exceptionThrower($e);\n\t\t}\n\t}", "public function listEst() {\n // $user = \\App\\User::find($id);\n //$estabelecimentos = \\App\\Estabelecimento::whereIn(\"modalidade_id\", $categorias)->get();\n //$estabelecimentos = \\App\\Estabelecimento::whereIn(\"iser_id\", $usuarios)->get();\n $admin = \\App\\Admin::where('user_id', Auth::user()->id)->get();\n\n $lista = \\App\\Estabelecimento::\n where('status', 'Pendente')->get();\n \n $estabelecimentos = array();\n foreach($lista as $estabelecimento) {\n if($estabelecimento->endereco->cidade == $admin[0]->cidade->nome) {\n $estabelecimentos[] = $estabelecimento;\n }\n }\n // return dd($estabelecimentos);\n return view(\"estabelecimento.pending\")->with(['estabelecimentos' => $estabelecimentos]);\n }", "public function lastSpoolAction()\n {\n $arraySpool = array();\n\n try {\n\n // last spool SF3\n $lquery = new Query($this->container->getParameter(\"lavoisier01\"), 'OPSCORE_portal_spoolMail', 'lavoisier');\n $xml = simplexml_load_string($lquery->execute(), 'SimpleXMLElement', LIBXML_NOCDATA);\n\n $tabSpoolSF3 = json_decode(json_encode($xml), TRUE);\n\n\n $arraySpool[\"sf3 lavoisier01\"] = array(\n \"GenerationDate\" => trim(str_replace(\"[\", \"\", explode(\"]\", $tabSpoolSF3[\"entry\"])[0])),\n \"Sent\" => trim(explode(\"...\", $tabSpoolSF3[\"entry\"])[1])\n );\n\n $lquery = new Query($this->container->getParameter(\"lavoisierfr\"), 'OPSCORE_portal_spoolMail', 'lavoisier');\n $xml = simplexml_load_string($lquery->execute(), 'SimpleXMLElement', LIBXML_NOCDATA);\n\n $tabSpoolSF3 = json_decode(json_encode($xml), TRUE);\n\n\n $arraySpool[\"sf3 lavoisierfr\"] = array(\n \"GenerationDate\" => trim(str_replace(\"[\", \"\", explode(\"]\", $tabSpoolSF3[\"entry\"])[0])),\n \"Sent\" => trim(explode(\"...\", $tabSpoolSF3[\"entry\"])[1])\n );\n\n\n //last spool SF1\n $lquery = new Query($this->container->getParameter(\"lavoisier01\"), 'OPSCORE_portal_cron_sendMail', 'lavoisier');\n $xml = simplexml_load_string($lquery->execute(), 'SimpleXMLElement', LIBXML_NOCDATA);\n\n $tabSpoolSF1 = json_decode(json_encode($xml), TRUE);\n\n $arraySpool[\"sf1 lavoisier01\"] = array(\n \"GenerationDate\" => $tabSpoolSF1[\"GenerationDate\"],\n \"Sent\" => $tabSpoolSF1[\"Sent\"] . \" emails sent\"\n );\n\n $lquery = new Query($this->container->getParameter(\"lavoisierfr\"), 'OPSCORE_portal_cron_sendMail', 'lavoisier');\n $xml = simplexml_load_string($lquery->execute(), 'SimpleXMLElement', LIBXML_NOCDATA);\n\n $tabSpoolSF1 = json_decode(json_encode($xml), TRUE);\n\n $arraySpool[\"sf1 lavoisierfr\"] = array(\n \"GenerationDate\" => $tabSpoolSF1[\"GenerationDate\"],\n \"Sent\" => $tabSpoolSF1[\"Sent\"] . \" emails sent\"\n );\n\n\n return $this->render(\":backend/Home:lastSpool.html.twig\", array(\"tabSpool\" => $arraySpool));\n\n } catch (\\Exception $e) {\n return $this->render(\":backend/Home:lastSpool.html.twig\", array(\"error\" => $e->getMessage()));\n }\n\n }", "function update_final_stage( $conds = array() )\n\t{\n\n\t\t$sql = \"UPDATE rt_transactions_status SET final_stage = '0' WHERE id != '\". $conds['id'] .\"' \";\n\t\t\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query;\n\t\t\n\t}", "public function state_list(){\n $entity_manager = $this->getEntityManager(); //access entity manager from inside the repository\n try{\n $query = $entity_manager->createQuery('SELECT s.name FROM UsersUserManageBundle:state s ');\n return $query->getArrayResult( ); // array of state objects\n throw new \\Exception( 'Database error in :: _state_list() function in UsermanageController' );\n }catch( \\Exception $e ){\n \n }\n }", "public function run()\n {\n DB::table('children_status')->delete();\n DB::table('children_status')->insert([\n [\n \t'id' =>'1',\n 'id_children' =>'1',\n 'id_program' =>'1',\n \t'in' =>'2020-01-01 16:52:33',\n \t'out' =>null,\n \t'absent' =>null,\n \t'status' =>'1',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'2',\n 'id_children' =>'2',\n 'id_program' =>'2',\n \t'in' =>null,\n \t'out' =>'2020-01-01 16:52:33',\n \t'absent' =>null,\n \t'status' =>'2',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'3',\n 'id_children' =>'3',\n 'id_program' =>'3',\n \t'in' =>null,\n \t'out' =>null,\n \t'absent' =>'2020-01-01 16:52:33',\n \t'status' =>'3',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'4',\n 'id_children' =>'4',\n 'id_program' =>'4',\n \t'in' =>'2020-01-01 16:52:33',\n \t'out' =>null,\n \t'absent' =>null,\n \t'status' =>'1',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'5',\n 'id_children' =>'5',\n 'id_program' =>'5',\n \t'in' =>null,\n \t'out' =>'2020-01-01 16:52:33',\n \t'absent' =>null,\n \t'status' =>'2',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'6',\n 'id_children' =>'6',\n 'id_program' =>'1',\n \t'in' =>null,\n \t'out' =>null,\n \t'absent' =>'2020-01-01 16:52:33',\n \t'status' =>'3',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'7',\n 'id_children' =>'7',\n 'id_program' =>'2',\n \t'in' =>'2020-01-01 16:52:33',\n \t'out' =>null,\n \t'absent' =>null,\n \t'status' =>'1',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'8',\n 'id_children' =>'8',\n 'id_program' =>'3',\n \t'in' =>null,\n \t'out' =>'2020-01-01 16:52:33',\n \t'absent' =>null,\n \t'status' =>'2',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'9',\n 'id_children' =>'9',\n 'id_program' =>'4',\n \t'in' =>null,\n \t'out' =>null,\n \t'absent' =>'2020-01-01 16:52:33',\n \t'status' =>'3',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n [\t\n \t'id' =>'10',\n 'id_children' =>'10',\n 'id_program' =>'5',\n \t'in' =>'2020-01-01 16:52:33',\n \t'out' =>null,\n \t'absent' =>null,\n \t'status' =>'1',\n \t\n 'active' =>'0',\n 'created_at' =>'2020-01-01 16:52:33',\n 'updated_at' =>'2020-01-01 16:52:33',\n ],\n ]);\n }", "function getMainActions(){\n $step = $this->getStep($this->listing->user_id);\n $data=[];\n\n /**\n * Hide buttons when listing is not on steps\n */\n if(isset($step) && $step->date_end != '0000-00-00 00:00:00')\n {\n /**\n * APPROVE AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_ACTIVE)\n {\n $data[]=[\n /** Approve and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_approve_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-approve action-btn',\n ];\n }\n /**\n * REJECT AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->featured == \\Orm\\Model\\Listings\\Listings::NOT_FEATURED){\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_DELETED)\n {\n $data[]=[\n /** REJECT and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_reject_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-reject action-btn',\n ];\n }\n }\n return $data;\n }\n }", "public function run()\n {\n InterviewStage::truncate();\n\n InterviewStage::create([\n 'title' => 'Telephonic',\n 'i_order' => 1\n ]);\n\n InterviewStage::create([\n 'title' => 'Technical',\n 'i_order' => 2,\n ]);\n\n InterviewStage::create([\n 'title' => 'HR',\n 'i_order' => 3\n ]);\n }", "public function saveList()\n {\n JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n $ordering = $this->input->get('ordering', array(), 'array');\n\n // Get the model.\n $model = $this->getModel();\n\n // Change the state of the records.\n if (!$model->savelist($ordering))\n {\n JError::raiseWarning(500, $model->getError());\n }\n\n $this->setRedirect('index.php?option=com_dmnd_team&view=team');\n }", "public function getStagesAt($offset)\n {\n return $this->get(self::_STAGES, $offset);\n }", "public function retrieveStageData(Request $request, TranslatorInterface $translator){\n $stgId = $request->get('id');\n $em = $this->em;\n $locale = $request->getLocale();\n $repoET = $em->getRepository(EventType::class);\n $repoEG = $em->getRepository(EventGroup::class);\n $currentUser = $this->user;\n $org = $this->org;\n /** @var Stage */\n $stage = $em->getRepository(Stage::class)->find($stgId);\n $activity = $stage->getActivity();\n $isSelfStage = $activity->getOrganization() == $currentUser->getOrganization();\n $data['if'] = $stage->getUserMasters()->exists(fn(int $i, UserMaster $m) => $m->getProperty() == 'followableStatus' && $m->getType() == UserMaster::ADDED && $m->getUser() == $this->user);\n $data['ap'] = (int) $isSelfStage;\n $data['ms'] = $activity->getStages()->count() > 1;\n $data['aname'] = $activity->getName();\n $data['name'] = $stage->getName();\n $data['progress'] = $stage->getProgress();\n $data['sdate'] = $stage->getStartdate();\n $data['edate'] = $stage->getEnddate();\n $visibility = $stage->getVisibility();\n $data['v'] = $visibility;\n switch($visibility){\n case -1: \n $data['vm'] = $translator->trans('activity_elements.visibility.private');\n break;\n case 0:\n $data['vm'] = $translator->trans('activity_elements.visibility.unlisted');\n break;\n case 1:\n $data['vm'] = $translator->trans('activity_elements.visibility.public');\n break;\n }\n\n $data['link'] = $stage->getAccessLink();\n $data['fs'] = $stage->getFollowableStatus();\n $data['js'] = $stage->getJoinableStatus();\n\n\n foreach($stage->getEvents() as $event){\n $evtData = [];\n $evtData['id'] = $event->getId();\n /** @var EventGroup */\n $eventGroup = $event->getEventType()->getEventGroup();\n /** @var EventType */\n $eventType = $event->getEventType();\n $evtData['evgId'] = $eventGroup->getEventGroupName()->getId();\n $evtData['evg'] = $repoEG->getDTrans($eventGroup, $locale, $org);\n $evtData['evt'] = $repoET->getDTrans($eventType, $locale, $org);\n $evtData['odate'] = $event->getOnsetDate()->diff(new DateTime)->d > 5 ? $event->getOnsetDate() : $event->nicetime($event->getOnsetDate(), $locale);\n $evtData['rdate'] = $event->getExpResDate() == null ? null : ($event->getExpResDate()->diff(new DateTime)->d > 5 ? $event->getExpResDate() : $event->nicetime($event->getExpResDate(),$locale));\n $evtData['nbdocs'] = $event->getDocuments()->count();\n $evtData['nbcoms'] = $event->getComments()->count();\n $evtData['oid'] = $event->getOrganization()->getId();\n $data['events'][] = $evtData;\n }\n\n foreach($stage->getUniqueParticipations() as $participant){\n $user = $participant->getUser();\n $partData = [];\n $partData['id'] = $participant->getId();\n $partData['fullname'] = $user->getFullname();\n $externalUser = $participant->getExternalUser();\n $isSynthetic = $user->isSynthetic();\n $isPrivate = $user->getOrganization()->getType() == 'C';\n if($externalUser){\n $clientName = $externalUser->getClient()->getName();\n if(!$isSynthetic && !$isPrivate){\n $partData['fullname'] .= \" ($clientName)\";\n } else {\n $partData['fullname'] = $clientName;\n }\n }\n $partData['synth'] = $isSynthetic;\n $partData['priv'] = $isPrivate;\n $partData['picture'] = $isSynthetic ? '/lib/img/org/no-picture.png' : (\n $user->getPicture() ? '/lib/img/user/'.$user->getPicture() : (\n $isPrivate ? '/lib/img/user/no-picture-i.png' : '/lib/img/user/no-picture.png'\n )\n );\n if($org != $user->getOrganization()){\n $partData['firmLogo'] = $user->getOrganization()->getOrganizationLogo();\n }\n $data['participants'][] = $partData;\n }\n $data['nbParticipants'] = $stage->getUniqueParticipations()->count();\n\n if($isSelfStage){\n foreach($stage->getFollowerMasters() as $followerMaster){\n $follower = $followerMaster->getUser();\n $followerData['id'] = $followerMaster->getId();\n $followerData['fullname'] = $follower->getFullname();\n $followerOrganization = $follower->getOrganization();\n $isPrivate = $followerOrganization->getType() == 'C';\n if($followerOrganization != $this->org){\n $orgName = $followerOrganization->getCommname();\n $followerData['fullname'] .= \" ($orgName)\";\n }\n\n $followerData['priv'] = $isPrivate;\n $followerData['picture'] = $follower->getPicture() ? '/lib/img/user/'.$follower->getPicture() : (\n $isPrivate ? '/lib/img/user/no-picture-i.png' : '/lib/img/user/no-picture.png'\n );\n if($followerOrganization != $user->getOrganization()){\n $followerData['firmLogo'] = $follower->getOrganization()->getOrganizationLogo();\n }\n $data['followers'][] = $followerData;\n }\n }\n $data['nbFollowers'] = $stage->getFollowerMasters()->count();\n \n return new JsonResponse($data, 200);\n }", "public function onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "public function getStates() {\n $stateList = array();\n \n if (!empty($this->billing_country)) {\n /*\n * PCM\n */\n $stateList = Subregion::model()->findAll('region_id=\"' . $this->billing_country . '\"');\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n \n }\n return $stateList;\n }", "function usergenviz_list_saved($viztype = '') {\n global $user;\n $page_contents = \"\";\n\n switch ($viztype) {\n case 'timeline':\n $saveditems = usergenviz_get_saved($user->uid, 'timeline');\n break; \n\n case 'map':\n $saveditems = usergenviz_get_saved($user->uid, 'map');\n break;\n }\n\n $links = array();\n foreach ($saveditems as $saveditem) {\n $params = unserialize($saveditem['usergen_timeline_saved_value']);\n\n $url = url('usergen/' . $viztype . '/results') . \"?\" . http_build_query($params);\n\n\n $alltypes = usergenviz_getcontenttypes();\n\n $type_name = $alltypes[$params['types']]['name'];\n unset($alltypes);\n\n $datasource_info = usergenviz_getfields($params['sources']);\n $datasource_name = $datasource_info['widget']['label'];\n unset($datasource_info);\n\n $criteria = sprintf(t(\"Pages of type %s, using the data source %s\"), $type_name, $datasource_name);\n if (isset($params['fromdate'])) {\n $criteria .= \" \" . sprintf(t(\"from %s\"), $params['fromdate']);\n }\n if (isset($params['todate'])) {\n $criteria .= \" \" . sprintf(t(\"to %s\"), $params['todate']);\n }\n\n $links[$i]['save'] = '<a href=\"' . $url . '\">' . $criteria . '</a>';\n $links[$i]['delete'] = '<a href=\"' . url('usergen/' . $viztype . '/remove') . '?' . http_build_query($params) . '\" title=\"' . t('Forget this {$viztype}') . '\">[x]</a>';\n $i++;\n }\n\n if (sizeof($links) > 0) {\n $page_contents .= '<ul id=\"saved_' . $viztype . ' class=\"list\">';\n foreach ($links as $link) {\n $page_contents .= \"<li>{$link['save']} {$link['delete']}</li>\";\n }\n $page_contents .= \"</ul>\";\n }\n else {\n $page_contents .= \"<p>\" . t('No saved timelines found.') . ' <a href=\"' . url('usergen/timeline') . '\">' . t('Build another timeline') . '?</a></p>';\n }\n\n return $page_contents;\n\n}" ]
[ "0.70892614", "0.6348238", "0.6318034", "0.62402135", "0.6226621", "0.60704273", "0.5999854", "0.5876861", "0.5765171", "0.5738177", "0.5727698", "0.5699537", "0.56575656", "0.5510848", "0.5504459", "0.5483624", "0.54623294", "0.5440239", "0.54125994", "0.5357903", "0.5318252", "0.53149325", "0.5298995", "0.5241579", "0.5222295", "0.5217445", "0.52163947", "0.5199225", "0.51962686", "0.5184786", "0.5181559", "0.51260066", "0.50137377", "0.5002056", "0.49718335", "0.49701956", "0.49577075", "0.49394828", "0.49283007", "0.49276996", "0.48961014", "0.4885201", "0.48562306", "0.48436102", "0.48170722", "0.4808512", "0.47923794", "0.47698194", "0.47343543", "0.47327557", "0.47173703", "0.4716179", "0.47109765", "0.4699235", "0.46942508", "0.46924335", "0.46883878", "0.46880347", "0.46792018", "0.46736354", "0.46674597", "0.46568814", "0.46506763", "0.46367198", "0.46316516", "0.46305633", "0.46260956", "0.4624595", "0.46234944", "0.4604895", "0.45959517", "0.45942914", "0.45889777", "0.4576495", "0.45680773", "0.45676813", "0.45590258", "0.45569244", "0.45532638", "0.45495552", "0.45475352", "0.45471275", "0.4545376", "0.45441648", "0.45429978", "0.45397002", "0.4538609", "0.45359626", "0.45328572", "0.45245826", "0.45145372", "0.4504612", "0.44879794", "0.44850656", "0.4484769", "0.4483099", "0.44805494", "0.44805494", "0.44805494", "0.4479924", "0.44750288" ]
0.0
-1
Display a listing of the resource.
public function index() { return new PriceCollection(Price::orderBy('id', 'desc')->take(20)->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 index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "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 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 showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\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 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 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 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 view('admin.resources.index');\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\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.7446737", "0.73625076", "0.7300871", "0.72476006", "0.7163127", "0.7149414", "0.7131995", "0.7105663", "0.7102927", "0.7101388", "0.704981", "0.69946545", "0.69897777", "0.6935023", "0.690029", "0.68989694", "0.68925905", "0.68878543", "0.6866467", "0.6849924", "0.6829784", "0.68033314", "0.67971504", "0.6796001", "0.6786942", "0.6760321", "0.6743112", "0.6730776", "0.67266184", "0.67259544", "0.67259544", "0.67259544", "0.671818", "0.670783", "0.670644", "0.6704464", "0.6665842", "0.6663898", "0.6660563", "0.6660198", "0.6657512", "0.6654405", "0.6648237", "0.6620824", "0.6619237", "0.6618058", "0.66072917", "0.660077", "0.6600677", "0.6594786", "0.6587929", "0.65850085", "0.65824693", "0.6581521", "0.6577045", "0.6574634", "0.65729445", "0.65715027", "0.6570646", "0.6565125", "0.6563328", "0.6553843", "0.6553201", "0.6545921", "0.6537198", "0.6534121", "0.6533748", "0.65272135", "0.6526431", "0.6525868", "0.6519198", "0.65185314", "0.6517867", "0.65170157", "0.651509", "0.65070677", "0.6505637", "0.65033627", "0.6494597", "0.6492147", "0.64880013", "0.64871716", "0.6485315", "0.6485215", "0.64790684", "0.64767736", "0.64725083", "0.64709103", "0.64702755", "0.6466392", "0.64618254", "0.646148", "0.64601135", "0.6458744", "0.64543813", "0.64537513", "0.64530194", "0.6450726", "0.64492655", "0.6449169", "0.64466155" ]
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 //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\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 return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\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 $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\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 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 create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\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}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $price = Price::create($request->all()); return new PriceResource($price); }
{ "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(Price $price) { // }
{ "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(Price $price) { // }
{ "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, Price $price) { // }
{ "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(Price $price) { // }
{ "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
Display a listing of the resource.
public function index(Request $request) { $url = config('console.create_talent_url'); $qrImg = QrCode::format('png')->margin(0)->size(130)->generate($url, public_path('img/qrcode.png')); $type = $request->get('type', ''); if ($type == 'download') { header("Content-Disposition: attachment; filename=qrcode.png"); // 告诉浏览器通过附件形式来处理文件 header('Content-Length: ' . filesize(public_path('img/qrcode.png'))); // 下载文件大小 readfile(public_path('img/qrcode.png')); // 读取文件内容 }else { return config('console.web_index').'img/qrcode.png'; } }
{ "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 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 actionRestList() {\n\t $this->doRestList();\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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\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 index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\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 return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "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}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "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 $items = Item::all();\n return view('items::list_items',compact('items'));\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 // 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 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 showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\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 actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\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 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 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 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 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 $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
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) { // }
{ "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($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 }", "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($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(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\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 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() {\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($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($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 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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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 $data = Restful::find($id);\n return view('restful.edit', compact('data'));\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 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.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
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 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) { // }
{ "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
Show the application registration form.
public function showRegistrationForm(Request $request) { if($request->allow_register == 1){ return view('auth.register'); }else{ return view('index'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showRegistrationForm()\n {\n abort_unless(config('access.registration'), 404);\n\n return view('frontend.auth.register');\n }", "public function showRegistrationForm()\n {\n return view('skins.' . config('pilot.SITE_SKIN') . '.auth.register');\n }", "public function showRegistrationForm() {\n //parent::showRegistrationForm();\n $data = array();\n\n $data = $this->example_of_user();\n $data['title'] = 'RegisterForm';\n\n return view('frontend.auth.register', $data);\n }", "public function showRegistrationForm()\n {\n $askForAccount = false;\n return view('client.auth.register',compact(\"askForAccount\"));\n }", "public function showRegisterForm()\n {\n return view('ui.pages.register');\n }", "public function showRegistrationForm()\n {\n return view('adminlte::auth.register');\n }", "public function showRegistrationForm()\n {\n return view('laboratorio.auth.register');\n \n }", "public function showRegistrationForm()\n {\n return view('privato.auth.register');\n }", "public function showRegistrationForm()\n\t{\n\t\t$data = [];\n\t\t\n\t\t// References\n\t\t$data['countries'] = CountryLocalizationHelper::transAll(CountryLocalization::getCountries());\n\t\t$data['genders'] = Gender::trans()->get();\n\t\t\n\t\t// Meta Tags\n\t\tMetaTag::set('title', getMetaTag('title', 'register'));\n\t\tMetaTag::set('description', strip_tags(getMetaTag('description', 'register')));\n\t\tMetaTag::set('keywords', getMetaTag('keywords', 'register'));\n\t\t\n\t\t// return view('auth.register.indexFirst', $data);\n\t\treturn view('auth.register.index', $data);\n\n\t}", "public function showRegistrationForm()\n {\n return view('admin.auth.register');\n }", "public function showRegisterForm()\n {\n return view('estagiarios.auth.register');\n }", "public function showRegistrationForm()\n {\n return view('instructor.auth.register');\n }", "public function showRegistrationForm()\n {\n return view('auth.register');\n }", "public function showRegistrationForm()\n {\n $navList = Nav::getMenuTree(Nav::orderBy('sort', 'asc')->get()->toArray());\n $categories = Category::getMenuTree(Category::orderBy('sort', 'asc')->select('id', 'name', 'pid')->get()->toArray());\n View::share([\n 'nav_list' => $navList,\n 'category_list' => $categories,\n ]);\n return view('auth.register');\n }", "public function showForm()\n {\n return view('auth.register-step2');\n }", "public function showRegistrationForm()\n {\n return view('frontend.user_registration');\n }", "public function showRegisterForm()\n {\n return view('dashboard.user.registerForm');\n }", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "public function registration()\n {\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->display();\n }", "public function showRegisterForm(){\n return view('frontend.register');\n }", "public function showRegistrationForm()\n {\n return view('Registration View');\n }", "public function registerForm()\n {\n return view('register', [\n 'titlePart' => '| Register',\n ]);\n }", "public function ShowRegistrationForm(){\n return view('Auth.register');\n }", "public function showRegisterForm(){\n return view('auth.entreprise-register');\n }", "public function showRegistrationForm()\n {\n //Custom code here\n return view('auth.register')->with('packages', Package::all()->where('status', 1));\n }", "public function showRegistrationForm()\n {\n if (property_exists($this, 'registerView')) {\n return view($this->registerView);\n }\n\n $roles = Role::assignable()->orderBy('id')->get();\n return view('auth.register', compact('roles'));\n }", "function showform(){\n return view('registration');\n }", "public function showRegistrationForm()\n {\n return view('auth.officer-register');\n }", "public function showRegistrationForm()\n {\n $countries = Country::all();\n $counties = County::all();\n $nationalities = Nationality::all();\n\n return view('auth.register', compact('countries', 'counties', 'nationalities'));\n }", "public function showRegistrationForm()\n {\n // get all roles expet root.\n $roles = Role::where('name', '!=', 'root')->get();\n $specialties = Specialty::all();\n\n return view('auth.register')->with([\n 'roles' => $roles, \n 'specialties' => $specialties\n ]);\n }", "public function showRegistrationForm()\n {\n $countries = Country::getCountries();\n\n return view('auth.register', compact('countries'));\n }", "public function showRegistrationForm()\n {\n return view('user.auth.login');\n }", "public function showAdminRegisterForm()\n {\n return view('admin.register');\n }", "public function showRegistrationForm()\n {\n return view('signup');\n }", "public function showregistrationform(){\n return view('register');\n }", "public function showRegistrationForm()\n {\n return redirect()->route('frontend.account.register');\n //return theme_view('account.register');\n }", "public function showRegistrationForm()\n {\n $groups = Group::all();\n return view('auth.register', compact('groups'));\n }", "private function _registerForm()\n\t{\n\t\tglobal $MySmartBB;\n\t\t\n\t\t$MySmartBB->func->showHeader( $MySmartBB->lang[ 'template' ][ 'registering' ] );\n\t\t\n\t\t$MySmartBB->plugin->runHooks( 'register_main' );\n\t\t\n\t\t$MySmartBB->template->display( 'register' );\n\t}", "public function showRegistrationForm()\n {\n $jurusan = \\App\\Models\\Jurusan::where('active', 1)->get();\n return view('auth.register', ['jurusan' => $jurusan]);\n }", "public function showRegisterForm() {\n return view('seller.registerSeller');\n }", "public function formRegister(){\n $this->view->registerForm();\n }", "public function showReg()\n {\n //show the form\n if (Auth::check())\n {\n return Redirect::route('account');\n }\n\n // Show the page\n return View::make('account.reg');\n }", "public function showRegistration()\n\t{\n\t\t# if the user is already authenticated then they can't register and they can't log in\n\t\t# so get them out of here.\n\t\tif( userIsAuthenticated() ) {\n\t\t\treturn Redirect::to('profile');\n\t\t}\n\n\t\t# if we get here then forget the redirect value as the user has used the global sign in link\n\t\t# and we won't need to take them anywhere specific after authentication\n\t\tSession::forget('previousPage');\n\n\t\t# error vars, something went wrong!\n\t\tif(Session::has('registration-errors')) {\n\t\t\t$errors = reformatErrors(Session::get('registration-errors')['errors']);\n\t\t\t$message = Session::get('registration-errors')['public'];\n\t\t\t$messageClass = \"danger\";\n\n\t\t\t# grab the old form data\n\t\t\t$input = Input::old();\n\t\t}\n\n\t\t# indicate what we're on to the view. This is used to prevent the auth/register pop up\n\t\t# when viewing these pages\n\t\t$page = \"register\";\n\n\t\t$pageTitle = \"Register\";\n\n\t\treturn View::make('register.index', compact('errors', 'message', 'messageClass', 'input', 'form', 'page', 'pageTitle'));\n\t}", "public function showRegistrationForm()\n {\n $tiposDocumento = TipoDocumento::orderBy('nombre')->get();\n $perfiles = Perfil::orderBy('nombre')->get();\n $bodegas = Bodega::orderBy('nombre')->get();\n return view('auth.register') -> with( compact('tiposDocumento','perfiles','bodegas') );\n }", "public function showRegister()\n {\n return view('my_register');\n }", "public function showRegistrationForm()\n {\n if(Role::first()){\n $role = Role::pluck('name', 'id')->toArray();\n return view('Admin::auth.register', compact('role'));\n }else{\n return redirect()->route('admin.createRole');\n }\n }", "public function registrationForm() {\n\n }", "public function showSignUpForm() {\n if(!config('springintoaction.signup.allow')) {\n return view('springintoaction::frontend.signup_closed');\n }\n\n return view('springintoaction::frontend.signup');\n }", "public function index()\n {\n return view('registration_form');\n }", "public function showSignupForm()\n {\n return view('auth.signup');\n }", "public function showSignupForm()\n {\n return view('auth.signup');\n }", "public function showRegistrationForm()\n {\n $roles = Role::orderBy('name','asc')->whereNotIn('name',array('Administrator'))->get();\n return view('auth.register',compact('roles'));\n }", "public function getRegistrationForm()\n {\n \treturn view('auth.institute_register'); \n }", "public function showRegistrationForm()\n { \n $rooms = DB::table('rooms')->get();\n return view('auth.register', compact('rooms'));\n }", "public function registerForm(): Response\n {\n $this->init('You\\'r already loggedIn', '/chatroom');\n return $this->render('register.html.twig');\n }", "public function signupForm()\n {\n \t# code...\n \treturn view(\"external-pages.sign-up\");\n }", "public function getRegistrationForm()\n\t{\n\n\t}", "public function registration() {\n return view('auth.registration');\n }", "public function showSalesRegistrationForm()\n {\n return view('auth.sales-register');\n }", "public function registration()\n {\n return view('auth.registration');\n }", "public function showSignupForm()\n {\n return view('signup');\n }", "public function showRegistrationForm()\n {\n $country = DB::table('countries')->get();\n return view('auth.register',['country' => $country]);\n }", "public function showUserCreationForm()\n {\n return view('admin.user_create');\n }", "public function registration()\n {\n return view('register');\n }", "public function register()\n\t{\n\t\treturn View::make('user.register');\n\t}", "function viewSignUpForm() {\n\t$view = new viewModel();\n\t$view->showSignUpForm();\t\n}", "public function register()\n {\n return view('admin.auth.register');\n }", "public function register()\n {\n return view('main.auth.register');\n }", "public function register()\n\t{\n\t\treturn View::make('auth.register');\n\t}", "public function showRegistrationForm()\n {\n $roles=Roles::orderBy('id','asc')->paginate(10);\n return view('auth.register',compact('roles'));\n }", "public function register()\n {\n return view('Admin.login.register');\n }", "public function viewRegistration()\n {\n $config = $this->config;\n\n if (Auth::check()) {\n return redirect()->route('admin.dashboard');\n }\n\n return view('auth.registration', compact('config'));\n }", "public function getRegister()\n {\n return $this->showRegistrationForm();\n }", "public function getRegister()\n {\n return $this->showRegistrationForm();\n }", "public function getRegisterView() {\n\t\t$header = $this->loginView->getHTMLForm();\n\t\t$body = $this->registerView->getHTMLForm();\n\t\t$footer = \"\";\n\t\treturn new \\common\\view\\Page(\"Bildblogg - registrera användare\", $header, $body, $footer);\n\t}", "private static function printRegForm() {\n\t\t\tinclude 'engine/values/site.values.php';\n\t\t\tif($site_reg_open){\n\t\t\techo \"<form action=\\\"?module=handler&action=registration\\\" method=\\\"post\\\">\n\t\t\t\t <div class=\\\"form_settings\\\">\n\t\t\t\t \t<center><h2>\".strip_tags($site_title).\" - Registration</h2></center>\n\t\t\t\t \t<br>\n\t\t\t\t <p><span>Email</span><input type=\\\"text\\\" name=\\\"email1\\\" tabindex=\\\"1\\\" class=\\\"contact\\\"/></p>\n\t\t\t\t <p><span>Confirm email</span><input type=\\\"text\\\" name=\\\"email2\\\" tabindex=\\\"2\\\" class=\\\"contact\\\"/></p>\n\t\t\t\t <p><span>Name</span><input type=\\\"text\\\" name=\\\"name\\\" tabindex=\\\"3\\\" class=\\\"contact\\\"/></p>\n\t\t\t\t <p><span>Password</span><input type=\\\"password\\\" name=\\\"password1\\\" tabindex=\\\"4\\\" class=\\\"contact\\\"/></p>\n\t\t\t\t <p><span>Confirm password</span><input type=\\\"password\\\" name=\\\"password2\\\" tabindex=\\\"5\\\" class=\\\"contact\\\"/></p>\n\t\t\t\t <p><span>User agreement</span><textarea class=\\\"contact textarea\\\" name=\\\"useragreement\\\" readonly=\\\"readonly\\\">\".file_get_contents('engine/values/user.agreement.txt').\"</textarea></p>\n\t\t\t\t <p>By pressing submit you agree to the user agreement above.</p>\n\t\t\t\t <p style=\\\"padding-top: 15px\\\"><span>&nbsp;</span><input class=\\\"submit\\\" type=\\\"submit\\\" tabindex=\\\"6\\\" name=\\\"contact_submitted\\\" value=\\\"Submit\\\" /></p>\n\t\t\t\t </div>\n\t\t\t\t</form>\";\n\t\t\t} else {\n\t\t\t\techo \"Registration is currently closed. For more information contact the administrators.\";\n\t\t\t}\n\t\t}", "public function registerFamilyAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authRegisterParent' );\n }", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "public function showRegistrationForm()\n {\n return redirect('login');\n }", "public function index()\n {\n return view('partials.registrationForm');\n }", "public function registration()\n\t{\n\t\t$this->load->view('register');\n }", "public function form_register()\n {\n $roles = Role::all(); \n return view('auth.register', compact('roles'));\n }", "public function regi_form() {\n $template = $this->loadView('registration_page');\n // $template->set('result', $error);\n $template->render();\n }", "public function register()\n {\n return View::make('users.register');\n }", "public function register()\n {\n return view('form');\n }", "public function create()\n {\n return view('admin.auth.register');\n }", "public function create()\n {\n return view('admin.auth.register');\n }", "public function showSignup()\n\t{\n\t\treturn View::make('signup');\n\t}", "function register()\n {\n // Create our Application instance (necessary to request Facebook data)\n $facebook = new Facebook(array(\n 'appId' => FACEBOOK_LOGIN_APP_ID,\n 'secret' => FACEBOOK_LOGIN_APP_SECRET,\n ));\n\n $redirect_url_after_facebook_auth = URL . 'login/registerwithfacebook';\n // hard to explain, read the Facebook PHP SDK for more\n // basically, when the user clicks the Facebook register button, the following arguments will be passed\n // to Facebook: In this case a request for getting the email (not shown by default btw) and the URL\n // when facebook will send the user after he/she has authenticated\n $this->view->facebook_login_url = $facebook->getLoginUrl(array(\n 'scope' => 'email',\n 'redirect_uri' => $redirect_url_after_facebook_auth\n ));\n\n $this->view->render('login/register');\n }", "public function index()\n\t{\n\t\t$title = \"Register\";\n\n\t\treturn view('auth.register', compact('title'));\n\t}", "function register() {\n\n/* ... this form is not to be shown when logged in; if logged in just show the home page instead (unless we just completed registering an account) */\n if ($this->Model_Account->amILoggedIn()) {\n if (!array_key_exists( 'registerMsg', $_SESSION )) {\n redirect( \"mainpage/index\", \"refresh\" );\n }\n }\n\n/* ... define values for template variables to display on page */\n $data['title'] = \"Account Registration - \".$this->config->item( 'siteName' );\n\n/* ... set the name of the page to be displayed */\n $data['main'] = \"register\";\n\n/* ... complete our flow as we would for a normal page */\n $this->index( $data );\n\n/* ... time to go */\n return;\n }", "public function create()\n {\n return view('register.form');\n }", "function register(){\n\t\treturn view(\"pages.index.register\");\n\t}", "public function register()\n {\n return view('frontend.register');\n }", "public function showForm()\n\t{\n echo view($this->config->views['login']);\n\t}", "public function index()\n {\n return view('auth.register');\n }", "public function getRegister()\n\t{\n\t\treturn \\View::make('company.auth.register');\n\t}", "public function getRegister()\n {\n return view(\"Home::auth.register\");\n }", "function register(){\n\n return view('auth.register');\n }", "public function actionView()\n {\n \t$model=new RegisterForm();\n \treturn $this->renderPartial('/registration/register',array('model'=>$model));\n }", "function RegistrationForm() {\n\t\t$data = Session::get(\"FormInfo.Form_RegistrationForm.data\");\n\n\t\t$use_openid =\n\t\t\t($this->getForumHolder()->OpenIDAvailable() == true) &&\n\t\t\t(isset($data['IdentityURL']) && !empty($data['IdentityURL'])) ||\n\t\t\t(isset($_POST['IdentityURL']) && !empty($_POST['IdentityURL']));\n\n\t\t$fields = singleton('Member')->getForumFields($use_openid, true);\n\n\t\t// If a BackURL is provided, make it hidden so the post-registration\n\t\t// can direct to it.\n\t\tif (isset($_REQUEST['BackURL'])) $fields->push(new HiddenField('BackURL', 'BackURL', $_REQUEST['BackURL']));\n\n\t\t$validator = singleton('Member')->getForumValidator(!$use_openid);\n\t\t$form = new Form($this, 'RegistrationForm', $fields,\n\t\t\tnew FieldList(new FormAction(\"doregister\", _t('ForumMemberProfile.REGISTER','Register'))),\n\t\t\t$validator\n\t\t);\n\n\t\t// Guard against automated spam registrations by optionally adding a field\n\t\t// that is supposed to stay blank (and is hidden from most humans).\n\t\t// The label and field name are intentionally common (\"username\"),\n\t\t// as most spam bots won't resist filling it out. The actual username field\n\t\t// on the forum is called \"Nickname\".\n\t\tif(ForumHolder::$use_honeypot_on_register) {\n\t\t\t$form->Fields()->push(\n\t\t\t\tnew LiteralField(\n\t\t\t\t\t'HoneyPot',\n\t\t\t\t\t'<div style=\"position: absolute; left: -9999px;\">' .\n\t\t\t\t\t// We're super paranoid and don't mention \"ignore\" or \"blank\" in the label either\n\t\t\t\t\t'<label for=\"RegistrationForm_username\">' . _t('ForumMemberProfile.LeaveBlank', 'Don\\'t enter anything here'). '</label>' .\n\t\t\t\t\t'<input type=\"text\" name=\"username\" id=\"RegistrationForm_username\" value=\"\" />' .\n\t\t\t\t\t'</div>'\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$member = new Member();\n\n\t\t// we should also load the data stored in the session. if failed\n\t\tif(is_array($data)) {\n\t\t\t$form->loadDataFrom($data);\n\t\t}\n\n\t\t// Optional spam protection\n\t\t$form->enableSpamProtection();\n\n\t\treturn $form;\n\t}" ]
[ "0.8297065", "0.8129581", "0.80603653", "0.80266684", "0.799944", "0.7991334", "0.79490364", "0.7943822", "0.7927548", "0.7884847", "0.7865486", "0.78399515", "0.7831668", "0.7810182", "0.7768593", "0.7721173", "0.77126104", "0.7705905", "0.7700533", "0.7687983", "0.7687317", "0.7664321", "0.76229894", "0.7612647", "0.760388", "0.7570235", "0.75617176", "0.7538868", "0.75342345", "0.75296795", "0.75271606", "0.7505018", "0.7429727", "0.74159354", "0.7415824", "0.7403257", "0.7397781", "0.7393836", "0.73242694", "0.7277446", "0.7268252", "0.72621596", "0.7207488", "0.7172451", "0.7166539", "0.71533144", "0.7146139", "0.7132442", "0.7081848", "0.7069249", "0.7069249", "0.70675105", "0.70569783", "0.70526695", "0.70346606", "0.70136553", "0.7000505", "0.69868505", "0.6979945", "0.69669676", "0.6959301", "0.695743", "0.69277936", "0.6917276", "0.6916973", "0.6887431", "0.6882441", "0.68824387", "0.6880349", "0.6867516", "0.6836969", "0.6835146", "0.6819448", "0.6819448", "0.68158126", "0.68061495", "0.6802297", "0.67885154", "0.6783061", "0.6779848", "0.6773178", "0.6767527", "0.67665184", "0.6761487", "0.6756428", "0.6751873", "0.6751873", "0.6738009", "0.6735529", "0.6726485", "0.6725998", "0.6720303", "0.6708419", "0.67053854", "0.67035246", "0.6697786", "0.6695409", "0.668315", "0.6682737", "0.6682413", "0.667716" ]
0.0
-1
Handle a registration request for the application.
public function register(Request $request) { $this->validator($request->all())->validate(); event(new Registered($user = $this->create($request->all()))); /*pegar email */ $getID = DB::table('login') ->where('email', '=', $request->email) ->where('cpf', '=', $request->cpf) // ->orderBy('quantity', 'asc') ->first(); // return $getID->id; // return $request->simulacao_id // //porrag; try{ //Find the user object from model if it exists $simulacao= Simulacao::findOrFail($request->simulacao_id); //$request contain your post data sent from your edit from //$user is an object which contains the column names of your table //Set user object attributes $simulacao->user_id = $getID->id; // Save/update user. // This will will update your the row in ur db. $simulacao->save(); return view('api.ativacao', ['name' => $request->email, 'params' => $request->all()]); } catch(ModelNotFoundException $err){ //Show error page } return redirect()->intended('index'); // return redirect()->back()->withInput(); // pegar o id do usuario e inserir na table simulacao_id /**///simulacao_id e editar }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration()\n {\n \n }", "public function onRegister();", "public function register(){}", "public function register() {}", "public function handleRegistration()\n {\n $user = $this->repository->signup(\\Input::all());\n\n if ($user->id) {\n if (\\Config::get('confide::signup_email')) {\n \\Mail::queueOn(\n \\Config::get('confide::email_queue'),\n \\Config::get('confide::email_account_confirmation'),\n compact('user'),\n function ($message) use ($user) {\n $message\n ->to($user->email, $user->username)\n ->subject(\\Lang::get('confide::confide.email.account_confirmation.subject'));\n }\n );\n }\n \\Notification::success(\n \\Notification::message(\\Lang::get('users::app.user.registered'))->flash()\n );\n\n return \\Redirect::route('app.session.login');\n\n } else {\n $errors = $user->errors()->all(':message');\n\n if (is_array($errors) && $errors) {\n foreach ($errors as $error) {\n \\Notification::error(\n \\Notification::message(\\Lang::get($error))->flash()\n );\n }\n } else {\n \\Notification::error(\n \\Notification::message(\\Lang::get('users::app.registration.failed'))->flash()\n );\n }\n\n\n return \\Redirect::route('app.session.register');\n }\n }", "public function registrationAction(Request $request)\n {\n try {\n $this->validator->validate($request, 'user_registration');\n } catch (\\Exception $e) {\n $errors = json_decode($e->getMessage(), true);\n $errorMessage = [];\n foreach ($errors as $field => $_errors) {\n foreach ($_errors as $error) {\n $errorMessage[] = $error;\n }\n }\n $ret = new JsonResponse(['message' => implode(', ', $errorMessage)]);\n $ret->setStatus(JsonResponse::STATUS_ERROR);\n return $ret;\n }\n\n $username = $request->get('username');\n $password = $request->get('password');\n\n try {\n $user = $this->security->createUser($username, $password, $request->get('data',array()));\n $this->security->loginByCredentials($username, $password);\n\n $dispatcher = $this->app['dispatcher'];\n $dispatcher->dispatch(SecurityInterface::REGISTRATION_EVENT, new RegistrationEvent($user));\n\n } catch (Exception $e) {\n if ($request->isXmlHttpRequest()) {\n $ret = new JsonResponse(['message' => $e->getMessage()]);\n $ret->setStatus(JsonResponse::STATUS_SYSTEM_ERROR);\n return $ret;\n }\n }\n\n if (!$request->isXmlHttpRequest()) {\n return $this->app->redirect('/?event=welcome');\n } else {\n $user['password'] = $password;\n return new JsonResponse($user);\n }\n\n }", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function registration() {\r\n \r\n if (isset($_GET[\"submitted\"])) {\r\n $this->registrationSubmit();\r\n } else {\r\n \r\n }\r\n }", "protected function registered(Request $request, $user)\n {\n // \n }", "public function registration(){\n\n // ejecuta la funcion del modelo verificando que sea post \n \tif ($_SERVER['REQUEST_METHOD'] == 'POST') \n \t{\n \t\t$this->model->registration($_POST['contratista']);\n \t}\n \telse\n \t{\n \t\tshow_404();\n \t}\n }", "public function processRegistration(RegisterRequest $request)\n { \n if (Request::ajax()) {\n return response()->json( array(\n 'status' => 'ok',\n ));\n } \n \n $user = Sentinel::register($request->all()); \n \n if ($user) {\n \n $role = Sentinel::findRoleBySlug($request->get('role'));\n \n $role->users()->attach($user);\n \n $activation = Activation::createIfNotExists($user); \n \n $sent = Mail::send('sentinel.emails.activate', compact('user', 'activation'), function($m) use ($user)\n {\n $m->to($user->email)->subject(trans('sentinel.emails.activate'));\n });\n \n if ( ! $sent) {\n \n return redirect()->back()\n ->withInput()\n ->withErrors(trans('sentinel.errors.send'));\n }\n \n return redirect()->route('auth.login')\n ->with('message', trans('sentinel.messages.account-created'))\n ->with('userId', $user->getUserId());\n }\n \n return redirect()->back()\n ->withInput()\n ->withErrors(trans('sentinel.errors.register'));\n }", "protected function registered(Request $request, $user) {\n \n }", "private function overrideRegistration()\n {\n $this->app->instance(\n Spark\\Contracts\\Http\\Requests\\Auth\\RegisterRequest::class,\n RegisterRequest::class\n );\n }", "protected function registered(Request $request, $user)\n {\n //\n }", "protected function registered(Request $request, $user)\n {\n //\n }", "protected function registered(Request $request, $user)\n {\n //\n }", "protected function registered(Request $request, $user)\n {\n //\n }", "protected function registered(Request $request, $user)\n {\n //\n }", "protected function registered(Request $request, $user)\n {\n //\n }", "protected function registered(Request $request, $user)\n {\n //\n }", "protected static function register() {}", "public function register(Request $request)\n {\n //\n }", "abstract public function register();", "abstract public function register();", "abstract public function register();", "public function register(): void;", "public function registerAction()\n {\n Lb_Points_Helper_Data::debug_log(\"Registration request sent to LB\", true);\n $txtName = $_POST['txtName'];\n $txtEmail = $_POST['txtEmail'];\n $txtPhoneNumber = $_POST['txtPhoneNumber'];\n $result = Lb_Points_Helper_Data::registerUser($txtName,$txtEmail,$txtPhoneNumber);\n echo json_encode($result);\n }", "public function register($request, $response)\n {\n// $app = new \\Slim\\Slim();\n// $app->post('/register', function ($request, $response){ //How it is supposed to be\n $first_name = $request->getParam('txtFirstName');\n $last_name \t= $request->getParam('txtLastName');\n $email \t= $request->getParam('txtEmail');\n $password \t= md5($request->getParam('txtPassword'));\n $created_at = date(\"Y/m/d\");\n $updated_at = date(\"Y/m/d\");\n\n User::create([ //STORE IN DB\n 'name' => $first_name,\n 'email' => $email,\n 'password' => $password,\n 'created_at' => $created_at,\n 'updated_at' => $updated_at,\n 'verified' => 0\n ]);\n\n $this->send_verification_email($email);\n// });\n }", "public function registerAction()\n {\n if (!isset($this->post['name'])) {\n return new ResponseModel(ResponseModel::ERRORMSG, \"No name was supplied\");\n }\n $name = $this->post['name'];\n if (strlen($name) < 3) {\n return new ResponseModel( ResponseModel::ERRORMSG, \"Name is too short\");\n }\n\n $session = QuizSessionService::getSession();\n $user = $this->quizService->registerUser($name);\n $session->userId = $user->id;\n return new ResponseModel(ResponseModel::USER, $user);\n }", "protected function registered()\n {\n //\n }", "public function register()\n {\n // maybe something, one day\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}", "public function register()\n {\n $this->registration->execute([],$this);\n }", "abstract public function onRegister(): void;", "public function register(): void\n {\n\n }", "public function register() {\n\n $dg = strtoupper( $this->app->request->input('dg') );\n if($dg) {\n // multi-tenant\n $path = config_path('churches/'. $dg .'.php');\n }\n else {\n // single tenant\n $path = config_path('mp.php');\n }\n $this->app['config']->set('mp', require $path);\n\n $this->_registerMinistryPlatform();\n\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function actionRegister() {\n $this->writeMessage('Start registrate Microservice');\n\n $url = $this->module->gatewayUrl.'/api/gateway/apps/register';\n\n $this->writeMessage('Convert file static file content to base64');\n $this->setFileContents();\n\n $this->writeMessage('create Microservice security ApiKey');\n $this->module->registrationConfig['unixTimeStamp'] = time();\n $this->module->registrationConfig['apiKey'] = $this->getSecurityApiKey();\n\n $data = $this->module->registrationConfig;\n\n $options = array(\n 'http' => array(\n 'header' => \"Content-Type: application/json\\r\\n\",\n 'method' => 'POST',\n 'content' => Json::encode($data)\n )\n );\n\n $this->writeMessage('POST microservice registration: '.$url);\n\n $context = stream_context_create($options);\n $result = file_get_contents($url, false, $context);\n\n if ($result === FALSE) {\n $this->writeMessage('Microservice registration failed. Please check you application configuration');\n return false;\n }\n\n $this->writeMessage('Microservice successfully registrated: '.$this->module->registrationConfig['h2OApp']['host']);\n }", "public function registerDetails(Request $request)\n {\n DB::beginTransaction();\n\n try {\n validateInput($request->all(), User::updateRulesOnRegister());\n\n $user = $this->jobChoiceService->user()->verifyUser($request);\n Auth::loginUsingId($user->id);\n $this->jobChoiceService->user()->saveClientType($request, $user);\n\n $this->data['results']['token'] = $user->createToken('JobChoice')->accessToken;\n $this->jobChoiceService->slug()->store($user);\n $user = $this->jobChoiceService->user()->updateUserOnRegister($request, $user->id);\n $this->data['results']['message'] = \"Successfully registered\";\n $this->data['results']['user'] = $user;\n $this->data['status'] = 200;\n\n // Validate User ID\n if($user->type == 'job_seeker') {\n // Set Data\n $data = [\n 'user_id' => $user->id,\n 'contact_no' => $request->contact_no,\n 'action' => 'send',\n 'lang' => $request->lang\n ];\n // Send Verification Code\n $twilio = $this->jobChoiceService->twilio()->store($data);\n }\n\n Auth::logout();\n\n } catch (\\Exception $e) {\n DB::rollBack();\n $this->data['error'] = $e->getMessage();\n }\n\n // return 'let me know';\n DB::commit();\n return response()->json($this->data, $this->data['status']);\n }", "public function doRegister()\n {\n\n //check if all the fields are filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity based on filled data\n $userEntity = new User(Request::postData());\n\n //check if the user exists and get it as entity if exists\n if ($this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username/email already exists!\", \"type\" => \"error\")));\n exit;\n }\n\n //add the user into DB\n $this->repository->addUser($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"Your account has been created!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function register()\n\t{\n //\n\t}", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "public function register() {\n\t\tif($this->isPost()) {\n\t\t\treturn $this->registerUser();\n\t\t}\n\t\techo json_encode(['success' => false, 'message' => 'Check method type!']);\n\t}", "public function register(){\n $this->registration->execute([], $this);\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function _register()\n {\n }", "abstract public function register ( );", "public function register()\n\t{\n\t\t\n\t}", "public function register()\n {\n // ...\n }", "public function register()\n {\n // ...\n }", "public function register():void\n {\n //returning a concrete Client request interface depending on the config. Mainly for testing\n $this->app->singleton(ClientRequestInterface::class, function($app){\n if(\\config('app')['env'] === 'live') {\n return new LiveClientRequest();\n }\n return new TestClientRequest();\n });\n }", "public function register()\r\n {\r\n //\r\n\t}", "public function onRegistration(): void\n { exit;\n }", "public function register()\r\n\t{\r\n\r\n\t}", "public function register()\r\n\t{\r\n\r\n\t}", "public function register()\r\n\t{\r\n\r\n\t}", "public function register(){\r\n\r\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register(Request $request)\n\t{\n $this->validator($request->all())->validate();\n\n event(new Registered($user = $this->create($request->all())));\n\n return $this->registered($request, $user)\n ?: redirect($this->redirectPath());\n }", "public function register(Request $request)\n {\n $this->registerValidator();\n //极验验证\n $request->offsetSet('geetest_challenge', $request->input('verify'));\n $this->validator($request->all())->validate();\n //最后验证短信码\n if ($request->get('model') != 'email') {\n Validator::make($request->all(), [\n 'mobile_phone_code' => 'required|sms_code:mobile_phone' //短信验证码\n ], [\n 'mobile_phone_code.sms_code' => '短信验证码验证失败'\n ], [\n 'mobile_phone_code' => '短信验证码'\n ])->validate();\n }\n event(new Registered($user = $this->create($request->all())));\n if ($request->get('model') != 'email') {\n $this->guard()->login($user);\n //用户数据记录\n app('user.logic')->loginCacheInfo();\n }\n return $this->registered($request, $user)\n ?: orRedirect($this->redirectPath());\n }", "public function doRegister(){\n\t\t\t$requestUser = $this->registerView->getRequestUserName();\n\t\t\t$requestPassword = $this->registerView->getRequestPassword();\n\t\t\t$requestRePassword = $this->registerView->getRequestRePassword();\n\t\t\t\n\t\t\tif($this->registerView->didUserPressRegister() ){\n\t\t\t\ttry{\n\t\t\t\tif($this->checkUsername($requestUser) && $this->checkPassword($requestPassword,$requestRePassword)){\n\t\t\t\t\t//create and add new user\n\t\t\t\t\t$newUser = new User($requestUser,$requestPassword);\n\t\t\t\t\t$this->userList->add($newUser);\n\t\t\t\t\t\n\t\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t\t$this->model->setSessionUsername($requestUser);\n\t\t\t\t\t$this->navView->clearURL();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch (UserFewCharException $ufce){\n\t\t\t\t\t$this->registerView->setErrorUsernameFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (UserBadCharException $udce){\n\t\t\t\t\t$this->registerView->setErrorUsernameInvalidChar();\n\t\t\t\t\t$this->registerView->setUsernameField(strip_tags($requestUser));\n\t\t\t\t} \n\t\t\t\tcatch (UserExistsException $uee){\n\t\t\t\t\t$this->registerView->setErrorUsernameExists();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordLenException $ple){\n\t\t\t\t\t$this->registerView->setErrorPasswordFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordMissmatchException $pme){\n\t\t\t\t\t$this->registerView->setErrorPasswordMatch();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t\tif(empty($requestUser) && empty($requestPassword) && empty($requestRePassword))\n\t\t\t\t\t$this->registerView->setErrorMissingFields();\t\t\n\t\t\t}\n\t\t}", "public function register(): void\n {\n $response = $this->signedPostRequest('acme/new-acct', [\n 'termsOfServiceAgreed' => true,\n ], true);\n $this->kid = $response->getHeader('Location')[0];\n }", "public function register()\n {\n //\n }", "public function registrar(){\n if ($this->input->is_ajax_request()){\n echo $this->compra->registrar();\n }else{\n show_404();\n }\n }", "abstract public function Register();", "public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "public function register() \n {\n \n\n }", "public function registerAction(Request $request)\n {\n if ($request->isMethod('GET')) {\n $authenticated = $this->_isUserAuthenticated($request);\n if ($authenticated) {\n $url = $this->container->get('router')->generate('connection_homepage');\n return new RedirectResponse($url);\n }\n }\n /** @var $formFactory \\FOS\\UserBundle\\Form\\Factory\\FactoryInterface */\n $formFactory = $this->container->get('fos_user.registration.form.factory');\n /** @var $userManager \\FOS\\UserBundle\\Model\\UserManagerInterface */\n $userManager = $this->container->get('fos_user.user_manager');\n /** @var $dispatcher \\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface */\n $dispatcher = $this->container->get('event_dispatcher');\n\n $user = $userManager->createUser();\n $user->setEnabled(true);\n\n $event = new GetResponseUserEvent($user, $request);\n $dispatcher->dispatch(FOSUserEvents::REGISTRATION_INITIALIZE, $event);\n\n if (null !== $event->getResponse()) {\n return $event->getResponse();\n }\n\n $form = $formFactory->createForm();\n $form->setData($user);\n\n if ('POST' === $request->getMethod()) {\n $form->bind($request);\n\n if ($form->isValid()) {\n $event = new FormEvent($form, $request);\n $dispatcher->dispatch(FOSUserEvents::REGISTRATION_SUCCESS, $event);\n\n $userManager->updateUser($user);\n\n if (null === $response = $event->getResponse()) {\n $url = $this->container->get('router')->generate('edit_user_profile');\n $response = new RedirectResponse($url);\n }\n\n $dispatcher->dispatch(FOSUserEvents::REGISTRATION_COMPLETED, new FilterUserResponseEvent($user, $request, $response));\n\n return $response;\n }\n }\n\n $registrationType = $form->get('registrationType')->getData();\n if (empty($registrationType) || $registrationType == 'quick') {\n return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:register.html.twig', array(\n 'form' => $form->createView(),\n ));\n } else {\n return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:extended_register.html.twig', array(\n 'form' => $form->createView(),\n ));\n }\n }", "public function register() {\n //\n }", "public function register()\n {\n //\n\t\t\n }", "public function register()\n {\n echo 'User Registered';\n }", "public function registerFamilyAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authRegisterParent' );\n }", "public function register()\n {\n //$_SESSION['prov'] = 'this will be called at bootstrapping application, before EventServicesProvider';\n }", "public function register() { \n }", "public function register($request)\r\n {\r\n $registerModel = new RegisterModel();\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'POST')\r\n {\r\n $registerModel->loadData($request->getBody());\r\n\r\n if ($registerModel->validate() && $registerModel->register())\r\n {\r\n Application::$app->session->setFlash('success', 'Thanks for registering!');\r\n Application::$app->response->redirect('/login');\r\n return 0;\r\n }\r\n\r\n return $this->render('register', [\r\n 'model' => $registerModel\r\n ]);\r\n }\r\n\r\n // GET request\r\n // return register view\r\n // $this->setLayout('auth');\r\n return $this->render('register', [\r\n 'model' => $registerModel\r\n ]);\r\n }", "public function register()\n\t{\n\n\t}", "public function register()\n\t{\n\n\t}" ]
[ "0.68779165", "0.6740797", "0.67237926", "0.6703773", "0.66660756", "0.6618832", "0.6610021", "0.6610021", "0.6610021", "0.6610021", "0.6610021", "0.6610021", "0.6610021", "0.6610021", "0.6603086", "0.6598497", "0.65599626", "0.6551888", "0.6524162", "0.65187156", "0.65036166", "0.65036166", "0.65036166", "0.65036166", "0.65036166", "0.65036166", "0.65036166", "0.6457981", "0.64567214", "0.6438416", "0.6438416", "0.6438416", "0.6423667", "0.64018095", "0.63987255", "0.63949126", "0.63701624", "0.6356981", "0.6350452", "0.6350452", "0.6350452", "0.6350452", "0.6350452", "0.634196", "0.6319928", "0.63091993", "0.62866664", "0.6282981", "0.62827474", "0.62827474", "0.62827474", "0.62827474", "0.62827474", "0.62821805", "0.62662685", "0.626464", "0.62508947", "0.62247163", "0.6221964", "0.62205803", "0.6219416", "0.6219416", "0.6219416", "0.6219416", "0.6219292", "0.62091905", "0.61904657", "0.6179857", "0.6179857", "0.6178387", "0.6173397", "0.6171612", "0.61641335", "0.61641335", "0.61641335", "0.61637026", "0.6156789", "0.6156789", "0.61351705", "0.612842", "0.61279196", "0.6116321", "0.6110237", "0.61014056", "0.6101261", "0.6095588", "0.6095539", "0.6095539", "0.6095539", "0.6095539", "0.6093781", "0.6086523", "0.60773766", "0.6062255", "0.60620373", "0.6060011", "0.6051959", "0.6051814", "0.6040675", "0.60392386", "0.60392386" ]
0.0
-1
Get the guard to be used during registration.
protected function guard() { return Auth::guard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getGuard()\n\t{\n\t\treturn property_exists($this, 'guard') ? $this->guard : null;\n\t}", "public function getGuard()\n {\n return $this->guard;\n }", "protected function getGuard()\n {\n return property_exists($this, 'guard') ? $this->guard : null;\n }", "protected function getGuard()\n {\n return property_exists($this, 'guard') ? $this->guard : null;\n }", "protected function guard()\n {\n return $this->guard;\n }", "protected function getGuard()\n {\n \treturn app('auth')->guard();\n }", "protected function guard()\n {\n return \\Auth::guard($this->guard);\n }", "private function guard()\n {\n return Auth::guard(static::GUARD);\n }", "private function guard() {\n return Auth::guard();\n }", "protected function guard()\n {\n return Auth::guard('web_vendor');\n }", "protected function guard()\n\t{\n\t\treturn Auth::guard('organizer');\n\t}", "private function guard()\n {\n return Auth::guard();\n }", "protected function guard() {\n return Auth::guard();\n }", "private function guard()\n {\n return auth()->guard('therapist');\n }", "protected function guard()\n {\n return Auth::guard('user');\n }", "protected function guard()\n {\n return Auth::guard('user');\n }", "protected function guard()\n {\n return auth()->guard();\n }", "protected function guard() {\n return Auth::guard('web');\n }", "protected function guard()\n {\n return Auth::guard('client');\n }", "protected function guard()\n {\n return Auth::guard('web');\n }", "protected function guard()\n {\n return Auth::guard('web');\n }", "protected function guard()\n {\n return Auth::guard('web');\n }", "protected function guard(): Guard\n {\n return Auth::guard('customer');\n }", "protected function guard(): Guard\n {\n return Auth::guard('api');\n }", "public function guard(): Guard\n {\n return Auth::guard('api');\n }", "public function guard(): Guard\n {\n return Auth::guard('api');\n }", "public static function getProvider(){\n return \\Illuminate\\Auth\\Guard::getProvider();\n }", "protected function guard()\n\t{\n\t\treturn Auth::guard('api');\n\t}", "public function guard()\n {\n return Auth::guard();\n }", "public function guard()\n {\n return Auth::guard();\n }", "public function guard()\n {\n return Auth::guard();\n }", "public function guard()\n {\n return Auth::guard();\n }", "public function guard()\n {\n return \\Auth::guard();\n }", "public function guard($guard = 'api')\n {\n return Auth::guard($guard);\n }", "protected function guard()\n {\n return Auth::guard('superieur');\n }", "protected function guard()\n {\n return Auth::guard('jwt');\n }", "protected function guard()\n {\n return Auth::guard('laboratorio');\n }", "public function guard()\n {\n return Auth::Guard('api');\n }", "protected function guard()\n {\n return Auth::guard('api');\n }", "public function guard()\n {\n return Auth::guard('api-user');\n }", "protected function guard()\n {\n return Auth::guard('membre');\n }", "protected function guard()\n {\n return \\Auth::guard('arogyasakhi');\n }", "protected function guard()\n {\n return Auth::guard('webapi');\n }", "protected function guard()\n {\n return Auth::guard('officer');\n }", "protected function getSecurity_Authentication_GuardHandlerService()\n {\n return $this->services['security.authentication.guard_handler'] = new \\Symfony\\Component\\Security\\Guard\\GuardAuthenticatorHandler($this->get('security.token_storage'), $this->get('event_dispatcher', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "protected function guard()\n {\n return Auth::guard('customer');\n }", "protected function guard()\n {\n return Auth::guard('student');\n }", "protected function guard()\n {\n return Auth::guard('student');\n }", "protected function guard() {\n return Lyra::auth();\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "public function guard()\n {\n return Auth::guard('api');\n }", "protected function guard()\n {\n return backpack_auth();\n }", "protected function guard()\n {\n return backpack_auth();\n }", "protected function guard()\n {\n return Auth::guard('employee');\n }", "protected function getGuard(){\n\t\treturn 'eventplanner';\n\t}", "public static function getDispatcher(){\n return \\Illuminate\\Auth\\Guard::getDispatcher();\n }", "protected function guard()\n {\n return Auth::guard('privato');\n }", "protected function guard()\n {\n return Auth::guard('web_instructor');\n }", "public function guard(): StatefulGuard\n {\n return Auth::guard('admin');\n }", "public function guard()\n {\n return Auth::guard('dashboard');\n }", "protected function guard()\n {\n return Auth::guard('admins');\n }", "protected function guard()\n {\n return Auth::guard('teacher');\n }", "public static function getName(){\n return \\Illuminate\\Auth\\Guard::getName();\n }", "public static function getUser(){\n return \\Illuminate\\Auth\\Guard::getUser();\n }", "public function guard()\n{\n return Auth::guard('api');\n}", "public static function user(){\n return \\Illuminate\\Auth\\Guard::user();\n }", "public static function check(){\n return \\Illuminate\\Auth\\Guard::check();\n }", "protected function setGuard()\n {\n $user = request()->user ?? null;\n\n switch ($user) {\n case 'client':\n $this->guard = 'client-api';\n break;\n default:\n $this->guard = 'web';\n break;\n }\n\n }", "protected function registerGuard()\n {\n Auth::extend('passport', function ($app, $name, array $config) {\n return tap($this->makeGuard($config), function ($guard) {\n $this->app->refresh('request', $guard, 'setRequest');\n });\n });\n }", "function adminGuard()\n{\n return Auth::guard('api');\n}", "function isGuardA(String $guardName = 'web'):bool\n{\n return Auth::guard($guardName)->check();\n}", "public function me()\n{\n return $this->guard()->user();\n}", "public function guards()\n {\n return $this->guards;\n }", "protected function configureGuard()\n {\n Auth::resolved(function ($auth) {\n $auth->viaRequest('sanctum', new Guard($auth, config('sanctum.expiration')));\n });\n }", "public function getRegistrant();", "public static function getRequest(){\n return \\Illuminate\\Auth\\Guard::getRequest();\n }", "protected function setupGuardMiddlewareMatch()\n {\n // should the middleware group match the guard name?\n $middlewareMatch = $this->app['config']->get('jwt.middleware_match', true);\n\n if ($middlewareMatch) {\n // when the route is actually matched...\n $this->app['router']->matched(function (RouteMatched $event) {\n\n // get the route middleware group.\n $middlewareGroup = Arr::first((array) $event->route->middleware());\n\n // if there is a group detected and there is a guard that matches the middleware\n // group name...\n if ($middlewareGroup && !!$this->app['auth']->guard($middlewareGroup)) {\n // setup the matching guard as default.\n $this->app['auth']->setDefaultDriver($middlewareGroup);\n }\n });\n }\n }", "public function getRegulator()\n {\n return $this->regulator;\n }", "public function getRegistrant() {\n\t\treturn self::$_registrant;\n\t}", "public function register()\n {\n $this->app->singleton('Illuminate\\Contracts\\Auth\\Guard', function () {\n $hasher = $this->app->make('Illuminate\\Contracts\\Hashing\\Hasher');\n $session = $this->app->make('Symfony\\Component\\HttpFoundation\\Session\\SessionInterface');\n\n $provider = new EloquentUserProvider($hasher, 'FluxBB\\Models\\User');\n $guard = new Guard($provider, $session);\n\n $guard->setCookieJar($this->app->make('Illuminate\\Contracts\\Cookie\\QueueingFactory'));\n $guard->setDispatcher($this->app->make('Illuminate\\Contracts\\Events\\Dispatcher'));\n $guard->setRequest($this->app->make('Symfony\\Component\\HttpFoundation\\Request'));\n\n return $guard;\n });\n\n if (Core::isInstalled()) {\n $this->app->extend('view', function ($view) {\n $view->share('user', $this->app->make('Illuminate\\Contracts\\Auth\\Guard')->user());\n\n return $view;\n });\n }\n }", "protected function getRegistryLoader()\n {\n return $this->registryLoader;\n }", "public function getAuthIdentifier($guard)\n {\n return Auth::guard($guard)->id();\n }", "public function getRegistration()\n {\n return $this->_registration;\n }", "public function __construct(Guard $guard)\n {\n $this->guard = $guard;\n }" ]
[ "0.8065396", "0.80365604", "0.8009855", "0.8009855", "0.79829365", "0.7818894", "0.76957506", "0.76111376", "0.7386967", "0.73849404", "0.7355003", "0.7292204", "0.7286029", "0.7269087", "0.72652036", "0.72652036", "0.72057885", "0.71839017", "0.716824", "0.7153059", "0.7153059", "0.7153059", "0.713978", "0.7128494", "0.7107515", "0.7107515", "0.70838505", "0.70480585", "0.70456237", "0.70456237", "0.70456237", "0.70456237", "0.70405", "0.7031831", "0.70231223", "0.7004653", "0.6990075", "0.6975139", "0.6953886", "0.6931679", "0.692259", "0.69185656", "0.69017977", "0.68723965", "0.68166137", "0.68165183", "0.67527497", "0.67527497", "0.67491174", "0.674604", "0.674604", "0.674604", "0.674604", "0.674604", "0.674604", "0.674604", "0.66491514", "0.6639633", "0.6639633", "0.6630729", "0.6576224", "0.6572793", "0.65485185", "0.6397402", "0.63725793", "0.6346219", "0.6259991", "0.61051464", "0.60402197", "0.5986624", "0.5963063", "0.59006983", "0.5874414", "0.57979393", "0.5757749", "0.57393676", "0.5731112", "0.5713825", "0.5646042", "0.5631816", "0.56030154", "0.5585112", "0.5554428", "0.5541118", "0.55240375", "0.5504191", "0.54920554", "0.54756874", "0.5459961", "0.54314333" ]
0.71644795
27
The user has been registered.
protected function registered(Request $request, $user) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_user()\n {\n \n return true;\n \n }", "public function guest_completed_registration_form_Successfully_registered_and_checked_in_DB()\n {\n $this->visit('/register')\n ->seePageIs('/register')\n ->type($this->user->name, 'name')\n ->type($this->user->email, 'email')\n ->type($this->user->password, 'password')\n ->type($this->user->password, 'password_confirmation')\n ->press('Register');\n\n\n $this->seeInDatabase('users', ['name' => $this->user->name]);\n }", "public function register()\n {\n echo 'User Registered';\n }", "function isUserRegistered()\r\n{\r\n $statusFlag = FALSE;\r\n \r\n // if user has previously registered, return true;\r\n if( isset($_COOKIE[\"user_email\"] ))\r\n $statusFlag = TRUE;\r\n\t \r\nreturn $statusFlag;\r\n\r\n}", "public function register() {\n\n // If it is not a valid password\n if (!$this->valid_password()) {\n return \"Invalid Password. It must be six characters\";\n }\n\n // If the mobile is valid\n if (!$this->valid_mobile()) {\n return \"Mobile Number is Invalid. It must be 10 numeric digits\";\n }\n\n // If there is a user with that username\n if (User::find($this->username, 'username') !== null) {\n return \"Username already taken\";\n }\n\n // Now we create the user on the database\n if ($this->create_record()) {\n echo \"<br><br>Record Created\";\n // We update the sync the object with the database\n if ($this->update_object('username')) {\n return true;\n echo \"<br><br>Object Updated\";\n }\n }\n\n return \"Sorry, an error has ocurred. Try again later\";\n }", "public function firstRegistration():bool\n {\n // SQL request\n $sql = \" SELECT COUNT(*) AS user FROM user\";\n\n // Preparing the sql query\n $requete = $this->DB->prepare($sql);\n\n // Execute the sql query\n $requete->execute();\n\n // Retrieves information\n $reponse = $requete->fetch();\n\n // If there is a record, we return true\n if ((int)$reponse['user'] === 0) {\n return true;\n }\n // else\n return false;\n }", "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}", "public function register()\n {\n if ($this->getIsNewRecord() == false) {\n throw new \\RuntimeException('Calling \"' . __CLASS__ . '::' . __METHOD__ . '\" on existing user');\n }\n\n if ($this->module->enableConfirmation == false) {\n $this->confirmed_at = time();\n }\n\n if ($this->module->enableGeneratingPassword) {\n $this->password = Password::generate(8);\n }\n\n $this->trigger(self::USER_REGISTER_INIT);\n\n if ($this->save(false)) {\n Yii::getLogger()->log($this->getErrors(), Logger::LEVEL_INFO);\n $this->trigger(self::USER_REGISTER_DONE);\n if ($this->module->enableConfirmation) {\n $token = \\Yii::createObject([\n 'class' => \\dektrium\\user\\models\\Token::className(),\n 'type' => \\dektrium\\user\\models\\Token::TYPE_CONFIRMATION,\n ]);\n $token->link('user', $this);\n $this->mailer->sendConfirmationMessage($this, $token);\n } else {\n \\Yii::$app->user->login($this);\n }\n if ($this->module->enableGeneratingPassword) {\n $this->mailer->sendWelcomeMessage($this);\n }\n \\Yii::$app->session->setFlash('info', $this->getFlashMessage());\n \\Yii::getLogger()->log('User has been registered', Logger::LEVEL_INFO);\n return true;\n }\n\n \\Yii::getLogger()->log('An error occurred while registering user account', Logger::LEVEL_ERROR);\n\n return false;\n }", "private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }", "function Register(){\n\n\t\t$sql = \"select * from USUARIOS where login = '\".$this->login.\"'\";\n\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'El usuario ya existe';\n\t\t\t}\n\t\telse{\n\t \t\treturn true; //TEST : El usuario no existe\n\n\t}\n}", "public function getUserExiste(){\n return $this->userExist;\n }", "protected function registered(Request $request, $user) {\n \n }", "public static function userCreateSuccess(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_CREATE_KEY, self::USER_INTELLIGENCE_SUCCESS);\n }", "public function is_registered(): bool {\n\t\treturn $this->registered;\n\t}", "public function userExists( $user_name ) { return true;}", "function checkRegistered(){\n $registered_user=User::find('all',array('conditions' => array('email=? and active=1',$this->email)));\n $registered_user_id='';\n if(!empty($registered_user)){\n foreach($registered_user as $user){\n $registered_user_id=$user->id;\n }\n $this->user_id=$registered_user_id;\n }\n return null;\n }", "public function registerSuccess()\n {\n return $this->loadPublicView('user.register-success');\n }", "protected function registered(Request $request, $user)\n {\n \n\n //get data into verification\n \n $this->userVerificationCreate($user);\n\n\n //send email\n\n $this->sendVerifyEmail($user);\n\n \n $this->guard()->logout();\n return redirect()->route('login')->with('success', 'We have sent you an account activation link through email. Please activate your account to login.');\n \n\n }", "public function userExists()\n {\n $action = __NAMESPACE__ . '\\actions\\UserExists';\n\n $result = $this->actionController->executeAction($action);\n $content = ($result->getSuccess()) ?: 'That Username Does Not Exist';\n\n $result->setContent($content)\n ->Render();\n }", "public function register_action()\n {\n $registration_successful = RegistrationModel::registerNewUser();\n\n if ($registration_successful) {\n Redirect::to('index');\n } else {\n Redirect::to('user/register');\n }\n }", "public function postRegister()\n\t{\n\t\t$user = $this->userService->create(Input::all());\n\n\t\tif (!$user)\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($this->userService->errors())->withInput();\n\t\t}\n\n\t\tAlert::success('You have successfully registered yourself!')->flash();\n\n\t\t// set flag for login page\n\t\tSession::flash('just_registered', '1');\n\n\t\treturn Redirect::route('auth-login');\n\t}", "public static function userLoginSuccess(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_LOGIN_KEY, self::USER_INTELLIGENCE_SUCCESS);\n }", "public function hasUser();", "public function isRegistered()\n\t{\n\t\treturn $this->registered;\n\t}", "public function userExists() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection(); \n\t\t\n //inserts username and password in to users table\n $data =(\"SELECT user_id FROM user WHERE username ='{$this->_username}'\");\n\t\t$result = $mysqli->query($data);\n return(mysqli_num_rows($result) > 0) ? 1 : 0;\n }", "function Register()\r\n\t{\r\n\t\tglobal $Site;\r\n\t\t//if all the details is valid save the user on data base\r\n\t\tif ($this->IsValid())\r\n\t\t{\r\n\t\t\t$MemberID = GetID(\"member\", \"MemberID\");//getting last MemberID +1 for adding one more user\r\n\t\t\t$DateAdded = date(\"Y-m-d H:i:s\");\r\n\t\t\t$DateUpdated = $DateAdded;\r\n\t\t\t$IsEnable = 1;\r\n\t\t\t$pass = base64_encode($this->Password);\r\n\t\t\t$SQL = \"insert into member (MemberID, ProfileType, FirstName, LastName, TelNo, Email, Password, IsActive, IsEnable, DateAdded, DateUpdated) values ($MemberID, 'user', '$this->FirstName', '$this->LastName', '$this->PhoneNumber', '$this->Email', '$pass', '1' , '$IsEnable', '$DateAdded', '$DateUpdated')\";\r\n\t\t\tGetRS($SQL);\r\n\t\t\t$_SESSION['SAWMemberID'] = $MemberID;//cookie- to not allow impersonation of another user PHP gives each customer ID\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t}", "public function doRegister(){\n\t\t\t$requestUser = $this->registerView->getRequestUserName();\n\t\t\t$requestPassword = $this->registerView->getRequestPassword();\n\t\t\t$requestRePassword = $this->registerView->getRequestRePassword();\n\t\t\t\n\t\t\tif($this->registerView->didUserPressRegister() ){\n\t\t\t\ttry{\n\t\t\t\tif($this->checkUsername($requestUser) && $this->checkPassword($requestPassword,$requestRePassword)){\n\t\t\t\t\t//create and add new user\n\t\t\t\t\t$newUser = new User($requestUser,$requestPassword);\n\t\t\t\t\t$this->userList->add($newUser);\n\t\t\t\t\t\n\t\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t\t$this->model->setSessionUsername($requestUser);\n\t\t\t\t\t$this->navView->clearURL();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch (UserFewCharException $ufce){\n\t\t\t\t\t$this->registerView->setErrorUsernameFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (UserBadCharException $udce){\n\t\t\t\t\t$this->registerView->setErrorUsernameInvalidChar();\n\t\t\t\t\t$this->registerView->setUsernameField(strip_tags($requestUser));\n\t\t\t\t} \n\t\t\t\tcatch (UserExistsException $uee){\n\t\t\t\t\t$this->registerView->setErrorUsernameExists();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordLenException $ple){\n\t\t\t\t\t$this->registerView->setErrorPasswordFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordMissmatchException $pme){\n\t\t\t\t\t$this->registerView->setErrorPasswordMatch();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t\tif(empty($requestUser) && empty($requestPassword) && empty($requestRePassword))\n\t\t\t\t\t$this->registerView->setErrorMissingFields();\t\t\n\t\t\t}\n\t\t}", "function register_action()\n {\n $login_model = $this->loadModel('Login');\n $registration_successful = $login_model->registerNewUser();\n\n if ($registration_successful == true) {\n $this->view->render('login/index');\n } else {\n $this->view->render('login/register');\n }\n }", "public function getRegisterSuccess()\n {\n return view(\"Home::auth.registersuccess\");\n }", "protected function registered(Request $request, $user)\n {\n // \n }", "function RegisterUser(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateRegistrationSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$itemPicture = $this->upLoadUserPic();\r\n\t\tif($itemPicture != false){\r\n\t\t\t$formvars['Upic'] = $this->upLoadUserPic();\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectRegistrationSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->comparePswd($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(!$this->SaveToEventAdvDatabase($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/*if(!$this->sendConfimMail($formvars)){\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\r\n\t\t//$this->SendAdminIntimationEmail($formvars);\r\n\r\n\t\treturn true;\r\n\t}", "public function register() {\n\t\tif ($this->Session->check('Auth.User')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$data = $this->request->data;\n\t\t\tif ($this->User->save($data)) {\n\t\t\t\t$this->Session->setFlash(\"User has been created.\", 'default', array(), 'register');\n\t\t\t\t$this->redirect('/login');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"This user couldn't created. Please try again.\");\n\t\t\t}\n\t\t} else\n\t\t\t$this->Session->delete('Message.register');\n\t}", "public function action_register(){\n\t\t\n\t\t$user = CurUser::get();\n\t\t\n\t\tif($user->save($_POST, User_Model::SAVE_REGISTER)){\n\t\t\t$user->login($user->{CurUser::LOGIN_FIELD}, $_POST['password']);\n\t\t\tApp::redirect('user/profile/greeting');\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\tMessenger::get()->addError('При регистрации возникли ошибки:', $user->getError());\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function register(){\n\t\t//Better to be implemented through db table\n\t\t$userRole = array('Job Seeker'=>'Job Seeker', 'Employer'=>'Employer');\n\t\t$this->set('userRole',$userRole);\n\n\t\tif($this->request->is('post')){\n\t\t\t$this->User->create();\n\t\t\t\n\t\t\tif($this->User->save($this->request->data)){\n\t\t\t\t$this->Session->setFlash(__('You are now registered and may login'));\n\t\t\t\treturn $this->redirect(array('controller'=>'jobs','action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Unable to create new user'));\n\n\t\t\t}\n\t\t}\n\t}", "public function doRegister()\n {\n\n //check if all the fields are filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity based on filled data\n $userEntity = new User(Request::postData());\n\n //check if the user exists and get it as entity if exists\n if ($this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username/email already exists!\", \"type\" => \"error\")));\n exit;\n }\n\n //add the user into DB\n $this->repository->addUser($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"Your account has been created!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function register()\n\t{\n\t\tif($this->current_user) //is the CURRENT USER(OWNER OF CURRENT PHP SCRIPT LOGGED?)\n\t\t{\n\t\t\tredirect(base_url('dashboard'));\n\t\t}else{\n\t\t\t $this->load->view(\"register\");\n\t\t}\n\t}", "public function newRegistration() {\n $this->registerModel->getUserRegistrationInput();\n $this->registerView->setUsernameValue($this->registerView->getUsername());\n $this->registerModel->validateRegisterInputIfSubmitted();\n if ($this->registerModel->isValidationOk()) {\n $this->registerModel->hashPassword();\n $this->registerModel->saveUserToDatabase();\n $this->loginView->setUsernameValue($this->registerView->getUsername());\n $this->loginView->setLoginMessage(\"Registered new user.\");\n $this->layoutView->render(false, $this->loginView);\n } else {\n $this->layoutView->render(false, $this->registerView);\n }\n \n }", "public function post_join()\n\t{\n\t\tif(Service\\Validation\\Register::passes(Input::all()))\n\t\t{\n\t\t\tif($user = Repository\\User::register(Input::all()))\n\t\t\t{\n\t\t\t\t// Users must confirm their e-mail address once they have registered. We\n\t\t\t\t// will now send them an e-mail with their activation code.\n\t\t\t\tif(Config::get('feather.registration.confirm_email'))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t// Log the user in and redirect back to the home page.\n\t\t\t\tService\\Security::authorize($user);\n\n\t\t\t\treturn Redirect::home();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to_route('register')->with_input()->with_errors(new Messages(array(\n\t\t\t\t\t__('register.failed')->get()\n\t\t\t\t)));\n\t\t\t}\n\t\t}\n\n\t\treturn Redirect::to_route('register')->with_input()->with_errors(Service\\Validation::errors());\n\t}", "public function registration() {\r\n \r\n if (isset($_GET[\"submitted\"])) {\r\n $this->registrationSubmit();\r\n } else {\r\n \r\n }\r\n }", "private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }", "public function hasPressedRegister(){\n if(isset($_POST[self::$RegisterID])){\n return true;\n }\n return null;\n }", "function subscribeUser()\n\t\t{\n\t\t\techo $this->email.\"add to the database !!\";\n\t\t}", "public function callbackSubmit()\n {\n $this->user = new \\Anax\\Users\\User();\n $this->user->setDI($this->di);\n\n if (isset($_SESSION[\"user\"])) {\n unset($_SESSION[\"user\"]);\n return $this->isLogoutSuccessful();\n } else {\n $this->logoutMessage = \"Du är inte inloggad!\";\n return false;\n }\n }", "public function actionCheckUser()\n {\n if(isset($_POST['user'])) {\n $email = $_POST['user'];\n\n $users = TUsers::model()->findAllByAttributes(array('username'=>$email));\n $users_count = count($users);\n\n if($users_count > 0)\n {\n echo '<span style=\"color:green\">This User <strong>' . $email . '</strong>' .\n ' is registered.</span>';\n }\n else\n {\n echo '<span style=\"color:red\"> User Does Not Exist.</span>';\n }\n\n }\n }", "public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}", "public function isRegistered(){\n return isset($this->data['id']);\n }", "function user_isregistered($user)\n\t\t{\n\t\t\t$iduser = $this->check_user($user);\n\t\t\t$result = $this->select(array(\"user\"), array(\"password\"), array(\"\"), array(\"IDUser\"), array(\"=\"), array($iduser));\n\n\t\t\treturn($result[0][\"password\"] != \"\");\n\t\t}", "public function isRegistered(User $user): bool\n {\n return $this->registered->contains($user);\n }", "protected function registered(Request $request, $user)\n {\n return redirect()->to('login')\n ->with('success', \"Hi {$user->name}, We sent activation code. Please check your mail.\");\n }", "function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}", "public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }", "public function register(){\n\t\t$db = new Database();\n\t\t$conn= $db->getConn();\n\t\t$status = false;\n\t\t\n\t\t$stmt = $conn->prepare(\"insert into login (username,email,password,user_type) VALUES (?, ?, ?, ?)\");\n\t\t$v_password=sha1($this->password);\n\t\t$stmt->bind_param(\"sssd\", $this->username,$this->email,$v_password,$this->type);\t\t\t\n\t\t if($stmt->execute()){\n\t\t $status = true;\n\t\t }\n\t\t//release resources\n\t\t$stmt->free_result();\n\t\t$conn->close();\n\t\t\n\t\treturn $status;\t\n\t}", "function RegisterUser($newUser, $connection)\n\t{\n\t\tif(insertUser($newUser, $connection))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function hasSignupId(){\n return $this->_has(4);\n }", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }", "public function register()\n {\n\t\tUser::deleting(function ($user) {\n\t\t\tif ($user->id === 1) {\n\t\t\t\treturn redirect()->back();\n\t\t\t}\n\t\t});\n }", "function is_user_registered($cellphone)\n {\n \n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND register_user=0\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "public function register() {\n\t\t$user_email = $this->input->post(\"email\");\n\t\t$user_password = md5($this->input->post('password'));\n\t\t$user_reg_ip = ip2long($this->input->ip_address());\n\t\t\n\t\t$re = $this->user_lib->save_reg_userInfo($user_email,$user_password,$user_reg_ip);\n\t\t\n\t\tif($re===false){\n\t\t\t//set mc error\n\t\t}\n\t\t/*if(!$this->email_lib->send_active_email($user_email)){\n\t\t\t//send mail error\n\t\t}*/\n\t\t$uid = $this->user_lib->active_process($user_email);\n\t\tif($uid===false){\n\t\t\treturn false;\t\t//for active error\n\t\t}\n\t//\t$this->_set_login_cookie($uid);\n\t\tredirect('/regsuccess'); \n\t}", "public function onUserRegister(Registered $event)\n {\n LogUser::create([\n 'log_request_id' => LogRequest::createFromRequest($this->request)->id,\n 'user_id' => $event->user->id,\n 'user_action_id' => LogUserAction::where('slug', 'register')->first()->id,\n 'social_provider_id' => $this->getSocialProviderId()\n ]);\n }", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}", "public function column_registered($user)\n {\n }", "private function checkUserExistence() {\n\t\t\t\t$query = \"select count(email) as count from register where email='$this->email'\";\n\t\t\t\t$resource = returnQueryResult($query);\n\t\t\t\t$result = mysql_fetch_assoc($resource);\n\t\t\t\tif($result['count'] > 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public function register() \n\t{\n $referer = isset($_GET['referer']) ? htmlentities($_GET['referer'], ENT_QUOTES) : '';\n\t\t\n\t\t$this->View->RenderMulti(['_templates/header','user/register']);\n }", "public function register() {\n\t\tif($this->isPost()) {\n\t\t\treturn $this->registerUser();\n\t\t}\n\t\techo json_encode(['success' => false, 'message' => 'Check method type!']);\n\t}", "public function onNewRegister(RegisterEvent $event): bool\n {\n $user = $event->user;\n $badges = Badge::where('type', 'onNewRegister')->get();\n\n $today = new Carbon();\n $diff = $today->diff($user->created_at)->y;\n\n $collection = $badges->filter(function ($badge) use ($diff) {\n return $badge->rule <= $diff;\n });\n\n $result = $user->badges()->syncWithoutDetaching($collection);\n\n return $this->sendNotifications($result, $badges, $user);\n }", "function registrarSesion () {\n\n if (!empty($this->id_usuario)) {\n $this->salvar(['ultima_session' => 'current_timestamp',\n 'activo' => 1\n ]);\n Helpers\\Sesion::sessionLogin();\n }\n else return false;\n\n }", "public function isRegistered() {\n //1ero. es un registro completo o 2do es un\n //registro incompleto.\n if (is_file(\"/etc/elastix.key\")) { \n if($this->columnExists(\"has_account\")) {\n $result = $this->_DB->getFirstRowQuery(\"select has_account from register;\", true);\n if (is_array($result) && count($result)>0){\n return ($result['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n }\n else return \"yes-inc\";\n }\n else {\n //intento crear la columna \n if(!$this->addColumnTableRegister(\"has_account char(3) default 'no'\")) {\n $this->errMsg = \"The column 'has_account' does not exist and could not be created\";\n return \"yes-inc\";\n }\n\n //Actualizo el valor de la columna\n //con la info desde webservice\n $dataWebService = $this->getDataServerRegistration();\n if(!(is_array($dataWebService) && count($dataWebService)>0)) // no se puedo conectar al webservice\n return \"yes-inc\";\n \n if($this->updateHasAccount(1,$dataWebService['has_account']))\n return ($dataWebService['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n else return \"yes-inc\";\n }\n }\n else return \"no\";\n }", "public function regNewUser( $data ){\n\n\t\t$success = parent::regNewUser( $data );\n\t\n\t\tif( is_array( $success ) ){\n\t\t \treturn $this->createAnswer( 1,\"Username or email already exist\",403 );\n\t\t}elseif ( $success ){\n\t\t\treturn $this->createAnswer( 0,\"Congratulation you got permission\" );\n\t\t}else{\n\t\t return $this->createAnswer( 1,\"invalid query\",402 );\n\t\t}\n\t}", "public function viewed_signup() {\n\t\tif ( $this->not_page_reload() ) {\n\t\t\t$this->js_record_event( $this->event_name['viewed_signup'] );\n\t\t}\n\t}", "public function hasUsername(){\n return $this->_has(4);\n }", "static public function user_registered($user)\n {\n $user->set_role(self::ROLE_KEY);\n }", "public function register()\n\t{\n\t\t$input = Input::All();\n\t\t\n\t\t$validation = Validator::make($input, User::$rules);\n\t\t\n\t\tif ($validation->passes() && $data['user'] = $this->repo->register($input))\n\t\t{\t\t\t\n\t\t\t$data['activationCode'] = $data['user']->getActivationCode();\n\t\t\t//Send activation code\n\t\t\t$body = View::make('emails.auth.account_activation',$data);\n\t\t\tEmailController::sendMail($data['user']->email, $data['user']->first_name.' '.$data['user']->last_name, 'Welcome to Leadcliq', $body);\n\t\t\t// Create a Milestones entry to track user's checkpoints.\n\t\t\tMilestone::create(array('user_id' => $data['user']->id));\n\t\t\t\n\t\t\treturn View::make('authentication.activation_message',$data);\t\t\t\n\t\t}\n\t\treturn Redirect::route('register')\n\t\t->withInput()\n\t\t->withErrors($validation)\n\t\t->with('message', 'There were validation errors.');\n\t}", "function user_register($user_info)\n {\n }", "function userExists( $username ) {\n return true;\n }", "function register()\r\n {\r\n if (!empty($this->data))\r\n {\r\n // Turn the supplied password into the correct Hash.\r\n // and move into the ‘password’ field so it will get saved.\r\n $this->data['User']['password'] = $this->Auth->password($this->data['User']['passwrd']);\r\n\r\n $this->User->data = Sanitize::clean($this->data);\r\n\r\n // Successfully created account – send activation email\r\n\r\n if ($this->User->save())\r\n {\r\n $this->__sendActivationEmail($this->User->getLastInsertID());\r\n\r\n // this view is not show / listed – use your imagination and inform\r\n // users that an activation email has been sent out to them.\r\n $this->flashSuccess('The activation eMail has been sent to you. Please click on the link in your eMail to activate your account. Please note that right now there is no possibility to recover a lost password for you.', 'login');\r\n }\r\n // Failed, clear password field\r\n else\r\n {\r\n $this->data['User']['passwrd'] = null;\r\n }\r\n }\r\n $groups = $this->User->Group->find('list');\r\n $this->set(compact('groups'));\r\n }", "function is_user_registered() {\n global $my_database;\n \n $query_string = \"SELECT * FROM `xdr_user` WHERE `email` = '\" . $_POST['email'] . \"'\";\n $my_result = $my_database->send_query($query_string);\n $my_database->close_connection();\n \n if ($my_result->num_rows == 0)\n launch_error(\"This mail is already present in our database.\");\n}", "public function testSuccessfulRegistration(){\n \t/*\n \t * Create a user for registration\n \t */\n \t$clearpass = str_random(10);\n \t$user = factory(App\\User::class)->make([\n \t\t\t'password' => bcrypt($clearpass)\n \t]);\n \t\n \t/*\n \t * Visit the Registration page and confirm a user can successfully create an account\n \t */\n \t$this->visit('/register')\n \t->see('E-Mail Address')\n \t->type($user->name, 'name')\n \t->type($user->email, 'email')\n \t->type($clearpass, 'password')\n \t->type($clearpass, 'password_confirmation')\n \t->press('Register') \t\n \t->see('You are logged in!');\n \t\n \t$this->assertFalse(App\\User::where('name', $user->name)->get()->isEmpty());\n }", "public function register()\n {\n // maybe something, one day\n }", "function registerUser()\n\t{\n\t\t$userName = $_POST['userName'];\n\n\t\t# Verify that the user doesn't exist in the database\n\t\t$result = verifyUser($userName);\n\n\t\tif ($result['status'] == 'COMPLETE')\n\t\t{\n\t\t\t$email = $_POST['email'];\n\t\t\t$userFirstName = $_POST['userFirstName'];\n\t\t\t$userLastName = $_POST['userLastName'];\n\n\t\t\t$userPassword = encryptPassword();\n\n\t\t\t# Make the insertion of the new user to the Database\n\t\t\t$result = registerNewUser($userFirstName, $userLastName, $userName, $email, $userPassword);\n\n\t\t\t# Verify that the insertion was successful\n\t\t\tif ($result['status'] == 'COMPLETE')\n\t\t\t{\n\t\t\t\t# Starting the session\n\t\t\t\tstartSession($userFirstName, $userLastName, $userName);\n\t\t\t\techo json_encode($result);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Something went wrong while inserting the new user\n\t\t\t\tdie(json_encode($result));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Username already exists\n\t\t\tdie(json_encode($result));\n\t\t}\n\t}", "public function register() {\n\t\t\tif($this->Session->read('Auth.User.id')){\n\t\t\t\t$this->redirect('/');\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\tif(!empty($this->request->data)){\n\n\t\t\t\t\t$this->User->create($this->request->data);\n\t\t\t\t\t// Validation des données\n\t\t\t\t\tif($this->User->validates()) {\n\n\t\t\t\t\t\t$token = md5(time() .' - '. uniqid());\n\n\t\t\t\t\t\t$this->User->create(array(\n\t\t\t\t\t\t\t\"email\" \t\t=> $this->request->data['User']['email'],\n\t\t\t\t\t\t\t\"password\" \t\t=> $this->Auth->password($this->request->data['User']['password']),\n\t\t\t\t\t\t\t\"token\" \t\t=> $token\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t// Si tout est ok, on sauvegarde\n\t\t\t\t\t\t$this->User->save();\n\n\t\t\t\t\t\t// Envoie de l'email d'activation à l'utilisateur\n\t\t\t\t\t\t$CakeEmail = new CakeEmail('default');\n\t\t\t\t\t\t$CakeEmail->to($this->request->data['User']['email']);\n\t\t\t\t\t\t$CakeEmail->subject('Dezordre: Confirmation d\\'inscription');\n\t\t\t\t\t\t$CakeEmail->viewVars($this->request->data['User'] + array(\n\t\t\t\t\t\t\t'token' => $token,\n\t\t\t\t\t\t\t'id'\t=> $this->User->id,\n\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t$CakeEmail->emailFormat('text');\n\t\t\t\t\t\t$CakeEmail->template('register');\n\t\t\t\t\t\t$CakeEmail->send();\n\n\n\t\t\t\t\t\t$this->Session->setFlash(\"Votre compte à bien été créer. Un lien vous à été envoyé par email afin d'activer votre compte.\", 'alert', array('class' => 'success'));\n\t\t\t\t\t\t$this->redirect(array('controller' => 'pages', 'action' => 'display', 'home'));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->Session->setFlash(\"Erreur, merci de corriger\", 'alert', array('class' => 'danger'));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function register_user()\n {\n if (isset($_POST['btnRegister'])) {\n $username = $_POST['username_reg'];\n $password = $_POST['password'];\n $role = 2;\n\n //check Username ton tai hay khong ton tai\n $checkUsername = $this->UserModel->checkUsername($username);\n if ($checkUsername == 'true') {\n header(\"Location:../Register\");\n } else {\n // 2.INSERT DATA EQUAL USERS\n $rs = $this->UserModel->InserNewUser($username,$password,$role);\n // 3.SHOW OK/FAILS ON SCREENS\n header(\"Location:../Login\");\n }\n }\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public function hasUsername() {\n return $this->_has(1);\n }", "public function register () : void\n {\n $this->getHttpReferer();\n\n // if the user is already logged in,\n // redirection to the previous page\n if ($this->session->exist(\"auth\")) {\n $url = $this->router->url(\"admin\");\n Url::redirect(301, $url);\n }\n\n $errors = []; // form errors\n $flash = null; // flash message\n\n $tableUser = new UserTable($this->connection);\n $tableRole = new RoleTable($this->connection);\n\n // form validator\n $validator = new RegisterValidator(\"en\", $_POST, $tableUser);\n\n // check that the form is valid and add the new user\n if ($validator->isSubmit()) {\n if ($validator->isValid()) {\n $role = $tableRole->find([\"name\" => \"author\"]);\n\n $user = new User();\n $user\n ->setUsername($_POST[\"username\"])\n ->setPassword($_POST[\"password\"])\n ->setSlug(str_replace(\" \", \"-\", $_POST[\"username\"]))\n ->setRole($role);\n\n $tableUser->createUser($user, $role);\n\n $this->session->setFlash(\"Congratulations {$user->getUsername()}, you are now registered\", \"success\", \"mt-5\");\n $this->session\n ->write(\"auth\", $user->getId())\n ->write(\"role\", $user->getRole());\n\n // set the token csrf\n if (!$this->session->exist(\"token\")) {\n $csrf = new Csrf($this->session);\n $csrf->setSessionToken(175, 658, 5);\n }\n\n $url = $this->router->url(\"admin\") . \"?user=1&create=1\";\n Url::redirect(301, $url);\n } else {\n $errors = $validator->getErrors();\n $errors[\"form\"] = true;\n }\n }\n\n // form\n $form = new RegisterForm($_POST, $errors);\n\n // url of the current page\n $url = $this->router->url(\"register\");\n\n // flash message\n if (array_key_exists(\"form\", $errors)) {\n $this->session->setFlash(\"The form contains errors\", \"danger\", \"mt-5\");\n $flash = $this->session->generateFlash();\n }\n\n $title = App::getInstance()\n ->setTitle(\"Register\")\n ->getTitle();\n\n $this->render(\"security.auth.register\", $this->router, $this->session, compact(\"form\", \"url\", \"title\", \"flash\"));\n }", "function exists($user_query){\n\t\t\n\t\t//CALL MEMBER FUNCTION QUERY OF THE CURRENT OBJECT\n\t\t$result = $this->query(\"Select username from users where username='\".$user_query.\"'\");\n\t\t\n\t\t//COUNT RESULTS FROM QUERY\n\t\t$count = mysqli_num_rows($result);\n\n\t\t//IF COUNT HAS COUNTED ONE OR MORE RESULTS, RETURN FALSE BECAUSE EMAIL/USER IS ALREADY REGISTERED!\n\t\tif($count>0){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function documentcheck() {\n $user = User::load(\\Drupal::currentUser()->id());\n bhge_user_registration_user_login($user);\n }", "public function registerUser()\n {\t\n\t\t/**\n\t\t * Our UserModel will return an error \n\t\t * if the email already exists, \n\t\t * or if the passwords do not match\n\t\t */\n\t\ttry{\n\t\t$user = new UserModel();\n\t\t$user->name = Input::get('name');\n\t\t$user->email = Input::get('email');\n\t\t$user->password = Input::get('password');\n\t\t$user->password_confirmation = Input::get('password_confirmation');\n\t\t$user->save();\t\n\t\t$this->setToken($user);\n\t\treturn $this->sendResponse('You have been registered and are logged in');\n\t\t}\n\t\tcatch(Exeption $e){\n\t\t\treturn $this->sendResponse(false, $e->getMessage());\n\n\t\t}\n }", "public function postRegister()\n {\n $input = Input::all();\n\n $input = $this->userSanitizer->sanitize($input);\n\n try {\n $this->registerUserValidator->validate($input);\n } catch (FormValidationException $e) {\n return Redirect::back()\n ->withErrors($e->getErrors())\n ->withInput();\n }\n\n $user = $this->users->register($input);\n $this->events->fire('user.registered', array($user));\n\n Notification::success('You are now registered and can login.');\n return Redirect::route('login');\n }", "public function user_can_register()\n {\n\n $this->withoutExceptionHandling();\n\n $response = $this->post(\"api/v1/auth/register\", [\n \"name\" => \"Jack Doe\",\n \"email\" => \"[email protected]\",\n \"password\" => \"password\"\n ]);\n\n $response->assertJsonStructure([\n 'token'\n ]);\n \n $response->assertStatus(200);\n\n $this->assertDatabaseCount('users', 1);\n $this->assertDatabaseHas('users', [\n 'email' => '[email protected]',\n ]);\n }", "public function postRegister()\n\t{\n\t\t$rules = array(\n\t\t\t'username' => 'required|unique:users',\n\t\t\t'email' => 'required|email|unique:users|confirmed',\n\t\t\t'password' => 'required|min:8',\n\t\t\t'checkbox' => 'accepted',\n\t\t\t);\n\t\t\n\t\t//validate form input with validation rules\n\t\t$validator = Validator::make(Input::all(),$rules);\n\n\t\t// if validator failed\n\t\tif($validator->fails()){\n\n\t\t\t// redirect back to form with errors from validator\n\t\t\treturn Redirect::route('login')->withErrors($validator)->withInput();\n\t\t}\n\t\telse{\n\t\t\t$user = Sentry::createUser(array(\n\t\t\t\t'username' => Input::get('username'),\n\t\t\t\t'email' => Input::get('email'),\n\t\t\t\t'password' => Input::get('password'),\n\t\t\t\t));\n\n\t\t\t$membergroup = Sentry::findGroupByName('Members');\n\t\t\t$user->addGroup($membergroup);\n\n\t\t\t// get activation code\n\t\t\t$activationCode = $user->getActivationCode();\n\n\t\t\t// send activation code to user so that he can activate account\n\t\t\t// link should be shopcaddy.com/verify-activate/{token}\n\t\t\t// http://shopcaddy.localhost/verify-activate/wk2dJHluf7GzO1uG0P04gSfTm9NdqE5DBc3vNBGHOe\n\n\t\t\t// redirect back\n\t\t\treturn Redirect::to('login')->with('message',\"Thanks for signing up.<br>You will receive a verification email to confirm your email address.<br>If you don't see the email in your inbox, please check your spam folder or <a href='/contact-us'>contact support</a>.\");\n\t\t}\n\t}", "public function register()\n\t{\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\n\t\t\t// CakePHP automatically call $this->User->validates() for us before saving it.\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t// we set the id of our newly created User to the request->data params\n\t\t\t\t$this->request->data['User']['id'] = $this->User->id;\n\t\t\t\t// so we can log in directly. (We don't use $this->User because the password is now encrypted so it would not match).\n\t\t\t\t$this->Auth->login($this->request->data['User']);\n\t\t\t\treturn $this->redirect(array('controller' => 'messages', 'action' => 'index'));\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.76916325", "0.7362986", "0.7074429", "0.69306415", "0.6892002", "0.6801763", "0.67287064", "0.67131513", "0.6688557", "0.6671933", "0.661091", "0.65980685", "0.6591109", "0.65896165", "0.65814793", "0.65642864", "0.6517002", "0.6506875", "0.65033567", "0.6502283", "0.6501843", "0.6479795", "0.646632", "0.64609754", "0.6450422", "0.64303815", "0.642498", "0.6403765", "0.6396774", "0.63954973", "0.6394742", "0.6384572", "0.6359921", "0.6305749", "0.6295504", "0.6286546", "0.62763685", "0.62756056", "0.62656474", "0.6254018", "0.62373906", "0.6228761", "0.6224564", "0.62155044", "0.62104505", "0.6209665", "0.6195178", "0.6193842", "0.6187274", "0.6150141", "0.61421657", "0.61376864", "0.61341846", "0.61337847", "0.6128005", "0.6126788", "0.6126589", "0.61208594", "0.61203176", "0.61145777", "0.61099213", "0.6108549", "0.61069804", "0.6106618", "0.6105344", "0.6102829", "0.61026216", "0.6099913", "0.60892504", "0.6087733", "0.60841113", "0.6074982", "0.6065783", "0.6063565", "0.60542965", "0.60538566", "0.60504556", "0.6043808", "0.6039201", "0.6029763", "0.602955", "0.6023183", "0.6019576", "0.6015793", "0.6015793", "0.60144645", "0.6012548", "0.60105795", "0.6008561", "0.60009164", "0.59890884", "0.5979011", "0.5977548", "0.59773886" ]
0.627221
43
$Type = new ProductType();
public function actionIndex() { //$data['type'] = ProductType::model()->findAll(""); $this->render('index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductType()\n {\n }", "public function __construct(){\n $this->productos = new Producto();\n }", "public static function build($type) {\n $product = $type;\n if (class_exists($product)) {\n return new $product();\n }\n else {\n throw new Exception(\"Invalid product type given.\");\n }\n }", "function createProductType($productType_data)\n {\n \n $producttype_model = new ProductType();\n //var_dump($productType_data);die;\n $producttype_model->cat_id = $productType_data['cat_id'];\n $producttype_model->subcat_id = $productType_data['subcat_id'];\n $producttype_model->store_id = $productType_data['store_id'];\n $producttype_model->site_id = $productType_data['site_id'];\n $producttype_model->product_type = isset($productType_data['product_type']) ? $productType_data['product_type']: '';\n $producttype_model->special_upc = isset($productType_data['special_upc']) ? $productType_data['special_upc'] : '';\n $producttype_model->other_value = isset($productType_data['other_value']) ? $productType_data['other_value'] : '';\n $producttype_model->item_type = isset($productType_data['item_type']) ? $productType_data['item_type'] : '';\n $producttype_model->save();\n }", "function __construct($type) {\n\t$this->type = $type;\n\t}", "public function getProductType();", "public function __construct() {\n $this->Types;\n }", "public function __construct(){\n\n\t\t$this->types_model = new Types();\n\t}", "public static function getInstance(){\n\t\tif(!isset(self::$_instance)){\n\t\t\tself::$_instance = new Add_rental_product_type();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "function __construct()\n\t{\n\t\t// this->model = new Producto();\n\t}", "function __construct($type='simple')\n {\n $this->type = $type;\n }", "public function __construct($type)\n {\n }", "public function product_type()\n {\n return $this->belongsTo('App\\ProductType');\n }", "public function productType()\n {\n return $this->belongsTo(\\App\\Models\\ProductType::class, \"product_type_id\", \"id\");\n }", "public function getTargetType($type) {\n $retObj = array();\n switch ($type) {\n case 'Brand':\n $retObj[] = new ProductBrand($this->targetData);\n $retObj[] = new ProductBrand();\n \n return $retObj;\n break;\n case 'Condition':\n $retObj[] = new ProductCanonicalCondition($this->targetData);\n $retObj[] = new ProductCanonicalCondition();\n \n return $retObj;\n break;\n case 'Category':\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1', $this->targetData);\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1');\n \n return $retObj;\n break;\n case 'Channel':\n $retObj[] = new ProductChannel($this->targetData);\n $retObj[] = new ProductChannel();\n \n return $retObj;\n break;\n case 'Item ID':\n $retObj[] = new ProductOfferId($this->targetData);\n $retObj[] = new ProductOfferId();\n \n return $retObj;\n break;\n case 'Product type':\n $retObj[] = new ProductType('PRODUCT_TYPE_L1', $this->targetData);\n $retObj[] = new ProductType('PRODUCT_TYPE_L1');\n \n return $retObj;\n break;\n case 'Channel exclusivity':\n $retObj[] = new ProductChannelExclusivity($this->targetData);\n $retObj[] = new ProductChannelExclusivity();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_0':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_1':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_2':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_3':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_4':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n \n default:\n break;\n }\n }", "public function __construct($type) {\n $this->type = $type;\n }", "public function store(Request $request)\n {\n $productType = new ProductType();\n $productType->name = $request->name;\n $productType->desc = $request->desc;\n $productType->save();\n return $productType;\n }", "public function __construct()\n {\n $this->mapper = \\Lib\\DataMapper::instance();\n $this->product = new Product();\n }", "public function run()\n {\n $array_Bshirt = ['เสื้อเชิ้ต','เสื้อแจ๊คเก็ต','เสื้อกล้าม'];\n $array_Gshirt = ['เสื้อยืด','เดรส'];\n $array_Bshoes = ['รองเท้าผ้าใบ','รองเท้าแตะ'];\n $array_Gshoes = ['รองเท้าส้นสูง', 'รองเท้ารัดส้น'];\n $array_Bag = ['กระเป๋าสะพายหลัง','กระเป๋าสะพายข้าง'];\n $array_primary = [\n 'เสื้อผ้าผู้ชาย' => $array_Bshirt,\n 'เสื้อผ้าผู้หญิง' => $array_Gshirt,\n 'รองเท้าผู้ชาย' => $array_Bshoes,\n 'รองเท้าผู้หญิง' => $array_Gshoes,\n 'กระเป๋า' => $array_Bag,\n ];\n\n $product = new ProductType;\n foreach ($array_primary as $key=>$primary){\n foreach ($primary as $type){\n $product->product_primary_type = $key;\n $product->product_secondary_type = $type;\n $product->save();\n $product = new ProductType;\n }\n }\n }", "public function getType()\n{\nreturn $this->type;\n}", "public function factoryMethod(): Product\n {\n return new ConcreteProduct1;\n }", "public function setProduct_type ($product_type) {\n\t$this->product_type = $product_type;\n\treturn $this;\n}", "public function __construct($type)\n {\n $this->type=$type;\n }", "public function model()\n {\n return new Product();\n }", "public function __construct()\n\t{\n\t\t$this->product = new Product();\n\t\t$this->validate = new Validate();\n\t}", "public function create($type)\n {\n //\n }", "public function __construct($id, $ProductName, $Extra, $maxExtra , $price, $type) {\n $this->id = $id;\n $this->ProductName = $ProductName;\n $this->Extra = $Extra;\n $this->maxExtra = $maxExtra;\n $this->price = $price;\n $this->type = $type;\n}", "public function show(ProductType $productType)\n {\n //\n }", "public function show(ProductType $productType)\n {\n //\n }", "public function show(ProductType $productType)\n {\n //\n }", "public function __construct()\n {\n $this->typeRepo = new TypesRepository();\n }", "public function __construct($type)\n {\n $this->type = $type;\n }", "public function __construct()\n {\n $this->model = new OrderProduct();\n }", "protected function _getProductTypeModel()\n\t{\n\t\treturn $this->getModelFromCache('Brivium_Store_Model_ProductType');\n\t}", "public function insertProductType() {\n $svcReturn = true;\n\n try {\n\n $input = array(\n 'name' => Input::get('name'),\n 'description' => Input::get('description'),\n 'brand' => Input::get('brand'),\n 'ip_address' => Request::getClientIp(),\n 'active' => Input::get('active'),\n );\n\n $table = new ProductType($input);\n $table->save();\n } catch (Exception $exc) {\n $svcReturn = false;\n }\n return $svcReturn;\n }", "public function __construct()\n {\n $fullClassName = explode('\\\\', get_class($this));\n $this->type = (string)array_pop($fullClassName);\n }", "public function __construct()\n {\n $this->pelanggan = new PelangganModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function __construct(){\n\t\t\t$this->productoDetalleModelo = new productoDetalleModelo;\n\t\t\t$this->productoFavoritoControlador = new productoFavoritoControlador();\n\t\t\t$this->productoEstrellaControlador = new productoEstrellaControlador();\n\t\t\t$this->productoCarritoControlador = new productoCarritoControlador();\n\t\t}", "public function __construct()\n {\n $this->productList = new ProductList();\n }", "public function getType()\n\t{\n\n\t}", "public function getType()\n\t{\n\n\t}", "public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}", "public function __construct($type)\n {\n $this->plant = new PlantFactory($type);\n }", "function createProduct($name,$price,$qty,$id):stdClass\n{\n$product=new stdClass();\n$product->name=$name;\n$product->price=$price;\n$product->quantity= $qty;\n$product->id=$id;\n\nreturn $product;\n}", "public function get_type(){ return $this->_type;}", "function __construct()\n {\n $this->_table = \"products_locations_type\"; \n }", "public function __construct() {\n $this->pengguna = new MsPenggunaModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function show(ProductProductType $productProductType)\n {\n //\n }", "public function testCreateProductStore()\n {\n\n }", "public function getType()\n {\n }", "public function getType()\n {\n }", "abstract public function factoryMethod(): Product;", "public function __construct()\n {\n $this->profil = new ProfilModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function run()\n {\n $typeProduct = new TypesProduct();\n $typeProduct->name = 'Venta';\n $typeProduct->description = 'Ventas';\n $typeProduct->save();\n $typeProduct = new TypesProduct();\n $typeProduct->name = 'Inventario';\n $typeProduct->description = 'Inventario';\n $typeProduct->save();\n\n }", "public function type() { }", "public function __construct($type, $price)\n {\n $this->type = $type;\n $this->price = $price;\n }", "private function get_type() {\n\n\t}", "public function __construct()\n {\n // $this->detail = new OrderDetail();\n // $this->product = new Product();\n // $this->category = new Category();\n // $this->branch = new Branch();\n // $this->delivery = new Delivery();\n }", "public function model()\n {\n return Product::class;\n }", "public function model()\n {\n return Product::class;\n }", "public function __construct(Product $product, $amount)\n {\n //\n }", "public function __construct( string$type='' )\n\t{\n\t\t$this->type= $type;\n\t}", "function makeProduct($productcode) {\n\t$product = new Product();\n \t$product->category = substr($productcode, 0, 1);\n \t$i = strpos($productcode, '-', 1) + 1;\n \t$product->style = substr($productcode, 1, $i - 2);\n \t$j = strpos($productcode, '-', $i) + 1;\n \t$product->type = substr($productcode, $i, $j - 1 - $i);\n \t$product->material = substr($productcode, $j);\n\treturn $product;\n}", "public function getType(){ }", "public function __construct()\n {\n $this->city = new City;\n $this->country = new Country;\n $this->event = new Event;\n $this->experience = new Experience;\n $this->place = new Place;\n $this->type = new Type;\n $this->subcategory = new Subcategory;\n }", "public function create(Product $product)\n {\n \n }", "function getType()\t { return $this->type;\t }", "public function create()\n {\n return view('product_type.create');\n }", "public function make($type);", "public function saveType()\n {\n }", "public function product(){\n\n }", "public function getType()\n {\n \n }", "public function __construct(Product $product)\n {\n $this->product = $product;\n }", "public function __construct(Product $product)\n {\n $this->product = $product;\n }", "public function __construct(Product $product)\n {\n $this->product = $product;\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, ProductType::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->product_type->create($input);\n\n\t\t\treturn Redirect::route('product_types.index');\n\t\t}\n\n\t\treturn Redirect::route('product_types.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "private function get_type(){\n\t\treturn $this->_type;\n\t}", "public function create()\n {\n return view('admin.product_type.create');\n }", "public function __construct()\n {\n $this->Customer = new Customer();\n $this->User = new User();\n }", "public function __construct(Type $type)\n {\n $this->type = $type;\n }", "public function __construct(Product $product) {\n $this->product = $product;\n }", "public function actionProducttype() {\n $data['type'] = ProductType::model()->findAll(\"\");\n $this->render('producttype',$data);\n }", "function __construct() \n\t{\n\t\tparent::__construct( 'rt_products', 'id', 'prd' );\n\t}", "public function setType($type){ }", "public function actionCreate()\n {\n $model = new ProductType();\n\n if ($model->load(Yii::$app->request->post())) {\n $file = UploadedFile::getInstance($model, 'file');\n if ($file && $file->tempName) {\n $model->file = $file;\n if ($model->validate(['file'])) {\n $dir = Yii::getAlias('@frontend') . '/web/upload/product_type/';\n $fileName = md5(microtime()) . '.' . $file->extension;\n //$fileName = $model->file->baseName . '.' . $model->file->extension;\n $model->file->saveAs($dir . $fileName);\n $model->file = $fileName;\n $model->img_product_type = $fileName;\n }\n }\n\n if ($model->save()) {\n\n $modelDesc = new \\common\\models\\ProductsTypeDesc();\n $modelDesc->product_type_id = $model->id_product_type;\n $modelDesc->desc_products = $model->desc_products;\n $modelDesc->desc_short_products = $model->desc_short_products;\n $modelDesc->desc_products_ua = $model->desc_products_ua;\n $modelDesc->desc_short_products_ua = $model->desc_short_products_ua;\n $modelDesc->save();\n\n return $this->redirect(['index', 'id' => $model->id_product_type]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "protected function getModelClass()\n {\n return Product::class;\n }", "public function getType()\n {\n \n $tipos = \n\n $TypeOfProduct = TypeOfProduct::find($this->type_id); \n\n return $TypeOfProduct->description;\n }", "public function menuType()\n {\n return ProductType::all();\n }", "public function create()\n {\n return View::make('product_types.create');\n }", "public function __construct($_quantity, $_productName, $_price, $_type, $_duty)\n {\n //variabili uguali all'input\n $this->quantity = $_quantity;\n $this->productName = $_productName;\n $this->price = $_price;\n\n //usando le funzioni del trait taxes mi trovo le tassazioni e i totali\n $this->salesTax = $this->findTax($_type);\n $this->dutyTax = $this->imported($_duty);\n $this->addNet($this->quantity * $this->price);\n $this->addTaxes($this->computeTaxes($this->quantity, $this->price, $this->salesTax, $this->dutyTax));\n $this->getTotal();\n\n \n }", "function getProductObjectFromId( $id, $productname ) {\r\n\treturn new Product ($id, $productname );\r\n}", "public function __construct()\n {\n parent::__construct('Product Details', 'Product');\n }", "public function create()\n\t{\n\t\treturn View::make('scaffolds.product_types.create');\n\t}", "public function create()\n {\n $typeproducts = Typeproduct::get();\n \n return view('product.createProduct', compact('typeproducts'));\n }", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}" ]
[ "0.7036644", "0.6904226", "0.66475195", "0.6638812", "0.6549509", "0.6545038", "0.6521901", "0.64813066", "0.64645153", "0.6366848", "0.6364224", "0.6346461", "0.6343838", "0.63367057", "0.6309972", "0.6292642", "0.6260802", "0.62197", "0.62170625", "0.6203932", "0.61900544", "0.6182794", "0.6182427", "0.61748797", "0.615386", "0.6140717", "0.61379766", "0.6137185", "0.6137185", "0.6137185", "0.61273724", "0.6123153", "0.61147726", "0.6095212", "0.6088921", "0.6068007", "0.60648", "0.6051556", "0.6035275", "0.6031153", "0.6031153", "0.60271144", "0.6024281", "0.60242015", "0.59936655", "0.5973041", "0.59706223", "0.59589976", "0.5954692", "0.59318185", "0.59318185", "0.5925111", "0.5911753", "0.5909032", "0.58933043", "0.5889455", "0.58695966", "0.58641696", "0.58624583", "0.58624583", "0.58404624", "0.58291626", "0.5825487", "0.5822412", "0.5807709", "0.58076125", "0.580571", "0.579333", "0.5773651", "0.57703894", "0.57514036", "0.57469416", "0.57367945", "0.57367945", "0.57367945", "0.5734076", "0.5732127", "0.5715432", "0.5714114", "0.5708909", "0.5708475", "0.5690375", "0.5678569", "0.5668423", "0.56648594", "0.56597644", "0.5632808", "0.56212455", "0.5620839", "0.5612673", "0.5612385", "0.5611317", "0.560382", "0.55996895", "0.559797", "0.559797", "0.559776", "0.559776", "0.559776", "0.55975807", "0.55975807" ]
0.0
-1
$Type = new ProductType();
public function actionProducttype() { $data['type'] = ProductType::model()->findAll(""); $this->render('producttype',$data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductType()\n {\n }", "public function __construct(){\n $this->productos = new Producto();\n }", "public static function build($type) {\n $product = $type;\n if (class_exists($product)) {\n return new $product();\n }\n else {\n throw new Exception(\"Invalid product type given.\");\n }\n }", "function createProductType($productType_data)\n {\n \n $producttype_model = new ProductType();\n //var_dump($productType_data);die;\n $producttype_model->cat_id = $productType_data['cat_id'];\n $producttype_model->subcat_id = $productType_data['subcat_id'];\n $producttype_model->store_id = $productType_data['store_id'];\n $producttype_model->site_id = $productType_data['site_id'];\n $producttype_model->product_type = isset($productType_data['product_type']) ? $productType_data['product_type']: '';\n $producttype_model->special_upc = isset($productType_data['special_upc']) ? $productType_data['special_upc'] : '';\n $producttype_model->other_value = isset($productType_data['other_value']) ? $productType_data['other_value'] : '';\n $producttype_model->item_type = isset($productType_data['item_type']) ? $productType_data['item_type'] : '';\n $producttype_model->save();\n }", "function __construct($type) {\n\t$this->type = $type;\n\t}", "public function getProductType();", "public function __construct() {\n $this->Types;\n }", "public function __construct(){\n\n\t\t$this->types_model = new Types();\n\t}", "public static function getInstance(){\n\t\tif(!isset(self::$_instance)){\n\t\t\tself::$_instance = new Add_rental_product_type();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "function __construct()\n\t{\n\t\t// this->model = new Producto();\n\t}", "function __construct($type='simple')\n {\n $this->type = $type;\n }", "public function __construct($type)\n {\n }", "public function product_type()\n {\n return $this->belongsTo('App\\ProductType');\n }", "public function productType()\n {\n return $this->belongsTo(\\App\\Models\\ProductType::class, \"product_type_id\", \"id\");\n }", "public function getTargetType($type) {\n $retObj = array();\n switch ($type) {\n case 'Brand':\n $retObj[] = new ProductBrand($this->targetData);\n $retObj[] = new ProductBrand();\n \n return $retObj;\n break;\n case 'Condition':\n $retObj[] = new ProductCanonicalCondition($this->targetData);\n $retObj[] = new ProductCanonicalCondition();\n \n return $retObj;\n break;\n case 'Category':\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1', $this->targetData);\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1');\n \n return $retObj;\n break;\n case 'Channel':\n $retObj[] = new ProductChannel($this->targetData);\n $retObj[] = new ProductChannel();\n \n return $retObj;\n break;\n case 'Item ID':\n $retObj[] = new ProductOfferId($this->targetData);\n $retObj[] = new ProductOfferId();\n \n return $retObj;\n break;\n case 'Product type':\n $retObj[] = new ProductType('PRODUCT_TYPE_L1', $this->targetData);\n $retObj[] = new ProductType('PRODUCT_TYPE_L1');\n \n return $retObj;\n break;\n case 'Channel exclusivity':\n $retObj[] = new ProductChannelExclusivity($this->targetData);\n $retObj[] = new ProductChannelExclusivity();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_0':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_1':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_2':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_3':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_4':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n \n default:\n break;\n }\n }", "public function __construct($type) {\n $this->type = $type;\n }", "public function store(Request $request)\n {\n $productType = new ProductType();\n $productType->name = $request->name;\n $productType->desc = $request->desc;\n $productType->save();\n return $productType;\n }", "public function __construct()\n {\n $this->mapper = \\Lib\\DataMapper::instance();\n $this->product = new Product();\n }", "public function run()\n {\n $array_Bshirt = ['เสื้อเชิ้ต','เสื้อแจ๊คเก็ต','เสื้อกล้าม'];\n $array_Gshirt = ['เสื้อยืด','เดรส'];\n $array_Bshoes = ['รองเท้าผ้าใบ','รองเท้าแตะ'];\n $array_Gshoes = ['รองเท้าส้นสูง', 'รองเท้ารัดส้น'];\n $array_Bag = ['กระเป๋าสะพายหลัง','กระเป๋าสะพายข้าง'];\n $array_primary = [\n 'เสื้อผ้าผู้ชาย' => $array_Bshirt,\n 'เสื้อผ้าผู้หญิง' => $array_Gshirt,\n 'รองเท้าผู้ชาย' => $array_Bshoes,\n 'รองเท้าผู้หญิง' => $array_Gshoes,\n 'กระเป๋า' => $array_Bag,\n ];\n\n $product = new ProductType;\n foreach ($array_primary as $key=>$primary){\n foreach ($primary as $type){\n $product->product_primary_type = $key;\n $product->product_secondary_type = $type;\n $product->save();\n $product = new ProductType;\n }\n }\n }", "public function getType()\n{\nreturn $this->type;\n}", "public function factoryMethod(): Product\n {\n return new ConcreteProduct1;\n }", "public function setProduct_type ($product_type) {\n\t$this->product_type = $product_type;\n\treturn $this;\n}", "public function __construct($type)\n {\n $this->type=$type;\n }", "public function model()\n {\n return new Product();\n }", "public function __construct()\n\t{\n\t\t$this->product = new Product();\n\t\t$this->validate = new Validate();\n\t}", "public function create($type)\n {\n //\n }", "public function __construct($id, $ProductName, $Extra, $maxExtra , $price, $type) {\n $this->id = $id;\n $this->ProductName = $ProductName;\n $this->Extra = $Extra;\n $this->maxExtra = $maxExtra;\n $this->price = $price;\n $this->type = $type;\n}", "public function show(ProductType $productType)\n {\n //\n }", "public function show(ProductType $productType)\n {\n //\n }", "public function show(ProductType $productType)\n {\n //\n }", "public function __construct()\n {\n $this->typeRepo = new TypesRepository();\n }", "public function __construct($type)\n {\n $this->type = $type;\n }", "public function __construct()\n {\n $this->model = new OrderProduct();\n }", "protected function _getProductTypeModel()\n\t{\n\t\treturn $this->getModelFromCache('Brivium_Store_Model_ProductType');\n\t}", "public function insertProductType() {\n $svcReturn = true;\n\n try {\n\n $input = array(\n 'name' => Input::get('name'),\n 'description' => Input::get('description'),\n 'brand' => Input::get('brand'),\n 'ip_address' => Request::getClientIp(),\n 'active' => Input::get('active'),\n );\n\n $table = new ProductType($input);\n $table->save();\n } catch (Exception $exc) {\n $svcReturn = false;\n }\n return $svcReturn;\n }", "public function __construct()\n {\n $fullClassName = explode('\\\\', get_class($this));\n $this->type = (string)array_pop($fullClassName);\n }", "public function __construct()\n {\n $this->pelanggan = new PelangganModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function __construct(){\n\t\t\t$this->productoDetalleModelo = new productoDetalleModelo;\n\t\t\t$this->productoFavoritoControlador = new productoFavoritoControlador();\n\t\t\t$this->productoEstrellaControlador = new productoEstrellaControlador();\n\t\t\t$this->productoCarritoControlador = new productoCarritoControlador();\n\t\t}", "public function __construct()\n {\n $this->productList = new ProductList();\n }", "public function getType()\n\t{\n\n\t}", "public function getType()\n\t{\n\n\t}", "public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}", "public function __construct($type)\n {\n $this->plant = new PlantFactory($type);\n }", "function createProduct($name,$price,$qty,$id):stdClass\n{\n$product=new stdClass();\n$product->name=$name;\n$product->price=$price;\n$product->quantity= $qty;\n$product->id=$id;\n\nreturn $product;\n}", "public function get_type(){ return $this->_type;}", "function __construct()\n {\n $this->_table = \"products_locations_type\"; \n }", "public function __construct() {\n $this->pengguna = new MsPenggunaModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function show(ProductProductType $productProductType)\n {\n //\n }", "public function testCreateProductStore()\n {\n\n }", "public function getType()\n {\n }", "public function getType()\n {\n }", "abstract public function factoryMethod(): Product;", "public function __construct()\n {\n $this->profil = new ProfilModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function run()\n {\n $typeProduct = new TypesProduct();\n $typeProduct->name = 'Venta';\n $typeProduct->description = 'Ventas';\n $typeProduct->save();\n $typeProduct = new TypesProduct();\n $typeProduct->name = 'Inventario';\n $typeProduct->description = 'Inventario';\n $typeProduct->save();\n\n }", "public function type() { }", "public function __construct($type, $price)\n {\n $this->type = $type;\n $this->price = $price;\n }", "private function get_type() {\n\n\t}", "public function __construct()\n {\n // $this->detail = new OrderDetail();\n // $this->product = new Product();\n // $this->category = new Category();\n // $this->branch = new Branch();\n // $this->delivery = new Delivery();\n }", "public function model()\n {\n return Product::class;\n }", "public function model()\n {\n return Product::class;\n }", "public function __construct(Product $product, $amount)\n {\n //\n }", "public function __construct( string$type='' )\n\t{\n\t\t$this->type= $type;\n\t}", "function makeProduct($productcode) {\n\t$product = new Product();\n \t$product->category = substr($productcode, 0, 1);\n \t$i = strpos($productcode, '-', 1) + 1;\n \t$product->style = substr($productcode, 1, $i - 2);\n \t$j = strpos($productcode, '-', $i) + 1;\n \t$product->type = substr($productcode, $i, $j - 1 - $i);\n \t$product->material = substr($productcode, $j);\n\treturn $product;\n}", "public function getType(){ }", "public function __construct()\n {\n $this->city = new City;\n $this->country = new Country;\n $this->event = new Event;\n $this->experience = new Experience;\n $this->place = new Place;\n $this->type = new Type;\n $this->subcategory = new Subcategory;\n }", "public function create(Product $product)\n {\n \n }", "function getType()\t { return $this->type;\t }", "public function create()\n {\n return view('product_type.create');\n }", "public function make($type);", "public function saveType()\n {\n }", "public function product(){\n\n }", "public function getType()\n {\n \n }", "public function __construct(Product $product)\n {\n $this->product = $product;\n }", "public function __construct(Product $product)\n {\n $this->product = $product;\n }", "public function __construct(Product $product)\n {\n $this->product = $product;\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, ProductType::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->product_type->create($input);\n\n\t\t\treturn Redirect::route('product_types.index');\n\t\t}\n\n\t\treturn Redirect::route('product_types.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "private function get_type(){\n\t\treturn $this->_type;\n\t}", "public function create()\n {\n return view('admin.product_type.create');\n }", "public function __construct()\n {\n $this->Customer = new Customer();\n $this->User = new User();\n }", "public function __construct(Type $type)\n {\n $this->type = $type;\n }", "public function __construct(Product $product) {\n $this->product = $product;\n }", "function __construct() \n\t{\n\t\tparent::__construct( 'rt_products', 'id', 'prd' );\n\t}", "public function setType($type){ }", "public function actionCreate()\n {\n $model = new ProductType();\n\n if ($model->load(Yii::$app->request->post())) {\n $file = UploadedFile::getInstance($model, 'file');\n if ($file && $file->tempName) {\n $model->file = $file;\n if ($model->validate(['file'])) {\n $dir = Yii::getAlias('@frontend') . '/web/upload/product_type/';\n $fileName = md5(microtime()) . '.' . $file->extension;\n //$fileName = $model->file->baseName . '.' . $model->file->extension;\n $model->file->saveAs($dir . $fileName);\n $model->file = $fileName;\n $model->img_product_type = $fileName;\n }\n }\n\n if ($model->save()) {\n\n $modelDesc = new \\common\\models\\ProductsTypeDesc();\n $modelDesc->product_type_id = $model->id_product_type;\n $modelDesc->desc_products = $model->desc_products;\n $modelDesc->desc_short_products = $model->desc_short_products;\n $modelDesc->desc_products_ua = $model->desc_products_ua;\n $modelDesc->desc_short_products_ua = $model->desc_short_products_ua;\n $modelDesc->save();\n\n return $this->redirect(['index', 'id' => $model->id_product_type]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "protected function getModelClass()\n {\n return Product::class;\n }", "public function getType()\n {\n \n $tipos = \n\n $TypeOfProduct = TypeOfProduct::find($this->type_id); \n\n return $TypeOfProduct->description;\n }", "public function menuType()\n {\n return ProductType::all();\n }", "public function create()\n {\n return View::make('product_types.create');\n }", "public function __construct($_quantity, $_productName, $_price, $_type, $_duty)\n {\n //variabili uguali all'input\n $this->quantity = $_quantity;\n $this->productName = $_productName;\n $this->price = $_price;\n\n //usando le funzioni del trait taxes mi trovo le tassazioni e i totali\n $this->salesTax = $this->findTax($_type);\n $this->dutyTax = $this->imported($_duty);\n $this->addNet($this->quantity * $this->price);\n $this->addTaxes($this->computeTaxes($this->quantity, $this->price, $this->salesTax, $this->dutyTax));\n $this->getTotal();\n\n \n }", "function getProductObjectFromId( $id, $productname ) {\r\n\treturn new Product ($id, $productname );\r\n}", "public function __construct()\n {\n parent::__construct('Product Details', 'Product');\n }", "public function create()\n\t{\n\t\treturn View::make('scaffolds.product_types.create');\n\t}", "public function create()\n {\n $typeproducts = Typeproduct::get();\n \n return view('product.createProduct', compact('typeproducts'));\n }", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}" ]
[ "0.7036644", "0.6904226", "0.66475195", "0.6638812", "0.6549509", "0.6545038", "0.6521901", "0.64813066", "0.64645153", "0.6366848", "0.6364224", "0.6346461", "0.6343838", "0.63367057", "0.6309972", "0.6292642", "0.6260802", "0.62197", "0.62170625", "0.6203932", "0.61900544", "0.6182794", "0.6182427", "0.61748797", "0.615386", "0.6140717", "0.61379766", "0.6137185", "0.6137185", "0.6137185", "0.61273724", "0.6123153", "0.61147726", "0.6095212", "0.6088921", "0.6068007", "0.60648", "0.6051556", "0.6035275", "0.6031153", "0.6031153", "0.60271144", "0.6024281", "0.60242015", "0.59936655", "0.5973041", "0.59706223", "0.59589976", "0.5954692", "0.59318185", "0.59318185", "0.5925111", "0.5911753", "0.5909032", "0.58933043", "0.5889455", "0.58695966", "0.58641696", "0.58624583", "0.58624583", "0.58404624", "0.58291626", "0.5825487", "0.5822412", "0.5807709", "0.58076125", "0.580571", "0.579333", "0.5773651", "0.57703894", "0.57514036", "0.57469416", "0.57367945", "0.57367945", "0.57367945", "0.5734076", "0.5732127", "0.5715432", "0.5714114", "0.5708909", "0.5708475", "0.5678569", "0.5668423", "0.56648594", "0.56597644", "0.5632808", "0.56212455", "0.5620839", "0.5612673", "0.5612385", "0.5611317", "0.560382", "0.55996895", "0.559797", "0.559797", "0.559776", "0.559776", "0.559776", "0.55975807", "0.55975807" ]
0.5690375
81
Defining a constructor accepting the Enum operand and two numberrs
function __construct($operand, $number1, $number2) { $this->operand = $operand; $this->number1 = $number1; $this->number2 = $number2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($o1, $o2) {\n if (!is_numeric($o1) || !is_numeric($o2)) {\n throw new Exception('Non-numeric operand.');\n }\n\n // Assign passed values to member variables\n $this->operand_1 = $o1;\n $this->operand_2 = $o2;\n }", "public function __construct($operand)\n {\n $this->operand = $operand;\n }", "public function __construct(string $enumClass)\n {\n parent::__construct(\"The enum $enumClass has empty case or you pass empty array as parameter\");\n }", "final private function __construct()\n {\n throw new Exception( 'Enum and Subclasses cannot be instantiated.' );\n }", "public function __construct($enum = null, $strict = false){\n\t\t\n\t\tif(!in_array($enum, $this->getConstantsList())) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf(\"%s does not contain the enum value `%d`\", get_class($this), $enum));\n\t\t}\n\t\t\n\t\tif(is_null($enum) && !defined('static::__default')){\n\t\t\tthrow new \\InvalidArgumentException(sprintf(\"No argument was passed, %s does not contain a default value `static::__default`\", get_class($this)));\n\t\t}\n\t\t\n\t\t$this->enum = isset($enum)?$enum:static::__default;\n\t}", "public function __construct($value) {\n\t\tparent::__construct($value, 2);\n\n\t\t$valid = [\n\t\t\tself::CHECKING_DEPOSIT,\n\t\t\tself::CHECKING_CREDIT_PRENOTIFICATION,\n\t\t\tself::CHECKING_ZERO_DOLLAR,\n\t\t\tself::CHECKING_DEBIT,\n\t\t\tself::CHECKING_DEBIT_PRENOTIFICATION,\n\t\t\tself::CHECKING_DEBIT_ZERO_DOLLAR,\n\t\t\tself::SAVINGS_DEPOSIT,\n\t\t\tself::SAVINGS_CREDIT_PRENOTIFICATION,\n\t\t\tself::SAVINGS_CREDIT_ZERO_DOLLAR,\n\t\t\tself::SAVINGS_DEBIT,\n\t\t\tself::SAVINGS_DEBIT_PRENOTIFICATION,\n\t\t\tself::SAVINGS_DEBIT_ZERO_DOLLAR,\n\t\t];\n\n\t\tif (!in_array($value, $valid)) {\n\t\t\tthrow new InvalidFieldException('Invalid transaction code \"' . $value . '\".');\n\t\t}\n\t}", "public function __construct(string $value) //constructor\n {\n $seperateValues=explode(\" \",$value); //splitting the input using ' '\n\n $this->operator=array_shift($seperateValues); //using this method, I stored the operator in the operator property of \n //this class and removed it from the array\n \n \n for ($x = 0; $x < count($seperateValues); $x++) \n {\n try\n {\n if(is_numeric($seperateValues[$x])==1)\n {\n $this->operands[$x]=(int)$seperateValues[$x]; //retreivng the numbers from the existing array to the operands \n } //property I have created int this class\n else\n {\n $this->flag=1; //if the array has something else than a number, the flag becomes 1\n }\n }\n catch(Exception $e)\n {\n $this->flag=1; //also if there is any exception, the flag becomes 1\n }\n }\n }", "public function __construct($name = null, $operator = null, $value = null);", "public function __construct($valor){\n\t\tif(is_numeric($valor)){\n\t\t\t$this->arabigo = intval($valor);\n\t\t\t$this->romano = CRomano::arabigo2romano($this->arabigo);\n\t\t}\n\t\telse{\n\t\t\t$this->arabigo = CRomano::romano2arabigo($valor);\n\t\t\t$this->romano = CRomano::arabigo2romano($this->arabigo);\n\t\t}\n\t}", "public function __construct(\n //nbMessErr $nbMessErr,\n // Bar $bar,\n // Baz $baz,\n // Other $other\n )\n {\n //$this->nbMessErr = $nbMessErr;\n // $this->bar = $bar;\n // $this->baz = $baz;\n // $this->other = $other;\n }", "public function __construct($_oprL = null,$_oprType = null,$_label = null,$_name = null,$_oper = null,$_debit = null,$_credit = null)\n {\n parent::__construct(array('oprL'=>$_oprL,'oprType'=>$_oprType,'Label'=>$_label,'Name'=>$_name,'oper'=>$_oper,'Debit'=>$_debit,'Credit'=>$_credit), false);\n }", "public function __construct($title, $status = self::DID_PASS)\n {\n if (!is_int($status)) {\n throw new InvalidArgumentException(\n \"{$status} is not a valid result status\"\n );\n }\n\n $this->title = $title;\n $this->status = $status;\n }", "final private function __construct(string $enum)\n {\n $enum = strtoupper($enum);\n if (!array_key_exists($enum, static::$values)) {\n throw new UnexpectedValueException();\n }\n $this->value = static::$values[$enum];\n }", "function __construct(/*$value=NULL,$key=NULL,$settings=array()*/){\n $this->err = new opc_status($this->_init_msgs());\n $this->val = $this->s_get('val_init');\n $this->err->mode_success = 2;\n $this->err->lev_base = 2;\n $ar = func_get_args();\n call_user_func_array(array(&$this,'init'),$ar);\n }", "public function __construct($red, $green, $blue)\n {\n $this->toSelf = \"toRGB\";\n\n if ($red < 0 || $red > 255) {\n throw new InvalidArgumentException(sprintf('Parameter red out of range (%s)', $red));\n }\n if ($green < 0 || $green > 255) {\n throw new InvalidArgumentException(sprintf('Parameter green out of range (%s)', $green));\n }\n if ($blue < 0 || $blue > 255) {\n throw new InvalidArgumentException(sprintf('Parameter blue out of range (%s)', $blue));\n }\n\n $this->red = $red;\n $this->green = $green;\n $this->blue = $blue;\n }", "public function __construct($value = null, int $type = VT_EMPTY, $codepage = CP_ACP) {}", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->name = func_get_arg(0);\n $this->values = func_get_arg(1);\n }\n }", "public function testValueIsInvalid()\n {\n $init = 'foo';\n $set = array('test');\n $str = new \\Pv\\PEnum($init, null, $set);\n }", "function __construct() {\n # Initialize Attributes\n $this->cur_val = 0;\n $this->cur_type = \"Integer\";\n $this->length = 0;\n $this->result = 0;\n $this->error_message = \"\";\n $this->error_log = array();\n $this->error_count = 0;\n }", "function __construct($errorMsg, $comparisonField){\r\n\t\tparent::__construct($errorMsg);\r\n\t\t$this->comparisonField = $comparisonField;\r\n\t}", "public function __construct()\n {\n if (1 == func_num_args()) {\n $this->insuranceTypesCount = func_get_arg(0);\n }\n }", "public function __construct ($value) {}", "public function __construct ($value) {}", "public function __construct ($value) {}", "abstract public function __construct($value);", "function __construct(int $r, int $g, int $b) {\n\t\t$this->col = sprintf(\"#%02X%02X%02X\", $r, $g, $b);\n\t}", "public function __construct($value) {\n\t\t$this->_value = $value + 0;\n\t\t$this->_result = '';\n\t}", "function __construct($h = 0, $s = 0, $v = 0)\n {\n if(!is_numeric($h) || !is_numeric($s) || !is_numeric($v)){\n throw new \\Exception('Values must be numeric');\n }\n\n //Check if parameters are in the proper range 0->255\n if(!($h>=0 && $h <=360) || !($s>=0 && $s <=1) || !($v>=0 && $v <=1)){\n throw new \\Exception('Expected values from 0 to 360 in hue, and 0 to 1 in saturation and value');\n }\n $this->hue = $h;\n $this->saturation = $s;\n $this->value = $v;\n }", "function __construct(int $loanTerm, int $loanAmount, int $rpa, int $extraAmount = 0, int $downPayment = 0)\n {\n $this->loanAmount = $loanAmount - $downPayment;\n $this->loanTerm = $loanTerm;\n $this->rpa = $rpa;\n $this->extraAmount = $extraAmount;\n $this->rpm = $rpa / (100 * 12);\n $this->loanMonths = $loanTerm * 12;\n $this->downPayment = $downPayment;\n }", "public function __construct($r, $g, $b)\r\n {\r\n $this->red = $r;\r\n $this->green = $g;\r\n $this->blue = $b;\r\n }", "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->type = func_get_arg(0);\n $this->currentBalance = func_get_arg(1);\n $this->twoMonthAverage = func_get_arg(2);\n $this->sixMonthAverage = func_get_arg(3);\n $this->beginningBalance = func_get_arg(4);\n }\n }", "public function __construct(int $num, string $vd)\n {\n $this->rut = [\n 'num' => $num,\n 'vd' => $this->case($vd),\n ];\n }", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->liable = func_get_arg(0);\n $this->chargeProcessingFee = func_get_arg(1);\n }\n }", "public function __construct($errors, $message = \"\", $code = 400) {\n\t\tparent::__construct(\"\",$message);\n\t\t$this->messages = $errors;\n\t\t$this->httpCode = $code;\n\t}", "function __construct($field, $value, $current) {\n\t\t\n\t\tparent::__construct();\n\t\t$this->field = $field;\n\t\t$this->field['msg'] = (isset($this->field['msg']))?$this->field['msg']:__('This field must be a valid color value.', 'redux');\n\t\t$this->value = $value;\n\t\t$this->current = $current;\n\t\t$this->validate();\n\t\t\n\t}", "function __construct($label, $value)\n\t{\n\t\t$this->label = $label;\n \t$this->value = $value;\n\t}", "public function __construct()\n {\n if (11 == func_num_args()) {\n $this->valid = func_get_arg(0);\n $this->internationalCallingCode = func_get_arg(1);\n $this->countryCode = func_get_arg(2);\n $this->location = func_get_arg(3);\n $this->isMobile = func_get_arg(4);\n $this->type = func_get_arg(5);\n $this->internationalNumber = func_get_arg(6);\n $this->localNumber = func_get_arg(7);\n $this->country = func_get_arg(8);\n $this->countryCode3 = func_get_arg(9);\n $this->currencyCode = func_get_arg(10);\n }\n }", "public function __construct(int $value) {\n if (!in_array($value, self::$values)) {\n throw new Exception($value . ' does not exist.');\n }\n\n $this->value = $value;\n }", "public function testInvalidConstructorParams6()\n {\n new AcceptMediaType(1, 'type', 'subtype', null, 0.4, 1234);\n }", "public function testInvalidEnum()\n {\n $this->expectException(UnexpectedValueException::class);\n\n $createPaymentAccountRequest = new CreatePaymentAccountRequest(\n 'Valid Description',\n 'INVALID_ENUM_VALUE'\n );\n }", "public function __construct($tokens, $unit)\n {\n if (! isset(self::$unitMap[$unit])) {\n throw new \\InvalidArgumentException(\"Not a valid unit.\");\n }\n if ($tokens <= 0) {\n throw new \\InvalidArgumentException(\"Amount of tokens should be greater then 0.\");\n }\n $this->tokens = $tokens;\n $this->unit = $unit;\n }", "public function testInvalidConstructorParams1()\n {\n new AcceptMediaType(1, null, 'subtype');\n }", "function create($whole, $num, $denom) {\n if ($denom == 0) { $denom = 1; }\n // negative?\n if ((($whole < 0) xor ($denom < 0)) xor ($num < 0)) {\n // yes make the numerator negative\n $this->num = -1 * (abs($whole) * abs($denom) + abs($num));\n } else {\n $this->num = (abs($whole) * abs($denom) + abs($num));\n }\n // denom always positive\n $this->denom = abs($denom);\n }", "function __construct($exact = NULL,\n $numerator = NULL,\n $denominator = NULL,\n $imaginary = NULL,\n $production = NULL) {\n $this->exact = $exact;\n $this->numerator = $numerator;\n $this->denominator = $denominator;\n $this->imaginary = $imaginary;\n $this->production = $production;\n }", "public function __construct(int $status, ?string $inputLeft = null, ?array $responses = null)\n {\n $this->status = $status;\n $this->inputLeft = $inputLeft;\n $this->responses = $responses;\n }", "public function __construct(int $value = 0) {}", "public function __construct($value, $message = '%s') {\n\t\tparent::__construct($value, $message);\n\t}", "public function testConstructor()\n {\n $params = ['fieldName' => 'quantity', 'value' => -100, 'minValue' => 0];\n $inputException = new InputException(\n new Phrase('The %fieldName value of \"%value\" must be greater than or equal to %minValue.', $params)\n );\n\n $this->assertEquals(\n 'The %fieldName value of \"%value\" must be greater than or equal to %minValue.',\n $inputException->getRawMessage()\n );\n $this->assertStringMatchesFormat('%s greater than or equal to %s', $inputException->getMessage());\n $this->assertEquals(\n 'The quantity value of \"-100\" must be greater than or equal to 0.',\n $inputException->getLogMessage()\n );\n }", "function __construct($message_or_previous = FALSE, $code = 0, $previous = NULL)\n {\n $message = FALSE;\n // Determine if the first parameter is a string or exception\n if ($message_or_previous) {\n if (is_string($message_or_previous)) {\n $message = $message_or_previous;\n } else {\n $previous = $message_or_previous;\n }\n }\n // If no message was provided, create a default message\n if (!$message) {\n $message = \"Invalid data type used for entity. Please use stdClass\\n\\t\\t\\t\\tor a subclass of C_DataMapper_Model. Arrays will be supported in\\n\\t\\t\\t\\tthe future.\";\n }\n parent::__construct($message, $code);\n }", "public function __construct()\n {\n if (7 == func_num_args()) {\n $this->baseCurrencyCode = func_get_arg(0);\n $this->baseCurrencySymbol = func_get_arg(1);\n $this->defaultDisplayCurrencyCode = func_get_arg(2);\n $this->defaultDisplayCurrencySymbol = func_get_arg(3);\n $this->availableCurrencyCodes = func_get_arg(4);\n $this->exchangeRates = func_get_arg(5);\n $this->extensionAttributes = func_get_arg(6);\n }\n }", "public function __construct($number = 0)\n {\n $this->value = $number;\n echo 'Class Created with Value: ' . $number . '<br>';\n }", "public function testValueIsCorrect()\n {\n $init = 'test';\n $set = array('test');\n $str = new \\Pv\\PEnum($init, null, $set);\n }", "public function __construct(array $options = array())\n {\n\t\tforeach ($options as $opt => $val)\n\t\t{\n\t\t\t$key = '_' . $opt;\n\t\t\tif (isset($this->$key))\n\t\t\t{\n\t\t\t\t$this->$key = $val;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->_min > $this->_max)\n\t\t{\n\t\t\tthrow new Zend_Validate_Exception('Minimum must not be greater than maximum.');\n\t\t}\n }", "final public static function make($value): self\n {\n $key = array_search($value, static::getValues(), true);\n if ($key === false) {\n throw new InvalidArgumentException('Invalid Enum Value');\n }\n\n return self::init($key);\n }", "public function __construct($state1, $state2)\n {\n parent::__construct(1, $state1);\n\n $this->available_states[] = $state1;\n $this->available_states[] = $state2;\n }", "public function testInvalidConstructorParams7()\n {\n new AcceptMediaType(-1, 'type', 'subtype', null, 0.4, null);\n }", "public function testConstructWithNegativeValues()\n {\n static::setExpectedExceptionRegExp('LogicException');\n new Box(-10, -10);\n }", "public function __construct($operator, $version)\n {\n if (!isset(self::$transOpStr[$operator])) {\n throw new \\InvalidArgumentException(\\sprintf('Invalid operator \"%s\" given, expected one of: %s', $operator, \\implode(', ', self::getSupportedOperators())));\n }\n $this->operator = self::$transOpStr[$operator];\n $this->version = $version;\n }", "public function __construct($value, $title = \"\") {\n if (!is_numeric($value)) {\n throw new \\InvalidArgumentException(\"value - number expected\");\n }\n if (!is_string($title)) {\n throw new \\InvalidArgumentException(\"title - string expected\");\n }\n $this->value = $value;\n $this->title = $title;\n }", "public function __construct() {\n $this->regex = '/^';\n foreach (CreditCardValidator::$card_patterns as $card => $regex)\n $this->regex .= '(' . $regex . ')|';\n $this->regex .= '$/';\n // remove final pipe\n $this->regex = str_replace(')|$/', ')$/', $this->regex);\n $this->invalid_msg = 'is not a valid CreditCard number';\n }", "function __construct2($shiftVal, $alphabetVal)\n {\n $this->shift = $shiftVal;\n $this->alphabet = $alphabetVal;\n }", "public function testInvalidConstructorParams2()\n {\n new AcceptMediaType(1, 'type', null);\n }", "public function __construct(RawCost|int $value)\n {\n $value = (string)$value;\n $this->set((int)$value);\n parent::__construct($this->property_name);\n }", "function __construct($armour, $maxhealth, $powerReq, $shieldFactor, $startArc, $endArc){\n parent::__construct($armour, $maxhealth, $powerReq, $shieldFactor);\n \n $this->startArc = (int)$startArc;\n $this->endArc = (int)$endArc;\n }", "function __construct($armour, $maxhealth, $powerReq, $shieldFactor, $startArc, $endArc){\n parent::__construct($armour, $maxhealth, $powerReq, $shieldFactor);\n \n $this->startArc = (int)$startArc;\n $this->endArc = (int)$endArc;\n }", "public function __construct($operation, $current_query, $current_args, $current_table, $error)\n {\n parent::__construct(\"{$operation} operation failed on query: {$current_query} using args: \" . print_r($current_args, TRUE) . \" [{$error}]\");\n\n $this->operation = $operation;\n $this->preparedQuery = $current_query;\n $this->preparedArgs = $current_args;\n $this->table = $current_table;\n $this->error = $error;\n }", "public function __construct(string $name, $value) {\n\t\t\t$info = Core\\DataType::info($value);\n\t\t\tif (($info->class == 'object') && ($info->type != 'string')) {\n\t\t\t\tthrow new Throwable\\InvalidArgument\\Exception('Invalid argument specified. Expected a primitive or unknown, but got \":type\"', array(':type', $info->type));\n\t\t\t}\n\t\t\t$this->info = $info;\n\t\t\t$this->name = $name;\n\t\t\t$this->value = $value;\n\t\t}", "public function __construct()\r\n {\r\n if(3 == func_num_args())\r\n {\r\n $this->compositeFault = func_get_arg(0);\r\n $this->customerSupport = func_get_arg(1);\r\n $this->servicePoints = func_get_arg(2);\r\n }\r\n }", "public function __construct($numerator = null, $denominator = null)\n {\n $this\n ->setNumerator($numerator)\n ->setDenominator($denominator);\n }", "public function __construct($paraArr,$relatedEval) {\n //$this->setProperty('mil_id', $relatedEval->getProperty('mil_id'));\n $this->setProperty('eval_method',$relatedEval->getProperty('eval_method'));\n $this->isReplacement = (($relatedEval->getProperty('eval_type')==3?true:false));\n foreach ($paraArr as $key => $val) {\n if (array_key_exists($key, $this->attrArr)) {\n if ($val != '') {\n if ($val == 0) {\n if ($key == 'acre_from' || $key == 'acre_to') {\n \n } else {\n continue;\n }\n }\n $this->attrArr[$key] = $val;\n \n }\n }\n }\n \n if (is_numeric($paraArr['acre_from']) && is_numeric($paraArr['acre_to'])) {\n if ($paraArr['acre_from'] > $paraArr['acre_to']) {\n throw new Exception('acre from should be larger than acre to');\n }\n }\n }", "public function __construct()\n {\n $ldbl = new DBLCoreValidtyp();\n $this->setDbl($ldbl);\n $this->setListTemplate('validtyp_list.tpl');\n $this->setFormTemplate('validtyp_form.tpl');\n }", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->currentAverageValue = func_get_arg(0);\n $this->metricName = func_get_arg(1);\n }\n }", "public function __construct()\n {\n if (6 == func_num_args()) {\n $this->generation = func_get_arg(0);\n $this->status = func_get_arg(1);\n $this->type = func_get_arg(2);\n $this->lastTransitionTime = func_get_arg(3);\n $this->message = func_get_arg(4);\n $this->reason = func_get_arg(5);\n }\n }", "public function __construct($repo)\n {\n $this->code = \"WOSPM0015\";\n $this->title = \"GITHUB_LABELS\";\n $this->message = \"Project should have issue labels.\";\n $this->type = MetricType::ERROR;\n $this->dependency = array(\"WOSPM0003\");\n $this->repo = $repo;\n }", "public function __construct($code, $identity, array $messages = [])\n {\n $code = (int) $code;\n\n if ($code < self::FAILURE_UNCATEGORIZED) {\n $code = self::FAILURE;\n } elseif ($code > self::SUCCESS ) {\n $code = 1;\n }\n\n $this->_code = $code;\n $this->_identity = $identity;\n $this->_messages = $messages;\n }", "public function __construct() {\n\t\n\t\t\t//Call the parent constructor\n\t\t\tparent::__construct();\n\t\t\t\n\t\t\t$this->validate = array_merge( \n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => [\n\t\t\t\t\t\t\t\t'rule' \t=> 'alphaNumeric',\n\t\t\t\t\t\t\t\t'required' \t=>\ttrue,\n\t\t\t\t\t\t\t\t'message' \t=> \tparent::$alphaNumericMessage\n\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t],\n\t\t\t\t\t\t$this->validate\n\t\t\t\t\t);\n\n\t\t}", "public function __construct(\n $maxpossmark,\n $status = self::STATUS_VALID,\n $errormessage = '') {\n\n $this->status = $status;\n $this->errormessage = $errormessage;\n $this->errorcount = 0;\n $this->actualmark = 0;\n $this->maxpossmark = $maxpossmark;\n $this->runhost = php_uname('n'); // Useful for debugging with multiple front-ends\n $this->testresults = array();\n $this->sourcecodelist = null; // Array of all test runs on the sandbox\n $this->gradercodelist = null; // Array of all grader runs on the sandbox\n $this->feedbackhtml = null; // Used only by combinator template grader\n }", "public function __construct($number)\n {\n $this->value = $number;\n }", "public function __construct(int $current, int $start, int $value, int $total, string $message)\n {\n $this->current = $current;\n $this->start = $start;\n $this->value = $value;\n $this->total = $total;\n $this->message = $message;\n }", "function __construct($nomeAl, $matricula, $curso, $instituicaoAl){\n \t\t\t$this->nomeAl = $nomeAl;\n \t\t\t$this->matricula = $matricula;\n \t\t\t$this->curso = $curso;\n\t\t\t$this->instituicaoAl = $instituicaoAl;\n \t\t}", "public function __construct($unit = '') {\n $this->init();\n $this->exp = $this->unitExp($unit);\n }", "public function __construct($num = 1, $rank = 13) {\n $this->rank = $rank;\n $this->num = $num;\n }", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->causes = func_get_arg(0);\n $this->message = func_get_arg(1);\n }\n }", "public function __construct( $operation )\n {\n parent::__construct(\n \"The operation '$operation' is not permitted.\"\n );\n }", "public function __construct(Account $user, FullRegatta $reg, Division $div) {\n parent::__construct(\"Race results\", $user, $reg);\n if (!in_array($div, $reg->getDivisions())) {\n throw new InvalidArgumentException(\"No such division ($div) in this regatta.\");\n }\n $this->division = $div;\n }", "public function testInvalidConstructorParams4()\n {\n new AcceptMediaType(1, 'type', 'subtype', null, 5);\n }", "public function __construct()\n\t{\n\t\t$this->add(array(\n 'name' => 'ppu', // 'usr_name'\n 'required' => true,\n 'filters' => array(),\n 'validators' => array(\n array(\n 'name' => '\\Zend\\I18n\\Validator\\Float',\n ),\n array(\n 'name' => 'GreaterThan',\n 'options' => array(\n 'min' => 0,\n 'inclusive' => false\n ),\n ),\n ), \n ));\n \n $this->add(array(\n 'name' => 'cpu', // 'usr_name'\n 'required' => false,\n 'filters' => array(),\n 'validators' => array(\n array(\n 'name' => '\\Zend\\I18n\\Validator\\Float',\n ),\n array(\n 'name' => 'GreaterThan',\n 'options' => array(\n 'min' => 0,\n 'inclusive' => false\n ),\n ),\n ), \n ));\n \n $this->add(array(\n 'name' => 'product', // 'usr_name'\n 'required' => true,\n 'filters' => array(),\n 'validators' => array(), \n ));\n\t}", "public function __construct($mode)\n {\n $mode = substr($mode, 0, 3);\n $rest = substr($mode, 1);\n\n $this->base = substr($mode, 0, 1);\n $this->plus = (strpos($rest, '+') !== false);\n $this->flag = trim($rest, '+');\n\n if ($this->flag == '') {\n $this->flag = 'b';\n }\n }", "public function __construct( array $numbers ,$message)\n {\n\n $this->numbers = $numbers;\n $this->message = $message;\n\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($valtype)\n {\n if (false === is_resource($valtype) || 'wasm_valtype_t' !== get_resource_type($valtype)) {\n throw new Exception\\InvalidArgumentException();\n }\n\n $this->inner = $valtype;\n }", "function __construct1($shiftVal)\n {\n $this->shift = $shiftVal;\n $this->alphabet = new Alphabet(); \n }", "public function __construct(array $errors)\n {\n parent::__construct(\"Validation failed: \" . json_encode($errors));\n $this->errors = $errors;\n }", "public function __construct($status, $message, array $results = array()){\n $this->status = $status;\n $this->message = $message;\n $this->results = $results;\n }", "public function __construct($message = \"\", $code = 0, \\Exception $previous = null)\n {\n if (!$code) {\n $code = self::E_ANY;\n }\n parent::__construct($message, $code, $previous);\n }", "public function __construct(array $values = array())\n {\n\n // set the type attribute, if available\n if (isset($values[AnnotationKeys::TYPE])) {\n $this->type = $values[AnnotationKeys::TYPE];\n }\n\n // set the code attribute, if available\n if (isset($values[AnnotationKeys::CODE])) {\n $this->code = $values[AnnotationKeys::CODE];\n }\n\n // set the result attribute, if available\n if (isset($values[AnnotationKeys::RESULT])) {\n $this->result = $values[AnnotationKeys::RESULT];\n }\n\n // pass the arguements through to the parent instance\n parent::__construct($values);\n }", "function __construct($numbers_from)\n {\n $this -> numbrers_from = $numbers_from;\n // $this -> numbers_to = $numbers;\n }", "public function __construct(int $httpCode, string $error_code, string $message)\n {\n $this->httpCode = $httpCode;\n $this->error_code = $error_code;\n $this->message = $message;\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 }", "public function __construct($label, $value, $totalResults) {\n $this->label = $label;\n $this->value = $value;\n $this->totalResults = $totalResults;\n }" ]
[ "0.6713969", "0.6340263", "0.60523725", "0.566583", "0.5644633", "0.5627109", "0.5532788", "0.552133", "0.55060625", "0.55014443", "0.5485953", "0.54538053", "0.544474", "0.5418187", "0.53756094", "0.5345832", "0.53069496", "0.52875847", "0.5282102", "0.52296215", "0.52060574", "0.51917225", "0.51917225", "0.51917225", "0.51824266", "0.51823944", "0.5162966", "0.51611114", "0.5157388", "0.5148072", "0.5142975", "0.5125547", "0.5118859", "0.5110212", "0.51059395", "0.51038826", "0.50664544", "0.50588864", "0.50514066", "0.50410974", "0.50405955", "0.5033902", "0.50332284", "0.5030652", "0.5024062", "0.5023235", "0.5001185", "0.49960443", "0.49897346", "0.49802473", "0.497313", "0.49574855", "0.4950187", "0.49423096", "0.49322435", "0.49151817", "0.49109933", "0.49048376", "0.49014527", "0.4884745", "0.4878545", "0.48761332", "0.48719692", "0.48690876", "0.48690876", "0.48683983", "0.4860891", "0.48600015", "0.48568544", "0.4853896", "0.48509216", "0.48506734", "0.4849044", "0.4845404", "0.4838374", "0.48325193", "0.4826489", "0.48207572", "0.4818665", "0.481817", "0.48129752", "0.4810094", "0.4806656", "0.48049322", "0.48044533", "0.48013324", "0.47948343", "0.4790534", "0.47882855", "0.47876254", "0.47875577", "0.47838867", "0.4778145", "0.47720107", "0.4770901", "0.47682688", "0.4767147", "0.47650734", "0.47566602", "0.47528905" ]
0.66733354
1
Defining getters and setters
function getNumber1() { return $this->number1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function setRequiredGetters();", "public static function setters();", "public static function getters();", "function doGetterSetter() {\n\tglobal $description_obj;\n\tglobal $table_name, $class_name;\n\tglobal $tabs, $tab2, $tab3;\n\n\tfComment($tabs,\"Getters and Setters\");\n\tforeach($description_obj as $obj) {\n\t\t//print_r($obj);\n\n\t\techo $tabs,\"/// getter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function get_{$obj->Field}()\\t\\t{return \\$this->$obj->Field;}\\n\",\n\t\t\t $tabs,\"/// setter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function set_{$obj->Field}(\\$val)\\t{\\$this->$obj->Field = \",assignEscape($obj),\";}\\n\",\n\t\t\t \"\\n\";\n\t}\n\techo $tabs,\"public function get_last_error()\\t\\t{return \\$this->_last_error;}\\n\";\n\techo \"\\n\\n\";\n}", "abstract protected function getDirectGetters();", "public static function setters() {\n return self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }" ]
[ "0.76285064", "0.7396789", "0.7115825", "0.708466", "0.70056367", "0.6847506", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.68462586", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.6758056", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255", "0.67037255" ]
0.0
-1
Note, the $priorException replicates the final getPrevious() method that was added in PHP 5.3 (this enables exception nesting in PHP 5.0+).
public function __construct(\Exception $priorException=null, $errorDetail=''){ $this->errorDetail = $errorDetail; $this->priorException = $priorException; parent::__construct($errorDetail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPriorException(){\n // dont call this method getPrevious as in php5.3+ because this\n // method is final and we want this to run in 5 and 5.3+\n return $this->priorException;\n }", "public function get_previous() { return $this->getPrevious(); }", "function previousPage()\n\t\t{\n\t\t\tif(!$this->hasPrevious())\n\t\t\t\tthrow new Exception(\"Page out of bounds\");\n\t\t\t\t\n\t\t\t$this->currentPage--;\n\t\t}", "public function getPrevious() {}", "public function getPrevious();", "public function Previous()\n {\n return parent::Previous();\n }", "public function prev()\n {\n $current = $this->current();\n\n if ($current) {\n $this->current = $current->getBefore();\n }\n }", "final public function getPrevious() {\n\t\treturn null;\n\t}", "public function getPrevious()\n {\n return $this->previous;\n }", "public function getPrevious()\n {\n return $this->previous;\n }", "public function previousElement();", "public function previous(): static\n {\n $link = Arr::get($this->links, 'prev');\n\n throw_unless($link, NoPreviousPageException::class);\n\n return $this->getResults($link);\n }", "public function getCause()\n {\n return $this->getPrevious();\n }", "public function testAssertMessagePrevious()\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('Caused by `RuntimeException`');\n\n $this->get('/posts/throw_chained');\n $this->assertContentType('test');\n }", "public function getPrevSibling();", "protected function checkPreviousVersion( $previous )\r\n {\r\n if ( !$previous->getClass( ) === $this->getClass( ) ) {\r\n throw new KVDdom_RedactieException ( 'Kan enkel updaten naar een vorige versie van mezelf!' );\r\n }\r\n if ( !$this->isCurrentRecord( ) ) {\r\n throw new KVDdom_RedactieException ( 'Dit object is niet de huidige versie en kan dus niet geupdate worden!');\r\n }\r\n if ( $previous->isCurrentRecord( ) ) {\r\n throw new KVDdom_RedactieException ( 'Er kan enkel geupate worden naar een oude versie van een record, niet naar de huidige! ');\r\n }\r\n }", "private function previous()\n {\n $this->m--;\n $this->init();\n }", "public function prev_entry()\n\t{\n\t\treturn $this->_prev_next('prev');\n\t}", "public function previous() {\r\n return prev($this->collection);\r\n }", "public function getException() {\n\t\treturn $this->lastException;\n\t}", "public function getPrevText()\n {\n return _t(__CLASS__ . '.PREVIOUS', 'Previous');\n }", "public function getPreviousObject()\n {\n return $this->__object;\n }", "public function getPrevious()\n {\n $prev = $this;\n $find = false;\n if (!is_null($this->parent)) {\n foreach ($this->parent->content as $c) {\n if ($c === $this) {\n $find=true;\n break;\n }\n if (!$find) {\n $prev = $c;\n }\n }\n }\n return $prev;\n }", "protected function previousStep()\r\n {\r\n $index = array_search($this->_currentStep, array_values($this->_steps)) - 1;\r\n $this->redirect(array_values($this->_steps)[($index > 0 ? $index : 0)]);\r\n }", "public function previousItem() {\n\t\treturn $this->previous()->current();\n\t}", "public function getPrevious($field);", "public function getPreviousValue();", "public function prevSibling()\n {\n return $this->adjacentSibling(-1);\n }", "final public static function getBaseException(\\Exception $exception)\n {\n while ($exception->getPrevious() !== null) {\n $exception = $exception->getPrevious();\n }\n\n return $exception;\n }", "public function prev()\n {\n return prev($this->steps);\n }", "public function testPrev()\n {\n $this->collection->next();\n $this->collection->prev();\n $this->assertEquals(0, $this->collection->key());\n $this->assertEquals(1, $this->collection->current());\n\n $this->collection->prev();\n $this->assertNull($this->collection->key());\n $this->assertFalse($this->collection->current());\n }", "protected function echoPreviousExceptions($e, $level = 0) {\n if ($level < $this->config->prevExceptionDepth && $e) {\n if ($this->isCLI) {\n $this->console->write('<eb>Preceded by </>')\n ->write('<e>[' . $e->getCode() . '] ' . $e->getMessage() . '</>')\n ->write('<e> @ ' . $e->getFile() . '\\'s line ' . $e->getLine() . '</>', true)\n ->writeln('');\n } else {\n ?>\n <div>\n <span class=\"alo-bold\">Preceded by </span>\n <span>[<?= $e->getCode() ?>]: <?= $e->getMessage() ?></span>\n <span> @ </span>\n <span class=\"alo-uline\"><?= $e->getFile() ?></span>\n <span> @ line </span>\n <span class=\"alo-uline\"><?= $e->getLine() ?>\n </div>\n <?php\n }\n\n $this->echoPreviousExceptions($e->getPrevious(), ++$level);\n }\n }", "public function getPrev() {\n\t\treturn $this->pagefiles->getPrev($this); \n\t}", "protected function _processPrevious()\n\t{\n\t\t$step = (int) $this->Session->read('Wizard.step');\n\t\t\n\t\tif( ! empty($step)){\n\t\t\t$step--;\n\t\t\t$this->_write($step);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\t\t\n\t}", "public function getPrevious($key)\n\t{\n\t\tif (in_array($key, $this->_keys))\n\t\t{\n\t\t\treturn $this->_previous[$key];\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public function previous($previous): static\n {\n $this->previous = $previous;\n // $this->previousLabel = $label;\n\n return $this;\n }", "public function getPrevious()\n {\n return $this->hasPrevious() ? $this->curPage - 1 : null;\n }", "public function previousPage()\n {\n return$this->currentPage - 1;\n }", "public function prev() {\n return $this->_prev($this->parent->children(), func_get_args());\n }", "public function getPreviousPage();", "function previous_post($format = '%', $previous = 'previous post: ', $title = 'yes', $in_same_cat = 'no', $limitprev = 1, $excluded_categories = '')\n {\n }", "public function previous()\n {\n return $this->getHeaders()['HTTP_REFERER'];\n }", "public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }", "public function getPreviousValue()\n {\n return $this->previousValue instanceof ValidFromAndUntilValueBuilder ? $this->previousValue->build() : $this->previousValue;\n }", "public function prev(){\n\t\t$this->nextRow(-1,'min');\n\t}", "public function previous_step() {\r\n\t\t$this->step --;\r\n\t}", "function getException() {\n\t\treturn $this->Exception;\n\t}", "public function getPreviousPage()\n\t{\n\t\treturn $this->previousPage;\n\t}", "function prevPage() {\n\t\treturn $this->hasPrevPage() ? $this->url(array('p' => $this->p + 1)) : null;\n\t}", "public function previous(): int;", "public function prev()\n {\n --$this->offset;\n }", "public function getPrev($criteria = null)\n\t{\n\t\treturn $this->_getRelativeElement($criteria, -1);\n\t}", "public function setPrevious($previous)\n {\n $this->previous = $previous;\n\n return $this;\n }", "public function getPreviousState();", "public static function getPreviousSiblingElement($node) {\n do {\n $node = $node->previousSibling;\n } while ($node && !($node instanceof DOMElement));\n return $node;\n }", "public function loadPreviousSibling()\n {\n $id = $this->_cache->getBackend()->getPreviousSiblingId($this);\n return $this->setPreviousSiblingId($id);\n }", "public function GetPrevLevel()\n {\n return $this->prevLevel;\n }", "public static function previous()\n {\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }", "public function previousAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $issue = $em->getRepository('BorrowersIssueBundle:Issue')->findPreviousIssue();\n\n if (!$issue) {\n throw $this->createNotFoundException('Unable to find Issue entity.');\n }\n\n return array('issue' => $issue,);\n }", "public function getPreviousPage() {\n\t\tif (($this->currentPage - 1) <= 0) {\n\t\t\t$this->currentPage = $this->countPages();\n\t\t\treturn $this->currentPage;\n\t\t} else {\n\t\t\treturn --$this->currentPage;\n\t\t}\n\t}", "public static function get_prev_next_post( $previous ) {\n\t\tif ( ! TpsOptions::get( 'button_behaviour' ) === 'post' ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( TpsOptions::get( 'post_navigation_inverse' ) ) {\n\t\t\t$previous = ! $previous;\n\t\t}\n\n\t\t$post = get_adjacent_post( TpsOptions::get( 'post_navigation_same_category' ), '', $previous );\n\t\tif ( ! $post ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $post->ID;\n\t}", "protected function previous($text)\n\t{\n\t\treturn $this->backwards(__FUNCTION__, $text, $this->page - 1);\n\t}", "public function previous() {\n\t\t--$this->_position;\n\t\treturn $this;\n\t}", "private function backTraceError()\n {\n //Set up backtrace variables\n $backtraceStarted = null;\n $rawBacktrace = debug_backtrace();\n $cleanBacktrace = $backtraceSeparator = '';\n $i = 0;\n\n //Loop through the backtrace\n foreach ( $rawBacktrace as $a_key => $a_value )\n {\n //If a file or line is not set, skip this iteration\n if ( ! isset($a_value['file']) || ! isset($a_value['line']) )\n {\n continue;\n }\n\n //Start saving the backtrace from the file the error occurred in, skip the rest\n if ( ! isset($backtraceStarted) && basename($a_value['file']) != $this->failedOnFile )\n {\n continue;\n }\n else\n {\n $backtraceStarted = true;\n }\n\n //Add this file to the backtrace\n $cleanBacktrace .= $backtraceSeparator . basename($a_value['file']) . ' [' . $a_value['line'] . ']';\n\n //Set the separator for the next iteration\n $backtraceSeparator = ' < ';\n\n //Increment the counter\n $i ++;\n }\n\n //Return the backtrace\n return $cleanBacktrace;\n }", "public function getPreviousPageUrl()\n {\n return $this->previousPageUrl;\n }", "public function previousSibling()\n {\n $node = $this->node->previousSibling;\n\n if ($node === null) {\n return null;\n }\n\n return new Element($node);\n }", "public function getPreviousValue()\n {\n return $this->previousValue instanceof CustomFieldsBuilder ? $this->previousValue->build() : $this->previousValue;\n }", "public function previous()\n {\n $this->cursor--;\n }", "public function previousAttribute();", "public function getPreviousUrl() {\r\n\t\treturn $this->Session->read('history.current');\r\n\t}", "public function previous_page(){\n if($this->current_page > 1){\n return $this->current_page - 1;\n }\n else{\n return NULL;\n }\n }", "protected function getPreviousButtonText() {\n return $this->previousButtonText;\n }", "#[\\ReturnTypeWillChange]\n public function prev()\n {\n $value = prev($this->_data);\n return key($this->_data) !== null ? $value : null;\n }", "public function getPreviousValue()\n {\n return $this->previousValue instanceof ParcelBuilder ? $this->previousValue->build() : $this->previousValue;\n }", "public function previousNode(): ?Node\n {\n return $this->traverse('previous');\n }", "public function getPreviousVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 1 ? $versions[1] : 0;\n }", "public function getException()\r\n {\r\n return count($this->oException) == 0 ? null :\r\n (count($this->oException) == 1 ? $this->oException[0] :\r\n $this->oException);\r\n }", "public function prevSibling($path)\n {\n return $this->adjacentSibling($path, -1);\n }", "public function getPreviousPageUrl();", "public function getPreviousPageUrl();", "private function getPreviousPartitionStep()\n\t{\n\t\t// Fetch the partition steps and wanted partitioning of the last saved action\n\t\t$undoStep = array_pop($this->undoArray);\n\n\t\t// If it is NULL, there are no undo steps\n\t\tif (is_null($undoStep))\n\t\t\treturn(NULL);\n\n\t\t// If the current partition steps are equal to the last saved partition steps => go back another step in the history\n\t\tif ($this->getUndoMd5() == md5(serialize($undoStep['ps'])))\n\t\t{\n\t\t\t// Fetch the partition steps and wanted partitioning of the (2nd) last saved action\n\t\t\t$undoStep = array_pop($this->undoArray);\n\n\t\t\t// If it is NULL, there are no undo steps (now)\n\t\t\tif (is_null($undoStep))\n\t\t\t\treturn(NULL);\n\t\t}\n\n\t\treturn($undoStep);\n\t}", "public function Previous()\n {\n $item = false;\n if ($this->getItemPointer() >= 0) {\n $item = $this->Current();\n $this->setItemPointer($this->getItemPointer() - 1);\n }\n\n return $item;\n }", "public function getPrevPage()\n {\n return $this->prevPage;\n }", "public static function previous_post_link () : void\n {\n add_filter(\"previous_post_link\", function ($output) {\n $previousPost = get_adjacent_post();\n \n if ($previousPost !== '') {\n $previousPostTitle = strlen(get_the_title($previousPost)) > 30 ? substr(get_the_title($previousPost), 0, 30) . \"...\" : get_the_title($previousPost);\n\n $output = '<div class=\"thumb\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\">' . get_the_post_thumbnail($previousPost, \"pagination_between_post\", [\"class\" => \"img-fluid\"]) . '</a>';\n $output .= '</div>';\n \n $output .= '<div class=\"arrow\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><span class=\"lnr text-white ti-arrow-left\"></span></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"detials\">';\n $output .= '<p>' . __(\"Prev Post\", \"dingo\") . '</p>';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><h4>' . $previousPostTitle . '</h4></a>';\n $output .= '</div>';\n } else {\n $output = '';\n }\n \n return $output;\n });\n }", "protected function getPreviousButton()\n {\n if ($this->paginator->currentPage() <= 1) {\n return $this->getDisabledLink($this->previousButtonText);\n }\n\n $url = $this->paginator->url(\n $this->paginator->currentPage() - 1\n );\n\n return $this->getPrevNextPageLinkWrapper($url, $this->previousButtonText, 'prev');\n }", "protected function GetPreviousStep()\n {\n static $oPreviousStep;\n if (!$oPreviousStep) {\n $oPreviousStep = TdbShopOrderStepList::GetPreviousStep($this);\n }\n\n return $oPreviousStep;\n }", "public function getException()\r\n\t{\r\n\t\treturn $this->_exception;\r\n\t}", "public function getException(){\n return $this->_exception;\n }", "static public function getPrevPage() {\n\t\treturn self::$prev_page;\n\t}", "abstract protected function setPreviousPage();", "public function getException() {\n\t\treturn $this->_exception;\n\t}", "public function getException() {\n return $this->exception;\n }", "function get_previous_posts_page_link()\n {\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "function getPreviousState();" ]
[ "0.8415124", "0.6608055", "0.64358026", "0.64160377", "0.6182544", "0.6154293", "0.6143511", "0.6099226", "0.6063559", "0.6063559", "0.59837085", "0.5942604", "0.5887682", "0.58704513", "0.58400077", "0.57685745", "0.57453316", "0.573074", "0.56826293", "0.5675963", "0.5624606", "0.56009686", "0.5574156", "0.55603504", "0.5557728", "0.5552878", "0.5515063", "0.5508734", "0.55062854", "0.54778516", "0.54735464", "0.5450906", "0.544411", "0.54399616", "0.5432438", "0.5425403", "0.54250133", "0.5418621", "0.5391963", "0.53838676", "0.53764844", "0.5370639", "0.5366831", "0.53593004", "0.534873", "0.53320247", "0.5328447", "0.5301503", "0.5296238", "0.52932817", "0.52806896", "0.52558476", "0.52468944", "0.5243367", "0.52372986", "0.52307296", "0.5230121", "0.5227358", "0.52215445", "0.51989216", "0.5192807", "0.51841015", "0.5181039", "0.51800513", "0.51714236", "0.51713943", "0.51709974", "0.51699024", "0.51610965", "0.5151709", "0.5128921", "0.51219314", "0.51195407", "0.51047826", "0.5099042", "0.5094846", "0.5094765", "0.5091997", "0.5081916", "0.5081916", "0.50774235", "0.5075004", "0.50726867", "0.5067316", "0.50611526", "0.5046406", "0.5035384", "0.50300694", "0.50297576", "0.5029168", "0.5025033", "0.5024522", "0.5018901", "0.501499", "0.501499", "0.501499", "0.501499", "0.501499", "0.501499", "0.5012671" ]
0.5754858
16
Get the detail error message (if any)
public function getErrorDetail(){ return $this->errorDetail; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getErrorDetail()\n {\n return $this->singleValue('//i:errorDetail');\n }", "public function getMessage()\n {\n return $this->_error;\n }", "public function message()\n {\n return $this->getError();\n }", "public function get_error_message() {\n\t\treturn $this->error_message;\n\t}", "function get_error_message() {\n return $this->error_msg;\n }", "public function getMessage()\n {\n return isset($this->data->failure_msg) ? $this->data->failure_msg : '';\n }", "public function message()\n {\n return $this->errorText;\n }", "public function getErrorMessage(): ?string {\n\t\t// 1. a string with an error message (e.g. `{\"error\":{\"code\":404,\"errors\":\"invalid token\"},\"success\":false}`)\n\t\t// 2. an object (e.g. `{\"error\":{\"code\":120,\"errors\":{\"name\":\"payload\",\"reason\":\"required\"}},\"success\":false}`)\n\t\t//\n\t\t// Below is an attempt to make sense of such craziness.\n\t\t$error = $this->getValue('[error][errors]');\n\t\tif ($error === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!is_array($error)) {\n\t\t\t$error = [\n\t\t\t\t'name' => 'generic',\n\t\t\t\t'reason' => $error,\n\t\t\t];\n\t\t}\n\n\t\treturn sprintf(\n\t\t\t'name=%s, reason=%s',\n\t\t\t(array_key_exists('name', $error) ? $error['name'] : 'missing'),\n\t\t\t(array_key_exists('reason', $error) ? $error['reason'] : 'missing')\n\t\t);\n\t}", "public function message()\n {\n return $this->error_message;\n }", "public function getErrorMessage()\r\n {\r\n return $this->error_message;\r\n }", "public function getErrorMessage()\n {\n return $this->error_message;\n }", "public function getDetailsOrMessage()\n {\n $result = !empty($this->_details) ? $this->_details : $this->getMessage();\n\n return $result;\n }", "public function getMessage()\n {\n return self::getMessageForError($this->value);\n }", "public function getMessage(): string\n\t{\n\t\treturn $this->err->getMessage();\n\t}", "public function getErrMsg() {\n return $this->get(self::ERR_MSG);\n }", "public function getErrMsg()\n {\n return $this->get(self::ERRMSG);\n }", "function getMessage()\n {\n return ($this->error_message_prefix . $this->message);\n }", "public function message()\n {\n return $this->doorman->error;\n }", "public function getErrorMessage()\n\t\t{\n\t\t\t$error = $this->statement->errorInfo();\n\t\t\t$errorText \t= '<h6>Something happened ... :(</h6>';\n\t\t\t$errorText .= 'Error code : '.$error[0].'<br>';\n\t\t\t$errorText .= 'Driver error code : '.$error[1].'<br>';\n\t\t\t$errorText .= 'Error Message : '.$error[2].'<br>';\n\t\t\treturn $errorText;\n\t\t}", "public function message()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMsg;\n }", "public function getErrMsg() {\n $errMsg = 'Error on line ' . $this->getLine() . ' in ' . $this->getFile()\n . '<br><b>Message: ' . $this->getMessage()\n . '</b><br>Exception Type: NoFormsFoundException';\n return $errMsg;\n }", "public function getError(){\n if (empty($this->getErrorCode())) {\n return null;\n }\n return $this->getErrorCode().': '.$this->getErrorMessage();\n }", "final public function error_get() : string{\r\n return (string) ($this->code != 0) ? \"[<b>{$this->code}</b>]: \".$this->message : $this->message;\r\n }", "public function getError()\n {\n\n if (!$this->getResponse()) {\n return null;\n }\n\n if ($this->isOK()) {\n return null;\n }\n\n $message = ($this->getResponse()->getStatusCode() ? $this->getResponse()->getStatusCode() . ' ' : '') .\n ($this->getResponse()->getReasonPhrase() ? $this->getResponse()->getReasonPhrase() : 'Unknown response reason phrase');\n\n try {\n\n $data = $this->getJson();\n\n if (!empty($data->message)) {\n $message = $data->message;\n }\n\n if (!empty($data->error_description)) {\n $message = $data->error_description;\n }\n\n if (!empty($data->description)) {\n $message = $data->description;\n }\n\n } catch (Exception $e) {\n }\n\n return $message;\n\n }", "function error() {\n return $this->error_message;\n }", "public function detail()\n {\n return $this->_msg;\n }", "public function getErrorDesc()\n {\n return $this->errorDesc;\n }", "function errorMsg() {\r\n return \r\n $this->resultError;\r\n }", "public function errorMessage() {\r\n\t\tif ($this->hasError()) {\r\n\t\t\treturn \"Query:\\n{$this->sql}\\nAnswer:\\n{$this->errorString}\";\r\n\t\t}\r\n\r\n\t\treturn 'No error occurred.';\r\n\t}", "public final function last_error_message()\n {\n return isset($this->error) ? $this->error['message'] : '';\n }", "public function getError(): ?string\n {\n return $this->debugMessage;\n }", "public function message(): string\n {\n return $this->errorMessage;\n }", "function getErrorMsg() {\n\t\treturn $this->errorMsg;\n\t}", "public function getErrorText(){\n return $this->error;\n }", "public function getMessage()\n {\n // check if any error message available.\n if (!is_null($this->_message)) {\n // return the message\n return $this->lang->line($this->_message) ? $this->lang->line($this->_message) : $this->_message;\n }\n\n // return nothing if previous condition does not apply\n return NULL;\n }", "public function getErrorMessage();", "public function getErrorMessage();", "public function getErrorMessage()\n {\n // then re-apply the error code:\n if(($this->error_code !== 0) && empty($this->error_msg))\n {\n $this->setError($this->error_code);\n }\n return $this->error_msg;\n }", "public function getErrorMsg()\n\t{\n\t\treturn $this->error;\n\t}", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n\t{\n\t\treturn $this->errorMessage;\n\t}", "public function getErrorDescription() {\n\t\treturn $this->error_description;\n\t}", "public function getErrorMessage() : string\n {\n return $this->errorMessage;\n }", "public function getError(): string\n {\n return $this->error;\n }", "public function getErrorMessage() {\n return $this->errorMessage;\n }", "public function errorInfo()\n {\n return $this->error;\n }", "public function errorMessage()\n\t{\n\t\treturn $this->_source->errorMessage();\n\t}", "public function getErrorMessage()\n {\n return $this->singleValue('//i:errorMessage');\n }", "function getErrorMessage()\n\t{\n\t\t// Ah, we have a custom message, use that.\n\t\tif ($this->errorMessage) {\n\t\t\treturn $this->errorMessage;\n\t\t}\n\t\t\n\t\t// Field is required, but empty, so return a fill in this form message.\n\t\telse if ($this->required && $this->value == false) \n\t\t\treturn sprintf($this->getTranslationString(\"Please fill in the required '%s' field.\"), $this->label);\n\t\n\t\t// Have we got an empty error message? Create a default one\n\t\telse if (!$this->errorMessage) {\n\t\t\treturn sprintf($this->getTranslationString(\"There's a problem with value for '%s'.\"), $this->label);\n\t\t} \n\t}", "public function getError(): string\n {\n return $this->Error;\n }", "public function getErrorMessage()\n {\n return null;\n }", "public function errorMessage()\n {\n return $this->provider->errorMessage;\n }", "public function getErrorMessage() {\n\t\tswitch( $this->error ) {\n\t\t\tcase TAN_NOT_FOUND : return \"Die TAN wurde nicht gefunden\";\n case REGISTRATION_USER_EXISTS : return \"Dieser Nutzer Existiert bereits\";\n\t\t}\n\t}", "public function getErrorDescription(): string\n {\n return $this->errorDescription;\n }", "public final function getLastErrorMsg() {\n return $this->lastErrorMsg;\n }", "public function errorMessage() {\n\t\t\treturn $this->strError; \n\t\t}", "public function getErrorDescription()\n {\n return $this->errorDescription;\n }", "public function getError();", "public function getError();", "public function getError();", "public function getError()\r\n {\r\n return count($this->strError) == 0 ? null :\r\n (count($this->strError) == 1 ? $this->strError[0] :\r\n $this->strError);\r\n }", "public function returnErrorMessage()\n \n {\n if (null !== $this->errormessage) {\n\n return $this->returnExternalObjectHtml($this->errorobjarray['errorobj'], $this->errorobjarray['att']);\n\n }\n\n }", "public function getErrorMessage()\n\t{\n\t\treturn $this->_errorMessage;\n\t}", "public function getErrorMessage(): string\n {\n if ($this->getSuccess()) {\n return '';\n }\n\n return (string) $this->errorMessage;\n }", "public function errorMessage()\n {\n return $this->error;\n }", "abstract public function getMsgError();", "function get_error()\n\t{\n\t\tif ($this->error != \"\") {\n\t\t\treturn \"Error:\".$this->error;\n\t\t}\n\t\treturn \"\";\n\t}", "public function errorInfo()\r\n\t{\r\n\t\treturn $this->errorInfo;\r\n\t}", "public function getErrorMessage()\n {\n return $this->applyTemplate();\n }", "public function get_error();", "public function get_error();", "public function errorInfo();", "public function errorInfo();", "public function getError() {}", "public function getFailedMessage()\n {\n if (array_key_exists(\"failedMessage\", $this->_propDict)) {\n return $this->_propDict[\"failedMessage\"];\n } else {\n return null;\n }\n }", "public function getError() : string\r\n {\r\n return $this->strError;\r\n }", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function getErrorMessage() {\n return '';\n }", "public function getMsgError() {\r\n return $this->msg_error;\r\n }", "function getErrorString() {\n\t\tswitch ($this->getErrorType()) {\n\t\t\tcase INSTALLER_ERROR_DB:\n\t\t\t\treturn 'DB: ' . $this->getErrorMsg();\n\t\t\tdefault:\n\t\t\t\treturn __($this->getErrorMsg());\n\t\t}\n\t}", "public function errorMessage() { return $this->errorMessage; }", "function get_error_info() {\n return $this->error_info;\n }", "protected function getErrorMessage(): string\n\t{\n\t\tif($this->input !== null)\n\t\t{\n\t\t\t$errorMessage = $this->input->getErrorMessage();\n\t\t}\n\n\t\treturn $errorMessage ?? $this->defaultErrorMessage;\n\t}", "public function message()\n {\n if ($this->error['type'] === 'custom') {\n return $this->error['message'];\n }\n\n $messages = null;\n\n if ($this->request) {\n $messages = $this->request->messages();\n }\n\n $message = $messages[\"{$this->error['attribute']}.check_file_{$this->error['type']}\"] ??\n trans(\"validation.check_file_{$this->error['type']}\");\n\n [$keys, $values] = Arr::divide($this->error['payload'] ?? []);\n\n $keys = \\array_map(function (string $key) {\n return \":{$key}\";\n }, $keys);\n\n return \\str_replace($keys, $values, $message);\n }", "public function get_message() { return $this->getMessage(); }", "public function errorMsg() {\r\n if(isset($this->get['e']) && isset($this->session[self::SESSION_ERROR])) {\r\n return '<p class=\"error\">' . $this->session[self::SESSION_ERROR] . '</p>';\r\n } else {\r\n return '';\r\n }\r\n }", "abstract protected function _getErrorString();", "public function getMessage()\n {\n if ($this->exception instanceof Exception) {\n return $this->exception->getMessage();\n }\n\n return null;\n }", "public function getLastError()\n {\n return $this->_errorMsg;\n }", "public function errorInfo() {}", "public function get_error() {\n \t$error = oci_error($this->resource);\n \treturn $error[ 'code' ] . ': ' . $error[ 'message' ];\n }" ]
[ "0.80024296", "0.7985574", "0.77561307", "0.7745844", "0.768539", "0.7666202", "0.76257175", "0.7576893", "0.7575024", "0.7513198", "0.75110054", "0.7485136", "0.747329", "0.7448172", "0.7436495", "0.7421363", "0.7399421", "0.73912066", "0.73876214", "0.7342235", "0.7342235", "0.73087484", "0.7295685", "0.72935694", "0.7287185", "0.7278593", "0.727752", "0.72673345", "0.7262811", "0.7246225", "0.7233338", "0.7220151", "0.7207765", "0.72031873", "0.72008216", "0.718867", "0.7186336", "0.71720815", "0.71720815", "0.71516615", "0.71507925", "0.714448", "0.714448", "0.714448", "0.714448", "0.714448", "0.714448", "0.714448", "0.7143201", "0.71201295", "0.71108747", "0.71083266", "0.7099183", "0.70978063", "0.7076947", "0.7070901", "0.7068364", "0.7061458", "0.7056867", "0.70380014", "0.7031094", "0.7026039", "0.7013118", "0.70019674", "0.70019406", "0.6992414", "0.6992414", "0.6992414", "0.6989736", "0.6987443", "0.6985945", "0.69736445", "0.6958724", "0.6950903", "0.69498765", "0.69476837", "0.69467163", "0.693224", "0.693224", "0.6928786", "0.6928786", "0.69223213", "0.6919321", "0.6914052", "0.6912353", "0.6912353", "0.69120675", "0.689873", "0.68939024", "0.6881099", "0.6879276", "0.68771005", "0.68726194", "0.6861855", "0.6843361", "0.6836482", "0.68329966", "0.6826485", "0.68106097", "0.6810494" ]
0.7856982
2
Get the nested causal exception (if any). Note, this replicates the final getPrevious() method that was added in PHP 5.3 (adding our own method enables exception nesting in PHP 5.0+).
public function getPriorException(){ // dont call this method getPrevious as in php5.3+ because this // method is final and we want this to run in 5 and 5.3+ return $this->priorException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCause()\n {\n return $this->getPrevious();\n }", "public function get_previous() { return $this->getPrevious(); }", "public function getPrevious()\n {\n $prev = $this;\n $find = false;\n if (!is_null($this->parent)) {\n foreach ($this->parent->content as $c) {\n if ($c === $this) {\n $find=true;\n break;\n }\n if (!$find) {\n $prev = $c;\n }\n }\n }\n return $prev;\n }", "public function getException() {\n\t\treturn $this->lastException;\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 getException()\r\n {\r\n return count($this->oException) == 0 ? null :\r\n (count($this->oException) == 1 ? $this->oException[0] :\r\n $this->oException);\r\n }", "function getException() {\n\t\treturn $this->Exception;\n\t}", "final public function getPrevious() {\n\t\treturn null;\n\t}", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException() {\n return $this->exception;\n }", "public function getException()\n {\n return $this->_exceptions;\n }", "public function getException() {\n\t\treturn $this->_exception;\n\t}", "public function getLastException(): ?\\Exception\n {\n return $this->lastException;\n }", "public function getPrevious()\n {\n return $this->previous;\n }", "public function getPrevious()\n {\n return $this->previous;\n }", "public function getException()\r\n\t{\r\n\t\treturn $this->_exception;\r\n\t}", "public function getException(){\n return $this->_exception;\n }", "public function getException();", "final public static function getBaseException(\\Exception $exception)\n {\n while ($exception->getPrevious() !== null) {\n $exception = $exception->getPrevious();\n }\n\n return $exception;\n }", "public function getOuterMostParent() {}", "public function prevInvisible() {\n if(!$this->parent) {\n return null;\n } else {\n return $this->_prev($this->parent->children(), func_get_args(), 'invisible');\n }\n }", "public function back() {\n if ($this->parent === null) {\n throw new IllegalStateException(\"can't go back - no parent image\");\n }\n return $this->parent;\n }", "public function getPrevious() {}", "public function GetPrevLevel()\n {\n return $this->prevLevel;\n }", "public function getPreviousObject()\n {\n return $this->__object;\n }", "public function Previous()\n {\n return parent::Previous();\n }", "public function previousItem() {\n\t\treturn $this->previous()->current();\n\t}", "public function getPreviousValue()\n {\n return $this->previousValue instanceof CustomFieldsBuilder ? $this->previousValue->build() : $this->previousValue;\n }", "public function getPrevious();", "public function getException(): Throwable;", "public function getException(): Throwable;", "public function previous() {\r\n return prev($this->collection);\r\n }", "function prevArticle() {\n\t\t$parent = $this->parent();\n\t\tif (!$parent) {\n\t\t\treturn false;\n\t\t}\n\t\t$parentChildren = $parent->children();\n\t\t$aCount = sizeof($parentChildren);\n\t\t$foundAtPos=null;\n\t\tfor ($i=0;$i<$aCount;$i++) {\n\t\t\tif ($parentChildren[$i]->getId() == $this->getId()) {\n\t\t\t\t$foundAtPos=($i-1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($foundAtPos>=0) {\n\t\t\treturn $parentChildren[$foundAtPos];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function returnStackTrace() {\n\t\ttry {\n\t\t\tthrow new \\Exception();\n\t\t} catch (\\Exception $e) {\n\t\t\treturn $e->getTrace();\n\t\t}\n\t}", "public function previous(): static\n {\n $link = Arr::get($this->links, 'prev');\n\n throw_unless($link, NoPreviousPageException::class);\n\n return $this->getResults($link);\n }", "public function getCause()\n {\n return $this->cause;\n }", "public function previous_day()\n {\n return $this->subDay();\n }", "public function prev_entry()\n\t{\n\t\treturn $this->_prev_next('prev');\n\t}", "public function getCause()\n {\n return $this->cause;\n }", "public function getPrevSibling();", "public function getPreviousValue()\n {\n return $this->previousValue instanceof ValidFromAndUntilValueBuilder ? $this->previousValue->build() : $this->previousValue;\n }", "public static function getException()\n {\n if (self::$error[0] == \"00000\") {\n return false;\n } else {\n return self::$error[1];\n }\n }", "public function getInterventionException()\n {\n return $this->interventionException;\n }", "public function testAssertMessagePrevious()\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('Caused by `RuntimeException`');\n\n $this->get('/posts/throw_chained');\n $this->assertContentType('test');\n }", "#[\\ReturnTypeWillChange]\n public function prev()\n {\n $value = prev($this->_data);\n return key($this->_data) !== null ? $value : null;\n }", "private function backTraceError()\n {\n //Set up backtrace variables\n $backtraceStarted = null;\n $rawBacktrace = debug_backtrace();\n $cleanBacktrace = $backtraceSeparator = '';\n $i = 0;\n\n //Loop through the backtrace\n foreach ( $rawBacktrace as $a_key => $a_value )\n {\n //If a file or line is not set, skip this iteration\n if ( ! isset($a_value['file']) || ! isset($a_value['line']) )\n {\n continue;\n }\n\n //Start saving the backtrace from the file the error occurred in, skip the rest\n if ( ! isset($backtraceStarted) && basename($a_value['file']) != $this->failedOnFile )\n {\n continue;\n }\n else\n {\n $backtraceStarted = true;\n }\n\n //Add this file to the backtrace\n $cleanBacktrace .= $backtraceSeparator . basename($a_value['file']) . ' [' . $a_value['line'] . ']';\n\n //Set the separator for the next iteration\n $backtraceSeparator = ' < ';\n\n //Increment the counter\n $i ++;\n }\n\n //Return the backtrace\n return $cleanBacktrace;\n }", "public function getThrownException()\n {\n return $this->thrownException;\n }", "public function getPrevious()\n {\n return $this->hasPrevious() ? $this->curPage - 1 : null;\n }", "public function exception(): ?\\Exception\n {\n return $this->error;\n }", "public function getExceptions()\n {\n if (array_key_exists(\"exceptions\", $this->_propDict)) {\n return $this->_propDict[\"exceptions\"];\n } else {\n return null;\n }\n }", "public function getOriginalError()\n {\n return $this->originalError;\n }", "public function getPrev($criteria = null)\n\t{\n\t\treturn $this->_getRelativeElement($criteria, -1);\n\t}", "public function getPrevBlock()\n {\n return $this->prevBlock;\n }", "public function getError()\n {\n return $this->currentError;\n }", "public function getPrevSibling()\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rightAttribute).'='.($owner->{$this->leftAttribute}-1));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner->find();\n\t}", "public function getExpectedException()\n {\n return null;\n }", "public function getExpectedException()\n {\n return null;\n }", "public function getError()\n {\n $nb_errors = count($this->errors);\n\n if (0 === $nb_errors) {\n return null;\n }\n\n return $this->errors[$nb_errors - 1];\n }", "public function previousNode(): ?Node\n {\n return $this->traverse('previous');\n }", "public function trustAnchorCertificate(): Certificate\n {\n if (count($this->certs) === 0) {\n throw new LogicException('No certificates.');\n }\n return $this->certs[count($this->certs) - 1];\n }", "function get_previous_comic($in_same_category = false, $category = null) { return get_adjacent_comic($category, true, $in_same_category); }", "function &thrownException() {\n return $this->_thrownException;\n }", "public function getParent(): ?array\n {\n if (!$this->currentFileName || !$this->metas) {\n return null;\n }\n\n $meta = $this->metas->get($this->currentFileName);\n\n if (!$meta || !isset($meta['parent'])) {\n return null;\n }\n\n $parent = $this->metas->get($meta['parent']);\n\n if (!$parent) {\n return null;\n }\n\n return $parent;\n }", "public function catchException()\n {\n // get the current exception\n $e = $this->getException();\n\n // throw a copy, with the original as the previous exception so that\n // we can see a full trace.\n $class = get_class($e);\n throw new $class($e->getMessage(), $e->getCode(), $e);\n }", "public function getCurrentError()\n {\n return $this->getCurrent(self::NAMESPACE_ERROR);\n }", "function getTraceback()\n\t{\n\t\tif(!$this->body)\n\t\t{\n\t\t\tthrow new CeleryException('Called getTraceback before task was ready');\n\t\t}\n\t\treturn $this->body->traceback;\n\t}", "public function getThrowable()\n {\n return $this->throwable;\n }", "public function getPreviousValue()\n {\n return $this->previousValue instanceof ParcelBuilder ? $this->previousValue->build() : $this->previousValue;\n }", "public function getPrevious($key)\n\t{\n\t\tif (in_array($key, $this->_keys))\n\t\t{\n\t\t\treturn $this->_previous[$key];\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public function prevSibling()\n {\n return $this->adjacentSibling(-1);\n }", "public function prevVisible() {\n if(!$this->parent) {\n return null;\n } else {\n return $this->_prev($this->parent->children(), func_get_args(), 'visible');\n }\n }", "public function getPreviousValue();", "public function endEntityCertificate(): Certificate\n {\n if (count($this->certs) === 0) {\n throw new LogicException('No certificates.');\n }\n return $this->certs[0];\n }", "public function prev() {\n return $this->_prev($this->parent->children(), func_get_args());\n }", "public function getError() {\n\t\treturn $this->current_error;\n\t}", "public function getParent()\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$dirname = fFilesystem::getPathInfo($this->directory, 'dirname');\n\t\t\n\t\tif ($dirname == $this->directory) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The current directory does not have a parent directory'\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn new fDirectory();\n\t}", "public static function backtrace() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::backtrace();\n\t}", "public function previousElement();", "public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }", "public function getNext()\n {\n $next = null;\n $find = false;\n if (!is_null($this->parent)) {\n foreach ($this->parent->content as $c) {\n if ($find) {\n $next = &$c;\n break;\n }\n if ($c == $this) {\n $find = true;\n }\n }\n }\n return $next;\n }", "static public function getFatalException()\n {\n return self::$exception;\n }", "public function nesting()\r\n\t{\r\n\t\treturn $this->context->current_nesting();\r\n\t}", "public function getLastNullCause()\n {\n return $this->lastNullCause;\n }", "public function inner()\n {\n return $this->inner;\n }", "public function inner()\n {\n return $this->inner;\n }", "function getBacktrace($frame = null)\n {\n if (defined('PEAR_IGNORE_BACKTRACE')) {\n return null;\n }\n if ($frame === null) {\n return $this->backtrace;\n }\n return $this->backtrace[$frame];\n }", "public function getError()\n {\n if (null == $this->error) {\n $this->error = new MessageContainer();\n }\n return $this->error;\n }", "public function get_chain()\n {\n return $this->_chain;\n }", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}", "public function getParent() {}" ]
[ "0.6553154", "0.6120389", "0.5961391", "0.5914953", "0.582243", "0.57577556", "0.56650764", "0.55970615", "0.5523271", "0.5523271", "0.5523271", "0.5523271", "0.5523271", "0.5523271", "0.5518413", "0.54944897", "0.5494391", "0.5482709", "0.5470664", "0.5470664", "0.5429438", "0.5398771", "0.53092974", "0.5289634", "0.5260937", "0.5239657", "0.522053", "0.5201901", "0.519305", "0.51176375", "0.5103984", "0.510207", "0.5050908", "0.5047495", "0.5031798", "0.5031798", "0.50274986", "0.5022578", "0.5022302", "0.50169116", "0.49815655", "0.49733594", "0.4964227", "0.49468395", "0.49108922", "0.49061212", "0.48772582", "0.48762146", "0.48752925", "0.4866598", "0.48588562", "0.48577327", "0.48396605", "0.48334634", "0.4822699", "0.4812001", "0.48109552", "0.481015", "0.48025703", "0.47977623", "0.47964805", "0.47964805", "0.4796116", "0.47929338", "0.47838074", "0.47825918", "0.47755867", "0.47565883", "0.47560725", "0.4737982", "0.4729509", "0.47249064", "0.4724004", "0.4723622", "0.47215474", "0.47113338", "0.47088355", "0.47079968", "0.47072378", "0.4676198", "0.46558118", "0.46492463", "0.46488592", "0.46348608", "0.46312007", "0.4615932", "0.46153355", "0.46147916", "0.4613263", "0.4613263", "0.46109167", "0.46063727", "0.46062946", "0.46062276", "0.46062276", "0.46062276", "0.46062276", "0.46062276", "0.46062276", "0.46062276" ]
0.6861253
0
Injects Phalcon Dependency Injector into this object.
public function setDI($di) { $this->di = $di; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDI(\\Phalcon\\DiInterface $dependencyInjector) {}", "public function __construct()\n {\n // Determine if we are running in a Windows environment\n self::$isWindows = (DIRECTORY_SEPARATOR === '\\\\');\n\n // Determine if we are running in safe mode\n self::$safeMode = (bool) ini_get('safe_mode');\n\n // Determin if we are running as the CLI\n self::$isCli = php_sapi_name() === 'cli';\n\n // load core classes required for operation\n $di = new DI;\n self::$di = $di;\n $this->setDi($di);\n\n\n // load the filesystem\n $di->setShared('fs', new Filesystem());\n $di->setShared('phalcana', $this);\n\n\n // Load the logger\n $di->setShared('logger', function () {\n\n $dir = APPPATH.'logs/';\n\n if (! is_dir($dir) || ! is_writable($dir)) {\n die('Logs directory MUST be writable');\n }\n\n if (!file_exists($dir.date('Y/m/'))) {\n mkdir($dir.date('Y/m/'), 0777, true);\n }\n\n $logger = new \\Phalcon\\Logger\\Adapter\\File($dir.date('Y/m/d').\".php\");\n\n return $logger;\n });\n\n $di->setShared('cache', $this->loadCache());\n\n\n\n // Load the primary config\n $di->setShared('setup', $this->configure());\n\n // Try to get mode from the environmental variable\n if ($env = getenv('phalcana_mode')) {\n self::$mode = constant('Phalcana\\Phalcana::'.strtoupper($env));\n }\n\n // Get mode from config\n $mode = $this->setup->get('mode', false);\n\n if ($mode) {\n self::$mode = $mode;\n }\n\n // Set the paths for the cascading file system\n $this->fs->setModules($this->setup->get('modules', array()));\n\n $di->setShared('loader', $this->loadLoader());\n\n\n // Load the error handler\n $di->setShared('error', $this->errorHandler());\n\n // Load the services into the dependency injector\n $this->loadSharedServices();\n\n if (self::$isCli) {\n $this->loadCliServices();\n } else {\n $this->loadServices();\n }\n\n // Run the inititalization files\n $this->init();\n\n }", "public function __construct()\n {\n // Dependencies automatically resolved by service container...\n }", "public function setDI(\\Phalcon\\DiInterface $dependencyInjector)\n {\n $this->di = $dependencyInjector;\n $this->db = $this->di->get('db');\n }", "function __construct() {\n\t\t$this->Inject();\n\t}", "public function setDI(\\Phalcon\\DiInterface $dependencyInjector) {\r\n\t\t$this->_di = $dependencyInjector;\t\r\n\t}", "public function setDI(DiInterface $dependencyInjector) {}", "public function setDI(\\Phalcon\\DiInterface $dependencyInjector) {\n $this->di = $dependencyInjector;\n }", "public function __construct(){\n $this->container = new Container();\n }", "public function injectContainer($container);", "public function __construct(DependencyInjector $dependencyInjector) {\n $this->dependencyInjector = $dependencyInjector;\n }", "public function finalConstruct(\\Pimple\\Container $dependencyInjector)\n {\n $this->dependencyInjector = $dependencyInjector;\n }", "public function __construct()\n {\n $this->propertyHandler = container_resolve(PropertyHandler::class, [$this]);\n $this->relationHandler = container_resolve(RelationHandler::class, [$this]);\n $this->actionHandler = container_resolve(ActionHandler::class, [$this]);\n }", "private function initDependencies()\n {\n // == HTML ==========================================================\n $this->di->mapService('core.html.factory', '\\Core\\Html\\HtmlFactory');\n\n // == AJAX ==========================================================\n $this->di->mapService('core.ajax', '\\Core\\Ajax\\Ajax');\n }", "public function __construct()\n\t\t{\n\t\t\t$this->doctrineHelper = new DoctrineHelper();\n\t\t\tself::$entityManager = $this->doctrineHelper->entityManager;\n\n\t\t\t$classes = $this->doctrineHelper->entityManager->getMetadataFactory()->getAllMetadata();\n\n\t\t\t$schemaTool = new SchemaTool($this->doctrineHelper->entityManager);\n\t\t\t$schemaTool->dropSchema($classes);\n\t\t\t$schemaTool->createSchema($classes);\n\n\t\t\t$appBuilderFactory = new Conpago\\AppBuilderFactory();\n\t\t\t$appBuilder = $appBuilderFactory->createAppBuilder(\"Web\", \".\");\n\t\t\t$appBuilder->registerAdditionalModule(new TestModule());\n\t\t\t$appBuilder->buildApp();\n\t\t\t$this->container = $appBuilder->getContainer();\n\n\t\t\t$this->passwordHasher = $this->container->resolve('Conpago\\Helpers\\Contract\\IPasswordHasher');\n\n\t\t\t$this->presenter = $this->container->resolve('Conpago\\Presentation\\Contract\\IJsonPresenter');\n\t\t}", "protected function prepareContainer()\n {\n $this -> container\n -> set('app', new InstanceService($this))\n -> set('config', new InstanceService($this -> config));\n }", "public function __construct()\n {\n $this->initializeSingleton();\n\n $this->container = new Container();\n\n $this->loadServices($this->container);\n }", "public function setDI($dependencyInjector){\n $this->di = $dependencyInjector;\n }", "public function __construct(\\Slim\\Container $container) {\n $this->container = $container;\n $this->entityManager = $container['em'];\n $this->logger = $container['logger'];\n }", "public static function setupDependencyInjection(Container $container)\n {\n\n }", "public function __construct() {\n // extensions, you'll need to inject services using this constructor\n }", "private function initDi() {\n\t\t$this->_di = new FactoryDefault();\n\t}", "public function __construct(Container $container) {\n $this->_commonService = $container->get(Service::class);\n $this->_userService = $container->get(UserService::class);\n $this->_authorize = $container->get('authorize');\n }", "public function __construct()\n {\n $this->userService = Core::getService(UserService::class);\n $this->applicationService = Core::getService(ApplicationService::class);\n $this->libraryService = Core::getService(LibraryService::class);\n $this->middleware('auth');\n }", "public function __construct()\n {\n // Dependencies automatically resolved by service container...\n //$this->users = $users;\n }", "protected function bootstrapContainer()\n {\n static::$instance = $this;\n $this->instance('zim', $this);\n $this->instance('config', new Config());\n $this->instance('event', new Dispatcher());\n $this->instance('router', new Router());\n $this->instance('env', $this->env());\n\n $this->aliases = [\n Zim::class => 'zim',\n Container::class => 'zim',\n Config::class => 'config',\n ConfigContract::class => 'config',\n Event::class => 'event',\n Dispatcher::class => 'event',\n RequestContract::class => 'request',\n Request::class => 'request',\n Router::class => 'router',\n ];\n }", "public function __construct(Container $container)\n {\n $this->container = $container;\n $this->container->register(TracyServiceProvider::class);\n if (!$this->container['config']->get('tracy.active')) {\n $this->registerHanlders();\n }\n }", "public function __construct($container){\n $this->container = $container;\n }", "public function __construct()\n {\n $this->container = Initializer::get()->getContainer();\n\n $this->structure_view = $this->container\n ->get('minphp.mvc')['default_structure'];\n\n // Initialize the structure view\n $this->structure = $this->container->get('view');\n\n // Initialize the main view\n $this->view = $this->container->get('view');\n\n // Load any preset models\n $this->uses($this->uses);\n\n // Load any preset components\n $this->components($this->components);\n\n // Load any preset helpers\n $this->helpers($this->helpers);\n }", "protected function loadSharedServices()\n {\n $di = $this->getDI();\n\n $setup = $di->get('setup');\n $fs = $di->get('fs');\n\n $di->setShared('assets', 'Phalcon\\Assets\\Manager');\n $di->setShared('escaper', 'Phalcon\\Escaper');\n $di->setShared('request', 'Phalcon\\Http\\Request');\n $di->setShared('response', 'Phalcon\\Http\\Response');\n\n $di->setShared('config', 'Phalcana\\Config');\n $di->setShared('inflector', 'Phalcana\\Inflector');\n $di->setShared('arr', 'Phalcana\\Arr');\n $di->setShared('num', 'Phalcana\\Num');\n $di->setShared('tag', 'Phalcon\\Tag');\n $di->setShared('filter', 'Phalcon\\Filter');\n $di->setShared('text', 'Phalcana\\Text');\n $di->setShared('utf8', 'Phalcana\\UTF8');\n $di->setShared('file', 'Phalcana\\File');\n $di->setShared('date', 'Phalcana\\Date');\n $di->setShared('title', 'Phalcana\\Title');\n\n if (UTF8::$server_utf8 === null) {\n // Determine if this server supports UTF-8 natively\n UTF8::$server_utf8 = extension_loaded('mbstring');\n }\n\n /**\n * The URL component is used to generate all kind of urls in the application\n */\n $di->setShared('url', function () use ($setup) {\n $url = new Url();\n $url->setBaseUri($setup->base_url);\n $url->setStaticBaseUri($setup->static_base_url);\n\n return $url;\n });\n\n\n //Registering the view component\n $di->set('view', function () use ($fs) {\n $view = new View();\n $view->setViewsDir('app/views/');\n\n $view->setCascadeDefault(APPPATH.'views');\n $view->setCascadePaths($fs->getModules());\n\n\n $view->registerEngines(array(\n '.volt' => function ($view, $di) {\n\n $volt = new Volt($view, $di);\n\n\n $volt->setOptions(array(\n 'compiledPath' => APPPATH.'cache/',\n 'compiledSeparator' => '_',\n 'compileAlways' => \\Phalcana\\Phalcana::$mode >= \\Phalcana\\Phalcana::PRODUCTION,\n ));\n\n $compiler = $volt->getCompiler();\n\n new Filters($compiler);\n new Functions($compiler);\n\n\n return $volt;\n }\n ));\n\n return $view;\n });\n\n if (isset($setup->database)) {\n $di->set('modelsManager', 'Phalcon\\Mvc\\Model\\Manager');\n $di->set('modelsMetadata', 'Phalcon\\Mvc\\Model\\MetaData\\Memory');\n $di->setShared('db', function () use ($setup) {\n return new \\Phalcon\\Db\\Adapter\\Pdo\\Mysql($setup->database->toArray());\n });\n }\n }", "public function init(){\n $this->container = new Container;\n $this->statistic = $this->container->get('common\\repositories\\StatisticRepository');\n }", "protected function bootstrapContainer()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n $this->instance(self::class, $this);\n\n $this->instance('path', $this->path());\n\n $this->instance('env', $this->environment());\n $this->registerContainerAliases();\n }", "public function loadService(\\Phalconry\\Di\\ServiceProviderInterface $provider);", "private function buildInjectors()\n\t{\n\t\t$container = $this;\n\n\t\t// Debug tracer\n\t\t$this->tracer = new Tracer;\n\n\t\t// Build provider injector\n\t\t$providerInjector =\n\t\t$this->providerInjector = new Injector(\n\t\t\t// Cache\n\t\t\t$this->providerCache, \n\t\t\t// Factory\n\t\t\tfunction($name) {\n\t\t\t\t$name = substr($name, 0, -8);\n\t\t\t\tthrow new LogicException(\"Provider for '$name' not found\\n\" . $this->tracer);\n\t\t\t}, \n\t\t\t// Debug tracer\n\t\t\t$this->tracer\n\t\t);\n\n\t\t// Build instance injector\n\t\t$this->instanceInjector = new Injector(\n\t\t\t// Cache\n\t\t\t$this->instanceCache, \n\t\t\t// Factory\n\t\t\tfunction($name) use ($providerInjector, $container) {\n\n\t\t\t\tif ($lazy = strpos($name, 'lazy::') === 0) {\n\t\t\t\t\t$name = substr($name, 6);\n\t\t\t\t}\n\n\t\t\t\t$this->tracer->request($name);\n\n\t\t\t\t$provider = $providerInjector->get($name . 'Provider');\n\t\t\t\t// Determin factory dependencies\n\t\t\t\t$factoryAndDependencies = Container::getDependencyArray($provider->getFactory());\n\t\t\t\t$instance = $lazy \n\t\t\t\t\t? function() use ($factoryAndDependencies){\n\t\t\t\t\t\treturn $this->invoke($factoryAndDependencies);\n\t\t\t\t\t} \n\t\t\t\t\t: $this->invoke($factoryAndDependencies);\n\n\t\t\t\t// Inject container\n\t\t\t\tif ($instance instanceof ContainerAwareInterface) {\n\t\t\t\t\t$instance->setContainer($container);\n\t\t\t\t}\n\n\t\t\t\t$this->tracer->received($name . ($lazy ? ' [lazy]' : ''));\n\n\t\t\t\treturn $instance;\n\t\t\t}, \n\t\t\t// Debug tracer\n\t\t\t$this->tracer\n\t\t);\n\n\t\t// Implement container as provider\n\t\t$this->provider('Container', new Provider([function(){\n\t\t\treturn $this;\n\t\t}]));\n\n\t\t// Implement instance injector as provider\n\t\t$this->provider('Injector', new Provider([function() {\n\t\t\treturn $this->instanceInjector;\n\t\t}]));\n\t}", "private function bindContainer()\n {\n parent::setInstance($this);\n \n $this->instance('container', $this);\n $this->instance(BaseContainer::class, $this);\n }", "public function init()\n {\n $dependencyInjector = $this->getDi();\n $eventsManager = $this->getEventsManager();\n $config = $this->_config;\n\n $adapter = $this->_getDatabaseAdapter($config->database->adapter);\n if (!$adapter) {\n throw new \\Engine\\Exception(\"Database adapter '{$config->database->adapter}' not exists!\");\n }\n $connection = new $adapter([\n \"host\" => $this->_config->database->host,\n \"username\" => $this->_config->database->username,\n \"password\" => $this->_config->database->password,\n \"dbname\" => $this->_config->database->dbname,\n \"options\" => [\n \\PDO::ATTR_EMULATE_PREPARES => false\n ]\n ]);\n\n if (!$config->application->debug && $config->database->useCache) {\n if ($dependencyInjector->offsetExists('modelsCache')) {\n $connection->setCache($dependencyInjector->get('modelsCache'));\n }\n }\n\n if ($config->application->debug) {\n // Attach logger & profiler\n $logger = new \\Phalcon\\Logger\\Adapter\\File($config->application->logger->path.'/db.log');\n if (isset($config->application->logger->formatter) && $config->application->logger->formatter == 'logstash') {\n $formatter = new \\Engine\\Logger\\Formatter\\Logstash($config->application->logger->project, 'database', gethostname());\n } else {\n $formatter = new \\Phalcon\\Logger\\Formatter\\Line($config->application->logger->format);\n }\n $logger->setFormatter($formatter);\n\n $profiler = new \\Phalcon\\Db\\Profiler();\n\n $eventsManager->attach('db', function ($event, $connection) use ($logger, $profiler) {\n if ($event->getType() == 'beforeQuery') {\n $statement = $connection->getSQLStatement();\n $logger->log($statement, \\Phalcon\\Logger::INFO);\n $profiler->startProfile($statement);\n }\n if ($event->getType() == 'afterQuery') {\n //Stop the active profile\n $profiler->stopProfile();\n }\n });\n\n if ($this->_config->application->profiler && $dependencyInjector->has('profiler')) {\n $dependencyInjector->get('profiler')->setDbProfiler($profiler);\n }\n $connection->setEventsManager($eventsManager);\n }\n\n $dependencyInjector->set('db', $connection);\n\n if (isset($config->database->useAnnotations) && $config->database->useAnnotations) {\n $dependencyInjector->set('modelsManager', function () use ($config, $eventsManager) {\n $modelsManager = new \\Phalcon\\Mvc\\Model\\Manager();\n $modelsManager->setEventsManager($eventsManager);\n\n //Attach a listener to models-manager\n $eventsManager->attach('modelsManager', new \\Engine\\Model\\AnnotationsInitializer());\n\n return $modelsManager;\n }, true);\n }\n\n /**\n * If the configuration specify the use of metadata adapter use it or use memory otherwise\n */\n $service = $this;\n $dependencyInjector->set('modelsMetadata', function () use ($config, $service) {\n if ((!$config->application->debug || $config->application->useCachingInDebugMode) && isset($config->metadata)) {\n $metaDataConfig = $config->metadata;\n $metadataAdapter = $service->_getMetaDataAdapter($metaDataConfig->adapter);\n if (!$metadataAdapter) {\n throw new \\Engine\\Exception(\"MetaData adapter '{$metaDataConfig->adapter}' not exists!\");\n }\n $metaData = new $metadataAdapter($config->metadata->toArray());\n } else {\n $metaData = new \\Phalcon\\Mvc\\Model\\MetaData\\Memory();\n }\n if (isset($config->database->useAnnotations) && $config->database->useAnnotations) {\n $metaData->setStrategy(new \\Engine\\Model\\AnnotationsMetaDataInitializer());\n }\n\n return $metaData;\n }, true);\n }", "public function __construct()\n {\n //$builder->addDefinitions('ConfigDI.php');\n //self::$container = $builder->build();\n }", "public function setDependencyInjector(DependencyInjector $dependencyInjector) {\n $this->dependencyInjector = $dependencyInjector;\n }", "public function setUp()\n {\n $delegate = new \\Rougin\\Slytherin\\Container\\Container;\n\n $this->container = new \\Rougin\\Slytherin\\Container\\ReflectionContainer($delegate);\n }", "protected function initDatabase()\n {\n $this->di->setShared('db', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config')->get('database')->toArray();\n $em = $this->getShared('eventsManager');\n $that = $this;\n\n $adapter = '\\Phalcon\\Db\\Adapter\\Pdo\\\\' . $config['adapter'];\n unset($config['adapter']);\n\n /** @var \\Phalcon\\Db\\Adapter\\Pdo $connection */\n $connection = new $adapter($config);\n\n // Listen all the database events\n $em->attach(\n 'db',\n function ($event, $connection) use ($that) {\n /**\n * @var \\Phalcon\\Events\\Event $event\n * @var \\Phalcon\\Db\\AdapterInterface $connection\n * @var DiInterface $that\n */\n if ($event->getType() == 'beforeQuery') {\n $variables = $connection->getSQLVariables();\n $string = $connection->getSQLStatement();\n\n if ($variables) {\n $string .= ' [' . join(',', $variables) . ']';\n }\n\n // To disable logging change logLevel in config\n $that->get('logger', ['db'])->debug($string);\n }\n }\n );\n\n // Assign the eventsManager to the db adapter instance\n $connection->setEventsManager($em);\n\n return $connection;\n });\n\n $this->di->setShared('modelsManager', function () {\n /** @var DiInterface $this */\n $em = $this->getShared('eventsManager');\n\n $modelsManager = new ModelsManager;\n $modelsManager->setEventsManager($em);\n\n return $modelsManager;\n });\n\n $this->di->setShared('modelsMetadata', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $config = $config->get('metadata')->toArray();\n $adapter = '\\Phalcon\\Mvc\\Model\\Metadata\\\\' . $config['adapter'];\n unset($config['adapter']);\n\n $metaData = new $adapter($config);\n\n return $metaData;\n });\n }", "public function __construct(LibraryDependencyResolverInterface $dependency_resolver) {\n $this->dependencyResolver = $dependency_resolver;\n }", "public function __construct(Container $container)\n {\n $this->setDependencies($container);\n }", "public function __construct(Container $app);", "public function __construct(Container $app);", "public function __construct() {\n $this->bootstrap = $this->Plugin();\n $this->crudService = $this->Plugin()->get('shopware_attribute.crud_service');\n }", "public function setUp()\n {\n // Create a new Laravel container instance.\n $container = new Container;\n\n // Resolve the pricing calculator (and any type hinted dependencies)\n // and set to class attribute.\n $this->priceHolder = $container->make('PAMH\\\\PriceHolder');\n }", "public function __construct()\n {\n $this->container = getContainer();\n $this->queue = $this->container->get(Queue::class);\n }", "protected function registerComposerBindings()\n {\n $this->singleton('composer', function ($app) {\n return new Composer($app->make('files'), $this->basePath());\n });\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->clientArticleService = app()->make(ClientArticleService::class);\n }", "public function register()\n {\n $this->container->share('db',function(){\n\n return new \\Medoo\\Medoo($this->getOptions());\n\n });\n // TODO: Implement register() method.\n }", "public function __construct()\n {\n $this->registerComposerAutoload();\n $app = $this->makeApplication();\n $this->boot($app);\n }", "public function __construct()\n {\n\n $this->postService = new PostService();\n $this->categoryService = new CategoryService();\n }", "public function __construct()\n {\n $this->tpl = new \\Phalcon\\Config($this->tpl);\n self::$instance = $this;\n }", "protected function configure_injector( Injector $injector ): Injector {\n\t\t$bindings = $this->get_bindings();\n\t\t$shared_instances = $this->get_shared_instances();\n\t\t$arguments = $this->get_arguments();\n\t\t$delegations = $this->get_delegations();\n\n\t\tif ( $this->enable_filters ) {\n\t\t\t/**\n\t\t\t * Filter the default bindings that are provided by the plugin.\n\t\t\t *\n\t\t\t * This can be used to swap implementations out for alternatives.\n\t\t\t *\n\t\t\t * @param array<string> $bindings Associative array of interface =>\n\t\t\t * implementation bindings. Both\n\t\t\t * should be FQCNs.\n\t\t\t */\n\t\t\t$bindings = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::BINDINGS_FILTER,\n\t\t\t\t$bindings\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Filter the default argument bindings that are provided by the\n\t\t\t * plugin.\n\t\t\t *\n\t\t\t * This can be used to override scalar values.\n\t\t\t *\n\t\t\t * @param array<class-string, mixed> $arguments Associative array of class =>\n\t\t\t * arguments mappings. The arguments\n\t\t\t * array maps argument names to\n\t\t\t * values.\n\t\t\t */\n\t\t\t$arguments = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::ARGUMENTS_FILTER,\n\t\t\t\t$arguments\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Filter the instances that are shared by default by the plugin.\n\t\t\t *\n\t\t\t * This can be used to turn objects that were added externally into\n\t\t\t * shared instances.\n\t\t\t *\n\t\t\t * @param array<string> $shared_instances Array of FQCNs to turn\n\t\t\t * into shared objects.\n\t\t\t */\n\t\t\t$shared_instances = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::SHARED_INSTANCES_FILTER,\n\t\t\t\t$shared_instances\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Filter the instances that are shared by default by the plugin.\n\t\t\t *\n\t\t\t * This can be used to turn objects that were added externally into\n\t\t\t * shared instances.\n\t\t\t *\n\t\t\t * @param array<string, callable> $delegations Associative array of class =>\n\t\t\t * callable mappings.\n\t\t\t */\n\t\t\t$delegations = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::DELEGATIONS_FILTER,\n\t\t\t\t$delegations\n\t\t\t);\n\t\t}\n\n\t\tforeach ( $bindings as $from => $to ) {\n\t\t\t$from = $this->maybe_resolve( $from );\n\t\t\t$to = $this->maybe_resolve( $to );\n\n\t\t\t$injector = $injector->bind( $from, $to );\n\t\t}\n\n\t\t/**\n\t\t * Argument mape.\n\t\t *\n\t\t * @var array<class-string, array<string|callable|class-string>> $arguments\n\t\t */\n\t\tforeach ( $arguments as $class => $argument_map ) {\n\t\t\t$class = $this->maybe_resolve( $class );\n\n\t\t\tforeach ( $argument_map as $name => $value ) {\n\t\t\t\t// We don't try to resolve the $value here, as we might want to\n\t\t\t\t// pass a callable as-is.\n\t\t\t\t$name = $this->maybe_resolve( $name );\n\n\t\t\t\t$injector = $injector->bind_argument( $class, $name, $value );\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $shared_instances as $shared_instance ) {\n\t\t\t$shared_instance = $this->maybe_resolve( $shared_instance );\n\n\t\t\t$injector = $injector->share( $shared_instance );\n\t\t}\n\n\t\t/**\n\t\t * Callable.\n\t\t *\n\t\t * @var callable $callable\n\t\t */\n\t\tforeach ( $delegations as $class => $callable ) {\n\t\t\t// We don't try to resolve the $callable here, as we want to pass it\n\t\t\t// on as-is.\n\t\t\t$class = $this->maybe_resolve( $class );\n\n\t\t\t$injector = $injector->delegate( $class, $callable );\n\t\t}\n\n\t\treturn $injector;\n\t}", "public function __construct(\\Slim\\Container $container)\n {\n $this->container = $container;\n }", "protected function bootstrapContainer()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n $this->instance(self::class, $this);\n\n $this->instance('path', $this->path());\n $this->instance('path.base', $this->basePath());\n $this->instance('path.config', $this->basePath('config'));\n $this->instance('path.database', $this->databasePath());\n $this->instance('path.storage', $this->storagePath());\n $this->instance('path.resources', $this->resourcePath());\n $this->instance('path.bootstrap', $this->bootstrapPath());\n\n $this->instance('env', $this->environment());\n\n $this->registerContainerAliases();\n\n $this->configure('app');\n $this->configure('view');\n }", "public function __construct()\n {\n $this->rota = new url;\n $this->last_module = '';\n $container = new \\vendor\\container;\n $container = (object)$container->container;\n $this->container= $container;\n }", "public function __construct($container) {\n $this->container = $container;\n }", "public function registerServices(DiInterface $dependencyInjector)\n\t\t{\n\t\t\t// Register service controller for module\n\t\t\t$dependencyInjector->set('dispatcher', function () {\n\t\t\t\t$dispatcher = new Dispatcher();\n\t\t\t\t$dispatcher->setDefaultNamespace(\"Xuantruong\\Api\\Controllers\");\n\t\t\t\t\n\t\t\t\treturn $dispatcher;\n\t\t\t});\n\t\t\t\n\t\t\t// Register Volt as template engine\n\t\t\t$dependencyInjector->set('view', function () {\n\t\t\t\t$view = new View();\n\t\t\t\t\n\t\t\t\t$view->setViewsDir(API_PATH . 'views');\n\t\t\t\t$view->registerEngines(\n\t\t\t\t\t[\n\t\t\t\t\t\t\".volt\" => \"voltService\",\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$view->setLayout('layout');\n\t\t\t\t\n\t\t\t\treturn $view;\n\t\t\t});\n\t\t}", "public static function createInjector() {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()));\n }", "private function configureContainer()\n {\n // Build the DI container.\n $builder = new ContainerBuilder;\n $builder->addDefinitions(__DIR__ . '/config/di.php');\n\n $this->container = $builder->build();\n }", "protected function setupEnvironmentInDi()\n {\n $diContainer = Application::getInstance()->getDiContainer();\n $diContainer[DependencyInjectionHelper::KEY_ENVIRONMENT] = ENVIRONMENT;\n }", "public function registerServices($di)\n\t{\n\n\t\t//Registering a dispatcher\n\t\t$di->set('dispatcher', function () {\n\t\t\t$dispatcher = new Dispatcher();\n\n\t\t\t//Attach a event listener to the dispatcher\n\t\t\t$eventManager = new \\Phalcon\\Events\\Manager();\n\t\t\t$eventManager->attach('dispatch', new \\Acl('frontend'));\n\n\t\t\t$dispatcher->setEventsManager($eventManager);\n\t\t\t$dispatcher->setDefaultNamespace(\"Multiple\\Frontend\\Controllers\\\\\");\n\t\t\treturn $dispatcher;\n\t\t});\n\n\t\t//Registering the view component\n\t\t/*$di->set('view', function () {\n\t\t\t$view = new \\Phalcon\\Mvc\\View();\n\t\t\t$view->setViewsDir('../apps/frontend/views/template1');\n \n\t\t\treturn $view;\n\t\t});*/\n /*$di->set('volt', function ($view, $di) {\n\n \t$volt = new VoltEngine($view, $di);\n\n \t$volt->setOptions(array(\n \t\t\"compiledPath\" => APP_PATH . \"cache/volt/\"\n \t));\n\n \t$compiler = $volt->getCompiler();\n \t$compiler->addFunction('is_a', 'is_a');\n\n \treturn $volt;\n }, true);*/\n\t\t$di->set('view', function() {\n $view = new View();\n\n $view->setViewsDir(__DIR__.'/views/template1');\n //$view->setTemplateBefore('main');\n\n $view->registerEngines([\n \".volt\" => function($view, $di) {\n\n $volt = new Volt($view, $di);\n\n $volt->setOptions([\n 'compiledPath' => function ($templatePath) {\n return realpath(__DIR__.\"/../../var/volt\") . '/' . md5($templatePath) . '.php';\n },\n 'compiledExtension' => '.php',\n 'compiledSeparator' => '%'\n ]);\n\n return $volt;\n }\n ]);\n\t\t\t$view->setVar('baseurl', BASE_URL_NAME);\n\t\t\t$view->setVar('ship_amount', SHIP_AMOUNT);\n\t\t\t$view->setVar('sitename', SITE_NAME);\n return $view;\n\n });\n \n\t\t/*$di->set('db', function () {\n\t\t\treturn new Database(array(\n\t\t\t\t\"host\" => \"localhost\",\n\t\t\t\t\"username\" => \"root\",\n\t\t\t\t\"password\" => \"\",\n\t\t\t\t\"dbname\" => \"multiple\"\n\t\t\t));\n\t\t});*/\n\t\t\n\t}", "public static function createInjector()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()));\n }", "public function __construct(Container $container);", "public function __construct(Container $container);", "protected function setUp(): void\n {\n $this->container = new Container();\n $this->appBuilder = new ConsoleApplicationBuilder($this->container);\n $this->input = new Input('foo');\n $this->container->bindInstance(IServiceResolver::class, $this->container);\n $this->container->bindInstance(Input::class, $this->input);\n $this->container->bindInstance(IOutput::class, $this->createMock(IOutput::class));\n }", "private function initHttp()\n {\n $this->di->mapService('core.http', '\\Core\\Http\\Http', [\n 'core.http.cookie',\n 'core.http.header'\n ]);\n $this->di->mapService('core.http.cookie', '\\Core\\Http\\Cookie\\CookieHandler');\n $this->di->mapService('core.http.header', '\\Core\\Http\\Header\\HeaderHandler');\n\n $this->http = $this->di->get('core.http');\n }", "public function __construct(ContainerInterface $container)\n {\n $this->authService = new CAuthService();\n $this->userModel = new User();\n $this->authHandler = new CAuthHandler();\n $this->email = new CSendEmail();\n }", "public function register(\\Phalcon\\DiInterface $di)\n {\n $di->set(self::SERVICE_NAME, function() {\n $aclAdapter = new \\Vegas\\Security\\Acl\\Adapter\\Mongo();\n $acl = new \\Vegas\\Security\\Acl($aclAdapter);\n\n return $acl;\n });\n }", "public function injectObject() {\n\n // load the map\n $this->loadMap();\n $this->_injectMethods();\n $this->_injectProperties();\n\n }", "public function __construct()\n {\n $this->middleware('auth');\n\n $this->cityRepo = app(CityRepository::class);\n\n $this->playerRepo = app(PlayerRepository::class);\n\n $this->locationRepo = app(LocationRepository::class);\n\n }", "public function __construct() {\n $this->addCompilerPass(new AddConsoleCommandPass());\n $this->addCompilerPass(new ControllerServicePass());\n parent::__construct();\n }", "protected function loadServices()\n {\n $di = $this->getDI();\n\n // Register the dispatcher setting a Namespace for controllers\n $di->setShared('dispatcher', function () {\n\n\n $dispatcher = new Dispatcher();\n $dispatcher->setDefaultNamespace('Phalcana\\Controllers');\n\n $listener = new Dispatch;\n $events = new Manager();\n $events->attach('dispatch', $listener);\n $dispatcher->setEventsManager($events);\n\n return $dispatcher;\n });\n\n $di->setShared('router', $this->loadRoutes(new Router(false)));\n }", "public static function inject(Container $app)\n {\n self::$injectedApp = $app;\n }", "public function setUp()\n {\n $capsule = new Capsule;\n\n $driver = config('database.driver', 'mysql');\n\n $capsule->addConnection([\n 'driver' => $driver,\n 'host' => config(\"database.{$driver}.host\"),\n 'database' => config(\"database.{$driver}.database\"),\n 'username' => config(\"database.{$driver}.username\"),\n 'password' => config(\"database.{$driver}.password\"),\n 'charset' => config(\"database.{$driver}.charset\", 'utf8'),\n 'collation' => config(\"database.{$driver}.collation\", 'utf8_unicode_ci'),\n 'prefix' => config(\"database.{$driver}.prefix\"),\n ]);\n\n $capsule->setAsGlobal();\n\n if (config('database.eloquent', true) === true) {\n $capsule->setEventDispatcher(app('events'));\n $capsule->bootEloquent();\n }\n\n $this->app->singleton($this->name(), function () use ($capsule) {\n return $capsule;\n });\n }", "public function __construct()\n {\n $this->registerBaseServiceProviders();\n\n $this->registerCoreContainerAliases();\n }", "private function configureDispatcher()\n {\n $dispatcher = new Dispatcher($this->container);\n $this->setDispatcher($dispatcher);\n $this->container->set('dispatcher', $dispatcher);\n }", "public function __construct()\n {\n $this->loop = Factory::create();//app('eventLoop');\n }", "public function __construct()\n {\n $this->demoService = new DemoService();\n }", "public function __construct()\n {\n $this->dispatcher = app('Dingo\\Api\\Dispatcher');\n }", "function Inject() {\n\t\t$CI =& get_instance();\n\t\tif (file_exists($file = 'application/controllers/' . $CI->router->class . '.php')) { // Found the controller\n\t\t\tforeach ($this->Scan($file, $CI->router->method) as $alias => $attribs)\n\t\t\t\t$this->Load($alias, $attribs);\n\t\t}\n\t}", "public function setDI(DiInterface $dependencyInjector)\n {\n $this->di = $dependencyInjector;\n }", "public function __construct(ContainerInterface $container)\n {\n //Set stuff\n $this->container = $container;\n }", "public function __construct()\n {\n // Get the module factory instance\n $this->moduleFactory = App::make(ModuleFactoryContract::class);\n\n // Get the installation repository instance\n $this->installationRepository = App::make(InstallationRepositoryContract::class);\n }", "public function registerServices($di) {\n\t\t\n\t\t/**\n\t\t * Read configuration\n\t\t */\n\t\t$config = include __DIR__ . \"/config/config.php\";\n\n\t\t//Registering a dispatcher\n\t\t$di->set('dispatcher', function () {\n\t\t\t//Attach a event listener to the dispatcher\n\t\t\t$eventManager = new \\Phalcon\\Events\\Manager();\n\t\t\t$eventManager->attach('dispatch', new \\Acl('frontend'));\n\t\t\t\t\n\t\t\t$dispatcher = new \\Phalcon\\Mvc\\Dispatcher();\n\t\t\t$dispatcher->setEventsManager($eventManager);\n\t\t\t$dispatcher->setDefaultNamespace(\"Modules\\Frontend\\Controllers\\\\\");\n\t\t\treturn $dispatcher;\n\t\t});\n\t\t\n\t\t/**\n\t\t * Setting up the view component\n\t\t */\n\t\t$di ['view'] = function () {\n\t\t\t$view = new View();\n\t\t\t$view->setViewsDir(__DIR__ . '/views/');\n\t\t\t$view->setLayoutsDir('layouts/');\n\t\t\t$view->setTemplateAfter('main');\n\t\t\t\n\t\t\treturn $view;\n\t\t};\n\t\t\n\t\t/**\n\t\t * Database connection is created based in the parameters defined in the configuration file\n\t\t */\n// \t\t$di ['db'] = function () use($config) {\n// \t\t\t$dbclass = 'Phalcon\\Db\\Adapter\\Pdo\\\\' . $config->database->adapter;\n// \t\t\t$dbAdapter = new $dbclass(array (\n// \t\t\t\t\t\"host\" => $config->database->host,\n// \t\t\t\t\t\"port\" => $config->database->port,\n// \t\t\t\t\t\"username\" => $config->database->username,\n// \t\t\t\t\t\"password\" => $config->database->password,\n// \t\t\t\t\t\"dbname\" => $config->database->name \n// \t\t\t));\n// \t\t\t$eventsManager = new \\Phalcon\\Events\\Manager();\n// \t\t\t$logger = $di->get('logger');\n// \t\t\t$eventsManager->attach('db', function ($event, $dbAdapter) use($logger) {\n// \t\t\t\tif ($event->getType() == 'beforeQuery') {\n// \t\t\t\t\t$logger->log('[Statement] ' . $dbAdapter->getSQLStatement(), \\Phalcon\\Logger::INFO);\n// \t\t\t\t\t$logger->log('[Variables] ' . implode('; ', $dbAdapter->getSQLVariables()), \\Phalcon\\Logger::INFO);\n// \t\t\t\t}\n// \t\t\t});\n// \t\t\t$dbAdapter->setEventsManager($eventsManager);\n// \t\t\treturn $dbAdapter;\n// \t\t};\n\t}", "public function __construct($container)\n {\n $this->container = $container;\n }", "public function __construct($container)\n {\n $this->container = $container;\n }", "public function __construct()\n {\n parent::__construct();\n $this->userService = App::make(UserService::class);\n }", "public function registerServices($di)\n {\n\n /**\n * Read configuration\n */\n $config = include __DIR__ . \"/config/config.php\";\n\n /**\n * Registering config\n */\n $di['config'] = function () use($config) {\n return $config;\n };\n\n //Registering a dispatcher\n $di->set('dispatcher', function() {\n $dispatcher = new Dispatcher();\n $dispatcher->setDefaultNamespace(\"Ns\\Core\\Controllers\");\n return $dispatcher;\n });\n /**\n * Setting up the view component\n */\n $di->set('view', function () use($config) {\n $view = new View();\n $view->setViewsDir(__DIR__ . '/views/');\n $view->registerEngines(array (\n \n '.volt' => function ($view, $di) use ($config) {\n $volt = new Volt($view, $di);\n $volt->setOptions(array (\n 'compiledPath' => $config->logger->viewcache,\n 'compiledSeparator' => '_',\n 'stat' => true,\n 'compileAlways' => true \n ));\n \n return $volt;\n },\n '.phtml' => 'Phalcon\\Mvc\\View\\Engine\\Php'\n ));\n\n return $view;\n }, true);\n\n $di['logger'] = function() use ($config){\n \n $path = $config->logger->path;\n \n if (! is_dir($path)) {\n mkdir($path, 0777, TRUE);\n }\n \n if(!is_writable($path)){\n $old = umask(0);\n @chmod($path, 0777);\n umask($old);\n }\n\n $logger = new MultipleStream();\n $logger->push(new FileAdapter($path.date(\"Ymd\").'.log'));\n \n return $logger;\n };\n /**\n * Database connection is created based in the parameters defined in the configuration file\n */\n $this->_initDatabase($di, $config);\n //$this->_initRouter($di, $config);\n /*$di['db'] = function () use ($config) {\n return new DbAdapter(array(\n \"host\" => $config->database->host,\n \"username\" => $config->database->username,\n \"password\" => $config->database->password,\n \"dbname\" => $config->database->dbname,\n \"port\" => $config->database->port\n ));\n };*/\n\n }", "public function __construct()\n {\n $this->app = app();\n }", "private function setupFacades()\n {\n $this->app->bind('discord-api', function($app) {\n return $app->make(\\App\\Services\\DiscordApi::class);\n });\n\n $this->app->bind('guilds', function($app) {\n return $app->make(\\App\\Support\\Guilds::class);\n });\n }", "function __construct() {\n $bootstrap = new Bootstrap();\n \n $this->entityManager = $bootstrap->getEntityManager();\n }", "private function bindServices()\n {\n // $this->app->singleton('package-blueprint-service', function ($app) {\n // return new FooService();\n // });\n }", "public function boot()\n\t{\n\t\t$this->state = self::STATE_CONFIG;\n\t\t$this->buildInjectors();\n\n\t\tif ($this->state === self::STATE_BOOTED) {\n\t\t\treturn $this;\n\t\t}\n\n\t\tforeach ($this->configs as $config) {\n\t\t\t$dependenciesAndCallable = self::getDependencyArray($config);\n\n\t\t\t$callable = array_pop($dependenciesAndCallable);\n\t\t\t$dependencies = array_map([$this->providerInjector, 'get'], $dependenciesAndCallable);\n\n\t\t\tcall_user_func_array($callable, $dependencies);\n\t\t}\n\n\t\t$this->state = self::STATE_BOOTED;\n\t\treturn $this;\n\t}", "public function __construct()\n {\n $this->middleware(backpack_middleware());\n }", "public function __construct(ContainerInterface $container) {\n $this->container = $container;\n\n $this->repo = new CompanyRepository();\n }", "public function __construct()\n {\n $this->bootstrap();\n }", "public function services(){\n\n $facades = Array(\n 'Cache' => 'Disco\\classes\\Cache',\n 'Crypt' => 'Disco\\classes\\Crypt',\n 'Data' => 'Disco\\classes\\Data',\n 'DB' => 'Disco\\classes\\DB',\n 'Email' => 'Disco\\classes\\Email',\n 'Event' => 'Disco\\classes\\Event',\n 'Html' => 'Disco\\classes\\Html',\n 'Form' => 'Disco\\classes\\Form',\n 'Model' => 'Disco\\classes\\ModelFactory',\n 'Queue' => 'Disco\\classes\\Queue',\n 'Session' => 'Disco\\classes\\Session',\n 'Template' => 'Disco\\classes\\Template',\n 'View' => 'Disco\\classes\\View'\n );\n\n foreach($facades as $facade=>$v){\n $this->make($facade,$v);\n }//foreach\n\n $this->as_factory('Router',function(){\n return new \\Disco\\classes\\Router::$base;\n });\n\n }", "private function __construct()\n {\n // Overwrite _config from config.ini\n if ($_config = \\Phalcon\\DI::getDefault()->getShared('config')->auth) {\n foreach ($_config as $key => $value) {\n $this->_config[$key] = $value;\n }\n }\n\n $this->_cookies = \\Phalcon\\DI::getDefault()->getShared('cookies');\n $this->_session = \\Phalcon\\DI::getDefault()->getShared('session');\n $this->_security = \\Phalcon\\DI::getDefault()->getShared('security');\n }", "protected function __construct() {\n\n // Cargamos Clases.\n $this -> setup_hooks();\n }" ]
[ "0.7372118", "0.69205564", "0.66975427", "0.652209", "0.6415302", "0.6413205", "0.6336277", "0.62420464", "0.624028", "0.62081856", "0.620654", "0.6203626", "0.6187213", "0.616486", "0.61449116", "0.6133151", "0.6104782", "0.6018669", "0.6000162", "0.5989025", "0.5973584", "0.59496063", "0.5913864", "0.59120756", "0.5893979", "0.5866865", "0.58615685", "0.58413994", "0.58368653", "0.580934", "0.5774936", "0.5774669", "0.57530534", "0.5751599", "0.57313573", "0.5725849", "0.57185304", "0.5717264", "0.5716413", "0.5702561", "0.5700462", "0.5693906", "0.5675387", "0.5675387", "0.56752187", "0.56742126", "0.5662603", "0.5658843", "0.56529605", "0.5626082", "0.5613702", "0.56125444", "0.5600647", "0.5587703", "0.5583335", "0.55790955", "0.5566411", "0.5550477", "0.5546494", "0.5541958", "0.55419296", "0.5538248", "0.5537436", "0.553655", "0.5532403", "0.5532403", "0.55286187", "0.5523579", "0.5521248", "0.55172104", "0.5511525", "0.5505204", "0.55051863", "0.5490025", "0.5485873", "0.5480918", "0.5480599", "0.54717755", "0.5463305", "0.54592985", "0.5453887", "0.5452561", "0.54524964", "0.54373217", "0.5434306", "0.5434062", "0.54297054", "0.54297054", "0.5423151", "0.5413694", "0.5413248", "0.5409914", "0.54056007", "0.539902", "0.5383085", "0.5373159", "0.53713113", "0.5369541", "0.5358755", "0.5357133", "0.5355475" ]
0.0
-1
Obtain the Phalcon Dependency Injector object.
public function getDI() { return $this->di; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDI()\n {\n return $this->_dependencyInjector;\n }", "public static function instance() : DependencyInjector \n {\n if ($instance === null) {\n $instance = new DependencyInjector();\n }\n return $instance;\n }", "public function getInjector()\n {\n if (!$this->di) {\n $this->config();\n }\n\n return $this->di;\n }", "public static function container()\n {\n if (is_null(self::$instance)) {\n self::$instance = new DI();\n }\n\n return self::$instance;\n }", "public function getDi()\n {\n return $this->application->getDI();\n }", "public function setDI(\\Phalcon\\DiInterface $dependencyInjector) {}", "public function getDI()\n {\n return $this->app->getDI();\n }", "public function getInjector() {\n\t\t// Does this component have an injector?\n\t\tif ( Injector::isInjector( $this -> injector ) ) {\n\t\t\treturn $this -> injector;\n\t\t} else {\n\t\t\t// Get parent\n\t\t\t$parent\t=&\t$this -> getParent();\n\n\t\t\t// Does parent have an injector?\n\t\t\treturn\tisset( $parent ) && Injector::isInjector( $parent -> getInjector() )\n\t\t\t\t?\t$parent -> getInjector()\n\t\t\t// Fallback to default injector\n\t\t\t\t:\tself::defaultInjector();\n\t\t}\n\t}", "public function __construct()\n {\n // Determine if we are running in a Windows environment\n self::$isWindows = (DIRECTORY_SEPARATOR === '\\\\');\n\n // Determine if we are running in safe mode\n self::$safeMode = (bool) ini_get('safe_mode');\n\n // Determin if we are running as the CLI\n self::$isCli = php_sapi_name() === 'cli';\n\n // load core classes required for operation\n $di = new DI;\n self::$di = $di;\n $this->setDi($di);\n\n\n // load the filesystem\n $di->setShared('fs', new Filesystem());\n $di->setShared('phalcana', $this);\n\n\n // Load the logger\n $di->setShared('logger', function () {\n\n $dir = APPPATH.'logs/';\n\n if (! is_dir($dir) || ! is_writable($dir)) {\n die('Logs directory MUST be writable');\n }\n\n if (!file_exists($dir.date('Y/m/'))) {\n mkdir($dir.date('Y/m/'), 0777, true);\n }\n\n $logger = new \\Phalcon\\Logger\\Adapter\\File($dir.date('Y/m/d').\".php\");\n\n return $logger;\n });\n\n $di->setShared('cache', $this->loadCache());\n\n\n\n // Load the primary config\n $di->setShared('setup', $this->configure());\n\n // Try to get mode from the environmental variable\n if ($env = getenv('phalcana_mode')) {\n self::$mode = constant('Phalcana\\Phalcana::'.strtoupper($env));\n }\n\n // Get mode from config\n $mode = $this->setup->get('mode', false);\n\n if ($mode) {\n self::$mode = $mode;\n }\n\n // Set the paths for the cascading file system\n $this->fs->setModules($this->setup->get('modules', array()));\n\n $di->setShared('loader', $this->loadLoader());\n\n\n // Load the error handler\n $di->setShared('error', $this->errorHandler());\n\n // Load the services into the dependency injector\n $this->loadSharedServices();\n\n if (self::$isCli) {\n $this->loadCliServices();\n } else {\n $this->loadServices();\n }\n\n // Run the inititalization files\n $this->init();\n\n }", "protected function _getInjector()\n {\n if ($this->_defaultInjector === null) {\n // The XML holds an option which one of the injectors is the default one\n $injectorName = $this->_reader->getOption('injector', 'Sweetie\\Injector\\Magic');\n\n // @todo check type\n $this->_defaultInjector = new $injectorName($this);\n }\n\n return $this->_defaultInjector;\n }", "protected function getDI()\n {\n return $this->di;\n }", "public function getDI()\n {\n return $this->di;\n }", "public function getDI()\n {\n return $this->di;\n }", "public static function createInjector()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()));\n }", "protected static function defaultInjector() {\n\t\t// static storage\n\t\tstatic $injector;\n\n\t\t// init if first time\n\t\tif ( is_null( $injector ) ) {\n\t\t\t$injector\t=\tnew Injector( array() );\n\t\t}\n\n\t\treturn $injector;\n\t}", "public function getDI() {\n return $this->di;\n }", "public static function createInjector() {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()));\n }", "function get_container()\n{\n static $container = null;\n if (!$container) {\n $builder = new \\DI\\ContainerBuilder();\n $builder->addDefinitions(get_config()['di']);\n \n $container = $builder->build();\n }\n \n return $container;\n}", "protected function createFinder()\n {\n return Injector::inst()->create('GreenFinder');\n }", "public function getDI(){\n return $this->di;\n }", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public function __construct()\n {\n // Dependencies automatically resolved by service container...\n }", "public function getDependency() {}", "public function getDependency() {}", "function analogue()\n {\n return Manager::getInstance();\n }", "public static function dao()\n {\n global $container;\n return $container->getService(\"dao\");\n }", "public function instance(): Container\n {\n return ($this->resolver)();\n }", "protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }", "public function getDiContainer(): Container\n {\n return self::diContainer();\n }", "public function get_container() { return $this->container; }", "public static function make()\n\t{\n\t\treturn IoC::container()->resolve('laravel.auth');\n\t}", "protected function getInjectorMock()\n {\n return $this->getMockBuilder('Vich\\UploaderBundle\\Injector\\FileInjectorInterface')\n ->disableOriginalConstructor()\n ->getMock();\n }", "protected static function getInstance()\n {\n\t\treturn static::getFacadeAccessor();\n }", "function app() {\n return Container::getInstance();\n}", "public function getDependency() {\r\n\t\r\n\t}", "public function __construct(){\n $this->container = new Container();\n }", "public function getDI()\n {\n if ($this->di == null) {\n $di = Di::getDefault();\n $this->setDI($di);\n }\n return $this->di;\n }", "public function __get($name)\n {\n if (isset($this->_diLocal[$name])) {\n return $this->_diLocal[$name];\n }\n $di = $this->getGlobalDependencyInstance($name, static::$_diConfig);\n if ($di) {\n #$this->_diLocal[$name] = $di;\n return $di;\n }\n return $this->get($name);\n }", "public function getContainer(): IDIContainer\n {\n return $this;\n }", "public function setDI(DiInterface $dependencyInjector) {}", "public static function service() {\n return self::$app->serviceContainer;\n }", "function container(): Container\n\t{\n\t\tstatic $container;\n\n\t\tif($container === null)\n\t\t{\n\t\t\t$container = Application::instance()->getContainer();\n\t\t}\n\n\t\treturn $container;\n\t}", "public function getReflector()\n {\n if ($this->reflector) {\n return $this->reflector;\n }\n\n return $this->reflector = new ReflectionClass($this->config);\n }", "static public function getInstance() {\n\t\t$objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');\n\t\treturn $objectManager->get('TYPO3\\CMS\\Vidi\\PersistenceObjectFactory');\n\t}", "public function getServiceManager ()\n {\n return $this->serviceManager;\n }", "public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}", "protected function getManager()\n {\n return $this->manager;\n }", "public function isolate(): IDIContainer\n {\n return new DIContainer($this);\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getServiceProvider();", "protected function getEnvironmentService()\n {\n $class = $this->getParameter('environment.class');\n $instance = new $class($this->getParameter('environment.file'));\n\n return $instance;\n }", "public function __invoke(ContainerInterface $container) : InjectorInterface\n {\n return $this->create($container);\n }", "public function getServiceManager()\n\t{\n\t\treturn $this->serviceManager;\n\t}", "public static function getInstance()\n {\n if (is_null(self::$container)) {\n self::$container = new Container();\n }\n\n return self::$container;\n }", "protected function getDbal_ExtractorService()\n {\n return $this->services['dbal.extractor'] = ${($_ = isset($this->services['dbal.extractor.factory']) ? $this->services['dbal.extractor.factory'] : ($this->services['dbal.extractor.factory'] = new \\phpbb\\db\\extractor\\factory(${($_ = isset($this->services['dbal.conn.driver']) ? $this->services['dbal.conn.driver'] : $this->get('dbal.conn.driver', 1)) && false ?: '_'}, $this))) && false ?: '_'}->get();\n }", "public static function getInstance(){\n //Method inherited from \\Illuminate\\Container\\Container \n return \\Illuminate\\Foundation\\Application::getInstance();\n }", "public function getServiceManager()\r\n\t{\r\n\t\treturn $this->serviceManager;\r\n\t}", "protected function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getConfigurator()\n {\n if ( ! $this->getContainer()->has(ConfiguratorInterface::class) ) {\n $this->getContainer()->share(ConfiguratorInterface::class, \\ArrayObject::class);\n }\n\n return $this->getContainer()->get(ConfiguratorInterface::class);\n }", "public static function getInstance() {\n if (self::$instance === null) {\n self::$instance = new self;\n self::$instance->container = new Container();\n }\n return self::$instance;\n }", "private function _getAuthService()\n {\n if(!isset($this->authservice)) {\n $this->authservice = \\Application\\Util\\ServicesUtil::getAuthService($this->getServiceLocator());\n }\n return $this->authservice;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }", "public static function getInstance() {\n if (is_null(self::$_instance)) {\n self::$_instance = self::bootstrap();\n }\n \n return self::$_instance;\n }", "private function initDi() {\n\t\t$this->_di = new FactoryDefault();\n\t}", "public function getService()\n {\n return null;\n }", "public function getInstance()\n {\n return self::$instance;\n }", "public function getDI() {}", "public function getDI() {}", "protected function getSecurityManager() {\n return $this->dependencyInjector->get('ride\\\\library\\\\security\\\\SecurityManager');\n }", "protected function getServiceContainer()\n {\n $serviceContainer = ServiceContainer::getInstance();\n\n $serviceContainer->set('engine', $this->getEngine());\n\n return $serviceContainer;\n }", "public static function create(ContainerInterface $container) {\n return new static(\n $container->get('library.dependency_resolver')\n );\n }", "public static function getInstance()\n {\n\t\tif (self::$instance == null) {\n\t\t\tself::$instance = new ServiceProvider();\n\t\t}\n\t\treturn self::$instance;\n\t}", "protected function getAuthService()\n {\n return $this->services['auth'] = new \\phpbb\\auth\\auth();\n }", "public function __invoke()\n {\n $client = $this->container->get('cpms\\service\\api');\n\n return $client;\n }", "public function getServiceManager()\n {\n return $this->serviceManager->getServiceLocator();\n }", "public function getInstance() {\n\t\treturn $this->instance;\n\t}", "public static function getContainer()\n {\n return static::$container;\n }", "function app()\n {\n return \\Core\\Container::getInstance()->singleton('app');\n }", "public function getServiceLocator() \n { \n return $this->serviceLocator; \n }", "public function getServiceLocator() \n { \n return $this->serviceLocator; \n }", "public static function getInstance()\n\t{\n\t\treturn ( isset(static::$app) ? static::$app : null );\n\t}", "public function getAppService()\n {\n return $this->getController()->getServiceLocator()->get('Application\\Service\\Service');\n }", "public function getManager() {\n return $this->manager;\n }", "public function getApplication()\n {\n if ($this->application !== null) {\n return $this->application;\n }\n\n $this->application = new Application(self::NAME, self::VERSION);\n\n foreach ($this->registeredCommands() as $command) {\n if ($command instanceof ContainerAwareInterface) {\n $command->setContainer($this->container);\n }\n\n $this->application->add($command);\n }\n\n return $this->application;\n }", "public function di()\n {\n return \\Cloud::di();\n }", "public function __construct(DependencyInjector $dependencyInjector) {\n $this->dependencyInjector = $dependencyInjector;\n }", "function get() {\n\t\tif (!self::$instance) self::$instance = new self;\n\t\treturn self::$instance;\n\t}" ]
[ "0.69008666", "0.6820943", "0.67470604", "0.6569066", "0.6472126", "0.6456658", "0.6440184", "0.63574976", "0.6355806", "0.63387585", "0.6277691", "0.6124257", "0.6124257", "0.6111173", "0.60860145", "0.6085729", "0.6063233", "0.60020655", "0.5965325", "0.59515905", "0.5903503", "0.5876017", "0.5845716", "0.5845716", "0.58161455", "0.58028305", "0.5749668", "0.5697627", "0.5675702", "0.5670913", "0.5661755", "0.5640767", "0.56395036", "0.5639252", "0.56058633", "0.56009245", "0.5599705", "0.55825084", "0.5573077", "0.5565595", "0.55594933", "0.55572194", "0.55456746", "0.5543678", "0.5537124", "0.5536803", "0.55336875", "0.5519385", "0.55123633", "0.55123633", "0.55123633", "0.55123633", "0.5511223", "0.55076176", "0.55011404", "0.54934984", "0.54916537", "0.54773813", "0.5476095", "0.54713714", "0.5468632", "0.54618424", "0.54606915", "0.5455078", "0.5452759", "0.5452759", "0.5452759", "0.5451691", "0.5451691", "0.5451691", "0.5451691", "0.5451691", "0.5451691", "0.5451691", "0.54464275", "0.5442487", "0.54348546", "0.5434321", "0.5433094", "0.54320145", "0.54320145", "0.54311925", "0.54300463", "0.54232806", "0.5415611", "0.54064447", "0.54007995", "0.53981656", "0.53930306", "0.539303", "0.53851277", "0.5384933", "0.5384933", "0.5371615", "0.5360782", "0.53572047", "0.5349779", "0.5348459", "0.5348259", "0.53476506" ]
0.59498036
20
Retorna uma lista preparada para dropdowns, com os valores como keys e os nomes formatados como values.
public static function listForDropdown($emptyOption = false) { return ( $emptyOption ? [ '' => '-' ] : [ ] ) + (new static)->_all; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _get_picker_dropdown_choices() {\n\t\t$this->load_data();\n\t\t$result = array();\n\t\tforeach ( $this->data as $unique_key => $item ) {\n\t\t\t$result[ $unique_key ] = $item['label'];\n\t\t}\n\n\t\treturn $result;\n\t}", "function drop_down()\n\t{\n\t\t$args = func_get_args();\n\n\t\tif(count($args) == 2)\n\t\t{\n\t\t\tlist($key, $value) = $args;\n\t\t}\n\t\telse {\n\t\t\t$key = $this->primary_key;\n\t\t\t$value = $args[0];\n\t\t}\n\n\t\t$this->trigger('before_dropdown', array($key, $value));\n\n\t\t$result = $this->db->select(array($key, $value))\n\t\t\t\t\t\t ->get($this->_table)\n\t\t\t\t\t\t ->result();\n\n\t\t$options = array();\n\n\t\tforeach($result as $row) \n\t\t{\n\t\t\t$options[$row->{$key}] = $row->{$value};\n\t\t}\n\n\n\t\t$options = $this->trigger('after_dropdown', $options);\n\n\t\treturn $options;\n\t}", "function get_name_select_list()\n\t{\n\t\treturn $this->get_name_select_edit();\n\t}", "public function get_dropdown_list() {\n /* convert things like &gt; to > etc */\n foreach ($this->allanswers as $key => $value) {\n $this->allanswers[$key] = htmlspecialchars_decode($value);\n }\n // Make the key and value the same in the array.\n $selectoptions = array_combine($this->allanswers, $this->allanswers);\n return $selectoptions;\n }", "public function _get_picker_choices() {\n\t\t$this->load_data();\n\t\t$result = array();\n\t\tforeach ( $this->data as $unique_key => $item ) {\n\t\t\t$result[ $unique_key ] = ( isset( $item['options'] ) && is_array( $item['options'] ) ) ? $item['options'] : array();\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function getSelectOptions()\n\t{\n\t\t$arrReturn = array();\n\t\t$arrFields = deserialize( $this->get('defaultMulti') );\n\t\tif( empty($arrFields) )\n\t\t{\n\t\t\t$arrFields = array('rating','tstamp','helpful','not_helpful');\n\t\t}\n\t\t\n\t\tforeach($arrFields as $f)\n\t\t{\n\t\t\t$arrReturn[$f.'[asc]'] \t= $GLOBALS['TL_LANG']['MSC']['ratings_filter'][$f]['asc'];\n\t\t\t$arrReturn[$f.'[desc]'] = $GLOBALS['TL_LANG']['MSC']['ratings_filter'][$f]['desc'];\n\t\t}\n\t\t\n\t\treturn $arrReturn;\n\t}", "public function getForSelect()\n {\n $options = [];\n\n foreach ($this->find() as $record) {\n $key = (string)$record->getId();\n $val = (string)$this->getRecordLabel($record);\n $options[$key] = $val;\n }\n\n return $options;\n }", "public function dropdown() {\n $args = func_get_args();\n\n if (count($args) == 2) {\n list($key, $value) = $args;\n } else {\n $key = $this->primary_key;\n $value = $args[0];\n }\n\n $this->_callbacks('before_get', array($key, $value));\n\n if ($this->result_mode == 'object') {\n $result = $this->db->select(array($key, $value))->get($this->_table())->result();\n\n $options = array();\n foreach ($result as $row) {\n $row = $this->_callbacks('after_get', array($row));\n $options[$row->{$key}] = $row->{$value};\n }\n } else {\n $result = $this->db->select(array($key, $value))->get($this->_table())->result_array();\n\n $options = array();\n foreach ($result as $row) {\n $row = $this->_callbacks('after_get', array($row));\n $options[$row[$key]] = $row[$value];\n }\n }\n\n return $options;\n }", "public function getAllForDropDownList()\n {\n $items = (new Query())\n ->select('emails_templates.id, emails_templates.name')\n ->from(['emails_templates' => 'emails_templates'])\n ->orderBy(['emails_templates.name' => SORT_ASC])\n ->all();\n\n return ArrayHelper::map($items, 'id', 'name');\n }", "public function dropdown_tree() {\n $args = func_get_args();\n list($key, $value, $parent) = $args;\n\n $result = $this->db->select(array($key, $value, $parent))->get($this->_table())->result();\n\n $options = array();\n foreach ($result as $row) {\n $options[] = array(\n 'id'=>$row->{$key},\n 'name'=>$row->{$value},\n 'parent'=>$row->{$parent},\n );\n }\n return $options;\n }", "public function getSelectDataFields();", "public static function getOptions(){\n\t\t$results = DB::select('id', DB::expr('CONCAT(first, \" \", last) as `name`'))->from('employees')->order_by('name')->execute()->as_array();\n\t\t//return $options->as_array();\n\n\t\t$options = array();\n\t\tforeach($results as $result){\n\t\t\t$options[$result['id']] = $result['name']; \n\t\t}\n\t\t\n\t\treturn $options;\n\n\t}", "static function get_dropdown_options()\n {\n $rows = ORM::factory('actor')->where('parent_id=0')->orderby('actor')->find_all();\n \n foreach ($rows as $row){\n $hijos = array();\n $_t = ORM::factory('actor')->where('parent_id',$row->id)->orderby('actor')->select_list('id','actor');\n\n foreach($_t as $_id => $_n) {\n\n $_hijos = ORM::factory('actor')->where('parent_id',$_id)->orderby('actor')->select_list('id','actor');\n $hijos[] = array('id' => $_id, 'n' => $_n, 'h' => $_hijos);\n \n /* \n foreach($_hijos as $_idn => $_nn) {\n $_h[] = array('id' => $_idn, 'n' => $_nn, 'h' => ORM::factory('actor')->where('parent_id',$_idn)->select_list('id','actor'));\n }\n \n $hijos[] = array('id' => $_id, 'n' => $_n, 'h' => $_h);\n */\n }\n \n $opts[] = array('id' => $row->id, 'n' => $row->actor, 'h' => $hijos);\n }\n return $opts;\n }", "function getOptionValues() {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookuptypevalue as optiontext, lv.lookuptypevalue as optionvalue FROM lookuptype AS l , \n\t\tlookuptypevalue AS lv WHERE l.id = lv.lookuptypeid AND l.name ='\".$this->getName().\"' ORDER BY optiontext \";\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}", "public static function getSelect()\n {\n return Hash::combine(self::getConstants(), '{s}.value', '{s}.name');\n }", "private function getSelectOptions() {\n $result = \"\";\n if($this->pleaseSelectEnabled) {\n $result .= '<option value=\"null\"> -- Please Select --</option>';\n }\n foreach($this->itemList as $key => $val) {\n $selectedText = \"\";\n if(in_array($key, $this->selectedItems)) {\n $selectedText = 'selected=\"selected\"';\n }\n $result .= '<option value=\"'.$key.'\" '.$selectedText.'>'.$val.'</option>'.\"\\n \\t\";\n }\n return $result;\n }", "function getNameOptions(){\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n \n // Select some fields\n //$query->select('DISTINCT name');\n $query->select('name');\n // From the hello table\n $query->from('#__helloworld_message');\n\t\t\t\t\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$result = $db->loadObjectList();\n\t\t\t\n\t\t\tforeach($result as $item){\n\t\t\t\t$name = $item->name;\n\t\t\t\t$filter_name_options[] = JHTML::_('select.option', $name , $name);\n\t\t\t\t}\n\t\t\treturn $filter_name_options;\n\t\t\t\n\t\t\t}", "protected function getOptions()\n {\n $dbo = JFactory::getDbo();\n $query = $dbo->getQuery(true);\n\n $query->select('DISTINCT id AS value, field AS text')->from('#__thm_groups_fields')->order(\"text ASC\");\n\n // Suppress the inclusion of the file field type for new attribute types\n if (empty(JFactory::getApplication()->input->getInt('id'))) {\n $query->where('id != 4');\n }\n\n $dbo->setQuery($query);\n\n try {\n $fields = $dbo->loadAssocList();\n } catch (Exception $exc) {\n return parent::getOptions();\n }\n\n $options = [];\n foreach ($fields as $field) {\n\n $options[$field['text']] = JHtml::_('select.option', $field['value'], $field['text']);\n }\n\n return array_merge(parent::getOptions(), $options);\n }", "function get_dropdown_list() {\n\t\t$this->db->from('tag');\n\t\t$this->db->order_by('tag_id');\n\t\t$result = $this->db->get();\n\t\t$return = array();\n\t\tif($result->num_rows() > 0) {\n\t\t\tforeach($result->result_array() as $row) {\n\t\t\t\t$return[$row['tag_id']] = $row['tag_title'];\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "public function getSelectOptions(string $strName) : array;", "function build_table_drop_down() {\n\t$output = array();\n\t$output[] = array('id' => '', 'text' => TEXT_SELECT);\n\t$output[] = array('id' => 'step', 'text' => 'Step');\n\t$output[] = array('id' => 'task_name', 'text' => 'Task Name');\n\t$output[] = array('id' => 'description', 'text' => 'Task Description');\n\t$output[] = array('id' => 'mfg', 'text' => 'Mfg');\n\t$output[] = array('id' => 'qa', 'text' => 'QA');\n\t$output[] = array('id' => 'complete', 'text' => 'Complete');\n\t$output[] = array('id' => 'data_entry', 'text' => 'Data Entry Req');\n\treturn $output;\n }", "public function getOptionValues()\n {\n $options = [];\n $options[''] = __('--Please Select--');\n foreach ($this->getOptionArray() as $key => $value) {\n $options[$key] = $value;\n }\n return $options;\n }", "public static function typeNameSelectOptions()\n {\n return [\n ['value' => self::TYPE_SPECIFIC_DATETIME, 'text' => trans('messages.Immediately_or_on_a_specific_date')],\n ['value' => self::TYPE_WEEKLY_RECURRING, 'text' => trans('messages.weekly_recurring')],\n ['value' => self::TYPE_MONTHLY_RECURRING, 'text' => trans('messages.monthly_recurring')],\n ['value' => self::TYPE_LIST_SUBSCRIPTION, 'text' => trans('messages.Event_based_list_subscription')],\n ['value' => self::TYPE_LIST_UNSUBSCRIPTION, 'text' => trans('messages.Event_based_list_unsubscription')],\n ['value' => self::TYPE_SUBSCRIBER_EVENT, 'text' => trans('messages.Event_based_custom_list_subscriber_event')],\n ['value' => self::TYPE_CUSTOM_CRITERIA, 'text' => trans('messages.Custom_criteria')],\n ['value' => self::TYPE_API_CALL, 'text' => trans('messages.API_call')],\n ];\n }", "public static function optionsList()\n {\n $list = array();\n\n foreach (self::all() as $role) {\n $list[$role->id] = $role->name;\n }\n\n return $list;\n }", "private function getOptions(): array\n {\n $subdivisionObj = new SubdivisionRepository();\n $options[] = Craft::t('sprout-forms-us-states', 'Select...');\n $states = $subdivisionObj->getAll(['US']);\n\n foreach ($states as $state) {\n /**\n * @var Subdivision $state\n */\n $stateName = $state->getName();\n $options[$stateName] = $stateName;\n }\n\n return $options;\n }", "public static function toSelectArray(): array\n {\n $array = self::toArray();\n $selectArray = [];\n\n foreach ($array as $key => $value) {\n $selectArray[$value] = static::getDescription($value);\n }\n\n return $selectArray;\n }", "public function getAllOptions()\r\n {\r\n $result = [];\r\n\r\n foreach (self::getOptionArray() as $index => $value) {\r\n $result[] = ['value' => $index, 'label' => $value];\r\n }\r\n\r\n return $result;\r\n }", "function get_dropdown_array($value){\n $result = array();\n $array_keys_values = $this->db->query('select Kode, '.$value.' from karyawan order by Kode asc');\n $result[0]=\"-- Pilih Urutan Kode --\";\n foreach ($array_keys_values->result() as $row)\n {\n $result[$row->Kode]= $row->$value;\n }\n return $result;\n }", "public function getValuesForForm()\n {\n $collection = $this->getCollection();\n $options = [];\n if ($collection->getSize() > 0) {\n foreach ($collection as $role) {\n $options[] = ['value' => $role->getId(), 'label' => $role->getData('display_name')];\n }\n }\n return $options;\n }", "public function getForSelect()\n {\n return $this->all()->lists('full_name', 'id')->all();\n }", "public function getOptions()\n {\n $res = [];\n foreach ($this->getOptionArray() as $index => $value) {\n $res[] = ['value' => $index, 'label' => $value];\n }\n return $res;\n }", "function createSelect($name, $keys, $values, $keyIndex)\n {\n echo \"<select name=\\\"\",$name,\"\\\">\\n\";\n \n $nbValues=count($values);\n for ($i=0;$i<$keyIndex;$i++) {\n echo \"<option value=\\\"\",$keys[$i],\"\\\">\",$values[$i],\"</option>\\n\";\n }\n if ($keyIndex>-1)\n echo \"<option value=\\\"\",$keys[$i],\"\\\" selected='true'>\",$values[$i],\"</option>\\n\";\n else\n $i==-1;\n for ($i++;$i<$nbValues;$i++) {\n echo \"<option value=\\\"\",$keys[$i],\"\\\">\",$values[$i],\"</option>\\n\";\n }\n echo \"</select>\\n\";\n }", "function option_dropdown($label, $name, $value, $keys, $comment='') {\r\n\t\techo \"<tr valign='top'><th scope='row'>\" . $label . \"</th>\";\r\n\t\techo \"<td><select name='$name'>\";\r\n\r\n\t\tforeach ((array)$keys as $key => $description) {\r\n\t\t\tif ($key == $value)\r\n\t\t\t\t$selected = \"selected\";\r\n\t\t\telse\r\n\t\t\t\t$selected = \"\";\r\n\r\n\t\t\techo \"<option value='\" . htmlentities($key, ENT_QUOTES, 'UTF-8') . \"' $selected>$description</option>\";\r\n\t\t}\r\n\t\techo \"</select>\";\r\n\t\techo \" $comment</td></tr>\";\r\n\t}", "public function options() {\n return $this->model->orderBy('name')->lists('name', 'id');\n }", "public function getAllOptions()\n {\n $result = [];\n\n foreach (self::getOptionArray() as $index => $value) {\n $result[] = ['value' => $index, 'label' => $value];\n }\n\n return $result;\n }", "public function getAllOptions()\n {\n if ($this->_options === null) {\n $this->_options = [\n ['label' => __('Fixed value'), 'value' => self::TYPE_FIXED],\n [\n 'label' => __('Dropdown values'), \n 'value' => self::TYPE_OPTION\n ],\n ['label' => __('Custom value'), 'value' => self::TYPE_RANGE],\n ];\n }\n return $this->_options;\n }", "private function getOptionItems()\n {\n $contract = new ContractRepository();\n $employee = new EmployeeRepository();\n $salaryComponent = new SalaryComponentRepository();\n return [\n 'contractItems' => ['' => __('crud.option.contract_placeholder')] + $contract->pluck(),\n 'employeeItems' => ['' => __('crud.option.employee_placeholder')] + $employee->pluck(),\n 'salaryComponentItems' => ['' => __('crud.option.salaryComponent_placeholder')] + $salaryComponent->pluck()\n ];\n }", "protected function filterDropdownFields(): array\n {\n return [];\n }", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', 1)))->getField('id, name');\n }", "protected function CatalogOptionsList() {\n\treturn $this->GetFieldValue('ItOptions');\n }", "function getDropDown() ;", "public function getArrayParaSelect()\n {\n return $this->model()::pluck('nome', 'id')->all();\n }", "public function get_drop_down( $query, $key, $value, $name,$defaultname='' )\n\t{\n //echo $defaultname;\n\t\t$query \t\t= $this->db->query($query);\n\t\t$records = $query->result_array(); //array of arrays\n\t\t\n\t\tif($defaultname=='')\n $data=array(\"\"=>\"SELECT \".$name.\" \");\n else\n $data=array(\"\"=>$defaultname);\n\t\t\n\t\t\n\t\tforeach ($records as $row)\n \t{\n \t$data[ $row[$key] ] = $row[ $value ];\n \t}\n \t\n\t\treturn $data;\n\t}", "public function select_list()\n\t{\n\t\t$list = array();\t\t\n\t\t$orm = ORM::factory('country');\t\t\n\t\t$list = $orm->select_list('id','name');\n\t\t\n\t\treturn $list;\n\t}", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', -1)))->getField('id, name');\n }", "public function getManufacturersForDropdown() {\n $manufacturers = $this->orderby('name','ASC')->get();\n $manufacturers_for_dropdown = [];\n foreach($manufacturers as $manufacturer) {\n $manufacturers_for_dropdown[$manufacturer->id] = $manufacturer->name;\n }\n return $manufacturers_for_dropdown;\n }", "public function getRenderedOptions()\n {\n $renderedOptions = [];\n $options = $this->getDataFromSqlServer();\n foreach ($options as $optionData) {\n $optionKey = $optionData[$this->filterField];\n\n $renderedOptions[$optionKey] = $optionData;\n $renderedOptions[$optionKey]['value'] = $this->renderOptionData($optionData);\n $renderedOptions[$optionKey]['selected'] = false;\n }\n return $renderedOptions;\n }", "public static function toSelectCollection(): Collection\n {\n return collect(self::toArray())->mapWithKeys(function ($value, $text) {\n return [\n $value => [\n 'text' => self::getDescription($value),\n 'value' => $value,\n ],\n ];\n });\n }", "public function getOptions()\n {\n $values = [];\n foreach ($this->options as $id => $option) {\n $values[$id] = $option->getValue();\n }\n return $values;\n }", "function erp_hr_get_departments_dropdown_raw($select_label = null ) {\n $departments = erp_hr_get_departments();\n $dropdown = array( 0 => __( '- Select Department -', 'wp-erp' ) );\n\n if ( $select_label ) {\n $dropdown = array( 0 => $select_label );\n }\n\n if ( $departments ) {\n foreach ($departments as $key => $department) {\n $dropdown[$department->id] = stripslashes( $department->title );\n }\n }\n\n return $dropdown;\n}", "function vcn_get_career_names_select_list () {\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry()), 'json');\r\n\t$select_list_array = array('' => 'Select a Career');\r\n\r\n\tif (count($data) > 0) {\r\n\t\tforeach ($data as $value) {\r\n\t\t\t$select_list_array[$value->onetcode] = $value->title;\r\n\t\t}\r\n\t}\r\n\treturn $select_list_array;\r\n}", "protected function getSelectFields()\n {\n return $this->getSettingsValue('select');\n }", "public function getTypes(){\r\n \r\n $options[\"\"] = \"--Select--\";\r\n //Query all users(Lecturers) not assigned to other departments\r\n $types = $this->em->getRepository(\"\\Application\\Entity\\Assessmenttype\")->findBy(array(\"systemGenerated\"=>0));\r\n \r\n foreach($types as $type ){\r\n $options[$type->getPkAtid()] = $type->getTypeName();\r\n }\r\n \r\n return $options;\r\n }", "public function getSelectFields() {\r\n\t\t$f = array();\r\n\t\tforeach($this->_salt_fields as $field) {\r\n\t\t\t$f[]=last($field);\r\n\t\t}\r\n\t\treturn $f;\r\n\t}", "public function options():array\n {\n $options = Datasheet::whereHas('schemes')\n ->with('file')\n ->orderBy('name')\n ->get()\n ->pluck('file.name', 'id');\n $options->prepend(trans('site::messages.select_from_list'), '');\n return $options->toArray();\n }", "public function dropdown_level()\n {\n //Menyusun value pada dropdown\n $value[''] = '--CHOOSE--';\n $value['Admin'] = 'Admin';\n $value['Technician'] = 'Technician';\n $value['User'] = 'User';\n\n return $value;\n }", "public function getDropDown() {}", "public function getDropDown() {}", "public function fields()\n {\n $statuses = \\App\\Status::all()->pluck('name','id');\n return [\n Select::make('Status','id')->options($statuses)\n ];\n }", "public static function getItemOptions(){\n\t\t$item = \"\";\n\t\t// Loop through items to populate drop down\n\t\t$sql2 = \"\n\t\t\tSELECT * FROM item\n\t\t\t\";\n\t\t$prepare_values2 = [\n\t\t\t':id' => $_GET['id']\n\t\t\t];\n\n\t\t// Make a PDO statement\n\t\t$statement2 = DB::prepare($sql2);\n\n\t\t// Execute\n\t\tDB::execute($statement2);\n\n\t\t// Get all the results of the statement into an array\n\t\t$results2 = $statement2->fetchAll();\n\t\tforeach ($results2 as $heading2 => $row2) {\n\t\t\t$item .= '<option value=\"' . $row2['id'] . '\">' . $row2['name'] . '</option>';\n\t\t}\n\t\treturn $item;\n\t}", "public function getSelect()\n {\n $select = array();\n $modules = $this->getModules();\n\n foreach ($modules as $module) {\n $select[$module->getId()] = $module->getName();\n }\n\n return $select;\n }", "public function getTypeOptions()\n {\n $calendars = Config::get('vojtasvoboda.proeventspreview::calendars');\n $return = [];\n\n foreach($calendars as $key => $calendar) {\n $return[$key] = $calendar['name'];\n }\n\n return $return;\n }", "public static function get_parameters() {\n return array(\n array(\n 'name' => 'termlist_id',\n 'caption' => 'Term List',\n 'description' => 'The term list being edited.',\n 'type' => 'select',\n 'table' => 'termlist',\n 'captionField' => 'title',\n 'valueField' => 'id',\n 'siteSpecific'=>true,\n 'group' => 'Terms',\n 'required'=>true\n ),\n array(\n 'name' => 'language_id',\n 'caption' => 'Language',\n 'description' => 'The language that terms are created in.',\n 'type' => 'select',\n 'table' => 'language',\n 'captionField' => 'language',\n 'valueField' => 'id',\n 'siteSpecific'=>true,\n 'group' => 'Terms',\n 'required'=>true\n )\n );\n }", "public function all_redes_dropdown(){\r\n\t\r\n $query = $this->db->query(\"SELECT nombre FROM redes;\");\r\n if ($query->num_rows() > 0) {\r\n $data =array();\r\n foreach ($query->result() as $red) {\r\n $data[$red->nombre] = $red -> nombre;\r\n }\r\n return $data;\r\n \r\n } else\r\n return false;\r\n }", "public function getDropDownListData($field)\n {\n switch ($field)\n {\n case 'item_name':\n return ArrayHelper::map(AuthItem::find()->all(),'name','description');\n case 'user_id':\n return ArrayHelper::map(User::find()->all(),'id','username');\n //put more fields need to be mapped.\n \n default:\n return [];\n }\n }", "function cjpopups_get_all_options(){\n\tglobal $wpdb;\n\t$return = '';\n\t$table = cjpopups_item_info('options_table');\n\t$all_query = $wpdb->get_results(\"SELECT * FROM $table\");\n\tif(!empty($all_query)){\n\t\tforeach ($all_query as $key => $query) {\n\t\t\tif(is_serialized($query->option_value)){\n\t\t\t\t$return[$query->option_name] = @unserialize($query->option_value);\n\t\t\t}else{\n\t\t\t\t$return[$query->option_name] = stripcslashes(html_entity_decode($query->option_value));\n\t\t\t}\n\t\t}\n\t}\n\treturn $return;\n}", "public function getValueSelectOptions()\n {\n if (!$this->hasData('value_select_options')) {\n switch ($this->getAttribute()) {\n case 'country_id':\n $options = $this->_directoryCountry->toOptionArray(true);\n break;\n\n case 'region_id':\n $options = $this->_directoryAllregion->toOptionArray(true);\n break;\n\n default:\n $options = [];\n }\n $this->setData('value_select_options', $options);\n }\n\n return $this->getData('value_select_options');\n }", "private function getOptionItems()\n {\n $salaryGroup = new SalaryGroupRepository();\n $salaryComponent = new SalaryComponentRepository();\n return [\n 'salaryGroupItems' => ['' => __('crud.option.salaryGroup_placeholder')] + $salaryGroup->pluck(),\n 'componentItems' => ['' => __('crud.option.salaryComponent_placeholder')] + $salaryComponent->pluck()\n ];\n }", "public static function getDecisionDropdown() {\n\n $decisions = Decision::orderBy('decision', 'ASC')->get();\n\n $decisions_for_dropdown = [];\n foreach($decisions as $decision) {\n $decisions_for_dropdown[$decision->id] = $decision->decision;\n }\n\n return $decisions_for_dropdown;\n }", "function getSearchOptions() {\n\n $tab = array();\n $tab['common'] = __('Characteristics');\n\n $tab[2]['table'] = $this->getTable();\n $tab[2]['field'] = 'id';\n $tab[2]['name'] = __('ID');\n $tab[2]['massiveaction'] = false;\n $tab[2]['datatype'] = 'number';\n\n if (!preg_match('/^itemtype/', static::$itemtype_1)) {\n $tab[3]['table'] = getTableForItemType(static::$itemtype_1);\n $tab[3]['field'] = static::$items_id_1;\n $tab[3]['name'] = call_user_func(array(static::$itemtype_1, 'getTypeName'));\n $tab[3]['datatype'] = 'text';\n $tab[3]['massiveaction'] = false;\n }\n\n if (!preg_match('/^itemtype/', static::$itemtype_2)) {\n $tab[4]['table'] = getTableForItemType(static::$itemtype_2);\n $tab[4]['field'] = static::$items_id_2;\n $tab[4]['name'] = call_user_func(array(static::$itemtype_2, 'getTypeName'));\n $tab[4]['datatype'] = 'text';\n $tab[4]['massiveaction'] = false;\n }\n\n return $tab;\n }", "public static function getDomainChoiceList(){\n $droptions = DomainChoiceRecord::find()->asArray()->all();\n return Arrayhelper::map($droptions, 'value', 'order');\n }", "public function getDropdownEmployeeGroup()\n {\n /*\n * define variable\n */\n $return[''] = '-- Select Employee Group --';\n $employeeGroup = $this->getEmployeeGroup();\n\n if ($employeeGroup->isNotEmpty())\n {\n foreach ($employeeGroup as $val){\n $return[$val->guid] = $val->name;\n }\n }\n\n return $return;\n }", "protected function getVocabulariesOptions() {\n $vocabularies = Vocabulary::loadMultiple();\n $options = [];\n foreach ($vocabularies as $vocabulary) {\n $options[$vocabulary->get('vid')] = $vocabulary->label();\n }\n return $options;\n }", "public function dropdown()\n {\n $building_id = \\Request::get('building_id');\n return \\App\\Floor::where('building_id', $building_id)->lists('name','id');\n }", "public function options(Request $request)\n {\n return \\App\\App::select('id', 'name')->get()->pluck('id', 'name')->toArray();\n }", "function to_name_array($value_field = null, $key_field = null) {\n\t\t$result = array();\n\n\t\t$this->reset();\n\n\t\twhile($option = $this->next()) {\n\t\t\tif (is_null($value_field)) {\n\t\t\t\t$value_field = $option->name_field;\n\t\t\t}\n\n\t\t\tif (is_null($key_field)) {\n\t\t\t\t$key_field = 'id';\n\t\t\t}\n\n\t\t\t$result[$option->get($key_field)] = $option->get($value_field);\n\t\t}\n\n\t\t$this->reset();\n\n\t\treturn $result;\n\n\t}", "public function getNewChildSelectOptions()\n {\n return array('value' => $this->getType(),\n 'label' => Mage::helper('bronto_reminder')->__('SKU'));\n }", "public function getAllOptions()\n {\n $res = $this->getOptions();\n array_unshift($res, ['value' => '', 'label' => '']);\n return $res;\n }", "public static function getSelectGroups() {\n foreach(self::$MESSAGES['GROUP'] as $group_id => $group_name) {\n $data[] = \"<option value=\\\"$group_id\\\">$group_name</option>\";\n }\n return $data;\n }", "public function getSelections()\n {\n if ($this->_aList === null && $this->oxselectlist__oxvaldesc->value) {\n $this->_aList = false;\n $aList = oxRegistry::getUtils()->assignValuesFromText($this->oxselectlist__oxvaldesc->getRawValue(), $this->getVat());\n foreach ($aList as $sKey => $oField) {\n if ($oField->name) {\n $this->_aList[$sKey] = oxNew(\"oxSelection\", getStr()->strip_tags($oField->name), $sKey, false, $this->_aList === false ? true : false);\n }\n }\n }\n\n return $this->_aList;\n }", "function outputOptionsList()\n {\n $cc_types = modApiFunc(\"Configuration\", \"getCreditCardSettings\", false);\n\n $OptionsList = '';\n foreach ($cc_types as $type)\n {\n $_id = $type['id'];\n $_name = $type['name'];\n $OptionsList.= '<option value='.$_id.'>'.$_name.'</option>';\n }\n return $OptionsList;\n }", "public function getOptionsList(): array\n {\n return [\n new SelectConfigOption(\n self::INPUT_KEY_SEARCH_ENGINE,\n SelectConfigOption::FRONTEND_WIZARD_SELECT,\n array_keys($this->getAvailableSearchEngineList()),\n '',\n 'Search engine. Values: ' . implode(', ', array_keys($this->getAvailableSearchEngineList()))\n ),\n new TextConfigOption(\n self::INPUT_KEY_ELASTICSEARCH_HOST,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'Elasticsearch server host.'\n ),\n new TextConfigOption(\n self::INPUT_KEY_ELASTICSEARCH_PORT,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'Elasticsearch server port.'\n ),\n new TextConfigOption(\n self::INPUT_KEY_ELASTICSEARCH_ENABLE_AUTH,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'Set to 1 to enable authentication. (default is 0, disabled)'\n ),\n new TextConfigOption(\n self::INPUT_KEY_ELASTICSEARCH_USERNAME,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'Elasticsearch username. Only applicable if HTTP auth is enabled'\n ),\n new TextConfigOption(\n self::INPUT_KEY_ELASTICSEARCH_PASSWORD,\n TextConfigOption::FRONTEND_WIZARD_PASSWORD,\n '',\n 'Elasticsearch password. Only applicable if HTTP auth is enabled'\n ),\n new TextConfigOption(\n self::INPUT_KEY_ELASTICSEARCH_INDEX_PREFIX,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'Elasticsearch index prefix.'\n ),\n new TextConfigOption(\n self::INPUT_KEY_ELASTICSEARCH_TIMEOUT,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'Elasticsearch server timeout.'\n ),\n new TextConfigOption(\n self::INPUT_KEY_OPENSEARCH_HOST,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'OpenSearch server host.'\n ),\n new TextConfigOption(\n self::INPUT_KEY_OPENSEARCH_PORT,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'OpenSearch server port.'\n ),\n new TextConfigOption(\n self::INPUT_KEY_OPENSEARCH_ENABLE_AUTH,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'Set to 1 to enable authentication. (default is 0, disabled)'\n ),\n new TextConfigOption(\n self::INPUT_KEY_OPENSEARCH_USERNAME,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'OpenSearch username. Only applicable if HTTP auth is enabled'\n ),\n new TextConfigOption(\n self::INPUT_KEY_OPENSEARCH_PASSWORD,\n TextConfigOption::FRONTEND_WIZARD_PASSWORD,\n '',\n 'OpenSearch password. Only applicable if HTTP auth is enabled'\n ),\n new TextConfigOption(\n self::INPUT_KEY_OPENSEARCH_INDEX_PREFIX,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'OpenSearch index prefix.'\n ),\n new TextConfigOption(\n self::INPUT_KEY_OPENSEARCH_TIMEOUT,\n TextConfigOption::FRONTEND_WIZARD_TEXT,\n '',\n 'OpenSearch server timeout.'\n )\n ];\n }", "public static function getGenreOptions() {\n \n try {\n\n require('connection.php');\n\n $result = $db->prepare(\"SELECT * FROM genres\");\n $result->execute();\n\n $options = '';\n\n while ($line = $result->fetch()) {\n $options = $options.'<option value=\"'.$line['Id'].'\">'.$line['Label'].'</option>';\n }\n\n return $options;\n\n } catch (Exception $e) {\n throw new Exception(\"<br>Erreur lors de la création de la liste d'options de genres : \". $e->getMessage());\n }\n\t\t}", "public function drop_down($obj, $val = 'name', $key = 'id', $empty = '', $ignore = FALSE)\n {\n $return = array();\n\n if ($empty != '') {\n $return['empty'] = $empty;\n }\n\n if (isset($obj->row_data) && $obj->row_data == NULL) {\n return $return;\n }\n\n foreach ($obj as $res) {\n if ($ignore && $res->{$key} == $ignore) {\n\n }\n else {\n $return[$res->{$key}] = $res->{$val};\n }\n }\n\n return $return;\n\n }", "public function getFieldList($dVat = null)\n {\n if ($this->_aFieldList == null && $this->oxselectlist__oxvaldesc->value) {\n $this->_aFieldList = oxRegistry::getUtils()->assignValuesFromText($this->oxselectlist__oxvaldesc->value, $dVat);\n foreach ($this->_aFieldList as $sKey => $oField) {\n $this->_aFieldList[$sKey]->name = getStr()->strip_tags($this->_aFieldList[$sKey]->name);\n }\n }\n\n return $this->_aFieldList;\n }", "function zen_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {\n $field = '<select id=\"select-'.zen_output_string($name).'\" name=\"' . zen_output_string($name) . '\"';\n\n if (zen_not_null($parameters)) $field .= ' ' . $parameters;\n\n $field .= '>' . \"\\n\";\n\n if (empty($default) && isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) ) $default = stripslashes($GLOBALS[$name]);\n\n for ($i=0, $n=sizeof($values); $i<$n; $i++) {\n $field .= ' <option value=\"' . zen_output_string($values[$i]['id']) . '\"';\n if ($default == $values[$i]['id']) {\n $field .= ' selected=\"selected\"';\n }\n\n $field .= '>' . zen_output_string($values[$i]['text'], array('\"' => '&quot;', '\\'' => '&#039;', '<' => '&lt;', '>' => '&gt;')) . '</option>' . \"\\n\";\n }\n $field .= '</select>' . \"\\n\";\n\n if ($required == true) $field .= TEXT_FIELD_REQUIRED;\n\n return $field;\n }", "private function formatSelects()\n\t{\n\t\t$value = '';\n\t\tforeach ($this->selects as $name => $alias)\n\t\t{\n\t\t\tif ($value != '')\n\t\t\t\t$value .= ', ';\n\t\t\t$value .= $name . ($alias !== $name ? ' AS ' . $alias : '');\n\t\t}\n\t\treturn $value;\n\t}", "public static function dropdownCategory()\n {\n return self::pluck('name', 'id');\n }", "function get_dropdown_array($value){\n $result = array();\n $array_keys_values = $this->db->query('select id, '.$value.' from purchase_transaction order by id asc');\n $result[0]=\"-- Pilih Urutan id --\";\n foreach ($array_keys_values->result() as $row)\n {\n $result[$row->id]= $row->$value;\n }\n return $result;\n }", "function options_form() {\n return array(\n );\n }", "public function fields()\n {\n $series = [];\n for ($i = 1; $i <= 110; $i++) {\n $name = \"第${i}集\";\n $series[$name] = $name;\n }\n return [\n Select::make('剧集', 'name')\n ->options($series)\n ->withMeta([\n 'value' => '第1集',\n 'extraAttributes' => [\n 'placeholder' => '第几集...'],\n ]),\n Text::make(\"播放地址\", 'url', )->withMeta(['extraAttributes' => [\n 'placeholder' => '目前仅支持m3u8播放地址'],\n ]),\n Select::make(\"是否完成求片处理\", 'fixed')->options([\n 0 => '否',\n 1 => '是',\n ])\n ->withMeta(['value' => 0])\n ->displayUsingLabels(),\n ];\n }", "public function toOptionArray()\n { \n \n return [\n 'value' => 'pick_up',\n 'value' => 'drop_off'\n \n ];\n }", "function awm_select_options()\n {\n return array(\n 'options' => array(\n 'label' => __('Options', 'extend-wp'),\n 'case' => 'repeater',\n 'include' => array(\n 'option' => array(\n 'label' => __('Value', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n 'label' => array(\n 'label' => __('Label', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n ),\n ),\n );\n }", "public static function getSelectData($useAccount = false, $val = null)\n {\n $items = array();\n $value = 'name';\n\n if($val)\n {\n $value = $val;\n }\n\n if($useAccount)\n {\n $account = access()->account();\n $collection = parent::where('account_id', '=', $account->id)->get()->pluck($value, 'id');\n }\n else\n {\n $collection = parent::pluck($value, 'id');\n }\n\n // For each item, the ID needs to become hashed\n foreach ($collection as $id => $name)\n {\n $item = parent::find($id);\n\n if(isset(static::$selectHTMLFormat) && static::$selectHTMLFormat !== '')\n {\n $items[$id] = static::generateSelectName($item, static::$selectHTMLFormat);\n }\n else\n {\n $items[$id] = $name;\n }\n }\n\n\n return $items;\n }", "function get_select_options($select_data_array, $value_field, $display_field, $selected, $show_instr='Y', $instr_txt='Select')\n{\t\n\t$drop_HTML = \"\";\n\t#Determine whether to show the instruction option\n\tif($show_instr == 'Y'){\n\t\t$drop_HTML = \"<option value='' \";\n\t\t# Select by default if there is no selected option\n\t\tif($selected == '')\n\t\t{\n\t\t\t$drop_HTML .= \" selected\";\n\t\t}\n\t\n\t\t$drop_HTML .= \">- \".$instr_txt.\" -</option>\";\n\t}\n\t\n\tforeach($select_data_array AS $data_row)\n\t{\n\t\t$drop_HTML .= \" <option value='\".addslashes($data_row[$value_field]).\"' \";\n\t\t\n\t\t# Show as selected if value matches the passed value\n\t\t#check if passed value is an array\t\t\n if(is_array($selected)){\n \tif(in_array($data_row[$value_field], $selected)) $drop_HTML .= \" selected\";\n \n\t\t}elseif(!is_array($selected)){\n \tif($selected == $data_row[$value_field]) $drop_HTML .= \" selected\";\n }\t\t\n\t\t\t\t\n\t\t$display_array = array();\n\t\t# Display all data given based on whether what is passed is an array\n\t\tif(is_array($display_field))\n\t\t{\n\t\t\t$drop_HTML .= \">\";\n\t\t\t\n\t\t\tforeach($display_field AS $display)\n\t\t\t{\n\t\t\t\tarray_push($display_array, $data_row[$display]);\n\t\t\t}\n\t\t\t\n\t\t\t$drop_HTML .= implode(' - ', $display_array).\"</option>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$drop_HTML .= \">\".$data_row[$display_field].\"</option>\";\n\t\t}\n\t}\n\t\n\treturn $drop_HTML;\n}", "public function toSelectListJsonArray() {\n $arr = [\n 'id' => $this->id,\n 'name' => $this->name\n ];\n\n return $arr;\n }", "function getOptions() {\n\t\t$rc = array();\n\t\t$conf = $this->config['table.'];\n\t\t$table = $conf['name'];\n\t\t\n\t\tif (is_array($conf)) {\n\t\t\t$query = $this->local_cObj->getQuery($table, $conf, TRUE);\n\t\t\treturn $this->db->selectRecords($query['SELECT'], $query['FROM'], $query['WHERE'], $query['ORDERBY']);\n\t\t}\n\t\t\n\t\t$rc = array();\n\t\t$options = $this->config['options.'];\n\t\tif (is_array($options)) {\n\t\t\tforeach ($options AS $uid => $title) {\n\t\t\t\t$rc[] = array('uid' => $uid, 'title' => $title);\n\t\t\t}\n\t\t\t$this->config['table.']['valueField'] = 'uid'; // Just in case\n\t\t}\n\t\t\n\t\treturn $rc;\n\t}", "public function getChoices();", "public function getOptions(): array {\n\t\t$field_options = [];\n\n\t\tif (!empty($this->fieldoptions)) {\n\t\t\t$field_options = elgg_string_to_array($this->fieldoptions);\n\t\t\t$field_options = array_combine(array_values($field_options), $field_options); // input radio and checkbox require non-numeric keys\n\t\t}\n\n\t\treturn $field_options;\n\t}", "public function toOptionArray(){\n $options = array();\n $table = 'cms_block';\n $fields = Mage::helper('connector')->getFields($table);\n \n for ($i = 0; $i < sizeof($fields); $i++){\n $options[] = array(\n 'label' => $fields[$i],\n 'value' => $fields[$i]\n );\n }\n return $options;\n }", "public function dropdown_pegawai()\n {\n //Query untuk mengambil data pegawai dan diurutkan berdasarkan nama\n $sql = \"SELECT A.nama, A.nik FROM karyawan A \n LEFT JOIN bagian_departemen B ON B.id_bagian_dept = A.id_bagian_dept\n LEFT JOIN departemen C ON C.id_dept = B.id_dept \n ORDER BY nama\";\n $query = $this->db->query($sql);\n\n //Value default pada dropdown\n $value[''] = '-- CHOOSE --';\n //Menaruh data pegawai ke dalam dropdown, value yang akan diambil adalah value nik\n foreach ($query->result() as $row) {\n $value[$row->nik] = $row->nama;\n }\n return $value;\n }" ]
[ "0.7534164", "0.7074722", "0.6933768", "0.6819759", "0.6794977", "0.67738444", "0.67379177", "0.6721823", "0.6546775", "0.6519377", "0.65044", "0.6464126", "0.64478856", "0.6445686", "0.64412165", "0.64384323", "0.6403057", "0.63999057", "0.63676983", "0.63336825", "0.6311374", "0.6270771", "0.62655824", "0.62584525", "0.62427914", "0.62385786", "0.6235999", "0.62200916", "0.6210037", "0.6192288", "0.61624146", "0.61560065", "0.61433715", "0.6137882", "0.612375", "0.612357", "0.610763", "0.6101273", "0.6091749", "0.60772437", "0.6057732", "0.6056719", "0.60483944", "0.6046968", "0.6032214", "0.60239863", "0.6020266", "0.60199445", "0.6019219", "0.6016962", "0.601502", "0.6009379", "0.5981965", "0.59710705", "0.5946585", "0.593135", "0.59308225", "0.59308225", "0.5917217", "0.59123844", "0.58997893", "0.5882818", "0.58815306", "0.5880517", "0.5870683", "0.586732", "0.58640873", "0.5863173", "0.5860043", "0.5859505", "0.5847231", "0.58460283", "0.58458483", "0.5838503", "0.5837809", "0.58187467", "0.58117557", "0.58073115", "0.58067715", "0.58030915", "0.5800875", "0.57948923", "0.57880384", "0.5779718", "0.57748634", "0.57704747", "0.57703054", "0.5764016", "0.57588124", "0.5756189", "0.5755669", "0.57527757", "0.5748439", "0.5746575", "0.5740431", "0.57349986", "0.57332885", "0.57285", "0.5718407", "0.5718207", "0.571134" ]
0.0
-1
Retorna um array com todas as possibilidades de valores da lista.
public static function listOfKeys() { return array_keys((new static)->_all); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRequiredValues():array {\n\n # Declare result\n $result = [];\n\n # Return result\n return $result;\n\n }", "public static function listOfValues()\n {\n return array_values((new static)->_all);\n }", "public static function getRequiredValues():array {\n\n # Set result\n $result = self::REQUIRED_VALUES;\n\n # Return result\n return $result;\n\n }", "public function getAllPossible(): array\n\t{\n\t\treturn $this->possibilities;\n\t}", "public function getPossibleValues() {\n\t\treturn $this->possibleValues;\n\t}", "public function getValues(): array;", "public function getValues(): array;", "function getValues(){\n $values = [];\n \n foreach($this as $valor){\n $values[] = $valor;\n }\n \n return $values;\n }", "abstract public static function getValues(): array;", "public function values() : array;", "public function checkArray(): array\n {\n return (new CheckerArray($this->getValue()))->check();\n }", "function condition_values() {\n return array();\n }", "function getArrayCampos() {\n\t\t$arr = array(\n\t\t\t\"id\"=>$this->id,\n\t\t\t\"idov\"=>$this->idov,\n\t\t\t\"idseccion\"=>$this->idseccion,\n\t\t\t\"idrecurso\"=>$this->idrecurso,\n\t\t\t\"value\"=>$this->value\n\t\t);\n\t\treturn $arr;\n\t}", "public function getValuesList() {\n return $this->_get(3);\n }", "public function getValuesList() {\n return $this->_get(2);\n }", "public function getArrayCampos()\n {\n $array = $this->get();\n $array = $array[ 0 ];\n\n return array_keys($array);\n }", "public function all(): array\n {\n return $this->values;\n }", "public static function getValues()\n {\n return array_values(self::getConstants());\n }", "abstract public function values(): array;", "public function getArraySkipEmpty () {\n\n $values = array();\n\n foreach ($this->values as $key => $value) {\n\n if ($value !== null && (!is_string($value) || strlen($value) > 0)) {\n\n $values[$key] = $value;\n\n }\n\n }\n\n return $values;\n\n }", "public function _getAllowedValueList()\n {\n return self::$valueList;\n }", "protected function inputSelectionCriteria(): array\n {\n return [];\n }", "public function getEmptyValues();", "public static function getValues(): array\n {\n return array_values(self::getConstants());\n }", "public function values() {\n\t\treturn array_values($this->_value);\n\t}", "public function getOptionValues()\n {\n $options = [];\n $options[''] = __('--Please Select--');\n foreach ($this->getOptionArray() as $key => $value) {\n $options[$key] = $value;\n }\n return $options;\n }", "public function getValues()\n\t{\n\t\t$params = array();\n\n\t\tforeach($this->values as $value)\n\t\t{\n\t\t\tswitch($value[self::TYPE])\n\t\t\t{\n\t\t\t\tcase self::TYPE_RAW:\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_IN:\n\n\t\t\t\t\t$params+= $value[self::VALUE];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_SCALAR:\n\t\t\t\tdefault:\n\n\t\t\t\t\t$params[] = $value[self::VALUE];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $params;\n\t}", "public function getArrValores()\n {\n return $this->arrValores;\n }", "public function getValidUseTypeValues(): array\n {\n // [ $value, $optional, $prohibited, $required, ]\n return [\n 'optional' => [ \n 'optional', TRUE, FALSE, FALSE, \n ],\n 'prohibited' => [ \n 'prohibited', FALSE, TRUE, FALSE, \n ],\n 'required' => [ \n 'required', FALSE, FALSE, TRUE, \n ],\n ];\n }", "public function getAllowedValues() : array\n {\n return $this->allowedValues;\n }", "public function getValues(): array\n {\n $enumeration = $this->enumeration;\n $values = [];\n foreach ($this->getOrdinals() as $ord) {\n $values[] = $enumeration::byOrdinal($ord)->getValue();\n }\n return $values;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::VN,\n self::AU,\n self::PALAO,\n self::BALI,\n self::FJ,\n self::PUJI,\n self::MV,\n self::JP,\n self::TR,\n self::GR,\n self::FR,\n self::IT,\n self::BULAGE,\n self::XIANBENNA,\n self::MU,\n self::GE,\n self::SUMEI,\n self::SAIBAN,\n self::JIZHOU,\n self::SHABA,\n self::DE,\n self::LONDON,\n self::SYDNEY,\n self::NZ,\n self::JILONGPO,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::UNKNOWN,\n self::SINGLE,\n self::UNMARRIED,\n self::MARRIED_WITH_CONDITIONS,\n self::MARRIED_IN_COMMUNITY_OF_PROPERTY,\n self::LIVING_TOGETHER_IN_CIVIL_PARTNERSHIP,\n self::LIVING_TOGETHER_WITHOUT_CIVIL_PARTNERSHIP,\n self::PARTNER_REGISTRATION_IN_COMMUNITY_OF_PROPERTY,\n self::PARTNER_REGISTRATION_WITH_TERM_LIFE_INSURANCE,\n self::PARTNER_REGISTRATION_PARTNERSHIP_WITH_CONDITIONS,\n self::WIDOWER,\n self::WIDOW,\n self::DIVORCED,\n self::MARRIED,\n self::MARRIED_IN_LIMITED_COMMUNITY_OF_PROPERTY,\n ];\n }", "public function getValidFormChoiceTypeValues(): array\n {\n return [\n 'qualified' => [\n 'qualified', TRUE, FALSE, \n ], \n 'unqualified' => [\n 'unqualified', FALSE, TRUE, \n ], \n ];\n }", "public function getValues()\n {\n $values = array();\n\n foreach ($this->items as $item) {\n $values[] = $item['value'];\n }\n\n return $values;\n }", "protected function forbiddenValues()\n\t{\n\t\treturn (array) $this->params->get('forbiddenValues', [null, '']);\n\t}", "public function getValues();", "public function getValues()\n {\n $values = array();\n \n foreach ($this->_fields as $name => $info) {\n $values[$name] = (isset($info['value'])) ? $info['value'] : null;\n }\n \n return $values;\n }", "function getArrayCampos() {\n\t\t$arr = array(\n\t\t\t\"id\"=>$this->id,\n\t\t\t\"idov\"=>$this->idov,\n\t\t\t\"ordinal\"=>$this->ordinal,\n\t\t\t\"visible\"=>$this->visible,\n\t\t\t\"iconoov\"=>$this->iconoov,\n\t\t\t\"name\"=>$this->name,\n\t\t\t\"idov_refered\"=>$this->idov_refered,\n\t\t\t\"idresource_refered\"=>$this->idresource_refered,\n\t\t\t\"type\"=>$this->type\n\t\t);\n\t\treturn $arr;\n\t}", "public static function getAllMandatory() {\n\t\t$mandatory = [];\n\t\t$mandatory['AT'] = array('IBAN');\n\t\t$mandatory['AU'] = array('BSB', 'Account Number');\n\t\t$mandatory['BE'] = array('IBAN');\n\t\t$mandatory['CA'] = array('Transit Number', 'Account Number', 'Institution Number');\n\t\t$mandatory['GB'] = array('Sort Code', 'Account Number');\n\t\t$mandatory['HK'] = array('Clearing Code', 'Account Number', 'Branch Code');\n\t\t$mandatory['JP'] = array('Bank Code', 'Account Number', 'Branch Code', 'Bank Name', 'Branch Name', 'Account Owner Name ');\n\t\t$mandatory['NZ'] = array('Routing Number', 'Account Number');\n\t\t$mandatory['SG'] = array('Bank Code', 'Account Number', 'Branch Code');\n\t\t$mandatory['US'] = array('Routing Number', 'Account Number');\n\t\t$mandatory['CH'] = array('IBAN');\n\t\t$mandatory['DE'] = array('IBAN');\n\t\t$mandatory['DK'] = array('IBAN');\n\t\t$mandatory['ES'] = array('IBAN');\n\t\t$mandatory['FI'] = array('IBAN');\n\t\t$mandatory['FR'] = array('IBAN');\n\t\t$mandatory['IE'] = array('IBAN');\n\t\t$mandatory['IT'] = array('IBAN');\n\t\t$mandatory['LU'] = array('IBAN');\n\t\t$mandatory['NL'] = array('IBAN');\n\t\t$mandatory['NO'] = array('IBAN');\n\t\t$mandatory['PT'] = array('IBAN');\n\t\t$mandatory['SE'] = array('IBAN');\n\t\t$mandatory['OT'] = array('Account Holder Name', 'Account Number','','Bank Name','Branch Name');\n\t\treturn $mandatory;\n\t}", "public static function all(self ...$except): array\n {\n static::setup();\n\n $all = [];\n foreach (self::$enumeration['values'] as $value) {\n foreach ($except as $exceptEnum) {\n if ($value & $exceptEnum->value()) {\n continue 2;\n }\n }\n\n $all[] = self::byValue($value);\n }\n\n return $all;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::_EMPTY,\n self::UNKNOWN,\n self::LITER,\n self::KILOGRAM,\n self::SQUARE_METER,\n self::CUBIC_METER,\n ];\n }", "public function values(): array\n\t{\n\t\treturn $this->fields()->values()->all();\n\t}", "public function safe_array()\n\t{\n\t\t// Load choices\n\t\t$choices = func_get_args();\n\t\t$choices = empty($choices) ? NULL : array_combine($choices, $choices);\n\n\t\t// Get field names\n\t\t$fields = $this->field_names();\n\n\t\t$safe = array();\n\t\tforeach ($fields as $field)\n\t\t{\n\t\t\tif ($choices === NULL OR isset($choices[$field]))\n\t\t\t{\n\t\t\t\tif (isset($this[$field]))\n\t\t\t\t{\n\t\t\t\t\t$value = $this[$field];\n\n\t\t\t\t\tif (is_object($value))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Convert the value back into an array\n\t\t\t\t\t\t$value = $value->getArrayCopy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Even if the field is not in this array, it must be set\n\t\t\t\t\t$value = NULL;\n\t\t\t\t}\n\n\t\t\t\t// Add the field to the array\n\t\t\t\t$safe[$field] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $safe;\n\t}", "public function ToArray()\n {\n $result = array();\n $option = $this->TopMost();\n while ($option)\n {\n $result[$option->GetValue()] = $option->GetText();\n $option = $this->NextOf($option);\n }\n return $result;\n \n }", "function variable_fields()\n\t{\n\t\t$vf=$this->variable_fields;\n\n\t\tif (!is_array($vf))\n\t\t{\n\t\t\t//default search field if nothing is selected\n\t\t\treturn array('labl,qstn,catgry');\n\t\t}\n\n\t\t$tmp=NULL;\n\t\tforeach($vf as $field)\n\t\t{\n\t\t\tif (in_array($field,$this->variable_allowed_fields))\n\t\t\t{\n\t\t\t\t$tmp[]=$field;\n\t\t\t}\n\t\t}\n\n\t\t//no allowed fields found\n\t\tif ($tmp==NULL)\n\t\t{\n\t\t\treturn array('labl');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $tmp;\n\t\t}\n\t}", "public function getValuesList(){\n return $this->_get(1);\n }", "public function getToArrayValuesNotNull()\r\n\t\t{\r\n\t\t\t$arrayValues = $this->getToArrayValues();\r\n\t\t\t$arrayValues = $this->OutNullArray($arrayValues);\r\n\t\t\treturn $arrayValues;\r\n\t\t}", "public static function getAllowableEnumValues()\n {\n return [\n self::O,\n self::PP,\n self::ID,\n self::DL,\n self::OT,\n ];\n }", "public function provideCheckAdjacentValues()\n {\n return [\n [123455, 123455],\n [123456, false],\n [112234, 112234],\n [112233, 112233]\n ];\n }", "public function values(): array\n {\n return array_values($this->items);\n }", "public function getValues() : array\n {\n return $this->values;\n }", "protected function getValidFieldValues()\n {\n return [\n 'id' => [\n '1',\n '100'\n ]\n ];\n }", "public function getValues () {\n\n return array_values($this->values);\n\n }", "public function get_values() {\n\t\t$values = [];\n\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$values[$field->name] = $field->get_value();\n\t\t}\n\n\t\treturn $values;\n\t}", "public function values() {\n return array_merge(\n array(null),\n $this->primitives(),\n $this->arrays(),\n $this->maps(),\n $this->objects()\n );\n }", "public function getAvailableValues() {\n\t\treturn $this->aAvailableValues;\n\t}", "public function getValues()\n {\n return $this->getVal('value', []);\n }", "public function getValues()\n {\n return array_values($this->data);\n }", "final public function values($is=null):array\n {\n return Base\\Arrs::values($this->arr(),$is);\n }", "public function optsValues() {\n return [];\n }", "public function getEnumValues()\n {\n return array(\n 'all' => self::all,\n 'part' => self::part,\n 'nothing' => self::nothing,\n );\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::CFP,\n self::FORHIRE,\n self::COLLABS,\n self::EDUCATION,\n self::JOBS,\n self::MENTORS,\n self::PRODUCTS,\n self::MENTEES,\n self::FORSALE,\n self::EVENTS,\n self::MISC,\n ];\n }", "protected function getLockedFieldsArray()\n {\n $return = array();\n foreach ($this->fieldDefs as $field) {\n if (isset($field['name'])) {\n $return[$field['name']] = in_array($field['name'], $this->lockedFields);\n }\n }\n\n return $return;\n }", "public function getValues()\n {\n // Load the config data\n $output = [];\n $configData = $this->getConfigFieldsList();\n\n // Update the array with database values\n foreach ($configData as $group => $fields) {\n $output[$group] = [];\n foreach ($fields as $key => $value) {\n $v = $this->value($group . '/' . $key);\n $output[$group][$key] = $this->toBooleanFilter($v);\n }\n }\n\n return $output;\n }", "public function getValues(): array\n {\n return array_map(function ($model) {\n return $model->value;\n }, $this->values);\n }", "public function values() : array\n {\n return array_values($this->entries);\n }", "function get_val_array($arr){\n\t$new = array();\n\tif(!empty($arr)){\n\tforeach($arr as $key=>$val){\n\t\t$new[$key] = $key;\n\t}\n\t}\n\treturn $new;\n}", "public function all()\n {\n return $this->values;\n }", "public function getAllowedValues();", "public function getAllowedValues();", "public function getValues(): array\n {\n return $this->values;\n }", "protected function getOptionValueIds()\n {\n return array_unique($this->optionValueIds);\n }", "public function getArrayNullEmpty () {\n\n $values = array();\n\n foreach ($this->values as $key => $value) {\n\n if ($value !== null && is_string($value) && strlen($value) == 0) {\n\n $value = null;\n\n }\n\n $values[$key] = $value;\n\n }\n\n return $values;\n\n }", "public function return(): array\n {\n $permutations = [];\n foreach ($this->buildPermutations() as $perm) {\n $object = $this->buildFromData($perm);\n\n // If all condition succeed, add\n if ($this->allConditionsSucceed($object) && !in_array($object, $permutations)) {\n $permutations[] = $object;\n }\n }\n\n return $permutations;\n }", "protected function _getDefaultValues()\n {\n return array(\n );\n }", "public function getValues()\n {\n $values = array();\n\n foreach($this->elements as $key => $value)\n {\n if(mb_substr($key, -12) === 'confirmation') continue;\n\n $values[$key] = $value;\n }\n\n return $values;\n }", "public function getCheckConditionData(): array\n {\n $checkValues = [];\n foreach ($this->itemReflection->getCasProperties() as $propertyName => $casType) {\n $fieldName = $this->itemReflection->getFieldNameByPropertyName($propertyName);\n $checkValues[$fieldName] = isset($this->originalData[$fieldName]) ? $this->originalData[$fieldName] : null;\n }\n\n return $checkValues;\n }", "public function _get_picker_choices() {\n\t\t$this->load_data();\n\t\t$result = array();\n\t\tforeach ( $this->data as $unique_key => $item ) {\n\t\t\t$result[ $unique_key ] = ( isset( $item['options'] ) && is_array( $item['options'] ) ) ? $item['options'] : array();\n\t\t}\n\n\t\treturn $result;\n\t}", "public function values() {\n\t\treturn array_values($this->toArray());\n\t}", "function get_array_list(){\n $ret = array();\n\n if(array_key_exists('settings.conf', $_SESSION) !== true ){\n if( $this->load_settings() === false ){\n echo \"FATAL ERROR: Unable to get list of settings!\";\n return false;\n }\n }\n\n foreach( $_SESSION['settings.conf'] as $key => $val ){\n if( $this->is_settings_array($key) === true ){\n $name_only = substr($key, 0, strpos($key, '[') ); //get only the array name, without key, from $set_key string\n //var_dump($name_only);\n if( array_is_value_unique($ret, $name_only) === true ){\n $ret[] = $name_only;\n }\n }\n }\n\n if( count($ret) == 0 ){ return false; }\n return $ret;\n }", "public function getValuesWithModifiers(): array\n {\n if (isset($this->valuesWithModifiers)) {\n return $this->valuesWithModifiers;\n }\n\n $values = array_map(fn($value) => [$value], array_flip($this->getValues()));\n\n $valuesWithModifiers = $values + $this->getModifiers(); // merge and keep keys (append)\n\n ksort($valuesWithModifiers);\n\n $this->valuesWithModifiers = $valuesWithModifiers;\n\n return $this->valuesWithModifiers;\n }", "public function getOptions()\n {\n $values = [];\n foreach ($this->options as $id => $option) {\n $values[$id] = $option->getValue();\n }\n return $values;\n }", "public function getValues() {\n $values = parent::getValues();\n return array_merge($values, Array('0'=>__('general.bool_no'), '1'=>__('general.bool_yes')));\n }", "protected function getValueAsArray()\n {\n if(strpos($this->value, '|') > 1){\n $values = array_filter(explode(\"|\", $this->value));\n } else {\n $values = [$this->value];\n }\n return $values;\n }", "public function getParameters(): array\n {\n if (\n $this->comparator === ComparatorEnum::NOT_NULL\n || $this->comparator === ComparatorEnum::IS_NULL\n ) {\n return [];\n }\n\n if (!is_array($this->value)) {\n return [$this->value];\n }\n\n return $this->value;\n }", "function getSpecimenTypePermissibleValues() {\r\n\t\t$result = array();\r\n\r\n\t\tforeach($this->find('all', array('conditions' => array('SpecimenReviewControl.flag_active' => 1))) as $new_control) {\r\n\t\t\t$result[$new_control['SpecimenReviewControl']['sample_control_id']] = __($new_control['SampleControl']['sample_type']);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn $result;\r\n\t}", "public function getValues()\n {\n return array_values($this->elements);\n }", "public function values(): array\n {\n return $this->values;\n }", "public function getOptinValues(array $optinList, array $values): array\n {\n $return = [];\n foreach ($optinList as $optin) {\n if ($values['can_' . $optin] == '1') {\n $return['can_' . $optin] = 1;\n $return[$optin . '_opt_in'] = Carbon::now();\n $return[$optin . '_opt_out'] = null;\n } else {\n $return['can_' . $optin] = 0;\n $return[$optin . '_opt_out'] = Carbon::now();\n $return[$optin . '_opt_in'] = null;\n }\n }\n return $return;\n }", "function getArray() {\n\treturn array('Red', 'Green', 'Blue');\n}", "function pnFormGetValues()\n {\n $result = array();\n\n $this->pnFormGetValues_rec($this->pnFormPlugins, $result);\n\n return $result;\n }", "private function checkFields()\r\n {\r\n $vars = array('user', 'pass', 'numbers', 'message', 'date', 'ids', 'data_start', 'data_end',\r\n 'lido', 'status', 'entregue', 'data_confirmacao', 'return_format'\r\n );\r\n\r\n $final = array();\r\n foreach ($vars as $key => $value) {\r\n if ($this->$value !== '') {\r\n $final[$value] = $this->$value;\r\n }\r\n }\r\n return $final;\r\n }", "public function values()\n {\n return array_values($this->_data);\n }", "public function getAllValues();", "public function getLabelledAvailableValues() {\n\t\t// This function is expensive so let's apply some caching\n\t\t// Might also be a candidate for Memcache\n\t\tif ( !is_null( $this->aLabelledAvailableValues ) ) {\n\t\t\treturn $this->aLabelledAvailableValues;\n\t\t} else {\n\t\t\t$this->aLabelledAvailableValues = array();\n\t\t}\n\t\tforeach ( $this->aAvailableValues as $sValue ) {\n\t\t\t$this->aLabelledAvailableValues[$sValue] = $sValue;\n\t\t}\n\t\treturn $this->aLabelledAvailableValues;\n\t}", "public function only() {\n $args = func_get_args();\n $result = array();\n foreach($args as $arg) {\n $result[$arg] = $this->get($arg);\n }\n\n return $result;\n }", "public function getValues()\n\t{\n\t\tif ($this->use_defaults) {\n\t\t\tforeach ($this->form_def['field_groups'] as $gi => $g) {\n\t\t\t\t// Read-only values are input-only\n\t\t\t\tif ($this->readonly || !empty($g['readonly'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// $this->field_defaults should contain all defaults by now, but maybe some of values are missing.\n\t\t\t\tif (!isset($this->field_defaults[$gi])) {\n\t\t\t\t\t$this->field_defaults[$gi] = array();\n\t\t\t\t\tif (empty($g['collection_dimensions'])) {\n\t\t\t\t\t\t// Values for the group are missing, use defaults from the form definition.\n\t\t\t\t\t\tforeach ($g['fields'] as $fi => $f) {\n\t\t\t\t\t\t\tif (isset($f['default'])) {\n\t\t\t\t\t\t\t\t$this->field_defaults[$gi][$fi] = $f['default'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Empty collection by default.\n\t\t\t\t\t\t$this->field_defaults[$gi] = array();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->field_defaults;\n\t\t} else {\n\t\t\tif ($this->field_values === null) {\n\t\t\t\t$this->field_values = array();\n\t\t\t\t//$this->field_values = $this->raw_input;\n\n\t\t\t\tforeach ($this->form_def['field_groups'] as $gi => $g) {\n\t\t\t\t\tif ($this->readonly || !empty($g['readonly'])) {\n\t\t\t\t\t\t// Read-only values are input-only\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (empty($g['collection_dimensions'])) {\n\t\t\t\t\t\t// Simple group\n\t\t\t\t\t\tif (isset($this->raw_input[$gi])) {\n\t\t\t\t\t\t\t$this->getValues_processCollection($this->raw_input[$gi], 0, $gi, $g['fields'],\n\t\t\t\t\t\t\t\t$this->field_values[$gi]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// No data, use empty \"object\"\n\t\t\t\t\t\t\t$this->field_values[$gi] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ($g['collection_dimensions'] >= 1) {\n\t\t\t\t\t\t// Validate fields for each item in collection.\n\t\t\t\t\t\tif (isset($this->raw_input[$gi])) {\n\t\t\t\t\t\t\t// Non-empty collection, walk it recursively.\n\t\t\t\t\t\t\t$this->getValues_processCollection($this->raw_input[$gi], $g['collection_dimensions'], $gi, $g['fields'],\n\t\t\t\t\t\t\t\t$this->field_values[$gi]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Missing data, it should not happen, but whatever ... use empty collection instead.\n\t\t\t\t\t\t\t$this->field_values[$gi] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($this->http_method == 'get') {\n\t\t\t\t\t// FIXME: This does not work with collections\n\t\t\t\t\t$this->field_values = array_replace_recursive($this->field_defaults, $this->field_values);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->field_values;\n\t\t}\n\t}", "public function getAllOptions()\r\n {\r\n $result = [];\r\n\r\n foreach (self::getOptionArray() as $index => $value) {\r\n $result[] = ['value' => $index, 'label' => $value];\r\n }\r\n\r\n return $result;\r\n }", "public function getPicklistValues($skipCheckingRole = false)\n\t{\n\t\tif ($this->getName() === 'targetmodule') {\n\t\t\treturn Settings_Webforms_Module_Model::getsupportedModulesList();\n\t\t}\n\t\treturn array();\n\t}", "public function getValues() {}" ]
[ "0.69296277", "0.6681584", "0.65327185", "0.6387066", "0.6337383", "0.62671244", "0.62671244", "0.6242079", "0.6237003", "0.619078", "0.6174013", "0.6167074", "0.60965466", "0.6080075", "0.6075288", "0.6072066", "0.60482824", "0.60443395", "0.6041813", "0.60366696", "0.6027969", "0.6020526", "0.59913725", "0.5984949", "0.5958009", "0.5948748", "0.594394", "0.59435624", "0.5941686", "0.5933202", "0.59079564", "0.5884314", "0.58752894", "0.58727473", "0.5870789", "0.5867074", "0.5856464", "0.5847106", "0.5830171", "0.5828708", "0.58180034", "0.58165777", "0.58051777", "0.57853216", "0.5777068", "0.5774046", "0.57677907", "0.57644695", "0.5762687", "0.57614577", "0.5747214", "0.5742742", "0.5731021", "0.57304484", "0.5729664", "0.57276565", "0.57161874", "0.571562", "0.5715589", "0.57140756", "0.57108015", "0.57054955", "0.57029015", "0.5701842", "0.5699506", "0.5695098", "0.56886405", "0.5684662", "0.56788325", "0.5675292", "0.5675292", "0.56739366", "0.5672023", "0.5670616", "0.56684965", "0.5661456", "0.565579", "0.5655071", "0.56535125", "0.5645884", "0.5640084", "0.56373274", "0.562951", "0.5627012", "0.5624264", "0.562131", "0.5615496", "0.56145567", "0.5601613", "0.55918616", "0.55913043", "0.55873543", "0.55845225", "0.5584043", "0.5581471", "0.5574653", "0.55696744", "0.55686194", "0.5565775", "0.5561603", "0.55602056" ]
0.0
-1
Retorna um array com todas as possibilidades de nomes formatados da lista.
public static function listOfValues() { return array_values((new static)->_all); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function names(): array;", "public function names(): array;", "public function getValidNameAttributes(): array\n {\n return [\n 'Starts with _' => [\n 'attribute_name_0001.xsd', '_foo', \n ], \n 'Starts with letter' => [\n 'attribute_name_0002.xsd', 'f', \n ], \n 'Contains letter' => [\n 'attribute_name_0003.xsd', 'foo', \n ], \n 'Contains digit' => [\n 'attribute_name_0004.xsd', 'f00', \n ], \n 'Contains .' => [\n 'attribute_name_0005.xsd', 'f.bar', \n ], \n 'Contains -' => [\n 'attribute_name_0006.xsd', 'f-bar', \n ], \n 'Contains _' => [\n 'attribute_name_0007.xsd', 'f_bar', \n ], \n 'Surrounded by whitespaces' => [\n 'attribute_name_0008.xsd', 'foo_bar', \n ], \n ];\n }", "public function getNames();", "protected function names()\n {\n $names = [];\n\n foreach ($this->data as $key => $value) {\n if (is_int($key)) {\n $names[$value] = str_replace(['-', '_'], ' ', ucfirst(trim($value)));\n } else {\n $names[$key] = $value;\n }\n }\n\n return $names;\n }", "public static function getNames()\n\t{\n\t\t$list = [];\n\t\tforeach (self::getCodes() as $code)\n\t\t{\n\t\t\t$list[$code] = Base::getNameByCode($code);\n\t\t}\n\n\t\treturn $list;\n\t}", "public static function getAllNames() {\n $contactArray = X2Model::model('Contacts')->findAll($condition = 'visibility=1');\n $names = array(0 => 'None');\n foreach ($contactArray as $user) {\n $first = $user->firstName;\n $last = $user->lastName;\n $name = $first . ' ' . $last;\n $names[$user->id] = $name;\n }\n return $names;\n }", "public function getNames() {}", "public function getNames() {}", "public function getNames() {}", "public function getDataForMakeNameMethod(): array\n {\n return [\n 0 => [\n 0 => [\n 'name' => 'Miss Althea Aufderhar',\n ],\n ],\n ];\n }", "abstract public static function getAllowedStrings(): array;", "public static function names(): array\n {\n return array_map(fn ($case) => $case->name, static::cases());\n }", "public static function getAllNames() {\n\t\t$contactArray = X2Model::model('Contacts')->findAll($condition='visibility=1');\n\t\t$names=array(0=>'None');\n\t\tforeach($contactArray as $user){\n\t\t\t$first = $user->firstName;\n\t\t\t$last = $user->lastName;\n\t\t\t$name = $first . ' ' . $last;\n\t\t\t$names[$user->id]=$name;\n\t\t}\n\t\treturn $names;\n\t}", "public function getNames(): array\n {\n $enumeration = $this->enumeration;\n $names = [];\n foreach ($this->getOrdinals() as $ord) {\n $names[] = $enumeration::byOrdinal($ord)->getName();\n }\n return $names;\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getAllNames() {}", "public function getNameList() {\n return $this->_get(3);\n }", "public function getNameList() {\n return $this->_get(3);\n }", "public function getNameList() {\n return $this->_get(3);\n }", "public static function getNames() {\n $contactArray = X2Model::model('Contacts')->findAll();\n $names = array(0 => 'None');\n foreach ($contactArray as $user) {\n $first = $user->firstName;\n $last = $user->lastName;\n $name = $first . ' ' . $last;\n $names[$user->id] = $name;\n }\n return $names;\n }", "function get_foodnames_arr(){\n\n}", "public function niceNames(){\n $niceNames = array(\n 'specifications_title' => __('Specifications Title'),\n 'specifications_name_english' => __('Specifications Name (English)'),\n 'specifications_name_arabic' => __('Specifications Name (Arabic)'),\n 'specifications_description_english' => __('Specifications Description (English)'),\n 'specifications_description_arabic' => __('Specifications Description (Arabic)'),\n );\n return $niceNames;\n }", "function getValidArray($vTest, $validNames = array(\"art\", \"music\")) {\r\n\t$returnValues = array ();\r\n\tif (empty ( $vTest ) || empty ( $validNames )) {\r\n\t\treturn $returnValues;\r\n\t}\r\n\tfor($k = 0; $k < count ( $vTest ); $k ++) {\r\n\t\tif (in_array ( $vTest [$k], $validNames ))\r\n\t\t\tarray_push ( $returnValues, $vTest [$k] );\r\n\t}\r\n\treturn $returnValues;\r\n}", "public function getNameValueList()\n {\n return $this->nameValueList;\n }", "public function names()\n {\n $names = [];\n foreach ($this->items as $item) {\n $names[] = $item->getName();\n }\n\n return $names;\n }", "public function getNameList() {\n return $this->_get(1);\n }", "private function latinNames()\n {\n\n return [\n\n 'Ageratum houstonianum',\n\n 'Tagetes erecta',\n\n 'Catharanthus roseus',\n\n 'Sutera cordata',\n\n 'Platycodon grandiflorus',\n\n 'Monarda didyma',\n\n 'Rudbeckia hirta',\n\n 'Rudbeckia fulgida var. sullivantii',\n\n 'Dicentra spectabilis',\n\n 'Geranium sanguineum',\n\n 'Festuca glauca',\n\n 'Salvia farinacea',\n\n 'Schizachyrium',\n\n 'Asclepias tuberosa',\n\n 'Caladium hortulanum',\n\n 'Canna generalis',\n\n 'Dianthus chinensis',\n\n 'Cuphea ignea',\n\n 'Coleus\tSolenostemon scutellaroides',\n\n 'Achillea millefolium',\n\n ];\n\n }", "function getNameOptions(){\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n \n // Select some fields\n //$query->select('DISTINCT name');\n $query->select('name');\n // From the hello table\n $query->from('#__helloworld_message');\n\t\t\t\t\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$result = $db->loadObjectList();\n\t\t\t\n\t\t\tforeach($result as $item){\n\t\t\t\t$name = $item->name;\n\t\t\t\t$filter_name_options[] = JHTML::_('select.option', $name , $name);\n\t\t\t\t}\n\t\t\treturn $filter_name_options;\n\t\t\t\n\t\t\t}", "public function allNamed(): array;", "public function fieldNameArray($result = false){\n $names = array();\n\n $field = $this->numFields($result);\n\n for ( $i = 0; $i < $field; $i++ ){\n $names[] = $this->fieldName($result, $i);\n }\n\n return $names;\n }", "public function titleArray($names);", "public static function validateName()\n {\n return array(\n new Main\\Entity\\Validator\\Length(null, 255),\n );\n }", "public function getIniciales() {\n $aIni = array();\n $aApe = $this->getApellidos();\n $sIni = \"\";\n foreach ($aApe as $Apellido) {\n $ini = substr($Apellido, 0, 1);\n if($ini != $sIni) {\n $aIni[] = $ini;\n }\n $sIni = $ini;\n }\n return $aIni;\n }", "public function listaCampos() {\r\n return Array(\"empleado\", \"nombre\", \"nif\", \"perfil_Usuario\", \"etiqueta_Emp\", \"observaciones_Emp\", \"centro_Directivo_Depart\", \"centro_Trabajo\", \"puesto_Trabajo\", \"servicio\", \"tipo_Usuario\", \"grupo_Nivel\");\r\n }", "function get_country_names($nations)\n\t{\n if(!is_array($nations)){\n return false;\n }\n\n $nation_names=array();\n foreach($nations as $nation){\n $nation_names[]=$nation['name'];\n }\t\n return $nation_names;\t\n }", "public function getAllNamesOnly()\n {\n $data = $this->getAll();\n\n $namesOnly = array_keys($data);\n\n return $namesOnly;\n }", "function option_names(): array {\r\n $option_names = [];\r\n\r\n foreach (MJKGTAPI::pages() as $page) {\r\n $option_names[] = $page->qualify_option('pid');\r\n $option_names[] = $page->qualify_option('last_gen');\r\n $option_names[] = $page->qualify_option('last_gen_success');\r\n }\r\n \r\n return $option_names;\r\n }", "public function validPrivateKeyNamesDataProvider()\n {\n return [\n ['validName'],\n ['valid_name'],\n ['1valid_name'],\n ];\n }", "public function getGroupNames()\n {\n $groups = deserialize( $this->groups );\n if ( ! count( $groups ) )\n {\n return array();\n }\n\n $query = 'select name from ' . $this->group_table . ' where ';\n $params = array();\n foreach ( $groups as $group )\n {\n $query .= 'id = ? or ';\n $params[] = $group;\n }\n\n $query = substr( $query, 0, strlen( $query ) - 4 );\n\n $records = $this->Database->prepare( $query )\n ->execute( $params );\n\n $group_names = array();\n while ( $records->next() )\n {\n $group_names[] = $records->name;\n }\n\n return $group_names;\n }", "static public function allNames()\n\t{\t\n\t\t$categories = PhotoCategory::all();\n\t\t\n\t\t$names = array();\n\t\t\n\t\t$categories->map(function($value) use (&$names)\n\t\t{\n\t\t\t$id = $value['id'];\n\t\t\t$names[$id] = $value['name'];\n\t\t});\n\t\t\n\t\treturn $names;\n\t}", "public function getFields()\r\n\t{\r\n\t \tforeach($this->mapping_rules as $field => $rule)\r\n\t \t{\r\n\t\t\tif(!strlen($rule['value']))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif(strpos($rule['value'],',') === false)\r\n\t\t\t{\r\n\t\t\t\t$fields[] = strtolower($rule['value']);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t \t$tmp_fields = explode(',',$rule['value']);\r\n\t\t\t$value = '';\r\n\t\t \tforeach($tmp_fields as $tmp_field)\r\n\t \t\t{\r\n\t\t\t\t$fields[] = trim(strtolower($tmp_field));\r\n\t \t\t}\r\n\t \t}\r\n\t\treturn $fields ? $fields : array();\r\n\t}", "public function getExternalizableFieldNames(): array\n\t{\n\t\t$externalizableList = [\n\t\t\t$this->fieldNameMap->getBindings(),\n\t\t];\n\n\t\tif ($this->fieldNameMap->isMultipleIdsFilled())\n\t\t{\n\t\t\t$externalizableList[] = $this->fieldNameMap->getMultipleIds();\n\t\t}\n\t\tif ($this->fieldNameMap->isSingleIdFilled())\n\t\t{\n\t\t\t$externalizableList[] = $this->fieldNameMap->getSingleId();\n\t\t}\n\n\t\treturn $externalizableList;\n\t}", "public static function allNames()\n {\n static $list;\n\n if ($list === null) {\n $list = [];\n $data = \\ResourceBundle::create(\\Locale::getDefault(), 'ICUDATA-curr')->get('Currencies');\n foreach ($data as $code => $values) {\n $list[$code] = $values[1];\n }\n }\n\n return $list;\n }", "public function provideValidReplacementNames()\n {\n return [\n ['firstname'], // original faker property\n ['lastname'], // original faker property\n ];\n }", "public function listNames(callable $filter = null): array\n {\n return iterator_to_array($this->scanNames($filter));\n }", "function getUsernames(){\n $arr = array();\n for($x=0;$x<count($this->names);$x++){\n array_push($arr,$this->names[$x]);\n }\n return $arr;\n }", "public function getNames()\n {\n return array_keys((array) $this->_prefNames);\n }", "function nice_names($groups){\n\n $group_array=array();\n for ($i=0; $i<$groups[\"count\"]; $i++) { //for each group\n if (isset($groups[$i])) { // Patched by SysCo/al\n $line=trim($groups[$i]);\n \n if (strlen($line)>0){ \n //more presumptions, they're all prefixed with CN= (but no more yet, patched by SysCo/al\n //so we ditch the first three characters and the group\n //name goes up to the first comma\n $bits=explode(\",\",$line);\n if (1== count($bits)) {\n $group_array[]=$bits[0]; // Patched by SysCo/al\n } else {\n $prefix_len=strpos($bits[0], \"=\"); // Patched by SysCo/al to allow also various length (not only 3)\n if (FALSE === $prefix_len) {\n $group_array[]=$bits[0];\n } else {\n $group_array[]=substr($bits[0],$prefix_len+1); // Patched by SysCo/al\n }\n }\n }\n }\n }\n return ($group_array);\t\n }", "public function getDatanamesArray()\n {\n\n $general_array[DataFactory::NONE] = 'DataNone';\n $general_array[DataFactory::SAME] = 'DataSame';\n $general_array[DataFactory::TYPE_ARTICLE] = 'DataArticle';\n $general_array[DataFactory::TYPE_DATE] = 'DataDate';\n $general_array[DataFactory::TYPE_INTEGER] = 'DataInteger';\n $general_array[DataFactory::TYPE_LIST] = 'DataList';\n $general_array[DataFactory::TYPE_STRING] = 'DataString';\n $general_array[DataFactory::TYPE_LIST_STRING] = 'DataListString';\n $general_array[DataFactory::TYPE_LIST_ARTICLE] ='DataListArticle';\n\n return $general_array;\n }", "protected function getMemberNames()\n {\n $arrMembers = array();\n\n $objMembers = $this->Database\n ->execute(\"SELECT id, username, firstname, lastname\n\t\t\t FROM tl_member\n\t\t\t WHERE login = 1\"\n );\n\n while ($objMembers->next()) {\n $varId = $objMembers->id;\n $varName = $objMembers->firstname . ' ' . $objMembers->lastname;\n\n $arrMembers[$varId] = $varName;\n }\n\n return $arrMembers;\n }", "public static function getUnformattedUsernames()\n {\n return [\n [\n 'username' => 'Aitor Tilla',\n 'expected' => 'AitorTilla'\n ],\n [\n 'username' => 'Aitor.Tilla',\n 'expected' => 'AitorTilla'\n ],\n [\n 'username' => 'Aitor__Tilla',\n 'expected' => 'AitorTilla'\n ],\n [\n 'username' => 'Aitor__Tilla.123',\n 'expected' => 'AitorTilla123'\n ],\n [\n 'username' => 'Aitor Tilla - 123',\n 'expected' => 'AitorTilla123'\n ],\n [\n 'username' => 'Aitor Tilla De Jamón',\n 'expected' => 'AitorTillaDeJamon'\n ],\n [\n 'username' => 'áéíóúàèìòù 10 Vocales con Acentos',\n 'expected' => 'aeiouaeiou10VocalesconAcentos'\n ],\n ];\n }", "public static function validateName()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}", "private function getGood(): array\n {\n return [\n CampType::FIELD_CAMP_TYPE => ucwords(TextSafe::shuffle(5) . ' ' . TextSafe::shuffle(5)),\n ];\n }", "private function getAllowedBypassUsernames(): array\n {\n $allowedUsernames = $this->scopeConfigInterface->getValue(self::XML_PATH_ALLOWED_BYPASS_USERNAMES);\n if (empty($allowedUsernames)) {\n $allowedUsernames = [];\n }\n return $allowedUsernames;\n }", "public function getPossibleCardNameArray()\n {\n return $this->possibleCardNameArray;\n }", "public function getExistingNames()\n {\n return array_keys($this->createQueryBuilder()\n ->select('name')\n ->hydrate(false)\n ->getQuery()\n ->execute()\n ->toArray());\n }", "public function bad_option_names() {\n\t\treturn array(\n\t\t\tarray( '' ),\n\t\t\tarray( '0' ),\n\t\t\tarray( ' ' ),\n\t\t\tarray( 0 ),\n\t\t\tarray( false ),\n\t\t\tarray( null ),\n\t\t);\n\t}", "function getList($name_fichier)\n {\n $xlsx = SimpleXLSX::parse($name_fichier);\n $list = array();\n $cont = 0;\n for ($cont = 0; $cont < 250; $cont++) {\n if ($xlsx->getCell(0, 'B' . $cont) == 'Nom et Prénom') {\n\n for ($i = $cont + 2; $i < 250; $i++) {\n if (empty($xlsx->getCell(0, 'B' . $i))) {\n break;\n }\n //echo $xlsx->getCell(0, 'B'.$i).'<br>';\n //echo $xlsx->getCell(0, 'I'.$i).'<br>';\n\n $list[0][$cont] = $xlsx->getCell(0, 'B' . $i);\n $list[1][$cont] = $xlsx->getCell(0, 'I' . $i);\n $cont++;\n\n\n }\n }\n }\n return $list;\n }", "public function getCandidatesNamesForUsers()\n {\n $db = Zend_Db_Table::getDefaultAdapter();\n $query = \"select c.id,c.candidate_name,c.emailid from main_candidatedetails c \n where c.isactive = 1 and c.cand_status = 'Selected' and c.backgroundchk_status in ('Yet to start','Completed') and c.id not in (select rccandidatename from main_users \n where isactive = 1 and rccandidatename is not null)\";\n $result = $db->query($query);\n $data = array();\n while($row = $result->fetch())\n {\n \n $data[$row['id']] = $row['candidate_name'];\n \n }\n return $data;\n }", "private function getCampos()\n {\n \t$fields \t= [];\n \tif ( !empty( $this->parametros['campos'] ) )\n \t{\n if ( is_string($this->parametros['campos']) )\n {\n $fields = explode(',', $this->parametros['campos'] );\n }\n \t} else\n \t{\n \t\t$tabela = $this->parametros['tabela'];\n \t\t$fields = [$this->Controller->$tabela->primaryKey(), $this->Controller->$tabela->displayField() ];\n \t}\n\n \treturn $fields;\n }", "public static function permissionLabels()\n {\n return [];\n }", "public static function getModuleNames(): array\n {\n return [\n static::MARGULIS => [\n 'name' => 'модуль пристройка-прихожка-низа',\n 'check_topic' => 'margulis/temperature',\n ],\n// static::HOME_CONTROL => [\n// 'name' => 'модуль дом-температура-котел',\n// 'check_topic' => 'home/kitchen/temperature',\n// ],\n //static::WATERING => ['name' => 'автополив', 'check_topic' => 'water/check/major'],\n ];\n\n }", "function affiliationsNames()\n {\n //@todo: fix this\n // dd($this->CI->session->all_userdata());\n $this->affiliationsName = $this->CI->session->userdata(AUTH_AFFILIATION_ARRAY);\n $this->cosi_db = $this->CI->load->database('roles', true);\n $affNames = array();\n foreach($this->affiliationsName as $affiliation){\n $query = $this->cosi_db->get_where('roles', array('role_id'=>$affiliation));\n if ($query->num_rows() > 0) {\n // There _can_ be more than one full name, so just pick the first for now.\n $affNames[$affiliation] = $query->result_array()[0]['name'] . ' (' . $affiliation . ')';\n } else {\n // No full name, so use the abbreviation only.\n $affNames[$affiliation] = $affiliation;\n }\n }\n return $affNames;\n }", "public function getSelectOptions(string $strName) : array;", "function only_four_letters_names($array)\n{\n\n // Init an empty array to contains 4 letters names\n $four_letters_names = [];\n\n // For each name in the given array, check if it contains 4 letters\n foreach($array as $name)\n if(strlen($name) == 4)\n $four_letters_names[] = $name;\n\n return $four_letters_names;\n}", "public function toArray()\n {\n $choose = [\n self::CHECK_MODIFIED_TIME => __('Check file modified time'),\n self::CHECK_MD5 => __('Check file MD5 hash'),\n self::CHECK_CRC32 => __('Check file CRC32 checksum'),\n self::CHECK_DISABLED => __('Do not check')\n ];\n\n return $choose;\n }", "function funcs_getNames($name,$bothnames = true){\n\t$last = ucwords(preg_replace('/^(.+), .+/','\\\\1',$name));\n\t$first = ucwords(preg_replace('/^.+, (.+)/','\\\\1',$name));\n\tif ($bothnames){\n\t\treturn array($first,$last);\n\t}else{\n\t\treturn $first;\n\t}\n}", "function getStatusNameList()\n\t{\n\t\tglobal $lang;\n\t\tif(!isset($lang->status_name_list))\n\t\t\treturn array_flip($this->getStatusList());\n\t\telse return $lang->status_name_list;\n\t}", "protected function nice_names($groups){\n\n $group_array=array();\n for ($i=0; $i<$groups[\"count\"]; $i++){ // For each group\n \t\n \tif (isset($groups[$i])) {\n \t$line=$groups[$i];\n \t} else {\n \t\t$line = '';\n \t}\n \n if (strlen($line)>0){ \n // More presumptions, they're all prefixed with CN=\n // so we ditch the first three characters and the group\n // name goes up to the first comma\n $bits=explode(\",\",$line);\n $group_array[]=substr($bits[0],3,(strlen($bits[0])-3));\n }\n }\n return ($group_array); \n }", "public function get_names()\n {\n }", "public function getServiceNameAllowableValues()\n {\n return [\n self::SERVICE_NAME_BOUNTY_MISSIONS,\n self::SERVICE_NAME_ASSASSINATION_MISSIONS,\n self::SERVICE_NAME_COURIER_MISSIONS,\n self::SERVICE_NAME_INTERBUS,\n self::SERVICE_NAME_REPROCESSING_PLANT,\n self::SERVICE_NAME_REFINERY,\n self::SERVICE_NAME_MARKET,\n self::SERVICE_NAME_BLACK_MARKET,\n self::SERVICE_NAME_STOCK_EXCHANGE,\n self::SERVICE_NAME_CLONING,\n self::SERVICE_NAME_SURGERY,\n self::SERVICE_NAME_DNA_THERAPY,\n self::SERVICE_NAME_REPAIR_FACILITIES,\n self::SERVICE_NAME_FACTORY,\n self::SERVICE_NAME_LABORATORY,\n self::SERVICE_NAME_GAMBLING,\n self::SERVICE_NAME_FITTING,\n self::SERVICE_NAME_PAINTSHOP,\n self::SERVICE_NAME_NEWS,\n self::SERVICE_NAME_STORAGE,\n self::SERVICE_NAME_INSURANCE,\n self::SERVICE_NAME_DOCKING,\n self::SERVICE_NAME_OFFICE_RENTAL,\n self::SERVICE_NAME_JUMP_CLONE_FACILITY,\n self::SERVICE_NAME_LOYALTY_POINT_STORE,\n self::SERVICE_NAME_NAVY_OFFICES,\n self::SERVICE_NAME_SECURITY_OFFICE,\n ];\n }", "public static function optionsList()\n {\n $list = array();\n\n foreach (self::all() as $role) {\n $list[$role->id] = $role->name;\n }\n\n return $list;\n }", "public function getNames() : array\n {\n return \\array_map(function ($t) {\n return $t instanceof self ? $t->getNames() : $t;\n }, $this->types);\n }", "public static function _getPropertyNames(): array\n {\n return [\n ];\n }", "public static function makeTitleArray($names);", "public static function getAllFieldNames()\n {\n return [\n self::ACTIVE,\n self::DISPLAY_NAME,\n self::EMAIL,\n self::EMPLOYEE_ID,\n self::FIRST_NAME,\n self::GROUPS,\n self::HR_CONTACT_NAME,\n self::HR_CONTACT_EMAIL,\n self::LAST_NAME,\n self::LOCKED,\n self::MANAGER_EMAIL,\n self::PERSONAL_EMAIL,\n self::REQUIRE_MFA,\n self::USERNAME,\n ];\n }", "public static function getWhitelist(): array\n {\n return static::pluck('word')->toArray();\n }", "public static function getAllMandatory() {\n\t\t$mandatory = [];\n\t\t$mandatory['AT'] = array('IBAN');\n\t\t$mandatory['AU'] = array('BSB', 'Account Number');\n\t\t$mandatory['BE'] = array('IBAN');\n\t\t$mandatory['CA'] = array('Transit Number', 'Account Number', 'Institution Number');\n\t\t$mandatory['GB'] = array('Sort Code', 'Account Number');\n\t\t$mandatory['HK'] = array('Clearing Code', 'Account Number', 'Branch Code');\n\t\t$mandatory['JP'] = array('Bank Code', 'Account Number', 'Branch Code', 'Bank Name', 'Branch Name', 'Account Owner Name ');\n\t\t$mandatory['NZ'] = array('Routing Number', 'Account Number');\n\t\t$mandatory['SG'] = array('Bank Code', 'Account Number', 'Branch Code');\n\t\t$mandatory['US'] = array('Routing Number', 'Account Number');\n\t\t$mandatory['CH'] = array('IBAN');\n\t\t$mandatory['DE'] = array('IBAN');\n\t\t$mandatory['DK'] = array('IBAN');\n\t\t$mandatory['ES'] = array('IBAN');\n\t\t$mandatory['FI'] = array('IBAN');\n\t\t$mandatory['FR'] = array('IBAN');\n\t\t$mandatory['IE'] = array('IBAN');\n\t\t$mandatory['IT'] = array('IBAN');\n\t\t$mandatory['LU'] = array('IBAN');\n\t\t$mandatory['NL'] = array('IBAN');\n\t\t$mandatory['NO'] = array('IBAN');\n\t\t$mandatory['PT'] = array('IBAN');\n\t\t$mandatory['SE'] = array('IBAN');\n\t\t$mandatory['OT'] = array('Account Holder Name', 'Account Number','','Bank Name','Branch Name');\n\t\treturn $mandatory;\n\t}", "function GetFieldNames($fields) {\r\n \t$names = array();\r\n for ($i = 0; $i < count($fields); $i++) {\r\n \t$names[] = $fields[$i]['name'];\r\n }\r\n\r\n return $names;\r\n }", "public function getPermissionNames()\n {\n $result = $this->getPermissions()->all();\n if( is_null( $result ) ) return [];\n return array_map( function($o) {return $o->namedId;}, $result );\n }", "function list_jenis_kelamin() {\n $list = ['laki - laki', 'perempuan'];\n \n return $list;\n}", "public function getNameTags() \n { \n $allTags = []; \n foreach($this->tags as $tag) {\n $allTags[] = $tag->name;\n }\n return $allTags;\n }", "public static function buscarPorNombre($nombreRol): array {\n $expresion = \"/^[a-z_ ]{0,15}$/\";\n if (preg_match($expresion, mb_strtolower($nombreRol))) {\n $consulta = \"SELECT * FROM vw_rol WHERE nombre LIKE '%{$nombreRol}%' ORDER BY nombre\";\n return Conexion::getInstancia()->seleccionar($consulta);\n }\n return array(0, \"El nombre no cumple con el formato requerido\");\n }", "public static function _getPropertyNames(): array\n {\n return [\n 'name',\n ];\n }", "function vcn_get_career_names_select_list () {\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry()), 'json');\r\n\t$select_list_array = array('' => 'Select a Career');\r\n\r\n\tif (count($data) > 0) {\r\n\t\tforeach ($data as $value) {\r\n\t\t\t$select_list_array[$value->onetcode] = $value->title;\r\n\t\t}\r\n\t}\r\n\treturn $select_list_array;\r\n}", "public function fieldValidationArray()\n {\n return [\n 'name' => 'required|codename|min:2|max:255',\n 'label' => 'string',\n 'description' => 'string',\n 'required' => 'boolean',\n 'mode' => 'string|in:prefer_local,prefer_external,only_local,only_external',\n 'script' => 'string'\n ];\n }", "public function get_names(): array {\n\t\treturn array_values( $this->missing_dependencies );\n\t}", "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 }", "protected function getFieldNameArray(string $name): array\n {\n if (empty($name) && $name !== '0') {\n return [];\n }\n\n if (!str_contains($name, '[')) {\n return Hash::filter(explode('.', $name));\n }\n $parts = explode('[', $name);\n $parts = array_map(function ($el) {\n return trim($el, ']');\n }, $parts);\n\n return Hash::filter($parts, 'strlen');\n }", "public function getNameList(CriteriaElement $criteria = null)\r\n {\r\n $blocks = $this->getObjects($criteria, true);\r\n $ret = array();\r\n foreach (array_keys($blocks) as $i) {\r\n $name = (!$blocks[$i]->isCustom()) ? $blocks[$i]->getVar('name') : $blocks[$i]->getVar('title');\r\n $ret[$i] = $name;\r\n }\r\n return $ret;\r\n }", "public function existAttributeNames() {\n\t\t$attributeNames = array();\n\t\tforeach ($this->getLanguages() as $language) {\n\t\t\t$attributeNames[] = 'exist_' . $language;\n\t\t}\n\t\treturn $attributeNames;\n\t}", "public function getListArray(){\n static $list;\n if (isset($list)) {\n return $list;\n }\n $package = new Hosh_Manager_Db_Package_Hosh_Class();\n $listall = $package->getList();\n $list = array();\n foreach ($listall as $val){\n $list[strtolower($val['sname'])] = $val;\n }\n return $list;\n }", "public function getCountriesNames() {\n $query = \\Drupal::entityQuery('taxonomy_term');\n $query->condition('vid', 'country');\n $result = $query->execute();\n\n $countries = Term::loadMultiple($result);\n $countries_list = []; \n foreach ($countries as $country) {\n $countries_list[$country->id()] = $country->name->value;\n }\n\n return $countries_list;\n }", "private function getDummyNames()\n {\n $names = [];\n\n for ($i=1; $i<=1000; $i++) {\n array_push($names, 'Comedor '. $i);\n }\n\n return array_rand($names);\n }" ]
[ "0.65749913", "0.65749913", "0.63739836", "0.6357513", "0.62552494", "0.62513393", "0.6182072", "0.6151727", "0.6151727", "0.615047", "0.6125488", "0.61010617", "0.6095346", "0.609284", "0.6082076", "0.60678685", "0.60678685", "0.60678685", "0.60678685", "0.60678685", "0.60678685", "0.60678685", "0.60443044", "0.6030003", "0.6030003", "0.6030003", "0.6011563", "0.5998827", "0.5940313", "0.59346366", "0.59212196", "0.5914444", "0.59122294", "0.5868462", "0.58665574", "0.5850453", "0.58501905", "0.5827895", "0.58233416", "0.58181757", "0.5812888", "0.5811165", "0.58020157", "0.57995826", "0.57959706", "0.5790929", "0.57861686", "0.57857966", "0.57832706", "0.5778365", "0.57660204", "0.576168", "0.57545376", "0.57216066", "0.57152194", "0.5713515", "0.5712118", "0.57077265", "0.5699988", "0.5698437", "0.56957805", "0.5685812", "0.5685574", "0.56799406", "0.56655985", "0.5659255", "0.5648108", "0.56473815", "0.5638098", "0.5637892", "0.56345946", "0.5613576", "0.5606623", "0.5595155", "0.5593667", "0.55917674", "0.5589716", "0.5588066", "0.55848026", "0.5584528", "0.5578184", "0.5571837", "0.5563542", "0.5562985", "0.55584097", "0.55439454", "0.5542096", "0.55415255", "0.55411357", "0.5528238", "0.55179155", "0.5517816", "0.55149597", "0.5505742", "0.5495412", "0.5484759", "0.5483884", "0.5478208", "0.5476498", "0.5470848", "0.5467091" ]
0.0
-1
Recebe uma lista de valores e retorna uma lista de valores formatados.
public static function getList($list, $separator = ', ') { $formatted = [ ]; $keys = explode($separator, $list); foreach ($keys as $key) { $formatted[] = self::get($key); } return implode($separator, $formatted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValuesList() {\n return $this->_get(2);\n }", "public function getValuesList() {\n return $this->_get(3);\n }", "#[Pure] public function get_values(): string\n {\n if(gettype($this -> value) === \"string\") {\n return \"'\" . $this->value . \"'\";\n }else{\n $res = \"'\";\n foreach($this -> value as $v){\n $res .= strval($v) . \" \";\n }\n $res .= \"'\";\n }\n return $res;\n }", "public function getValuesList(){\n return $this->_get(1);\n }", "public function getValues()\n {\n return $this->getVal('value', []);\n }", "function get_value_list()\n\t{\n\t\treturn $this->value;\n\t}", "public function get_values(){\n $value_str = '';\n if (is_array($this->value)){\n foreach ($this->value as $val){\n $value_str .= $val.' ';\n }\n } else {\n $value_str .= $this->value;\n }\n\n return $value_str;\n }", "public function get_values() {\n\t\t$values = [];\n\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$values[$field->name] = $field->get_value();\n\t\t}\n\n\t\treturn $values;\n\t}", "public static function toValues($list) {\n $names = array();\n foreach ($list as $k => $v) {\n $names[] = array('text' => $v, 'value' => $k);\n }\n\n return json_encode($names);\n }", "public function getValuesForOutput() {\n $formattedValues = $this->getFormattedValues();\n $rawValues = $this->getRawValues();\n\n $valuesForOutput = $rawValues;\n\n foreach ($formattedValues as $columnName => $value) {\n $valuesForOutput[$columnName] = $value;\n }\n\n return $valuesForOutput;\n }", "function getValues(){\n $values = [];\n \n foreach($this as $valor){\n $values[] = $valor;\n }\n \n return $values;\n }", "function str_values(){\n //\n //map the std objects inthe array to return an array of strings of this \n //format ['cname=value'......]\n $values_str= array_map(function($obj){\n //\n //Trim the spaces\n $tvalue = trim($obj->value);\n //\n //Replace '' with null\n $value = $tvalue=='' ? 'null': \"'$tvalue'\";\n //\n return \"`$obj->name`=$value\";\n \n }, $this->values);\n //\n //retun the imploded version of the array with a , separator\n return implode(\",\",$values_str);\n }", "public function getValues();", "public function getValues()\n\t{\n\t\t$params = array();\n\n\t\tforeach($this->values as $value)\n\t\t{\n\t\t\tswitch($value[self::TYPE])\n\t\t\t{\n\t\t\t\tcase self::TYPE_RAW:\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_IN:\n\n\t\t\t\t\t$params+= $value[self::VALUE];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_SCALAR:\n\t\t\t\tdefault:\n\n\t\t\t\t\t$params[] = $value[self::VALUE];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $params;\n\t}", "public function getValues()\n {\n $values = array();\n \n foreach ($this->_fields as $name => $info) {\n $values[$name] = (isset($info['value'])) ? $info['value'] : null;\n }\n \n return $values;\n }", "protected function convertPriceList() {\n\t\t$retArray =array();\n\t\t\n\t\tforeach ($this->DetailPriceList as $name => $nameValue) {\n\t\t\t$description = '';\n\t\t\t$unit = '';\n\t\t\t$price = 0;\n\t\t\t$avgPrice = 0;\n\t\t\tif (is_array($nameValue)) {\n\t\t\t\tforeach ($nameValue as $desc => $prices) {\n\t\t\t\t\tif (is_array($prices)) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$price = $nameValue;\n\t\t\t\t$avgPrice = $price;\n\t\t\t}\n\t\t\t$retArray[] = array($name,$description, $unit,$price, $avgPrice );\n\t\t}\n\t}", "protected function getValueAsArray()\n {\n if(strpos($this->value, '|') > 1){\n $values = array_filter(explode(\"|\", $this->value));\n } else {\n $values = [$this->value];\n }\n return $values;\n }", "public function getPicklistValues()\n\t{\n\t\t$taxes = Vtiger_Inventory_Model::getGlobalTaxes();\n\t\tforeach ($taxes as $key => $tax) {\n\t\t\t$taxes[$key] = $tax['name'] . ' - ' . App\\Fields\\Double::formatToDisplay($tax['value']) . '%';\n\t\t}\n\t\treturn $taxes;\n\t}", "public function getValues()\n {\n $values = array();\n\n foreach ($this->items as $item) {\n $values[] = $item['value'];\n }\n\n return $values;\n }", "function fieldValuesSimplified() {\n\t\t$arrFieldValuesSimplified = array();\n\t\t$fieldValues = $this->fieldValues();\n\t\tforeach ($fieldValues as $fieldID => $fieldVal) {\n\t\t\tif (!isset($arrFieldValuesSimplified[$fieldID])) {\n\t\t\t\t$arrFieldValuesSimplified[$fieldID] = array();\n\t\t\t}\n\t\t\tforeach ($fieldVal as $fieldSubVal) {\n\t\t\t\t$arrFieldValuesSimplified[$fieldID][] = $fieldSubVal['value'];\n\t\t\t}\n\t\t}\n\t\treturn $arrFieldValuesSimplified;\n\t}", "public function values_as_array() {\n $Data = array();\n foreach ($this->__fields() as $field) {\n $v = $this->$field->cleaned_value();\n if ($v instanceof Newforms_File_Object) continue;\n $Data[$field] = $v;\n }\n return $Data;\n }", "public function formatFormValues( $values )\n\t{\n\t\treturn $values;\n\t}", "public function getValueFormatersNames(): array;", "public function values($data, $format)\n {\n $result = '';\n $replace = (strpos($format, '%value%') !== false) || (strpos($format, '%column%') !== false); \n if (is_array($data)) {\n foreach ($data as $key => $value) {\n $value = is_null($value) ? 'NULL' : (is_int($value) ? $value : '\"' . $this->escapeSQL($value) . '\"');\n $key = $this->escapeDbIdentifier($key);\n if ($format == 'fields') {\n $result .= \", $key\";\n } else{\n if ($format == 'pairs') {\n $result .= \", $key = $value\";\n } elseif ($replace) {\n $result .= \", \" . strtr($format, ['%value%' => $value, '%column%' => $key]);\n } else {\n $result .= \",\\t$value\";\n }\n }\n }\n }\n return substr($result, 2 /* length of the initial \", \" */);\n }", "public function getValues() {}", "public function getValues() {}", "public function getArrValores()\n {\n return $this->arrValores;\n }", "public function values(): array\n\t{\n\t\treturn $this->fields()->values()->all();\n\t}", "function values($data) {\n\n $VALUES = array();\n\n foreach ($data as $key => $value) {\n $value = $data[$key];\n $VALUES[] = \"'\" . str_replace(\"'\", \"\\'\", $value) . \"'\";\n }\n\n return implode(', ', $VALUES);\n}", "public function getValues(): array\n {\n return array_map(function ($model) {\n return $model->value;\n }, $this->values);\n }", "public function getValues()\n\t{\n\t\tif ($this->use_defaults) {\n\t\t\tforeach ($this->form_def['field_groups'] as $gi => $g) {\n\t\t\t\t// Read-only values are input-only\n\t\t\t\tif ($this->readonly || !empty($g['readonly'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// $this->field_defaults should contain all defaults by now, but maybe some of values are missing.\n\t\t\t\tif (!isset($this->field_defaults[$gi])) {\n\t\t\t\t\t$this->field_defaults[$gi] = array();\n\t\t\t\t\tif (empty($g['collection_dimensions'])) {\n\t\t\t\t\t\t// Values for the group are missing, use defaults from the form definition.\n\t\t\t\t\t\tforeach ($g['fields'] as $fi => $f) {\n\t\t\t\t\t\t\tif (isset($f['default'])) {\n\t\t\t\t\t\t\t\t$this->field_defaults[$gi][$fi] = $f['default'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Empty collection by default.\n\t\t\t\t\t\t$this->field_defaults[$gi] = array();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->field_defaults;\n\t\t} else {\n\t\t\tif ($this->field_values === null) {\n\t\t\t\t$this->field_values = array();\n\t\t\t\t//$this->field_values = $this->raw_input;\n\n\t\t\t\tforeach ($this->form_def['field_groups'] as $gi => $g) {\n\t\t\t\t\tif ($this->readonly || !empty($g['readonly'])) {\n\t\t\t\t\t\t// Read-only values are input-only\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (empty($g['collection_dimensions'])) {\n\t\t\t\t\t\t// Simple group\n\t\t\t\t\t\tif (isset($this->raw_input[$gi])) {\n\t\t\t\t\t\t\t$this->getValues_processCollection($this->raw_input[$gi], 0, $gi, $g['fields'],\n\t\t\t\t\t\t\t\t$this->field_values[$gi]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// No data, use empty \"object\"\n\t\t\t\t\t\t\t$this->field_values[$gi] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ($g['collection_dimensions'] >= 1) {\n\t\t\t\t\t\t// Validate fields for each item in collection.\n\t\t\t\t\t\tif (isset($this->raw_input[$gi])) {\n\t\t\t\t\t\t\t// Non-empty collection, walk it recursively.\n\t\t\t\t\t\t\t$this->getValues_processCollection($this->raw_input[$gi], $g['collection_dimensions'], $gi, $g['fields'],\n\t\t\t\t\t\t\t\t$this->field_values[$gi]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Missing data, it should not happen, but whatever ... use empty collection instead.\n\t\t\t\t\t\t\t$this->field_values[$gi] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($this->http_method == 'get') {\n\t\t\t\t\t// FIXME: This does not work with collections\n\t\t\t\t\t$this->field_values = array_replace_recursive($this->field_defaults, $this->field_values);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->field_values;\n\t\t}\n\t}", "public function getToArrayValues()\r\n\t\t{\r\n\t\t\t$obj = \t$this->getObject();\r\n\t\t\t$arrayValues = array();\r\n\t\t\tforeach ($obj as $key => $value) {\r\n\t\t\t\t$arrayValues[\":\".strtoupper($key)] = $value;\r\n\t\t\t}\r\n\t\t\treturn $arrayValues;\r\n\t\t}", "public function getValues()\n {\n\n\t\t$record = ProductAttributeValues::whereIn('avid',[1,6])->get();\n\t\t$rec = $record->pluck('pro_att_value');\n\t\treturn $rec;\n }", "public function get_values(){ return $this->values; }", "public function getValues()\r\n {\r\n $values = $this->getValue();\r\n\r\n if (!is_array($values)) {\r\n $values = explode(',', $values);\r\n }\r\n\r\n if (!sizeof($values)) {\r\n return [];\r\n }\r\n\r\n $collection = $this->collectionFactory->create()\r\n ->addIdFilter($values);\r\n\r\n $options = [];\r\n foreach ($collection as $tag) {\r\n $options[] = $tag->getId();\r\n }\r\n\r\n return $options;\r\n }", "public function getValuesForProcessing() {\n $formattedValues = $this->getFormattedValues();\n $rawValues = $this->getRawValues();\n\n $valuesForProcessing = $rawValues;\n\n foreach ($formattedValues as $columnName => $value) {\n if (!isset($rawValues[$columnName]) || $rawValues[$columnName] === null) {\n $valuesForProcessing[$columnName] = $value;\n }\n }\n\n return $valuesForProcessing;\n }", "public function getAllValues();", "public function merge_validater_value_list($list)\n {\n foreach ($list as $k => $v) {\n $this->_validater_value_arr[$k] = $v;\n }\n }", "public function getValues()\n {\n return $this->values;\n }", "public function getValues()\n {\n return $this->values;\n }", "public function getValues()\n {\n return $this->values;\n }", "public function getValues()\n {\n return $this->values;\n }", "private function convertContent(){\n $newContent = array();\n foreach ($this->content as $key => $value) {\n if (is_scalar($value)) {\n $newContent[$key] = $this->format($value);\n }\n }\n return $newContent;\n }", "function getValuesAttributes(){\n $complete = [];\n \n foreach($this as $attribute => $valor){\n $complete[$attribute] = $valor;\n }\n \n return $complete;\n }", "public function getAllValues() {\n\t\t$keys = array_keys($this->defaults);\n\t\t$values = array_map(array($this, 'getAppValue'), $keys);\n\t\t$preparedKeys = array_map(array($this, 'camelCase'), $keys);\n\t\treturn array_combine($preparedKeys, $values);\n\t}", "public function getValues()\n {\n $values = array();\n $data = $this->getElement()->getValue();\n\n if (is_array($data) && count($data)) {\n usort($data, array($this, '_sortWeeeTaxes'));\n $values = $data;\n }\n return $values;\n }", "public function values();", "public function values();", "public function values();", "public function values();", "public function values();", "public static function listFormats(){\n $list = array();\n foreach(self::$_resultFormats as $key => $item){\n $list[$key] = $item['description'];\n }\n return $list;\n }", "public function values()\n {\n return $this->values;\n }", "public function values()\n {\n return $this->values;\n }", "public function values()\n {\n return $this->values;\n }", "public function values()\n {\n return $this->values;\n }", "public function getValues()\n {\n // Load the config data\n $output = [];\n $configData = $this->getConfigFieldsList();\n\n // Update the array with database values\n foreach ($configData as $group => $fields) {\n $output[$group] = [];\n foreach ($fields as $key => $value) {\n $v = $this->value($group . '/' . $key);\n $output[$group][$key] = $this->toBooleanFilter($v);\n }\n }\n\n return $output;\n }", "function getOptionValues() {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookuptypevalue as optiontext, lv.lookuptypevalue as optionvalue FROM lookuptype AS l , \n\t\tlookuptypevalue AS lv WHERE l.id = lv.lookuptypeid AND l.name ='\".$this->getName().\"' ORDER BY optiontext \";\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}", "public function getValues() {\n return $this->values;\n }", "public function getValues() {\n return $this->values;\n }", "public static function formatValues(array $value, int $start = 0) : array\n {\n $temp = [];\n $value = array_values($value);\n\n foreach ($value as $key => $val)\n {\n if ($val === '' || $val === null)\n {\n continue;\n }\n\n $field = self::FIELDS[$key + $start + 2];\n\n $temp[$field] = $val;\n }\n\n return $temp;\n }", "public function getAll()\n {\n return $this->values;\n }", "public function getAll()\n {\n return $this->values;\n }", "public static function get_values()\n {\n }", "public static function get_values()\n {\n }", "public static function get_values()\n {\n }", "public function getFormattedData();", "public function getValues()\n\t\t{\n\t\t\treturn $this->values;\n\t\t}", "public function toList();", "function valuelist($PA, $fobj)\t\n\t{\n\t\tglobal $TCA;\n\t\t$content='';\n\t\tglobal $TCA;\n \t\t$content='';\n \t\t$foreign_table='tx_commerce_attribute_values';\n \t\t$table='tx_commerce_attributes';\n \t\t$doc = t3lib_div::makeInstance('smallDoc');\n\t\t$doc->backPath = $GLOBALS['BACK_PATH'];\n\t\t/**\n\t\t * Load the table TCA into local variable\n\t\t *\n\t\t */\n \t\tt3lib_div::loadTCA($foreign_table);\n \t\t$tca=$GLOBALS['TCA'];\n \t\t$table_tca=$tca[$foreign_table];\n \t\t\n \t\t$attributeStoragePid=$PA['row']['pid'];\n \t\t$attributeUid=$PA['row']['uid'];\n\t\t/**\n\t\t * Select Attribute Values\n\t\t */\n \t\n\t\t\t \n\t\t\t \n\t\t\t /** \n\t\t\t * @TODO TS config of fields in list\n\t\t\t * \n\t\t\t */\n\t\t\t $field_rows=array('attributes_uid','value');\n\t\t\t $field_row_list=implode(',', $field_rows);\n\t\t\t \n\t\t\t\n\t\t\t /**\n\t\t\t * Taken from class.db_list_extra.php\n\t\t\t */\n\t\t\t $titleCol = $TCA[$foreign_table]['ctrl']['label'];\n\t\t\t $thumbsCol = $TCA[$foreign_table]['ctrl']['thumbnail'];\n\t\t\n\t\t\t\n\t\t\n\t\t\t // Create the SQL query for selecting the elements in the listing:\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$result=$GLOBALS['TYPO3_DB']->exec_SELECTquery( '*',\n \t\t\t\t\t\t\t\t\t$foreign_table,\n\t\t\t\t\t\t\t\t\t\"pid = $attributeStoragePid \" \n\t\t\t\t\t\t\t\t\t\t.t3lib_BEfunc::deleteClause($foreign_table).\n\t\t\t\t\t\t\t\t\t\t' AND '.\"attributes_uid='\".$GLOBALS['TYPO3_DB']->quoteStr($attributeUid,$foreign_table).\"'\"\n\t\t\t\t\t\t\t\t\t\t );\n \t\t\n\t\t\t$dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);\n\t\t\t\n\t\t\t if ($dbCount)\t\n\t\t\t {\n\t\t\t \t\n\t\t\t \t\n\t\t\t /**\n\t\t\t * Only if we have a result\n\t\t\t */\t\n\t\t\t \t\t$theData[$titleCol] = '<span class=\"c-table\">'.$GLOBALS['LANG']->sL('LLL:EXT:commerce/locallang_be.php:attributeview.valuelist',1).'</span> ('.$dbCount.')';\n\t\t\t \t\t$num_cols=count($field_rows);\n\t\t\t \t\t$out.='\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"c-headLineTable\" style=\"width:95%;\" colspan=\"'.($num_cols+1).'\">'.$theData[$titleCol].'</td>\n\t\t\t\t\t</tr>';\n\t\t\t\t\t/**\n\t\t\t\t\t * Header colum\n\t\t\t\t\t * */\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t$out.='<tr>';\n\t\t\t\t\tforeach($field_rows as $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$out.='<td class=\"c-headLineTable\"><b>'.\n\t\t\t\t\t\t\t\t$GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel($foreign_table,$field)).\n\t\t\t\t\t\t\t\t'</b></td>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t$out.='<td class=\"c-headLineTable\"></td>';\n\t\t\t\t\t$out.='</tr>';\n\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 * Walk true Data\n\t\t\t\t\t */\n\t\t\t\t\t$cc=0;\n\t\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))\t\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$cc++;\n\t\t\t\t\t\t$row_bgColor=(($cc%2)?'' :' bgcolor=\"'.t3lib_div::modifyHTMLColor($GLOBALS['SOBE']->doc->bgColor4,+10,+10,+10).'\"');\n\t\t\t\t\t\t\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Not very noice to render html_code directly\n\t\t\t\t\t\t * @todo chan ge rendering html code here\n\t\t\t\t\t\t * \n\t\t\t\t\t\t * */\n\t\t\t\t\t\t $iOut.='<tr '.$row_bgColor.'>';\n\t\t\t\t\t\t foreach ($field_rows as $field)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \t$iOut.='<td>';\n\t\t\t\t\t\t \t$wrap=array('','');\n\t\t\t\t\t\t \tswitch ($field)\n\t\t\t\t\t\t \t{\n\t\t\t\t\t\t \t\tcase $titleCol:\n\t\t\t\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\t $params = '&edit['.$foreign_table.']['.$row['uid'].']=edit';\n\t\t\t\t\t\t \t\t\t $wrap=array(\n\t\t\t\t\t\t \t\t\t\t\t'<a href=\"#\" onclick=\"'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$GLOBALS['BACK_PATH'])).'\">',\n\t\t\t\t\t\t \t\t\t\t\t'</a>'\n\t\t\t\t\t\t \t\t\t\t\t);\n\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t \t\t\tbreak;\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\n\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t \t$iOut.=implode(t3lib_BEfunc::getProcessedValue($foreign_table,$field,$row[$field],100),$wrap);\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t \t$iOut.='</td>';\n\t\t\t\t\t\t }\n\t\t\t\t\t\t /**\n\t\t\t\t\t\t * Trash icon\n\t\t\t\t\t\t */\n\t\t\t\t\t\t$iOut.='<td>&nbsp;';\n\t\t\t\t\t\t#$params='&delete['.$foreign_table.']['.$row['uid'].']=delete';\n\t\t\t\t\t\t#$iOut.='<a href=\"#\" onclick=\"'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$GLOBALS['BACK_PATH'])).'\"><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/delete_record.gif','width=\"11\" height=\"12\"').' title=\"Delete\" border=\"0\" alt=\"\" /></a>';\n\t\t\t\t\t\t$iOut.= '<a href=\"#\" onclick=\"deleteRecord(\\''.$foreign_table.'\\', ' .$row['uid'] .', \\'alt_doc.php?edit[tx_commerce_attributes][' .$attributeUid .']=edit\\');\"><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/delete_record.gif','width=\"11\" height=\"12\"').' title=\"Delete\" border=\"0\" alt=\"\" /></a></td>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t#$iOut.='</td>';\n\t\t\t\t\t\t$iOut.='</tr>';\n\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t \t\t$out.=$iOut;\n\t\t\t \t\t/**\n\t\t\t \t\t * Cerate the summ row\n\t\t\t \t\t */\n\t\t\t \t\t$out.='<tr>';\n\t\t\t \t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tforeach($field_rows as $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$out.='<td class=\"c-headLineTable\"><b>';\n\t\t\t\t\t\tif ($sum[$field]>0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$out.=t3lib_BEfunc::getProcessedValueExtra($foreign_table,$field,$sum[$field],100);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$out.='</b></td>';\n\t\t\t\t\t}\n\t\t\t\t\t$out.='<td class=\"c-headLineTable\"></td>';\n\t\t\t\t\t$out.='</tr>';\n\t\t\t \t\t \n\t\t\t }\n\t\t\t\n\t\t\t $out='\n\n\t\t\t\n\n\t\t\t<!--\n\t\t\t\tDB listing of elements:\t\"'.htmlspecialchars($table).'\"\n\t\t\t-->\n\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"typo3-dblist\">\n\t\t\t\t\t'.$out.'\n\t\t\t\t</table>';\n\t\t\t$content.=$out;\n\t\t\t\n\t\t\t/**\n\t\t\t * \n\t\t\t * New article\n\t\t\t */\n\t\t\t\n\t\t\n\t\t\t$params='&edit['.$foreign_table.']['.$attributeStoragePid.']=new&defVals['.$foreign_table.'][attributes_uid]='.urlencode($attributeUid);\n\t\t\t$content.='<div id=\"typo3-newRecordLink\">';\n\t\t\t$content.='<a href=\"#\" onclick=\"'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$GLOBALS['BACK_PATH'])).'\">';\n\t\t\t$content.=$GLOBALS['LANG']->sL('LLL:EXT:commerce/locallang_be.php:attributeview.addvalue',1);\n\t\t\t$content.='</a>';\n\t\t\t$content.='</div>';\n\t\t\t\n\t\t\t/**\n\t\t\t * Always\n\t\t\t * Update sum_price_net and sum_price_gross\n\t\t\t * To Be shure everything is ok\n\t\t\t */\n\t\t\t /*\n\t\t\t $values=array('sum_price_gross' => $sum['price_gross_value']*100,\n\t\t\t \t\t\t 'sum_price_net' => $sum['price_net_value']*100);\n \t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,\"order_id='\".$GLOBALS['TYPO3_DB']->quoteStr($order_id,$foreign_table).\"'\",$values);\n \t\t*/\n\t\t\n\t\treturn $content;\t\n\t}", "public function valueOf() {\n return $this->_values;\n }", "public function getValues()\n {\n return $this->_values;\n }", "public function Values()\n {\n return $this->values;\n }", "public function format()\n {\n $result = array();\n\n foreach ($this->groups as $group) {\n $result[] = array(\n 'id' => $group->getInternalId(),\n 'external_id' => $group->getExternalId(),\n 'value' => $group->getName(),\n 'label' => $group->getName(),\n );\n }\n\n return $result;\n }", "protected function getValuesFromList($list){\n\n\t\tif(preg_match_all('(-?(?=\\\\.?\\\\d)\\\\d*(?:\\\\.\\\\d+)?)i', $list, $values)){\n\t\t\treturn $values[0];\n\t\t}\n\t\treturn array();\n\n\t}", "public function valoracionToArray(){\n\t\t\t$this->arrayValor = array(\n\t\t\t\t\"user\"=> $this->user,\n\t\t\t\t\"object\"=> $this->object,\n\t\t\t\t\"valor\"=>$this->valor\n\t\t\t\t);\n\t\t}", "function show_list()\n\t{\n\t\t$out = $this->get_value_list();\n\t\treturn $out;\n\t}", "function getValues()\n {\n return $this->type->getValues();\n }", "public function getFieldValues() {\n return array_values($this->_fields);\n }", "protected function parseValues($_values)\n\t{\n\t\t$use_ingroup = $this->field->parameters->get('use_ingroup', 0);\n\t\t$multiple = $use_ingroup || (int) $this->field->parameters->get('allow_multiple', 0);\n\n\t\t// Make sure we have an array of values\n\t\tif (!$_values)\n\t\t{\n\t\t\t$vals = array(array());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$vals = !is_array($_values)\n\t\t\t\t? array($_values)\n\t\t\t\t: $_values;\n\t\t}\n\n\t\t// Compatibility with legacy storage, we no longer serialize all values to one, this way the field can be reversed and filtered\n\t\tif (count($vals) === 1 && is_string(reset($vals)))\n\t\t{\n\t\t\t$array = $this->unserialize_array(reset($vals), $force_array = false, $force_value = false);\n\t\t\t$vals = $array ?: $vals;\n\t\t}\n\n\t\t// Force multiple value format (array of arrays)\n\t\tif (!$multiple)\n\t\t{\n\t\t\tif (is_string(reset($vals)))\n\t\t\t{\n\t\t\t\t$vals = array($vals);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach ($vals as & $v)\n\t\t\t{\n\t\t\t\tif (!is_array($v))\n\t\t\t\t{\n\t\t\t\t\t$v = strlen($v) ? array($v) : array();\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($v);\n\t\t}\n\n\t\t//echo '<div class=\"alert alert-info\"><h2>parseValues(): ' . $this->field->label . '</h2><pre>'; print_r($vals); echo '</pre></div>';\n\t\treturn $vals;\n\t}", "function format_value( $value, $post_id, $field )\n\t\t{\n\n\t\t\tif(is_array($value)) {\n\t\t\t\t$array = array();\n\n\t\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t\t$array[$k] = json_decode( $v, true );\n\t\t\t\t}\n\n\t\t\t\treturn $array;\n\t\t\t}\n\n\t\t}", "public function aggregateListRowValues()\n\t{\n\t}", "public function aggregateListRowValues()\n\t{\n\t}", "public function getValues()\n\t{\n\t\treturn $this->_values;\n\t}", "private function getArrayValueAsList($foreignKey, $valueIds)\n\t{\n\t\t$foreignKey = explode('.', $foreignKey);\n\t\t$table = $foreignKey[0];\n\t\t$fieldname = $foreignKey[1];\n\t\tif (strlen($table) > 0 && strlen($valueIds) > 0)\n\t\t{\n\t\t\t$values = $this->Database->prepare(\"SELECT \" . $fieldname . \" FROM \" . $table . \" WHERE id IN (\" . $valueIds . \") ORDER BY name ASC\")\n\t\t\t\t\t\t\t\t->execute();\n\t\t\t$list = array();\n\t\t\twhile ($values->next())\n\t\t\t{\n\t\t\t\t$list[] = $values->$fieldname;\n\t\t\t}\n\t\t\treturn implode(\", \", $list);\n\t\t}\n\t\treturn \"\";\n\t}", "public function hydrateValuesDataProvider()\n {\n return [\n [\n [\n 'val1' => 1,\n 'val2' => 'text',\n 'val3' => false,\n 'val4' => 2,\n 'val5' => 3.5,\n ],\n [],\n ],\n ];\n }", "public function getValues() {\n $values = parent::getValues();\n return array_merge($values, Array('0'=>__('general.bool_no'), '1'=>__('general.bool_yes')));\n }", "public static function values($withEmpty = false)\n {\n return ($withEmpty ? ['' => static::emptyValue()] : []) + [\n static::METRIC => \\Yii::t('app', 'International System (metre, kilogram)'),\n static::US => \\Yii::t('app', 'United States (inch, pound)'),\n ];\n }", "public function getValues(): array\n {\n return $this->values;\n }", "final public function getValues()\n {\n return $this->values;\n }", "function valores($idCampo)\r\n {\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n $result = $query->select('v.valor')\r\n ->from('NomValorestruc v')\r\n ->where(\"v.idcampo='$idCampo'\")\r\n //->groupBy('v.valor')\r\n ->execute()\r\n ->toArray();\r\n return $result;\r\n }", "public function getFieldValues()\n {\n if($this->isNewRecord){\n return []; //TODO: LOAD DEFAULT FIELDS OF TYPE\n }\n\n //pull meta values from DB\n $table = self::tablePrefix().'cms_post_field';\n $strSql = \"SELECT id, field_id, value \n\t\t\t\t\tFROM {$table}\n\t\t\t\t\tWHERE post_id = :pid\n\t\t\t\t \";\n $cmd = self::getDb()->createCommand($strSql);\n $cmd->bindValue(\":pid\",$this->id,\\PDO::PARAM_STR);\n $arrResults = $cmd->queryAll();\n\n return ArrayHelper::index($arrResults, 'id', 'field_id');\n }", "public function getOptionValuesForRender()\n\t{\n\t\treturn $this->_elementValues;\n\t}", "public function providerFieldValues()\n {\n return [\n ['non_existent_field', []],\n ['empty_field', []],\n ['empty_field_2', []],\n [\n 'acf_value_field',\n [\n ['test-1' => 'test 1'],\n ['test-1' => 'test 2'],\n ['test-1' => 'test 3'],\n ],\n ],\n [\n 'acf_option_field',\n [\n [\n 'label' => 'test 1',\n 'slug' => 'test-1',\n ],\n [\n 'label' => 'test 2',\n 'slug' => 'test-2',\n ],\n ],\n ],\n ];\n }", "public function getValues () {\n\n return array_values($this->values);\n\n }", "protected function _getValues()\n {\n return [\n $this->_getOrderId(),\n $this->_getTotal(),\n $this->_getItemsNames(),\n $this->_getSuccessUrl(),\n $this->_getErrorUrl(),\n $this->_getPaymentReportUrl()\n ];\n }", "public function getFieldsForUpdate()\r\n\t{\r\n\t\tforeach($this->rules_for_update as $field => $rule)\r\n\t\t{\r\n\t\t\tif(!strlen($rule['value']))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif(strpos($rule['value'],',') === false)\r\n\t\t\t{\r\n\t\t\t\t$fields[] = strtolower($rule['value']);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t \t$tmp_fields = explode(',',$rule['value']);\r\n\t\t\t$value = '';\r\n\t\t \tforeach($tmp_fields as $tmp_field)\r\n\t \t\t{\r\n\t\t\t\t$fields[] = trim(strtolower($tmp_field));\r\n\t \t\t}\r\n\t \t}\r\n\t\treturn $fields ? $fields : array();\r\n\t}", "public function values() {\n\t\treturn array_values($this->_value);\n\t}", "public function getStringValues(Context\\Context $context):array {\n return parent::getStringValues($context);\n }", "public function all()\n {\n return $this->values;\n }", "public function getValues()\n {\n return array_values($this->data);\n }" ]
[ "0.66178507", "0.65298784", "0.6515219", "0.6412509", "0.6375853", "0.6366811", "0.63082653", "0.6175464", "0.6166494", "0.6150706", "0.6104632", "0.6067465", "0.604535", "0.59723395", "0.59676296", "0.5951466", "0.5931342", "0.5908868", "0.5895232", "0.5874584", "0.58572346", "0.584949", "0.5837768", "0.5827866", "0.5825434", "0.5825434", "0.5818298", "0.5795471", "0.5792131", "0.578719", "0.576704", "0.5761231", "0.57604706", "0.5755536", "0.5734133", "0.57096606", "0.570119", "0.5697894", "0.5696355", "0.5696355", "0.5696355", "0.5696355", "0.5694134", "0.56925535", "0.56904006", "0.5684227", "0.5663796", "0.5663796", "0.5663796", "0.5663796", "0.5663796", "0.56545067", "0.5626884", "0.5626884", "0.5626884", "0.5626884", "0.5624368", "0.5615649", "0.56152266", "0.56152266", "0.5597422", "0.5585919", "0.5585919", "0.5574726", "0.5574726", "0.5574726", "0.55690277", "0.55673844", "0.5565361", "0.5536342", "0.553491", "0.55330694", "0.5526543", "0.5525845", "0.5523608", "0.55230343", "0.5522605", "0.5513782", "0.5509699", "0.5505964", "0.54950523", "0.54909855", "0.54909855", "0.5479718", "0.54754215", "0.54685473", "0.54524004", "0.5448976", "0.5444783", "0.5444724", "0.5443135", "0.54422057", "0.5436604", "0.54363996", "0.5432741", "0.5428871", "0.5424056", "0.5423785", "0.54212576", "0.5421001", "0.5415442" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('id',$this->id); $criteria->compare('account_name',$this->account_name,true); $criteria->compare('username',$this->username,true); $criteria->compare('sex',$this->sex); $criteria->compare('email',$this->email,true); $criteria->compare('password',$this->password,true); $criteria->compare('create_time',$this->create_time); $criteria->compare('status',$this->status); $criteria->compare('iphone',$this->iphone,true); $criteria->compare('qq',$this->qq); $criteria->compare('type',$this->type); $criteria->compare('reg_time',$this->reg_time); $criteria->compare('vip',$this->vip); $criteria->compare('honour',$this->honour,true); $criteria->compare('iteam_list',$this->iteam_list,true); $criteria->compare('this_login_time',$this->this_login_time); $criteria->compare('last_login_time',$this->last_login_time); $criteria->compare('this_login_ip',$this->this_login_ip); $criteria->compare('last_login_ip',$this->last_login_ip); $criteria->compare('merchant_id',$this->merchant_id,true); $criteria->compare('tag_list',$this->tag_list,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\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 {\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('model_id',$this->model_id,true);\n $criteria->compare('color',$this->color,true);\n $criteria->compare('is_in_pare',$this->is_in_pare);\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('generator_id',$this->generator_id,true);\n\t\t$criteria->compare('serial_number',$this->serial_number,true);\n\t\t$criteria->compare('model_number',$this->model_number,true);\n\t\t$criteria->compare('manufacturer_name',$this->manufacturer_name,true);\n\t\t$criteria->compare('manufacture_date',$this->manufacture_date,true);\n\t\t$criteria->compare('supplier_name',$this->supplier_name,true);\n\t\t$criteria->compare('date_of_purchase',$this->date_of_purchase,true);\n\t\t$criteria->compare('date_of_first_use',$this->date_of_first_use,true);\n\t\t$criteria->compare('kva_capacity',$this->kva_capacity);\n\t\t$criteria->compare('current_run_hours',$this->current_run_hours);\n\t\t$criteria->compare('last_serviced_date',$this->last_serviced_date,true);\n\t\t$criteria->compare('engine_make',$this->engine_make,true);\n\t\t$criteria->compare('engine_model',$this->engine_model,true);\n\t\t$criteria->compare('fuel_tank_capacity',$this->fuel_tank_capacity);\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// 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('model',$this->model,true);\n\t\t$criteria->compare('idmodel',$this->idmodel);\n\t\t$criteria->compare('usuario_anterior',$this->usuario_anterior);\n\t\t$criteria->compare('usuario_nuevo',$this->usuario_nuevo);\n\t\t$criteria->compare('estado_anterior',$this->estado_anterior,true);\n\t\t$criteria->compare('estado_nuevo',$this->estado_nuevo,true);\n\t\t$criteria->compare('fecha',$this->fecha,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('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,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,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('car',$this->car,true);\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('client_type_id',$this->client_type_id,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('other',$this->other,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// 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\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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('text',$this->text,true);\n\t\t// $criteria->compare('record',$this->record,true);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('createdBy',$this->createdBy,true);\n\t\t$criteria->compare('viewed',$this->viewed);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('comparison',$this->comparison,true);\n\t\t// $criteria->compare('value',$this->value,true);\n\t\t$criteria->compare('modelType',$this->modelType,true);\n\t\t$criteria->compare('modelId',$this->modelId,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('ExchangeVND',$this->ExchangeVND,true);\n\t\t$criteria->compare('AppliedDate',$this->AppliedDate,true);\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 // @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 }", "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('firm',$this->firm,true);\n\t\t$criteria->compare('change_date',$this->change_date,true);\n\t\t$criteria->compare('item_id',$this->item_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('availability',$this->availability,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('bonus',$this->bonus,true);\n\t\t$criteria->compare('shipping_cost',$this->shipping_cost,true);\n\t\t$criteria->compare('product_page',$this->product_page,true);\n\t\t$criteria->compare('sourse_page',$this->sourse_page,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('column_id',$this->column_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('value',$this->value,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('type',$this->type);\n\t\t$criteria->compare('condition',$this->condition,true);\n\t\t$criteria->compare('value',$this->value,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,true);\n\t\t$criteria->compare('industry',$this->industry,true);\n\t\t$criteria->compare('industry_sub',$this->industry_sub,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('province',$this->province,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('contact_name',$this->contact_name,true);\n\t\t$criteria->compare('contact_tel',$this->contact_tel,true);\n\t\t$criteria->compare('ip',$this->ip,true);\n\t\t$criteria->compare('source',$this->source,true);\n $criteria->compare('status',$this->status);\n\t\t$criteria->compare('update_time',$this->update_time);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('notes',$this->notes);\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// 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('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('university',$this->university,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('gpa',$this->gpa,true);\n\t\t$criteria->compare('appl_term',$this->appl_term);\n\t\t$criteria->compare('toefl',$this->toefl);\n\t\t$criteria->compare('gre',$this->gre);\n\t\t$criteria->compare('appl_major',$this->appl_major,true);\n\t\t$criteria->compare('appl_degree',$this->appl_degree,true);\n\t\t$criteria->compare('appl_country',$this->appl_country,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// 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// @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('goods_code',$this->goods_code,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('brand_id',$this->brand_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('size',$this->size,true);\n\t\t$criteria->compare('material',$this->material,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('purchase_price',$this->purchase_price,true);\n\t\t$criteria->compare('selling_price',$this->selling_price,true);\n\t\t$criteria->compare('status',$this->status);\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// 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('model',$this->model,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('meta_title',$this->meta_title,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,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// 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('ContractsDetailID',$this->ContractsDetailID,true);\n\t\t$criteria->compare('ContractID',$this->ContractID,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\t\t$criteria->compare('CustomerID',$this->CustomerID,true);\n\t\t$criteria->compare('Share',$this->Share);\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// 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\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = $this->criteriaSearch();\r\n\t\t$criteria->limit = 10;\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\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('organizationName',$this->organizationName,true);\n\t\t$criteria->compare('contactNo',$this->contactNo,true);\n\t\t$criteria->compare('partnerType',$this->partnerType);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('emailId',$this->emailId,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('firstName',$this->firstName,true);\n\t\t$criteria->compare('lastName',$this->lastName,true);\n\t\t$criteria->compare('gender',$this->gender,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(Globals::FLD_NAME_ACTIVITY_ID,$this->{Globals::FLD_NAME_ACTIVITY_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_TASK_ID,$this->{Globals::FLD_NAME_TASK_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_BY_USER_ID,$this->{Globals::FLD_NAME_BY_USER_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_TYPE,$this->{Globals::FLD_NAME_ACTIVITY_TYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_SUBTYPE,$this->{Globals::FLD_NAME_ACTIVITY_SUBTYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_COMMENTS,$this->{Globals::FLD_NAME_COMMENTS},true);\n\t\t$criteria->compare(Globals::FLD_NAME_CREATED_AT,$this->{Globals::FLD_NAME_CREATED_AT},true);\n\t\t$criteria->compare(Globals::FLD_NAME_SOURCE_APP,$this->{Globals::FLD_NAME_SOURCE_APP},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// 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('manufacturers_image',$this->manufacturers_image,true);\n\t\t$criteria->compare('date_added',$this->date_added);\n\t\t$criteria->compare('last_modified',$this->last_modified);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_clicked',$this->url_clicked);\n\t\t$criteria->compare('date_last_click',$this->date_last_click);\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// 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('type_id',$this->type_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('date',$this->date);\n\t\t$criteria->compare('del',$this->del);\n\t\t$criteria->compare('action_id',$this->action_id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('catalog',$this->catalog,true);\n\t\t$criteria->compare('is_new',$this->is_new);\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('case',$this->case);\n\t\t$criteria->compare('basis_doc',$this->basis_doc);\n\t\t$criteria->compare('calc_group',$this->calc_group);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('value',$this->value,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('create_date',$this->create_date,true);\n\t\t$criteria->compare('competition',$this->competition);\n\t\t$criteria->compare('partner',$this->partner);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('website',$this->website,true);\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// 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('name',$this->name,true);\n\t\t$criteria->compare('data_attributes_fields',$this->data_attributes_fields,true);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('created',$this->created,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('skill_id',$this->skill_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('field_name',$this->field_name);\n\t\t$criteria->compare('content',$this->content);\n\t\t$criteria->compare('old_data',$this->old_data,true);\n\t\t$criteria->compare('new_data',$this->new_data,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,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,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\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 $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n $criteria->compare('actionPrice',$this->actionPrice);\n\t\t$criteria->compare('translit',$this->translit,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('display_description',$this->display_description,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\t\t$criteria->compare('editing',$this->editing);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\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('BrandID', $this->BrandID);\n $criteria->compare('BrandName', $this->BrandName, true);\n $criteria->compare('Pinyin', $this->Pinyin, true);\n $criteria->compare('Remarks', $this->Remarks, true);\n $criteria->compare('OrganID', $this->OrganID);\n $criteria->compare('UserID', $this->UserID);\n $criteria->compare('CreateTime', $this->CreateTime);\n $criteria->compare('UpdateTime', $this->UpdateTime);\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('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 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('componente_id',$this->componente_id);\n\t\t$criteria->compare('tipo_dato',$this->tipo_dato,true);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('cruce_automatico',$this->cruce_automatico,true);\n\t\t$criteria->compare('sw_obligatorio',$this->sw_obligatorio,true);\n\t\t$criteria->compare('orden',$this->orden);\n\t\t$criteria->compare('sw_puntaje',$this->sw_puntaje,true);\n\t\t$criteria->compare('sw_estado',$this->sw_estado,true);\n\t\t$criteria->compare('todos_obligatorios',$this->todos_obligatorios,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('real_name',$this->real_name,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('zip_code',$this->zip_code,true);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('district_id',$this->district_id);\n\t\t$criteria->compare('district_address',$this->district_address,true);\n\t\t$criteria->compare('street_address',$this->street_address,true);\n\t\t$criteria->compare('is_default',$this->is_default);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_time',$this->update_time);\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\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('EMCE_ID',$this->EMCE_ID);\n\t\t$criteria->compare('MOOR_ID',$this->MOOR_ID);\n\t\t$criteria->compare('EVCR_ID',$this->EVCR_ID);\n\t\t$criteria->compare('EVES_ID',$this->EVES_ID);\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('customerName',$this->customerName,true);\n\t\t$criteria->compare('agencyHead',$this->agencyHead,true);\n\t\t$criteria->compare('region_id',$this->region_id);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('municipalityCity_id',$this->municipalityCity_id);\n\t\t$criteria->compare('barangay_id',$this->barangay_id);\n\t\t$criteria->compare('houseNumber',$this->houseNumber,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('nature_id',$this->nature_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,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// 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('name',$this->name,true);\n\t\t$criteria->compare('type',$this->name,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('state',$this->address,true);\n\t\t$criteria->compare('country',$this->address,true);\n\t\t$criteria->compare('contact_number',$this->contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('deleted_by',$this->deleted_by,true);\n\t\t$criteria->compare('created_at',$this->created_at,true);\n\t\t$criteria->compare('updated_at',$this->updated_at,true);\n\t\tif(YII::app()->user->getState(\"role\") == \"admin\") {\n\t\t\t$criteria->condition = 'is_deleted = 0';\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\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('user_id',$this->user_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('professional_status_id',$this->professional_status);\n\t\t$criteria->compare('birthday',$this->birthday);\n\t\t$criteria->compare('location',$this->location);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\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=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\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('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()\r\r\n\t{\r\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\r\r\n\t\t$criteria->compare('id',$this->id);\r\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\r\n\t\t$criteria->compare('adds',$this->adds);\r\r\n\t\t$criteria->compare('edits',$this->edits);\r\r\n\t\t$criteria->compare('deletes',$this->deletes);\r\r\n\t\t$criteria->compare('view',$this->view);\r\r\n\t\t$criteria->compare('lists',$this->lists);\r\r\n\t\t$criteria->compare('searches',$this->searches);\r\r\n\t\t$criteria->compare('prints',$this->prints);\r\r\n\r\r\n\t\treturn new CActiveDataProvider($this, array(\r\r\n\t\t\t'criteria'=>$criteria,\r\r\n\t\t));\r\r\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('applyId',$this->applyId);\n\t\t$criteria->compare('stuId',$this->stuId);\n\t\t$criteria->compare('stuName',$this->stuName,true);\n\t\t$criteria->compare('specification',$this->specification,true);\n\t\t$criteria->compare('assetName',$this->assetName,true);\n\t\t$criteria->compare('applyTime',$this->applyTime,true);\n\t\t$criteria->compare('loanTime',$this->loanTime,true);\n\t\t$criteria->compare('returnTime',$this->returnTime,true);\n\t\t$criteria->compare('RFID',$this->RFID,true);\n\t\t$criteria->compare('stuTelNum',$this->stuTelNum,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 // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\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('itemcode', $this->itemcode, true);\n $criteria->compare('product_id', $this->product_id, true);\n $criteria->compare('delete_flag', $this->delete_flag);\n $criteria->compare('status', $this->status);\n $criteria->compare('expire', $this->expire, true);\n $criteria->compare('date_input', $this->date_input, true);\n $criteria->compare('d_update', $this->d_update, 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('verid',$this->verid);\n\t\t$criteria->compare('appversion',$this->appversion,true);\n\t\t$criteria->compare('appfeatures',$this->appfeatures,true);\n\t\t$criteria->compare('createtime',$this->createtime,true);\n\t\t$criteria->compare('baseNum',$this->baseNum);\n\t\t$criteria->compare('slave1Num',$this->slave1Num);\n\t\t$criteria->compare('packagename',$this->packagename,true);\n\t\t$criteria->compare('ostype',$this->ostype);\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,true);\n\t\t$criteria->compare('client_id',$this->client_id,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('rel_type',$this->rel_type,true);\n\t\t$criteria->compare('rel_id',$this->rel_id,true);\n\t\t$criteria->compare('meta_key',$this->meta_key,true);\n\t\t$criteria->compare('meta_value',$this->meta_value,true);\n\t\t$criteria->compare('date_entry',$this->date_entry,true);\n\t\t$criteria->compare('date_update',$this->date_update,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,true);\n\t\t$criteria->compare('column_id',$this->column_id,true);\n\t\t$criteria->compare('research_title',$this->research_title,true);\n\t\t$criteria->compare('research_url',$this->research_url,true);\n\t\t$criteria->compare('column_type',$this->column_type);\n\t\t$criteria->compare('filiale_id',$this->filiale_id,true);\n\t\t$criteria->compare('area_name',$this->area_name,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('trigger_config',$this->trigger_config);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('terminal_type',$this->terminal_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('explain',$this->explain,true);\n\t\t$criteria->compare('_delete',$this->_delete);\n\t\t$criteria->compare('_create_time',$this->_create_time,true);\n\t\t$criteria->compare('_update_time',$this->_update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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\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('city',$this->city,true);\n\t\t$criteria->compare('birthday',$this->birthday,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('is_get_news',$this->is_get_news);\n\t\t$criteria->compare('user_id',$this->user_id);\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('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 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('order_id',$this->order_id);\n\t\t$criteria->compare('device_id',$this->device_id,true);\n\t\t$criteria->compare('money',$this->money,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('recharge_type',$this->recharge_type);\n\t\t$criteria->compare('channel',$this->channel,true);\n\t\t$criteria->compare('version_name',$this->version_name,true);\n\t\t$criteria->compare('pay_channel',$this->pay_channel);\n\t\t$criteria->compare('chanel_bid',$this->chanel_bid);\n\t\t$criteria->compare('chanel_sid',$this->chanel_sid);\n\t\t$criteria->compare('versionid',$this->versionid);\n\t\t$criteria->compare('chanel_web',$this->chanel_web);\n\t\t$criteria->compare('dem_num',$this->dem_num);\n\t\t$criteria->compare('last_watching',$this->last_watching,true);\n\t\t$criteria->compare('pay_type',$this->pay_type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('country_id', $this->country_id);\r\n $criteria->compare('user_id', $this->user_id);\r\n $criteria->compare('vat', $this->vat);\r\n $criteria->compare('manager_coef', $this->manager_coef);\r\n $criteria->compare('curator_coef', $this->curator_coef);\r\n $criteria->compare('admin_coef', $this->admin_coef);\r\n $criteria->compare('status', $this->status);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\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,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('purchase_price',$this->purchase_price);\n\t\t$criteria->compare('sell_price',$this->sell_price);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('measurement',$this->measurement,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\t\t$criteria->compare('date_out',$this->date_out,true);\n\t\t$criteria->compare('date_in',$this->date_in,true);\n\t\t$criteria->compare('firma_id',$this->firma_id,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('instock',$this->instock);\n\t\t$criteria->compare('user_id',$this->user_id);\n $criteria->compare('warning_amount',$this->warning_amount);\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,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('mname',$this->mname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('landline',$this->landline,true);\n\t\t$criteria->compare('em_contact_name',$this->em_contact_name,true);\n\t\t$criteria->compare('em_contact_relation',$this->em_contact_relation,true);\n\t\t$criteria->compare('em_contact_number',$this->em_contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\n return new CActiveDataProvider( $this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState( 'pageSize', Yii::app()->params[ 'defaultPageSize' ] ),\n ),\n ) );\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\t\t\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\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// @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('sys_name',$this->sys_name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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$parameters = array('limit'=>ceil(Profile::getResultsPerPage()));\n\t\t$criteria->scopes = array('findAll'=>array($parameters));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('itemId',$this->itemId);\n\t\t$criteria->compare('changedBy',$this->changedBy,true);\n\t\t$criteria->compare('recordName',$this->recordName,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\t\t$criteria->compare('oldValue',$this->oldValue,true);\n\t\t$criteria->compare('newValue',$this->newValue,true);\n\t\t$criteria->compare('diff',$this->diff,true);\n\t\t$criteria->compare('timestamp',$this->timestamp);\n\n\t\treturn new SmartActiveDataProvider(get_class($this), array(\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'timestamp DESC',\n\t\t\t),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Profile::getResultsPerPage(),\n\t\t\t),\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('CustomerId',$this->CustomerId,true);\n\t\t$criteria->compare('AddressId',$this->AddressId,true);\n\t\t$criteria->compare('CustomerStatusId',$this->CustomerStatusId,true);\n\t\t$criteria->compare('DateMasterId',$this->DateMasterId,true);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('CustomerPhoto',$this->CustomerPhoto,true);\n\t\t$criteria->compare('CustomerCode',$this->CustomerCode);\n\t\t$criteria->compare('Telephone',$this->Telephone,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('EmailId',$this->EmailId,true);\n\t\t$criteria->compare('Status',$this->Status);\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// 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('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\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// @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('city_id',$this->city_id);\n\t\t$criteria->compare('locality',$this->locality,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\n\t\t$criteria->compare('mem_type',$this->mem_type);\r\n\t\t$criteria->compare('business_type',$this->business_type);\r\n\t\t$criteria->compare('product_name',$this->product_name,true);\r\n\t\t$criteria->compare('panit',$this->panit,true);\r\n\t\t$criteria->compare('sex',$this->sex);\r\n\t\t$criteria->compare('tname',$this->tname);\r\n\t\t$criteria->compare('ftname',$this->ftname,true);\r\n\t\t$criteria->compare('ltname',$this->ltname,true);\r\n\t\t$criteria->compare('etname',$this->etname);\r\n\t\t$criteria->compare('fename',$this->fename,true);\r\n\t\t$criteria->compare('lename',$this->lename,true);\r\n\t\t$criteria->compare('birth',$this->birth,true);\r\n\t\t$criteria->compare('email',$this->email,true);\r\n\t\t$criteria->compare('facebook',$this->facebook,true);\r\n\t\t$criteria->compare('twitter',$this->twitter,true);\r\n\t\t$criteria->compare('address',$this->address,true);\r\n\t\t$criteria->compare('province',$this->province);\r\n\t\t$criteria->compare('prefecture',$this->prefecture);\r\n\t\t$criteria->compare('district',$this->district);\r\n\t\t$criteria->compare('postcode',$this->postcode,true);\r\n\t\t$criteria->compare('tel',$this->tel,true);\r\n\t\t$criteria->compare('mobile',$this->mobile,true);\r\n\t\t$criteria->compare('fax',$this->fax,true);\r\n\t\t$criteria->compare('high_education',$this->high_education);\r\n\t\t$criteria->compare('career',$this->career);\r\n\t\t$criteria->compare('skill_com',$this->skill_com);\r\n\t\t$criteria->compare('receive_news',$this->receive_news,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\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('item_id',$this->item_id);\n\t\t$criteria->compare('table_id',$this->table_id);\n\t\t$criteria->compare('status',$this->status);\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('cou_id',$this->cou_id);\n\t\t$criteria->compare('thm_id',$this->thm_id);\n\t\t$criteria->compare('cou_nom',$this->cou_nom,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 // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\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('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// @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('idempleo',$this->idempleo);\n\t\t$criteria->compare('administrativo',$this->administrativo,true);\n\t\t$criteria->compare('comercial',$this->comercial,true);\n\t\t$criteria->compare('artes',$this->artes,true);\n\t\t$criteria->compare('informatica',$this->informatica,true);\n\t\t$criteria->compare('salud',$this->salud,true);\n\t\t$criteria->compare('marketing',$this->marketing,true);\n\t\t$criteria->compare('servicio_domestico',$this->servicio_domestico,true);\n\t\t$criteria->compare('construccion',$this->construccion,true);\n\t\t$criteria->compare('agricultura',$this->agricultura,true);\n\t\t$criteria->compare('ganaderia',$this->ganaderia,true);\n\t\t$criteria->compare('telecomunicaciones',$this->telecomunicaciones,true);\n\t\t$criteria->compare('atencion_cliente',$this->atencion_cliente,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_VALOR',$this->ID_VALOR);\n\t\t$criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('ID_VISITA',$this->ID_VISITA);\n\t\t$criteria->compare('VALOR',$this->VALOR);\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\n\t\t$criteria->compare('id_aspecto',$this->id_aspecto,true);\n\t\t$criteria->compare('tbl_Programa_id_programa',$this->tbl_Programa_id_programa,true);\n\t\t$criteria->compare('tbl_Factor_id_factor',$this->tbl_Factor_id_factor);\n\t\t$criteria->compare('tbl_caracteristica_id_caracteristica',$this->tbl_caracteristica_id_caracteristica,true);\n\t\t$criteria->compare('num_aspecto',$this->num_aspecto,true);\n\t\t$criteria->compare('aspecto',$this->aspecto,true);\n\t\t$criteria->compare('instrumento',$this->instrumento,true);\n\t\t$criteria->compare('fuente',$this->fuente,true);\n\t\t$criteria->compare('documento',$this->documento,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('Observaciones',$this->Observaciones,true);\n\t\t$criteria->compare('cumple',$this->cumple,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t\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('sex',$this->sex,true);\n\t\t$criteria->compare('website_url',$this->website_url,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('user_name',$this->user_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('created_datetime',$this->created_datetime,true);\n\t\t$criteria->compare('icon_src',$this->icon_src,true);\n\t\t$criteria->compare('show_r18',$this->show_r18);\n\t\t$criteria->compare('show_bl',$this->show_bl);\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// 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('description',$this->description,true);\n\t\t$criteria->compare('creationDate',$this->creationDate,true);\n\t\t$criteria->compare('year',$this->year);\n\t\t$criteria->compare('term',$this->term,true);\n\t\t$criteria->compare('activated',$this->activated);\n\t\t$criteria->compare('startingDate',$this->startingDate,true);\n\t\t$criteria->compare('activation_userId',$this->activation_userId);\n\t\t$criteria->compare('parent_catalogId',$this->parent_catalogId);\n $criteria->compare('isProspective', $this->isProspective);\n $criteria->compare('creatorId', $this->creatorId);\n $criteria->compare('isProposed', $this->isProposed);\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('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('location',$this->location);\n\t\t$criteria->compare('theripiest',$this->theripiest);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('dob',$this->dob,true);\n\t\t$criteria->compare('inurancecompany',$this->inurancecompany,true);\n\t\t$criteria->compare('injurydate',$this->injurydate,true);\n\t\t$criteria->compare('therapy_start_date',$this->therapy_start_date,true);\n\t\t$criteria->compare('ASIA',$this->ASIA,true);\n\t\t$criteria->compare('injury',$this->injury,true);\n\t\t$criteria->compare('medication',$this->medication,true);\n\t\t$criteria->compare('notes',$this->notes,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\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('formId', $this->formId, true);\n\t\t$criteria->compare('data', $this->data, true);\n\t\t$criteria->compare('ctime', $this->ctime);\n\t\t$criteria->compare('mtime', $this->mtime);\n\n\t\treturn new CActiveDataProvider($this, array(\n\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$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('imputetype_id',$this->imputetype_id);\n\t\t$criteria->compare('project_id',$this->project_id);\n\n\t\treturn new ActiveDataProvider(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\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('category_id',$this->category_id);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('price_z',$this->price_z);\n\t\t$criteria->compare('price_s',$this->price_s);\n\t\t$criteria->compare('price_m',$this->price_m);\n\t\t$criteria->compare('dependence',$this->dependence,true);\n\t\t$criteria->compare('barcode',$this->barcode,true);\n\t\t$criteria->compare('unit',$this->unit,true);\n\t\t$criteria->compare('minimal_amount',$this->minimal_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 100),\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('image',$this->image,true);\n\t\t$criteria->compare('manager',$this->manager);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('realname',$this->realname,true);\n\t\t$criteria->compare('identity',$this->identity,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('bussiness_license',$this->bussiness_license,true);\n\t\t$criteria->compare('bankcode',$this->bankcode,true);\n\t\t$criteria->compare('banktype',$this->banktype,true);\n\t\t$criteria->compare('is_open',$this->is_open,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('images_str',$this->images_str,true);\n\t\t$criteria->compare('gmt_created',$this->gmt_created,true);\n\t\t$criteria->compare('gmt_modified',$this->gmt_modified,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('id_user',$this->id_user);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email_admin',$this->email_admin,true);\n\t\t$criteria->compare('password_api',$this->password_api,true);\n\t\t$criteria->compare('url_result_api',$this->url_result_api,true);\n\t\t$criteria->compare('id_currency_2',$this->id_currency_2);\n\t\t$criteria->compare('id_currency_1',$this->id_currency_1,true);\n\t\t$criteria->compare('is_test_mode',$this->is_test_mode);\n\t\t$criteria->compare('is_commission_shop',$this->is_commission_shop);\n\t\t$criteria->compare('commission',$this->commission);\n\t\t$criteria->compare('is_enable',$this->is_enable);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('mod_date',$this->mod_date,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// 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('userID',$this->userID,true);\n\t\t$criteria->compare('mtID',$this->mtID,true);\n\t\t$criteria->compare('fxType',$this->fxType);\n\t\t$criteria->compare('leverage',$this->leverage);\n\t\t$criteria->compare('amount',$this->amount,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// 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\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('surname',$this->surname,true);\n\t\t$criteria->compare('comany_name',$this->comany_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('is_admin',$this->is_admin);\n\t\t$criteria->compare('paid_period_start',$this->paid_period_start,true);\n\t\t$criteria->compare('ftp_pass',$this->ftp_pass,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('HISTORY',$this->HISTORY,true);\n\t\t$criteria->compare('WELCOME_MESSAGE',$this->WELCOME_MESSAGE,true);\n\t\t$criteria->compare('LOCATION',$this->LOCATION,true);\n\t\t$criteria->compare('PHONES',$this->PHONES,true);\n\t\t$criteria->compare('FAX',$this->FAX,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('MISSION',$this->MISSION,true);\n\t\t$criteria->compare('VISION',$this->VISION,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// 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('price',$this->price,true);\n\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('breed',$this->breed,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_birthday',$this->date_birthday,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('tattoo',$this->tattoo,true);\n\t\t$criteria->compare('sire',$this->sire,true);\n\t\t$criteria->compare('dame',$this->dame,true);\n\t\t$criteria->compare('owner_type',$this->owner_type,true);\n\t\t$criteria->compare('honors',$this->honors,true);\n\t\t$criteria->compare('photo_preview',$this->photo_preview,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('pet_status',$this->pet_status,true);\n\t\t$criteria->compare('about',$this->about,true);\n\t\t$criteria->compare('uid',$this->uid);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('veterinary',$this->veterinary,true);\n\t\t$criteria->compare('vaccinations',$this->vaccinations,true);\n\t\t$criteria->compare('show_class',$this->show_class,true);\n\t\t$criteria->compare('certificate',$this->certificate,true);\n $criteria->compare('neutered_spayed',$this->certificate,true);\n \n\n $criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('city',$this->city,true);\n\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('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\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('orgName',$this->orgName,true);\n\t\t$criteria->compare('noEmp',$this->noEmp);\n\t\t$criteria->compare('phone',$this->phone);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('addr1',$this->addr1,true);\n\t\t$criteria->compare('addr2',$this->addr2,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('orgType',$this->orgType,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('fax',$this->fax);\n\t\t$criteria->compare('orgId',$this->orgId,true);\n\t\t$criteria->compare('validity',$this->validity);\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 $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\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,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('sortorder',$this->sortorder,true);\n\t\t$criteria->compare('fullname',$this->fullname,true);\n\t\t$criteria->compare('shortname',$this->shortname,true);\n\t\t$criteria->compare('idnumber',$this->idnumber,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('summaryformat',$this->summaryformat);\n\t\t$criteria->compare('format',$this->format,true);\n\t\t$criteria->compare('showgrades',$this->showgrades);\n\t\t$criteria->compare('sectioncache',$this->sectioncache,true);\n\t\t$criteria->compare('modinfo',$this->modinfo,true);\n\t\t$criteria->compare('newsitems',$this->newsitems);\n\t\t$criteria->compare('startdate',$this->startdate,true);\n\t\t$criteria->compare('marker',$this->marker,true);\n\t\t$criteria->compare('maxbytes',$this->maxbytes,true);\n\t\t$criteria->compare('legacyfiles',$this->legacyfiles);\n\t\t$criteria->compare('showreports',$this->showreports);\n\t\t$criteria->compare('visible',$this->visible);\n\t\t$criteria->compare('visibleold',$this->visibleold);\n\t\t$criteria->compare('groupmode',$this->groupmode);\n\t\t$criteria->compare('groupmodeforce',$this->groupmodeforce);\n\t\t$criteria->compare('defaultgroupingid',$this->defaultgroupingid,true);\n\t\t$criteria->compare('lang',$this->lang,true);\n\t\t$criteria->compare('theme',$this->theme,true);\n\t\t$criteria->compare('timecreated',$this->timecreated,true);\n\t\t$criteria->compare('timemodified',$this->timemodified,true);\n\t\t$criteria->compare('requested',$this->requested);\n\t\t$criteria->compare('enablecompletion',$this->enablecompletion);\n\t\t$criteria->compare('completionnotify',$this->completionnotify);\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// 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('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('zipcode',$this->zipcode,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('role',$this->role,true);\n\t\t$criteria->compare('active',$this->active);\n\t\t$criteria->compare('camaras',$this->camaras);\n\t\t$criteria->compare('freidoras',$this->freidoras);\n\t\t$criteria->compare('cebos',$this->cebos);\n\t\t$criteria->compare('trampas',$this->trampas);\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('attribute',$this->attribute,true);\n\t\t$criteria->compare('displayName',$this->displayName,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('value_type',$this->value_type,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('cod_venda',$this->cod_venda,true);\n\t\t$criteria->compare('filial_cod_filial',$this->filial_cod_filial,true);\n\t\t$criteria->compare('funcionario_cod_funcionario',$this->funcionario_cod_funcionario,true);\n\t\t$criteria->compare('cliente_cod_cliente',$this->cliente_cod_cliente,true);\n\t\t$criteria->compare('data_2',$this->data_2,true);\n\t\t$criteria->compare('valor_total',$this->valor_total);\n\t\t$criteria->compare('forma_pagamento',$this->forma_pagamento,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 // 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 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\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->buscar,'OR');\n\t\t$criteria->compare('fecha',$this->buscar,true,'OR');\n\t\t$criteria->compare('fechaUpdate',$this->buscar,true,'OR');\n\t\t$criteria->compare('idProfesional',$this->buscar,'OR');\n\t\t$criteria->compare('importe',$this->buscar,'OR');\n\t\t$criteria->compare('idObraSocial',$this->buscar,'OR');\n\t\t$criteria->compare('estado',$this->buscar,true,'OR');\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('codop',$this->codop,true);\n\t\t$criteria->compare('codcatval',$this->codcatval,true);\n\t\t$criteria->compare('cuentadebe',$this->cuentadebe,true);\n\t\t$criteria->compare('cuentahaber',$this->cuentahaber,true);\n\t\t$criteria->compare('desop',$this->desop,true);\n\t\t$criteria->compare('descat',$this->descat,true);\n\t\t$criteria->compare('debe',$this->debe,true);\n\t\t$criteria->compare('haber',$this->haber,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pagesize'=>100),\n\t\t));\n\t}" ]
[ "0.7212646", "0.7136024", "0.70933706", "0.7093113", "0.69846046", "0.69604707", "0.69481945", "0.69420165", "0.69337475", "0.6924065", "0.69110894", "0.69029695", "0.68983483", "0.6897775", "0.6892544", "0.6882542", "0.6880248", "0.68738663", "0.6849395", "0.6848976", "0.6835021", "0.6826429", "0.68153846", "0.68071353", "0.6804119", "0.67973655", "0.67965937", "0.67958015", "0.6795615", "0.6793925", "0.6790211", "0.67854524", "0.6785193", "0.6784183", "0.6780748", "0.67806154", "0.6778495", "0.6777439", "0.6776678", "0.6776307", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.67729664", "0.6768814", "0.6767436", "0.6766098", "0.6762363", "0.6762199", "0.6761053", "0.67603993", "0.67600876", "0.67587113", "0.67538935", "0.67528695", "0.67520636", "0.6747887", "0.6747579", "0.6746115", "0.67456204", "0.6744872", "0.6744774", "0.6744671", "0.6743801", "0.67434025", "0.67420316", "0.6740797", "0.6740326", "0.6739247", "0.67369187", "0.6736679", "0.67343915", "0.67321134", "0.67313653", "0.6725215", "0.6723444", "0.67229563", "0.6721933", "0.67129296", "0.6712657", "0.67108434", "0.67091316", "0.6706584", "0.6706038", "0.6705222", "0.67039245", "0.6702423", "0.6699911", "0.6698295", "0.6696625", "0.66953385", "0.66952217", "0.66936946", "0.6693138", "0.66924226", "0.6691166" ]
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.75739974", "0.7529423", "0.72707176", "0.72699165", "0.7261287", "0.7212491", "0.72118646", "0.7130976", "0.71278566", "0.71278566", "0.7101946", "0.7101946", "0.7101556", "0.70737654", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194", "0.70631194" ]
0.0
-1
Monta a estrutura do Json para apresentar.
public function prepararJson($contentContainer) { $response = []; $modeloFiltrado = []; foreach ($contentContainer as $index => $element) { foreach ($element->attributes as $attribute) { if ('href' == $attribute->nodeName || 'title' == $attribute->nodeName) { $response[$index]['attributes'][ strtolower($attribute->nodeName) ] = $this->addSpace($attribute->nodeValue); $modeloFiltrado[$index] = $response[$index]; } } } return $modeloFiltrado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildJson();", "protected function prepareJsonStructure(){\n\t\t\n\t}", "public function toJson();", "public function toJson();", "public static function generateJSON();", "public function json();", "function generateJSON(){\n\t\t $metadata = array();\n\t\t $metadata[\"tableID\"] = $this->tableID;\n\t\t $metadata[\"tableGroupID\"] = $this->tableGroupID;\n\t\t $metadata[\"tablePage\"] = $this->tablePage +0 ;\n\t\t $metadata[\"title\"] = $this->tableName;\n\t\t $metadata[\"description\"] = $this->tableDesciption;\n\t\t $metadata[\"tags\"] = $this->tableTags;\n\t\t $metadata[\"doi\"] = $this->tableDOI;\n\t\t $metadata[\"ark\"] = $this->tableARK;\n\t\t $metadata[\"versionControl\"] = $this->versionControl;\n\t\t $metadata[\"license\"] = $this->license;\n\t\t $metadata[\"recordCount\"] = $this->recordCount+0;\n\t\t $metadata[\"rawCreators\"] = $this->rawCreators;\n\t\t $metadata[\"rawContributors\"] = $this->rawContributors;\n\t\t $metadata[\"rawLinkedPersons\"] = $this->rawLinkedPersons;\n\t\t $metadata[\"projects\"] = $this->projects;\n\t\t $metadata[\"files\"] = $this->files;\n\t\t $metadata[\"tableFields\"] = $this->tableFields;\n\t\t $this->metadata = $metadata;\n\t\t return Zend_Json::encode($metadata);\n\t }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function toJSON() {\n\n $oServidor = ServidorRepository::getInstanciaByCodigo(\n $this->getMatricula(),\n DBPessoal::getAnoFolha(),\n DBPessoal::getMesFolha()\n );\n\n $aRetorno = array();\n $aRetorno[\"codigo\"] = $this->getCodigo();\n $aRetorno[\"tipo\"] = $this->getTipoAssentamento();\n $aRetorno[\"natureza\"] = \"padrao\";\n $aRetorno[\"cgm_servidor\"] = $oServidor->getCgm()->getCodigo();\n $aRetorno[\"nome_servidor\"] = utf8_encode($oServidor->getCgm()->getNome());\n\n $aRetorno[\"matricula\"] = $this->getMatricula();\n $aRetorno[\"dataConcessao\"] = ($this->getDataConcessao() instanceof DBDate ? $this->getDataConcessao()->getDate(DBDate::DATA_PTBR) : $this->getDataConcessao());\n $aRetorno[\"historico\"] = $this->getHistorico();\n $aRetorno[\"codigoPortaria\"] = $this->getCodigoPortaria();\n $aRetorno[\"descricaoAto\"] = $this->getDescricaoAto();\n $aRetorno[\"dias\"] = $this->getDias();\n $aRetorno[\"percentual\"] = $this->getPercentual();\n $aRetorno[\"dataTermino\"] = ($this->getDataTermino() instanceof DBDate ? $this->getDataTermino()->getDate(DBDate::DATA_PTBR) : $this->getDataTermino());\n $aRetorno[\"segundoHistorico\"] = $this->getSegundoHistorico();\n $aRetorno[\"loginUsuario\"] = $this->getLoginUsuario();\n $aRetorno[\"dataLancamento\"] = ($this->getDataLancamento() instanceof DBDate ? $this->getDataLancamento()->getDate(DBDate::DATA_PTBR) : $this->getDataLancamento());\n $aRetorno[\"convertido\"] = (int)$this->isConvertido();\n $aRetorno[\"anoPortaria\"] = $this->getAnoPortaria();\n $aRetorno[\"hora\"] = $this->getHora();\n\n return json_encode((object)$aRetorno);\n }", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function json(){ return json_encode( $this->objectify() ); }", "public function jsonProvider() {\n return '{\n \"data\": {\n \"attributes\": {\n \"object_domain\": \"contact\",\n \"object_id\": \"1\",\n \"due\": \"2019-01-25T07:50:14+00:00\",\n \"urgency\": 1,\n \"description\": \"Need to verify this guy house.\",\n \"items\": [\n \"Visit his house\",\n \"Capture a photo\",\n \"Meet him on the house\"\n ],\n \"task_id\": \"123\"\n }\n }\n }';\n}", "public function jsonSerialize() {\n\n return ['id' => $this->id,\n 'name' => $this->name,\n 'author' => $this->author,\n 'description' => $this->description];\n \n \n }", "public function __toString(){\n $json = parent::__toString();\n\n $json['idm_url'] = $this->idm_url;\n $json['read_url'] = $this->read_url;\n $json['read_headers'] = $this->read_headers;\n $json['search_url'] = $this->search_url;\n $json['search_headers'] = $this->search_headers;\n $json['search_method'] = $this->search_method;\n $json['search_POST'] = $this->search_POST;\n $json['update_url'] = $this->update_url;\n $json['update_headers'] = $this->update_headers;\n $json['update_method'] = $this->update_method;\n $json['create_url'] = $this->create_url;\n $json['create_headers'] = $this->create_headers;\n $json['create_method'] = $this->create_method;\n\n $json['patron'] = $this->patron;\n $json['search'] = $this->search;\n $json['create'] = $this->create;\n $json['update'] = $this->update;\n\n\n return json_encode($json, JSON_PRETTY_PRINT);\n }", "public function _jsonSerialize();", "function getListJsonString() {\r\n \r\n $arr=array();\r\n \r\n foreach ($this->list as $object)\r\n {\r\n $vars = $object->getObjectVars();\r\n \r\n if ( $object->getObjCentro() !=null )\r\n {\r\n $vars['objCentro']=$object->getObjCentro()->getObjectVars();\r\n }\r\n if ( $object->getObjCiclo() !=null )\r\n {\r\n $vars['objCiclo']=$object->getObjCiclo()->getObjectVars();\r\n \r\n if ( $object->getObjCiclo()->getObjFamilia() !=null )\r\n {\r\n $vars['objFamilia']=$object->getObjCiclo()->getObjFamilia()->getObjectVars();\r\n } \r\n }\r\n \r\n array_push($arr, $vars);\r\n }\r\n return json_encode($arr);\r\n }", "public function JsonDioceses() {\n $o_data = new Db();\n $qr_result = $o_data->query(\"select grandsparents.idno, CASE objects.status WHEN 0 THEN \\\"en attente\\\" WHEN 1 THEN \\\"en cours\\\" WHEN 2 THEN \\\"à valider\\\" WHEN 3 THEN \\\"validé\\\" ELSE \\\"valeur incohérente\\\" END as statut, count(*) as nombre from ca_objects as objects left join ca_objects as parents on parents.object_id=objects.parent_id left join ca_objects as grandsparents on parents.parent_id=grandsparents.object_id and grandsparents.type_id=261 where objects.type_id = 262 and objects.deleted=0 and parents.type_id=23 and parents.parent_id is not null and grandsparents.object_id is not null group by parents.parent_id, objects.status;\");\n $first=1;\n print \"[\";\n while($qr_result->nextRow()) {\n if(!$first) print \",\";\n print \"{\\\"idno\\\":\\\"\".$qr_result->get('idno').\"\\\",\\n\";\n print \"\\\"statut\\\":\\\"\".$qr_result->get('statut').\"\\\",\\n\";\n print \"\\\"nombre\\\":\\\"\".$qr_result->get('nombre').\"\\\"}\\n\";\n $first=0;\n }\n print \"]\\n\";\n exit;\n }", "public function toJson(){\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'sub_name' => $this->sub_name,\n 'bar_code' => $this->bar_code,\n 'flash_code' => $this->flash_code\n ];\n }", "public function toJSON(){\n $jsondata = array();\n $jsondata[\"idCliente\"]=$this->getIdCliente();\n $jsondata[\"idPedido\"]=$this->getIdPedido();\n \n return $jsondata;\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['uuid'] = $this->uuid;\n $json['updatedAt'] = DateTimeHelper::toRfc3339DateTime($this->updatedAt);\n $json['title'] = $this->title;\n $json['titleTranslated'] = $this->titleTranslated;\n $json['basePrice'] = $this->basePrice;\n $json['typeName'] = $this->typeName;\n $json['typeUuid'] = $this->typeUuid;\n $json['links'] = $this->links;\n $json['validFrom'] = $this->validFrom;\n $json['validThrough'] = isset($this->validThrough) ?\n DateTimeHelper::toSimpleDate($this->validThrough) : null;\n\n return $json;\n }", "protected function CreateJson() {\n\t\t$obj = new \\stdClass;\n\t\t$obj->recordsList = parent::CreateJson();\n\n\t\t// add links from server\n\t\t$obj->link = new \\stdClass;\n\t\t$obj->link->href = $this->link_href;\n\t\t$obj->link->rel = $this->link_rel;\n\t\treturn $obj;\n\t}", "public function prepare_json() { \n return json_encode($this->get_settings()); \n }", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['name'] = $this->name;\n $json['voa'] = $this->voa;\n $json['voi'] = $this->voi;\n $json['stateAgg'] = $this->stateAgg;\n $json['ach'] = $this->ach;\n $json['transAgg'] = $this->transAgg;\n $json['aha'] = $this->aha;\n $json['accountTypeDescription'] = $this->accountTypeDescription;\n $json['phone'] = $this->phone;\n $json['urlHomeApp'] = $this->urlHomeApp;\n $json['urlLogonApp'] = $this->urlLogonApp;\n $json['oauthEnabled'] = $this->oauth_Enabled;\n $json['urlForgotPassword'] = $this->urlForgotPassword;\n $json['urlOnlineRegistration'] = $this->urlOnlineRegistration;\n $json['class'] = $this->mclass;\n $json['specialText'] = $this->specialText;\n $json['specialInstructions'] = $this->specialInstructions;\n $json['address'] = $this->address;\n $json['currency'] = $this->currency;\n $json['email'] = $this->email;\n $json['status'] = $this->status;\n $json['newInstitutionId'] = $this->newInstitutionId;\n $json['branding'] = $this->branding;\n $json['oauthInstitutionId'] = $this->oauth_InstitutionId;\n\n return array_merge($json, $this->additionalProperties);\n }", "public function jsonSerialize() {\n return [\n \"nom\"=> $this->name,\n \"age\"=> $this->age,\n \"film\"=> $this->films\n ];\n }", "function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'author' => $this->authorModel->fullName,\n 'cover_path' => $this->getCoverWebPath(),\n 'cover_image_name' => $this->preview_path,\n 'release_date' => date('M d, Y', $this->release_date),\n 'created_at' => Yii::$app->getFormatter()->asDatetime($this->created_at),\n 'updated_at' => Yii::$app->getFormatter()->asDatetime($this->updated_at),\n ];\n }", "public function getJsonBroDeployOverseas(){\n\t\t$query = \"Select BroDeployOverseas.post, Sum(bandwidth.capacity) as capacity, BroDeployOverseas.regularworkstation, BroDeployOverseas.regworkdeployed, BroDeployOverseas.regworkremaining,\n\t\t\tBroDeployOverseas.latitude, BroDeployOverseas.longitude, BroDeployOverseas.regworkpercentcompleted, BroDeployOverseas.vsenpercentcompleted,\n\t\t\tBroDeployOverseas.region, BroDeployOverseas.vsencompatableworkstation, BroDeployOverseas.vsendeployed, BroDeployOverseas.vsenremaining\n\t\t\tFrom public.BroDeployOverseas, public.bandwidth\n\t\t\tWhere BroDeployOverseas.post = bandwidth.post\n\t\t\tGroup By BroDeployOverseas.post, BroDeployOverseas.region, \n\t\t\tBroDeployOverseas.regworkpercentcompleted, BroDeployOverseas.vsenpercentcompleted, \n\t\t\tBroDeployOverseas.regularworkstation, BroDeployOverseas.regworkdeployed, BroDeployOverseas.regworkremaining,\n\t\t\tBroDeployOverseas.vsencompatableworkstation,\n\t\t\tBroDeployOverseas.vsendeployed, BroDeployOverseas.vsenremaining,\n\t\t\tBroDeployOverseas.latitude, BroDeployOverseas.longitude; \n\t\t\"; // There might be a better way to do this.\n\t\t$result = $this->connectPG($query);\t\t\t\n\t\t$rows = pg_fetch_all($result);\t\n\n\t\t$jsonArrayOfObjs = \"[\";\n\t\tforeach($rows as $keys => $datums){\n\t\t\t//Build JSON string\n\t\t\t$rows2 = array_keys($rows);\n\t\t\tif(end($rows2) == $keys){\n\t\t\t\t//This will be the last element in the array of objects\n\t\t\t\t$jsonArrayOfObjs .= \"{\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"region\\\":\\\"\".trim($datums['region']).\"\\\", \\\"post\\\":\\\"\".trim($datums['post']).\"\\\",\"; \n\t\t\t \t$jsonArrayOfObjs .= \"\\\"regularworkstation\\\":\".$datums['regularworkstation'].\", \\\"regworkdeployed\\\":\".$datums['regworkdeployed'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"regworkremaining\\\":\".$datums['regworkremaining'].\", \\\"regworkpercentcompleted\\\":\".$datums['regworkpercentcompleted'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"vsencompatableworkstation\\\":\".$datums['vsencompatableworkstation'].\", \\\"vsendeployed\\\":\".$datums['vsendeployed'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"vsenremaining\\\":\".$datums['vsenremaining'].\", \\\"vsenpercentcompleted\\\":\".$datums['vsenpercentcompleted'].\", \\\"capacity\\\":\".$datums['capacity'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"latitude\\\":\".$datums['latitude'].\", \\\"longitude\\\":\".$datums['longitude'].\"\";\n\t\t \t$jsonArrayOfObjs .= \"}\";\n\t\t\t}else{\n\t\t\t\t$jsonArrayOfObjs .= \"{\";\n\t\t\t \t\t$jsonArrayOfObjs .= \"\\\"region\\\":\\\"\".trim($datums['region']).\"\\\", \\\"post\\\":\\\"\".trim($datums['post']).\"\\\",\"; \n\t\t\t \t$jsonArrayOfObjs .= \"\\\"regularworkstation\\\":\".$datums['regularworkstation'].\", \\\"regworkdeployed\\\":\".$datums['regworkdeployed'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"regworkremaining\\\":\".$datums['regworkremaining'].\", \\\"regworkpercentcompleted\\\":\".$datums['regworkpercentcompleted'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"vsencompatableworkstation\\\":\".$datums['vsencompatableworkstation'].\", \\\"vsendeployed\\\":\".$datums['vsendeployed'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"vsenremaining\\\":\".$datums['vsenremaining'].\", \\\"vsenpercentcompleted\\\":\".$datums['vsenpercentcompleted'].\", \\\"capacity\\\":\".$datums['capacity'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"latitude\\\":\".$datums['latitude'].\", \\\"longitude\\\":\".$datums['longitude'].\"\";\n\t\t \t$jsonArrayOfObjs .= \"},\";\n\t\t\t}\n\n\t\t} \n\t\t$jsonArrayOfObjs .= \"]\"; \n\t\t//error_log($jsonArrayOfObjs);\n\n\t\t$cleanJsonStr = json_decode($jsonArrayOfObjs);\n\n\t\t//Validate the JSON\n\t\tif($cleanJsonStr === NULL){error_log(\"Error in JSON in getJsonBroDeployOverseas() method.\"); }else{return $jsonArrayOfObjs;}\n\t}", "public function jsonSerialize()\n {\n return [\n 'mudou' => $this->_mudou,\n 'arquivoTemporario' => $this->_arquivoTemporario\n ];\n }", "public function jsonSerialize()\n {\n return array('title' => $this->title,\n 'size' => $this->size,\n 'unit_price' => $this->unitPrice,\n 'description' => $this->description);\n }", "public function jsonSerialize()\n {\n }", "public function jsonSerialize()\n {\n }", "public function jsonSerialize()\r\n {\r\n $json = array();\r\n $json['id'] = $this->id;\r\n $json['source'] = $this->source;\r\n $json['location_id'] = $this->locationId;\r\n $json['name'] = $this->name;\r\n $json['total_ratings'] = $this->totalRatings;\r\n $json['average_rating'] = $this->averageRating;\r\n $json['stars'] = $this->stars;\r\n $json['type_id'] = $this->typeId;\r\n $json['meta_no_index'] = $this->metaNoIndex;\r\n $json['owner_id'] = $this->ownerId;\r\n $json['trip_id'] = $this->tripId;\r\n $json['address1'] = $this->address1;\r\n $json['address2'] = $this->address2;\r\n $json['postcode'] = $this->postcode;\r\n $json['telephone'] = $this->telephone;\r\n $json['url'] = $this->url;\r\n $json['description'] = $this->description;\r\n $json['longitude'] = $this->longitude;\r\n $json['latitude'] = $this->latitude;\r\n $json['num_rooms'] = $this->numRooms;\r\n $json['redirect_accommodation_id'] = $this->redirectAccommodationId;\r\n $json['redirect_id'] = $this->redirectId;\r\n $json['page_url'] = $this->pageUrl;\r\n $json['binary_options'] = $this->binaryOptions;\r\n $json['desc_overview'] = $this->descOverview;\r\n $json['desc_room_information'] = $this->descRoomInformation;\r\n $json['desc_facilities'] = $this->descFacilities;\r\n $json['desc_food_drink'] = $this->descFoodDrink;\r\n $json['date_created'] = $this->dateCreated;\r\n $json['date_updated'] = $this->dateUpdated;\r\n $json['date_removed'] = $this->dateRemoved;\r\n\r\n return $json;\r\n }", "public function jsonSerialize()\n {\n return [\n 'id'=> $this->getId(),\n 'title'=> $this->getTitle(),\n 'image'=> $this->getImage(),\n 'content'=> $this->getContent(),\n 'date_added'=> $this->getDateAdded(),\n 'id_user'=> $this->getIdUser(),\n 'user'=> $this->user->getName(),\n ];\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function annonceJson(){\n $db = $this->getPDO();\n $sql = \"SELECT * FROM annonces INNER JOIN utilisateurs ON annonces.utilisateur_id = utilisateurs.id_utilisateur INNER JOIN categories ON annonces.categorie_id = categories.id_categorie INNER JOIN regions ON annonces.regions_id = regions.id_regions\";\n $json = $db->query($sql);\n return $json;\n }", "public function jsonSerialize() {\n $result = array();\n if (!is_null($this->id)) {\n $result[\"id\"] = intval($this->id);\n }\n if (!is_null($this->addresses)) {\n $result[\"addresses\"] = $this->addresses;\n }\n if (!is_null($this->appnotifications)) {\n $result[\"appnotifications\"] = $this->appnotifications;\n }\n if (!is_null($this->apponboardingstatus)) {\n $result[\"apponboardingstatus\"] = intval($this->apponboardingstatus);\n }\n if (!is_null($this->appoptin)) {\n $result[\"appoptin\"] = $this->appoptin;\n }\n if (!is_null($this->appphone)) {\n $result[\"appphone\"] = strval($this->appphone);\n }\n if (!is_null($this->apptoken)) {\n $result[\"apptoken\"] = strval($this->apptoken);\n }\n if (!is_null($this->birthdate)) {\n $result[\"birthdate\"] = Json::packTimestamp($this->birthdate);\n }\n if (!is_null($this->company)) {\n $result[\"company\"] = strval($this->company);\n }\n if (!is_null($this->customertitleid)) {\n $result[\"customertitleid\"] = intval($this->customertitleid);\n }\n if (!is_null($this->email)) {\n $result[\"email\"] = strval($this->email);\n }\n if (!is_null($this->firstname)) {\n $result[\"firstname\"] = strval($this->firstname);\n }\n if (!is_null($this->image)) {\n $result[\"image\"] = strval($this->image);\n }\n if (!is_null($this->languagecode)) {\n $result[\"languagecode\"] = strval($this->languagecode);\n }\n if (!is_null($this->lastname)) {\n $result[\"lastname\"] = strval($this->lastname);\n }\n if (!is_null($this->lookup)) {\n $result[\"lookup\"] = $this->lookup;\n }\n if (!is_null($this->middlename)) {\n $result[\"middlename\"] = strval($this->middlename);\n }\n if (!is_null($this->optins)) {\n $result[\"optins\"] = $this->optins;\n }\n if (!is_null($this->organizationfunction)) {\n $result[\"organizationfunction\"] = strval($this->organizationfunction);\n }\n if (!is_null($this->phonenumbers)) {\n $result[\"phonenumbers\"] = $this->phonenumbers;\n }\n if (!is_null($this->relationships)) {\n $result[\"relationships\"] = $this->relationships;\n }\n if (!is_null($this->relationtypes)) {\n $result[\"relationtypes\"] = $this->relationtypes;\n }\n if (!is_null($this->sendmail)) {\n $result[\"sendmail\"] = (bool)$this->sendmail;\n }\n if (!is_null($this->sex)) {\n $result[\"sex\"] = strval($this->sex);\n }\n if (!is_null($this->status)) {\n $result[\"status\"] = strval($this->status);\n }\n if (!is_null($this->subscribed)) {\n $result[\"subscribed\"] = (bool)$this->subscribed;\n }\n if (!is_null($this->vatnumber)) {\n $result[\"vatnumber\"] = strval($this->vatnumber);\n }\n if (!is_null($this->isdeleted)) {\n $result[\"isdeleted\"] = (bool)$this->isdeleted;\n }\n if (!is_null($this->createdts)) {\n $result[\"createdts\"] = Json::packTimestamp($this->createdts);\n }\n if (!is_null($this->lastupdatets)) {\n $result[\"lastupdatets\"] = Json::packTimestamp($this->lastupdatets);\n }\n\n\n if (is_array($this->custom_fields)) {\n foreach ($this->custom_fields as $key => $value) {\n $result[\"c_\" . $key] = $value;\n }\n }\n\n return $result;\n }", "public function jsonSerialize()\r\n {\r\n $json = array();\r\n $json['id'] = $this->id;\r\n $json['user_photo_album_id'] = $this->userPhotoAlbumId;\r\n $json['filename'] = $this->filename;\r\n $json['original_filename'] = $this->originalFilename;\r\n $json['text'] = $this->text;\r\n $json['display_format'] = $this->displayFormat;\r\n $json['counter'] = $this->counter;\r\n $json['do_not_feature'] = $this->doNotFeature;\r\n $json['approved'] = $this->approved;\r\n $json['category_mask'] = $this->categoryMask;\r\n $json['blessed_id'] = $this->blessedId;\r\n $json['hash'] = $this->hash;\r\n $json['album_id'] = $this->albumId;\r\n\r\n return $json;\r\n }", "public function getJson()\n {\n $newObject = $this->originalData;\n $resourcesClone = $this->resources;\n\n // Remove Main Options that might have been added\n $resourcesClone = array_filter($resourcesClone, function($value) {\n if ($value->gmResource()->getTypeName() == 'MainOptions') {\n return false;\n }\n return true;\n });\n\n // Cast to an array of objects\n $newObject->resources = array_values($resourcesClone);\n //@todo make sure this sorts the way GM does, prevent loads of changes @see\n $newObject->script_order = $this->script_order;\n return JsonService::encode($newObject);\n }", "function jsonSerialize()\n\t{\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'metadata' => $this->getMetadata()\n\t\t];\n\t}", "public function func_json_builder () {\n return json_encode ($this -> raw_data);\n }", "function jsonSerialize() {\n return[\n \"id\"=>$this->id,\n \"nom\"=>$this->nom\n ];\n }", "public function toJson(): string;", "public function toJson(): string;", "private function getJSON(){\n return json_encode($this->getResponseStructure());\n }", "public function generaJson(){\n\tdate_default_timezone_set(\"America/Mexico_City\");\n\t$datosMediaAction\t= \t\"\";\n\t$time\t\t\t\t=\ttime();\n\t$fechaActual \t\t= \tdate('Y-m-d h:i:sa');\n\t$fechaFormatoIso\t=\tdate(\"Y-m-d\", $time) . 'T' . date(\"H:i:s\", $time) .'Z';\t\n\t$nuevafecha \t\t= \tstrtotime ('+1 year' , strtotime($fechaActual)); //Le aumentamos 1 año por ahora solo prueba chance y sirva de algo mas adelante\n\t$fechaFormatoIsoMas\t=\tdate(\"Y-m-d\", $nuevafecha) . 'T' . date(\"H:i:s\", $nuevafecha) .'Z';\n\t\n\t$datosMediaAction =\tarray(\n\t\t\t\t\t\"@context\" \t\t\t=> \"http://schema.org\",\n\t\t\t\t\t\"@type\" \t\t\t=> \"DataFeed\",\n\t\t\t\t\t\"dateModified\" \t=> $fechaFormatoIso,\n\t\t\t\t\t\"dataFeedElement\" \t=> array([\n\t\t\t\t\t\t\t\"@context\" \t\t\t=> array(\"http://schema.org\", array(\"@language\" => \"en\")),\n\t\t\t\t\t\t\t\"@type\" \t\t\t=> \"Movie\",\n\t\t\t\t\t\t\t\"@id\" \t\t\t\t=> \"http://www.example.com/my_favorite_movie\",\n\t\t\t\t\t\t\t\"url\" \t\t\t\t=> \"http://www.example.com/my_favorite_movie\",\n\t\t\t\t\t\t\t\"name\" \t\t\t=> \"My Favorite Movie\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"potentialAction\" \t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t\t\t\t=> \"WatchAction\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"target\"\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t\t\t\t=> \"EntryPoint\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"urlTemplate\"\t\t=> \"http://www.example.com/my_favorite_movie?autoplay=true\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"inLanguage\"\t\t=> \"en\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"actionPlatform\"\t=> array(\"http://schema.org/DesktopWebPlatform\",\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\"http://schema.org/MobileWebPlatform\",\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\"http://schema.org/AndroidPlatform\",\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\"http://schema.org/IOSPlatform\",\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\"http://schema.googleapis.com/GoogleVideoCast\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"actionAccessibilityRequirement\" \t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t\t\t\t\t\t\t\t=> \"ActionAccessSpecification\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"category\"\t\t\t\t\t\t\t=> \"subscription\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"availabilityStarts\"\t\t\t\t=> $fechaFormatoIso,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"availabilityEnds\"\t\t\t\t\t=> $fechaFormatoIsoMas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"eligibleRegion\"\t\t\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t=> \"Country\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\"\t=> \"US\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t=> \"Country\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\"\t=> \"CA\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t),//Fin de potentialAction\n\t\t\t\t\t\t\t\"sameAs\"\t\t\t=> \"https://en.wikipedia.org/wiki/my_favorite_movie\",\n\t\t\t\t\t\t\t\"releasedEvent\"\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t\t\t=> \"PublicationEvent\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"startDate\"\t\t=> date('Y-m-d'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"location\"\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t\t=> \"Country\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\"\t\t=> \"US\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\"description\"\t\t=> \"This is my favorite movie.\",\n\t\t\t\t\t\t\t\"actor\" \t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t\t=> \"Person\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\"\t\t=> \"John Doe\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"sameAs\"\t=> \"https://en.wikipedia.org/wiki/John_Doe\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"\t\t=> \"Person\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\"\t\t=> \"Jane Doe\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"sameAs\"\t=> \"https://en.wikipedia.org/wiki/Jane_Doe\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\"identifier\"\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"@type\"=> \"PropertyValue\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"propertyID\"=> \"IMDB_ID\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\"=> \"tt0123456\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\n\t\t\t\t\t])//Fin de dataFeedElement\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t);\n\t\n\treturn $datosMediaAction;\n}", "public function jsonSerialize()\n {\n return [\n 'ID'=> $this->getDobavljacID(),\n 'ime'=> $this->getNaziv(),\n 'granica' => $this->getGranicaPovratka()\n ];\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['owner'] = $this->owner;\n $json['applicationId'] = $this->applicationId;\n $json['time'] = $this->time;\n $json['segmentCount'] = $this->segmentCount;\n $json['direction'] = $this->direction;\n $json['to'] = $this->to;\n $json['from'] = $this->from;\n $json['media'] = $this->media;\n $json['text'] = $this->text;\n $json['tag'] = $this->tag;\n\n return $json;\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['title'] = $this->title;\n $json['sort_order'] = $this->sortOrder;\n $json['sample_type'] = $this->sampleType;\n $json['id'] = $this->id;\n $json['sample_file'] = $this->sampleFile;\n $json['sample_file_content'] = $this->sampleFileContent;\n $json['sample_url'] = $this->sampleUrl;\n $json['extension_attributes'] = $this->extensionAttributes;\n\n return $json;\n }", "public function json() {\n\t\t$array = wp_array_slice_assoc(\n\t\t\t(array) $this,\n\t\t\tarray(\n\t\t\t\t'id',\n\t\t\t\t'description',\n\t\t\t\t'priority',\n\t\t\t\t'panel',\n\t\t\t\t'type',\n\t\t\t\t'description_hidden',\n\t\t\t\t'section',\n\t\t\t)\n\t\t);\n\n\t\t$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );\n\t\t$array['content'] = $this->get_content();\n\t\t$array['active'] = $this->active();\n\t\t$array['instanceNumber'] = $this->instance_number;\n\n\t\t$array['customizeAction'] = esc_html__( 'Customizing', 'kirki' );\n\t\tif ( $this->panel ) {\n\t\t\t/* translators: The title. */\n\t\t\t$array['customizeAction'] = sprintf( esc_html__( 'Customizing &#9656; %s', 'kirki' ), esc_html( $this->manager->get_panel( $this->panel )->title ) );\n\t\t}\n\t\treturn $array;\n\t}", "public function jsonSerialize()\n {\n $json = array();\n foreach ($this as $key => $value) {\n $json[$key] = $value;\n }\n \n $json['created_at'] = $this->getCreatedAt()->format(\"F j, Y\");\n \n return $json;\n }", "function get_produck_json(){\n header('Content-Type: application/json');\n echo $this->crud_model->get_all_produk();\n }", "public function json() {\n\t\t$data = parent::json();\n\n\t\t$data['id'] = $this->type . '-' . $this->id;\n\t\t$data['label'] = html_entity_decode( $this->label, ENT_QUOTES, get_bloginfo( 'charset' ) );\n\t\t$data['value'] = $this->value();\n\t\t$data['link'] = $this->get_link();\n\t\t$data['defaultValue'] = $this->setting->default;\n\n\t\treturn $data;\n\t}", "public function jsonSerialize()\r\n {\r\n // TODO: Implement jsonSerialize() method.\r\n return [\r\n 'codigo' => $this->getCodigo(),\r\n 'uf' => $this->getUf(),\r\n 'nome' => $this->getNome()\r\n ];\r\n }", "final public function jsonSerialize() {}", "public function jsonSerialize(){\n return [\n \"name\" => $this->getName(),\n \"location\" => $this->getLocation()\n ];\n }", "function jsonSerialize()\n {\n return [\n 'title' => $this->title,\n 'description' => $this->description,\n 'slug' => $this->slug,\n 'created_at' => $this->createdAt\n ];\n }", "function getJSON()\n\t{\n\t\treturn array(\n\t\t\t\t'id' => $this->id,\n\t\t\t\t'mail' => $this->mail,\n\t\t\t\t'username' => $this->username,\n\t\t\t\t'lastLogin' => $this->lastLogin,\n\t\t\t\t'loginTries' => $this->loginTries,\n\t\t\t\t'lastTry' => $this->lastTry,\n\t\t\t\t'gravatar' => md5($this->mail)\n\t\t);\n\t}", "public function toJson() {\n\t\t$data = array();\n\t\tforeach ($this->fields as $name => $field) {\n\t\t\t$data += [$name => $field->toJson()];\n\t\t}\n\t\t$top = array(\"success\"=>$this->getSuccess(),\"data\"=>$data,\"text\"=>$this->text);\n\t\treturn $top;\n\t}", "public function asJson($content=[])\n{\n self::$stored['json'][] = $content;\n return json_encode($content);\n}", "public function getJSON(){\n return '{\"tag\":\"'.$this->getTag().'\" , \"name\":\"'.$this->getName().'\" , \"donations\":\"'.$this->getDonations().'\", \n \"received\":\"'.$this->getReceived().',\"tagClan\":\"'.$this->getTagClan().'\"}' ;\n }", "public function jsonSerialize() {\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'name' => $this->getName(),\n\t\t\t'url' => $this->getUrl(),\n\t\t\t'description' => $this->getDescription(),\n\t\t];\n\t}", "public function jsonSerialize() {\n $result = array();\n if (!is_null($this->id)) {\n $result[\"id\"] = intval($this->id);\n }\n if (!is_null($this->name)) {\n $result[\"name\"] = strval($this->name);\n }\n if (!is_null($this->content)) {\n $result[\"content\"] = $this->content;\n }\n if (!is_null($this->defaultformat)) {\n $result[\"defaultformat\"] = strval($this->defaultformat);\n }\n if (!is_null($this->description)) {\n $result[\"description\"] = strval($this->description);\n }\n if (!is_null($this->emailbcc)) {\n $result[\"emailbcc\"] = strval($this->emailbcc);\n }\n if (!is_null($this->emailcc)) {\n $result[\"emailcc\"] = strval($this->emailcc);\n }\n if (!is_null($this->emailrecipients)) {\n $result[\"emailrecipients\"] = strval($this->emailrecipients);\n }\n if (!is_null($this->emailschedule)) {\n $result[\"emailschedule\"] = (bool)$this->emailschedule;\n }\n if (!is_null($this->emailscheduledayofmonth)) {\n $result[\"emailscheduledayofmonth\"] = intval($this->emailscheduledayofmonth);\n }\n if (!is_null($this->emailscheduledayofweek)) {\n $result[\"emailscheduledayofweek\"] = intval($this->emailscheduledayofweek);\n }\n if (!is_null($this->emailschedulehourofday)) {\n $result[\"emailschedulehourofday\"] = intval($this->emailschedulehourofday);\n }\n if (!is_null($this->emailschedulequery)) {\n $result[\"emailschedulequery\"] = strval($this->emailschedulequery);\n }\n if (!is_null($this->options)) {\n $result[\"options\"] = $this->options;\n }\n if (!is_null($this->reporttypeid)) {\n $result[\"reporttypeid\"] = intval($this->reporttypeid);\n }\n if (!is_null($this->subtitles)) {\n $result[\"subtitles\"] = $this->subtitles;\n }\n if (!is_null($this->translations)) {\n $result[\"translations\"] = $this->translations;\n }\n if (!is_null($this->usagetypeid)) {\n $result[\"usagetypeid\"] = intval($this->usagetypeid);\n }\n if (!is_null($this->createdts)) {\n $result[\"createdts\"] = Json::packTimestamp($this->createdts);\n }\n if (!is_null($this->lastupdatets)) {\n $result[\"lastupdatets\"] = Json::packTimestamp($this->lastupdatets);\n }\n\n return $result;\n }", "private function json()\n {\n return json_encode($this->data);\n }", "public static function getJson()\n {\n return '{\"credit_card_id\":\"TestSample\",\"payer_id\":\"TestSample\",\"last4\":\"TestSample\",\"type\":\"TestSample\",\"expire_month\":123,\"expire_year\":123}';\n }", "public function buildJSONOutput() {\n\t\t$json= new stdClass();\n\t\t$json->type = $this->getType();\n\t\t$json->registrant = $this->getRegistrant();\n\t\t$json->streetAddress = $this->getStreetAddress();\n\t\tif($this->getState() == \"\") {\n\t\t\t$json->state = $this->getCountry();\n\t\t} else {\n\t\t\t$json->state = $this->getState();\n\t\t}\n\t\t$json->city = $this->getCity();\n\t\t$json->country = $this->getCountry();\n\t\t$json->postCode = $this->getPostCode();\n\t\t$json->markIdentification = $this->getMarkIdentification();\n\t\t$json->serialNumber = $this->getSerialNumber();\n\t\t$json->registrationNumber = $this->getRegistrationNumber();\n\t\t$json->transactionDate = $this->getTransactionDate();\n\t\t$json->filingDate = $this->getFilingDate();\n\t\t$json->description = $this->getDescription();\n\t\t$json->correspondentAddress = $this->getCorrespondentAddress();\n\t\t$json->lastStatusUpdate = $this->getFilingDate();\n\t\treturn $json;\n\t}", "public function jsonSerialize()\n {\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'content' => $this->content,\n 'image' => $this->image,\n 'legend' => $this->legend,\n 'creationDate' => $this->creationDate\n ];\n }", "protected function getJSONFields() {\r\n\t\t$json_fields = parent::getJSONFields();\r\n\t\t$json_fields = $json_fields . \",\";\r\n\t\t$json_fields = $json_fields . \"\\\"LandingPages\\\":{\";\r\n\t\t$landings_count = 0;\r\n\t\tif ($this -> landings != null) {\r\n\t\t\tforeach ($this -> landings as $landing) {\r\n\t\t\t\t$json_fields = $json_fields . \"\\\"\".strval($landing -> get_id()) . \"\\\":\";\r\n\t\t\t\t$json_fields = $json_fields . strval($landing -> getJSON()) . \",\";\r\n\t\t\t\t$landings_count++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($landings_count) {\r\n\t\t\t$json_fields = substr($json_fields, 0, -1);\r\n\t\t}\r\n\t\t$json_fields = $json_fields . \"},\";\r\n\t\t$json_fields = $json_fields . \"\\\"EntitySchemaFields\\\":{\";\r\n\t\t$entitySchemaTypesCount = 0;\r\n\t\tforeach ($this -> entitySchemaFields as $type => $entitySchemaFields) {\r\n\t\t\t$json_fields = $json_fields . \"\\\"\" . strval($type) . \"\\\":[\";\r\n\t\t\t$fieldsCount = 0;\r\n\t\t\tforeach ($entitySchemaFields as $entitySchemaField) {\r\n\t\t\t\t$json_fields = $json_fields . \"\\\"\" . strval($entitySchemaField) . \"\\\",\";\r\n\t\t\t\t$fieldsCount++;\r\n\t\t\t}\r\n\t\t\tif ($fieldsCount > 0) {\r\n\t\t\t\t$json_fields = substr($json_fields, 0, -1);\r\n\t\t\t}\r\n\t\t\t$json_fields = $json_fields . \"],\";\r\n\t\t\t$entitySchemaTypesCount++;\r\n\t\t}\r\n\t\tif ($entitySchemaTypesCount > 0) {\r\n\t\t\t$json_fields = substr($json_fields, 0, -1);\r\n\t\t}\r\n\t\t$json_fields = $json_fields. \"}\";\r\n\t\treturn $json_fields;\r\n\t}", "public function converterJsonfile(){\n try {\n\n /**\n * Algoritmo para consumir a API e receber em $planets os dados dos planetas\n */\n $flag = 1;\n do{\n $cl = curl_init();\n curl_setopt($cl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($cl, CURLOPT_URL, \"https://swapi.co/api/planets/?page=$flag\");\n curl_setopt($cl, CURLOPT_HTTPHEADER, array(\"Content-Type: application/json;\") );\n $compare = json_decode( curl_exec($cl) );\n foreach( $compare->results as $value ){\n $planets[] = $value;\n }\n $flag++;\n curl_close($cl);\n }while( NULL != $compare->next );\n\n //Com todos os planetas agora monto meus dados conforme o banco de dados e insiro no final.\n foreach( $planets as $planet ){\n\n $data_planet[] = array( \n 'nome' => $planet->name , \n 'clima' => $planet->climate, \n 'terreno' => $planet->terrain, \n 'cnt_aparicoes' => count($planet->films), \n );\n }\n\n //Insert com todos os dados\n $response = $this->model->insert( $data_planet );\n\n return response()->json( $response . ', todos os dados foram carregados e inseridos corretamente!', Response::HTTP_OK );\n \n } catch (Exception $e) {\n return response()->json( [ 'Error' => $e ], Response::HTTP_INTERNAL_SERVER_ERROR );\n }\n\n }", "abstract protected function getAdditionalJsonData(): array;", "public static function getAllToJson() {\n $jsonArray = array(); //create JSON array\n //read items\n foreach(self::getAll() as $item) {\n array_push($jsonArray, json_decode($item->toJson()));\n }\n return json_encode($jsonArray); //return JSON array\n }", "function jsonSerialize()\n {\n return [\n 'meta' => [\n 'offset' => $this->page->getOffset(),\n 'limit' => $this->page->getLimit(),\n 'total' => $this->total,\n ],\n 'data' => $this->results,\n ];\n }", "public function jsonSerialize()\n {\n $arrayJson = array();\n foreach ($this as $key =>$value){\n if($key != 'document')\n $arrayJson[$key] = $value;\n }\n return $arrayJson;\n }", "public function __toString(){\n return json_encode($this->json);\n }", "public function jsonOrcamentos($tipo){\n $table = 'orcamento';\n\n // Table's primary key\n $primaryKey = 'cdnOrcamento';\n\n $columns = array();\n\n $extras = array();\n\n $extras[] = 'p.nomPaciente';\n $extras[] = 'p.cdnPaciente';\n if(ControleCampo::campoExiste('nomSobrenome'))\n $extras[] = 'p.nomSobrenome';\n\n // Id\n $columns[] = array(\n 'db' => 'cdnOrcamento',\n 'dt' => 0\n );\n\n\n $this->tipo = $tipo;\n\n // Nome\n $columns[] = array(\n 'db' => 'cdnOrcamento',\n 'dt' => 1,\n 'formatter' =>\n function($d, $row){\n $d = $row['nomPaciente'];\n if(isset($row['nomSobrenome']))\n $d = utf8_encode($d.' '.$row['nomSobrenome']);\n else\n $d = utf8_encode($d);\n return $d;\n }\n );\n\n // Prontuário\n $columns[] = array(\n 'db' => 'cdnOrcamento',\n 'dt' => 2,\n 'formatter' =>\n function($d, $row){\n $d = $row['cdnPaciente'];\n return $d;\n }\n );\n\n $join = 'inner join paciente p on orcamento.cdnPaciente = p.cdnPaciente';\n\n return $this->jsonFinalizar($table, $primaryKey, $columns, 'indAprovado = 1', $extras, $join);\n }", "public function jsonSerialize()\n {\n $jsonObject = parent::jsonSerialize();\n $jsonObject->result = $this->information[ self::INFORMATION_RESULT ];\n\n return $jsonObject;\n }", "function jsonSerialize()\n {\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'quantity' => $this->quantity,\n 'clientName' => $this->clientName,\n 'address' => $this->address,\n 'email' => $this->email,\n 'state' => $this->state,\n 'dispatchingTime'=> $this->dispatchingTime\n ];\n }" ]
[ "0.757596", "0.71444726", "0.70178455", "0.70178455", "0.69713366", "0.6877887", "0.6842315", "0.68157846", "0.68157846", "0.68157846", "0.68157846", "0.68157846", "0.68157846", "0.68157846", "0.68157846", "0.68157846", "0.68157846", "0.68157846", "0.68146867", "0.68100536", "0.67628837", "0.67628837", "0.67628837", "0.67628837", "0.67628837", "0.67628837", "0.67628837", "0.67628837", "0.6744332", "0.6718662", "0.66834104", "0.66662574", "0.6640957", "0.66178954", "0.66032535", "0.65688753", "0.65673673", "0.6566679", "0.656612", "0.6558328", "0.655777", "0.6557042", "0.6525023", "0.65241396", "0.65211105", "0.6508531", "0.6490816", "0.6490816", "0.6464333", "0.64371", "0.64278346", "0.64278346", "0.64278346", "0.64278346", "0.64278346", "0.64278346", "0.64278346", "0.64278346", "0.64278346", "0.6419523", "0.64145935", "0.64067894", "0.6402634", "0.6399264", "0.63809335", "0.6371201", "0.63694537", "0.63694537", "0.6365287", "0.6362997", "0.63343805", "0.6327998", "0.63257325", "0.63233113", "0.63223714", "0.6319634", "0.631945", "0.6316111", "0.6312992", "0.629595", "0.6288668", "0.62758267", "0.62705606", "0.6268501", "0.6267092", "0.6252831", "0.62510306", "0.6249891", "0.62452173", "0.6232283", "0.6230364", "0.6230135", "0.6228777", "0.6223509", "0.6218925", "0.62152165", "0.62042594", "0.6203096", "0.6197975", "0.61921185", "0.61853766" ]
0.0
-1
Get condition id from database
public static function saveExample() { $condition_id = DB::table('weather_conditions')->where('condition', Input::get('condition'))->pluck('id'); //Insert example to database DB::table('weather_examples')->insert( array('condition_id' => $condition_id, 'temperature' => Input::get('temperature'), 'pressure' => Input::get('pressure'), 'humidity' => Input::get('humidity'), 'wind_direction' => Input::get('wind_direction'), 'wind_speed' => Input::get('wind_speed'), 'sunrise' => Input::get('sunrise'), 'sunset' => Input::get('sunset'), 'day' => Input::get('day'), 'cloudiness' => Input::get('cloudiness'), 'class_head' => Input::get('head'), 'class_torso' => Input::get('torso'), 'class_legs' => Input::get('legs'), 'class_feet' => Input::get('boots'), ) ); return Redirect::to('example-generator'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetID($ConditionString);", "public function getCriterionId()\n {\n return isset($this->criterion_id) ? $this->criterion_id : 0;\n }", "public function getPrimaryKey()\n\t\t{\n\t\t\treturn array('cfe_rule_condition_id');\n\t\t}", "public function getCoopFromCond($id_cond)\n {\n $query = $this->db->query('select ID_EMPRESA from tbl_conductor where ID_COND=' . $id_cond);\n $row = $query->row_array();\n return $row['ID_EMPRESA'];\n }", "public function getAutoIncrement()\n\t\t{\n\t\t\treturn 'cfe_rule_condition_id';\n\t\t}", "public static function getCwhConfigId()\n {\n $cwhConfigId = null;\n $cwhConfig = CwhConfig::findOne(['tablename' => static::tableName()]);\n if (!is_null($cwhConfig)) {\n $cwhConfigId = $cwhConfig->id;\n }\n return $cwhConfigId;\n }", "function get_id_db($injured_table, $conn, $band_id, $mode) {\n valid_init($injured_table, $conn, $band_id, $mode);\n\n // Get ID from database\n $result = exec_query($conn, \"select id from $injured_table where opaska_id = $band_id and w_akcji = true\", TRUE);\n $id = $result['id'];\n return $id;\n}", "function Update_get_by_id($condition,$table,$where_condition){\n\t\t\n\t\t$select = \"select $condition from $table $where_condition\";\n\t\t$run = $this->connect->query($select);\n\t\t\n\t\tif($run->num_rows == 1){\n\t\t\t\n\t\t\t$fetch = $run->fetch_assoc();\n\t\t\t\n\t\t\treturn $fetch;\n\t\t} // if num_rows close\n\t}", "protected function _getId()\r\n\t{\r\n\t\t$select\t\t= $this->_db->select()->from('Cron_Jobs', array('id'))->where('name = ?', $this->_name);\r\n\t\tlist($id)\t= $this->_db->fetchCol($select);\r\n\t\t\r\n\t\treturn $id;\r\n\t}", "function getChoiceId($choice, $questionId){\r\n\tglobal $db;\r\n\tif(!$db) connectDb();\r\n\r\n\t$sql = \"SELECT a.id FROM choices AS a, questions AS b WHERE a.question_id=b.id AND b.id=$questionId AND a.choice='$choice'\";\r\n\r\n\t$result = null;\r\n\ttry {\r\n\t\techo $sql; echo '<br />';\r\n\t\t$result = $db->query($sql);\r\n\r\n\t}\r\n\tcatch (PDOException $e) {\r\n\t\t$error = $e->getMessage();\r\n\t}\r\n\treturn $result===false?null:$result->fetch(PDO::FETCH_OBJ)->id;\r\n\r\n}", "function getId() {\n\t\treturn $this->getData('sectionDecisionId');\r\n\t}", "public function get_id();", "public function get_id();", "public static function findOne($condition) {\n $table = static::$table;\n $one = Base::getInstance()->query(\"SELECT * FROM {$table} WHERE {$condition} LIMIT 1\");\n if ($one !== false) {\n return $one->fetchObject();\n } \n return false;\n }", "function getQuestionId($questionId, $form){\r\n\r\n\tglobal $db;\r\n\tif(!$db) connectDb();\r\n\r\n\t$formId = getFormId($form);\r\n\tif($formId) {\r\n\t\t$sql = \"SELECT id FROM questions WHERE question ='$questionId' and form_id='$formId' \";\r\n\r\n\t\ttry {\r\n\t\t\t$result = $db->query($sql)->fetch(PDO::FETCH_OBJ);\r\n\t\t}\r\n\t\tcatch (PDOException $e) {\r\n\t\t\t$error = $e->getMessage();\r\n\t\t}\r\n\r\n\t\tif($result) \r\n\t\t\treturn $result->id;\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}\r\n}", "protected function getSearchCriteriaId (): int {\n\t\tif (!$this->searchCriteriaId) {\n\t\t\t$this->searchCriteriaId = SearchCriteriaFinder::getSearchCriteriaIdFromUserId($this->getId());\n\t\t\tif (!$this->searchCriteriaId) {\n\t\t\t\t$this->searchCriteriaId = SearchCriteriaModel::create(['user_id' => $this->getId()]);\n\t\t\t\tif (!is_numeric($this->searchCriteriaId)) {\n\t\t\t\t\t$error_message = $this->searchCriteriaId;\n\t\t\t\t\tthrow new RuntimeException($error_message);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->searchCriteriaId;\n\t}", "protected function getCondition($condition)\n {\n }", "public function determineId() {}", "function IdEvaluacion()\n {\n \t$evaluacion = Evaluacion::select('id')->where('activo',1)->first();\n return $evaluacion->id;\n }", "public function getQuestionId()\r\n{\r\n $query_string = \"SELECT questionid FROM questions \";\r\n $query_string .= \"WHERE question = :question\";\r\n\r\n return $query_string;\r\n}", "public function getId() {\n return isset($this->query['id']) ? $this->query['id'] : null;\n }", "public static function findOne($condition);", "function getDatabaseId();", "public function getCountryCriterionId()\n {\n return isset($this->country_criterion_id) ? $this->country_criterion_id : 0;\n }", "abstract public function get_id();", "protected static function id(): mixed\n\t{\n\t\treturn self::$query->id;\n\t}", "protected static function id(): mixed\n\t{\n\t\treturn self::$query->id;\n\t}", "function getFieldValueById($table_name=NULL,$condition=NULL,$return_field=\"id\"){\r\n\t\tif(!isset($condition)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where($condition);\r\n\t\t$recordSet = $this->db->get($table_name);\r\n\t\t$data=$recordSet->result() ;\r\n\t\t\r\n\t\tif(count($data)>0){\r\n\t\t\treturn $data[0]->$return_field;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function select_database_id($tablename,$columnname,$columnid,$data='*',$condition_array=array())\n {\n $this->db->select($data);\n $this->db->where($columnname,$columnid);\n if(!empty($condition_array)){\n $this->db->where($condition_array);\n }\n $query = $this->db->get($tablename);\n \n if($query->num_rows()>0)\n {\n return $query->result_array();\n \n }\n else\n {\n return array();\n \n }\n }", "protected function getId()\n {\n try{\n return $this->get('id');\n }catch(\\Exception $e){\n \\Log::error($e);\n return FALSE;\n }\n }", "protected function getCurrentId()\n {\n return (array_key_exists($this->idfieldName(), $this->data)) ? $this->data[$this->idfieldName()] : NULL;\n }", "public function get_sorting_id($criteria) {\n $id = db:: table('my_sorting_criteria') \n -> where('criteria', $criteria)-> value('criteria_id') ;\n if($id) return $id;\n else return false;\n }", "public function getId() {\r\n\t\t\treturn $this->columns[ $this->index ];\r\n\t\t}", "private function getSQLCondition() {\n\t\t// the manager can see everyone in the department\n\t\t// the admin and everybody else can see everyone in the company.\n\t\tswitch ($this->page->config['user_level']) {\n\t\t\tcase lu_manager:\n\t\t\tcase lu_employee:\n\t\t\tcase lu_admin:\n\t\t\tcase lu_gm:\n\t\t\tcase lu_owner:\n\t\t\t\t$sql = ' WHERE l.company_id = '.$this->page->company['company_id'];\n\t\t}\n\t\treturn $sql;\n\t}", "public function getNotificationId($notif_id, $datetime){\n $query = new Query();\n $sql = \"SELECT notification_id\n FROM Notifications\n WHERE trainer_id = ? && date_created = ?;\";\n //Construct bind parameters\n $bindTypeStr = \"is\"; \n $bindArr = Array($notif_id, $datetime);\n $query->setAll($sql,$bindTypeStr,$bindArr);\n //Send query to database. Refer to utils/ResultContainer.php for its contents.\n $resultContainer = $query->handleQuery(); \n if (!$resultContainer->isSuccess()){\n $result->setFailure();\n $result->mergeErrorMessages($queryResult); //Retriving errors from model.\n };\n $row = $resultContainer->get_mysqli_result()->fetch_assoc();\n \n\n return $row[\"notification_id\"];\n }", "private function getSQLCondition() {\n\t\t// the manager can see everyone in the department\n\t\t// the admin and everybody else can see everyone in the company.\n\t\tswitch ($this->page->config['user_level']) {\n\t\t\tcase lu_manager:\n\t\t\tcase lu_employee:\n\t\t\tcase lu_admin:\n\t\t\t\t$sql = 'WHERE 1 = 2';\n\t\t\t\tbreak;\t//nobody below GM can access this subject\n\t\t\tcase lu_gm:\n\t\t\tcase lu_owner:\n\t\t\t\t$sql = ' WHERE c.company_id = '.$this->page->company['company_id'];\n\t\t}\n\t\treturn $sql;\n\t}", "function getAssetDatabaseId($asset=null){\n global $mysqli;\n $id = false;\n $results = $mysqli->query(\"SELECT id FROM assets WHERE asset='{$asset}' OR asset_longname='{$asset}' LIMIT 1\");\n if($results){\n $row = $results->fetch_assoc();\n $id = $row['id'];\n }\n return $id;\n}", "public function getId()\n {\n return $this->c_id;\n }", "public function getId (){\n $conn = Connection::getConn();\n $sql = 'SELECT * FROM usuarios WHERE email = :email';\n $stmt = $conn->prepare($sql);\n\n $stmt->bindValue(':email',$this->email );\n\n $stmt->execute();\n\n if ($stmt->rowCount()){\n $result = $stmt->fetch(); \n }\n $id = $result['id']; \n return $id;\n }", "protected function _getPrimaryKey(){\n $def = $this->_getDef();\n foreach($def as $column){\n if($column['primary'] === true){\n return $column['field_name'];\n }\n }\n \n return false;\n }", "abstract function getPrimaryKey();", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "public function getCheckid()\n {\n return $this->get(self::_CHECKID);\n }", "public function getCheckid()\n {\n return $this->get(self::_CHECKID);\n }", "public static function findOne($condition)\n {\n $object = Server::$container->make(get_called_class(), [get_called_class()]);\n $conn = self::getMongoReadConn($object);\n $collection = $conn->selectCollection($object->getDBName(), $object->getCollectionName());\n if (isset($condition[\"_id\"])) {\n if (!is_object($condition[\"_id\"])) {\n $condition[\"_id\"] = new ObjectID($condition[\"_id\"]);\n }\n }\n // var_dump($conn);\n $res = $collection->findOne($condition);\n // var_dump($res);\n return $object;\n }", "function get_constituency_id($constituency_name, $conn_huduma_db) {\n $constituency_result = mysql_query(\"SELECT `id` FROM boundary WHERE LOWER(boundary_name) = '\".trim(strtolower($constituency_name)).\"'\", $conn_huduma_db);\n\n if($constituency_result) {\n if($my_array = mysql_fetch_array($constituency_result)) {\n return $my_array[0];\n }\n\n return null;\n }\n\n return null;\n}", "abstract public function getPrimaryKey();", "abstract public function getPrimaryKey();", "function id_imm_to_id_cli($id_imm=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\n\t$q=\"SELECT * FROM cli_imm WHERE id_imm=$id_imm\";\n\t$r=$db->query($q);\n if($r){\n $ro=mysql_fetch_array($r);\n\treturn $ro['id_cli'];\n }\n}", "public function id()\n\t{\n\t\treturn $this->get($this->meta()->primary_key);\n\t}", "public function getId()\n {\n return $this->elasticaResult->getId();\n }", "function getStatId(){\n $connexion = openDBConnexion();\n $request = $connexion->prepare('\n SELECT idStatistics FROM bdd_satisfevent.statistics\n ORDER BY idStatistics DESC LIMIT 1 ');\n $request->execute(array());\n $result = $request->fetchAll();\n return $result[0]['idStatistics'];\n}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getProgramId(){\n $progam = null;\n $con = $this->mysqli->prepare(\n \"SELECT ProgramID FROM program where programname=? and callsign=?\");\n $con->bind_param('ss',$this->name,$this->callsign);\n $con->bind_result($progam);\n if($con->execute()){\n return $progam;\n }\n else{return false;}\n }", "function getFormId($form) {\r\n\r\n\tglobal $db;\r\n\t$sql = \"SELECT id FROM forms WHERE form=\" . $form;\r\n\t// $result = mysql_query($sql);\r\n\tif(!$db) connectDb();\r\n\ttry {\r\n\t\t$result = $db->query($sql)->fetch(PDO::FETCH_OBJ);\r\n\t}\r\n\tcatch (PDOException $e) {\r\n\t\t$error = $e->getMessage();\r\n\t}\r\n\r\n\tif($result) \r\n\t\treturn $result->id;\r\n\telse\r\n\t\treturn null;\r\n}", "public function getId() {\n\t\treturn $this->getData(static::$_primaryKey);\n\t}", "public function getCondition()\n {\n return $this->condition;\n }", "public function cheque_status_id() {\n return parent::get_fk_object(\"cheque_status_id\");\n }", "function getInterpreterId($iname) {\n $ci = & get_instance();\n $ci->load->database();\n $sql = \"SELECT * FROM gm_interpreter Where interpreter_name='\" . $iname . \"'\";\n $query = $ci->db->query($sql);\n $result = $query->row();\n // echo $sql; die;\n return $result;\n}", "function return_id($conn,$col_name,$col_value,$table_name)\r\n\t{\r\n\t\t$qry=\"select * from $table_name where $col_name='$col_value'\";\r\n\t\t$res=mysql_query($qry);\r\n\t\tif($res){\r\n\t\t\t $result=mysql_fetch_array($res);\r\n\t\t\t return $result['id'];\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn \"error\";\r\n\t}", "public function getConnectionId();", "private function selectResourceID()\n {\n $result = $this->sdb->query('select nextval(\\'resource_id_seq\\') as id',array());\n $row = $this->sdb->fetchrow($result);\n return $row['id'];\n }", "public function get_id()\n {\n\n $user_type = $this->isStaff ? \"staff\" : \"user\";\n\n return $this->database->get($user_type,'id',['user_url' => $this->username]);\n\n }", "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}", "public function id()\n {\n return $this->read($this->metadata['pk']->name);\n }", "public function getCondition() {\n return $this->condition;\n }", "public function getCondition() {\n return $this->condition;\n }", "public static function getId()\n {\n return $getId = DB::table('presensi')->orderBy('id','DESC')->take(1)->get();\n }", "static function custom_get_one_sql($id) {\n # this is the default functionality\n $primary_key = static::get_primary_key();\n return static::get_sql() . \" WHERE o.`$primary_key`='$id'\";\n }", "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('DiscussCategoriesModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('DiscussCategoriesModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "public function getID();", "public function getID();", "public function getID();", "function getPredictionId($prediction_name){\n $pred_id=0;\n $query=\"select gene_prediction_id from gene_prediction where gene_prediction_name ='$prediction_name'\";\n global $con;if(!$con)$con=getConnection();\n $result = mysql_query($query,$con);\n if($result){\n $numRows =mysql_numrows($result);\n if($numRows>0){\n $row = mysql_fetch_assoc($result);\n $pred_id=$row[\"gene_prediction_id\"];\n }\n }\n return $pred_id;\n}", "function clients_field_id($field, $id) {\n global $db;\n $data = null;\n $req = $db->prepare(\"SELECT $field FROM clients WHERE id= ?\");\n $req->execute(array($id));\n $data = $req->fetch();\n //return $data[0];\n return (isset($data[0]))? $data[0] : false;\n}", "public function getPrimaryKey();", "public function getPrimaryKey();", "public function getPrimaryKey();", "public function find($condition)\n {\n if(!is_array($condition))\n {\n $condition = array($this->getKeyField() => $condition);\n }\n $model = $this->getStorage()->fetchRow($condition);\n if(!$model->isLoaded())\n {\n return null;\n }\n return $model;\n }", "public function getCondition();", "public function getCondition();", "public function getCondition();", "public function getIdVit(){\n\t\treturn ($this->id);\n\t}", "public function getIdParameter(): string;", "public function get_id() {\n\t\tif ( ! empty( $this->data->id ) )\n\t\t\treturn $this->data->id;\n\t\telse\n\t\t\treturn false;\n\t}", "function getPrimaryKey () {\n\t\t\n\t\t$count = $this->find('count');\n\t\t\n\t\t$primaryKey = $count+1;\n\t\t\n\t\tif( $this->find('count',array('conditions'=>array($this->name . '.' . $this->primaryKey=>$primaryKey))) > 0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t$i = (int) $count;\n\n while ( $i >= 1 ) {\n\n $i += 1;\n\t\t\t\t\t\n\t\t\t\t\t$primaryKey = $i;\n \n\t\t\t\t\t$returnValue = $this->find('count',array('conditions'=>array($this->name . '.' . $this->primaryKey=>$primaryKey)));\n\n if ($returnValue == 0) {\n \t\t\t\t\t\t\t\t\t\n break;\n }\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n }\n\n return $primaryKey;\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\treturn $primaryKey;\n\n\t\t}\t\n\t\n\t}", "public function getPrimaryKey()\n {\n return $this->getSekolahId();\n }", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "public function id()\n {\n return $this->identity['modelId'];\n }", "function getPrimaryKey() {\n\n $count = $this->find('count');\n $primaryKey = $count + 1;\n\n if ($this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey))) > 0) {\n\n $i = (int) $count;\n\n while ($i >= 1) {\n\n $i += 1;\n\n $primaryKey = $i;\n\n $returnValue = $this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey)));\n\n if ($returnValue == 0) {\n\n break;\n }\n\n $i++;\n }\n\n return $primaryKey;\n } else {\n\n return $primaryKey;\n }\n }", "public function getId() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(0, $this->_result)) return (string) $this->_result[0];\n\t\t\telse parent::throwGetColException('Not set CampaignDefinitionsModel::getId', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignDefinitionsModel::getId', __LINE__, __FILE__);\n\t}", "function getIdForName($name, $dbh=null) {\r\n if (is_null($dbh)) $dbh = connect_to_database();\r\n $sql = \"SELECT id FROM stock WHERE LOWER(name) = LOWER('$name')\";\r\n $sth = make_query($dbh, $sql);\r\n $results = get_all_rows($sth);\r\n if ($results) {\r\n return $results[0]['id'];\r\n }\r\n }", "public function GetId()\n\t{\n\t\t$datas = $this->db->query('select DISTINCT id_komponenbiaya from masterkomponenbiaya order by id_komponenbiaya asc');\n\t\treturn $datas;\n\t}", "public function getStatusId()\n\t\t{\n\t\t\t\treturn $this->getModel()->application_status_id;\n\t\t}", "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('CampaignDefinitionsModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('CampaignDefinitionsModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "public function id() {\r\n return $this->orm->id();\r\n }", "public static function findOne($condition)\n {\n return static::find()->one($condition);\n }" ]
[ "0.731207", "0.6498333", "0.64472055", "0.6131283", "0.60097295", "0.5995664", "0.5956913", "0.5952705", "0.59142095", "0.5874571", "0.5847672", "0.5787308", "0.5787308", "0.5754731", "0.57429534", "0.5734127", "0.5725324", "0.570564", "0.56897914", "0.56818783", "0.5667066", "0.566639", "0.5665255", "0.5662494", "0.56558967", "0.56438434", "0.56438434", "0.5641793", "0.5638254", "0.5631993", "0.5606505", "0.5593521", "0.5557348", "0.5553759", "0.55445164", "0.55294216", "0.55284625", "0.5524253", "0.5497244", "0.5485976", "0.5481297", "0.5480733", "0.54781914", "0.5477198", "0.5463125", "0.545302", "0.5451045", "0.5451045", "0.54484236", "0.5445474", "0.5440515", "0.5436824", "0.54244035", "0.54244035", "0.5419833", "0.5416845", "0.540906", "0.5405545", "0.5399931", "0.53835136", "0.5373854", "0.5363226", "0.5363007", "0.53595924", "0.53572226", "0.53572226", "0.53572226", "0.53518224", "0.5349066", "0.5349066", "0.5346949", "0.53445196", "0.53412473", "0.5336466", "0.5336466", "0.5336466", "0.5334966", "0.5334841", "0.53336984", "0.53336984", "0.53336984", "0.5330559", "0.53282446", "0.53282446", "0.53282446", "0.53276306", "0.5325718", "0.53251594", "0.5323718", "0.5320972", "0.5320067", "0.5320067", "0.5319196", "0.5318564", "0.531495", "0.5314156", "0.5313389", "0.5310513", "0.529984", "0.5298893", "0.52974653" ]
0.0
-1
devuelvo la vista del formulario
public function agregarPelicula(){ return view('peliculas/agregarPelicula'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formulario()\n {\n //\n }", "public function valiteForm();", "function mostrarFormulario(){\r\n $this->consultaFacultades();\r\n }", "private function viewFormulario()\n {\n if (count($camposDefinidos = array_map('trim', explode(';', $this->camposForm))) > 0) {\n $campo_formulario = File::get(base_path($this->templates['campo']));\n $form = File::get(base_path($this->templates['form']));\n $stringCampos = \"\";\n foreach ($camposDefinidos as $c) {\n if (count($c_ = array_map('trim', explode(':', $c))) == 2) {\n $stringCampos .= $campo_formulario;\n $stringCampos = str_replace('[{campo}]', $c_[0], $stringCampos);\n $stringCampos = str_replace('[{label}]', $c_[1], $stringCampos);\n $stringCampos = str_replace('[{tabela}]', $this->tabela, $stringCampos);\n } else {\n echo \"#FORMULARIO# Campo {$c} ignorado, por nao estar descrito corretamente... forma correta -> campo:label\\n\";\n }\n }\n\n $form = str_replace('[{campos_formulario}]', $stringCampos, $form);\n $form = str_replace('[{route_as}]', $this->routeAs, $form);\n $form = str_replace('[{tabela}]', $this->tabela, $form);\n File::put(base_path('resources/views/' . $this->tabela . \"/form.blade.php\"), $form);\n }\n }", "public function getFormaPago();", "function ToonFormulierAfspraak()\n{\n\n}", "public function getForm();", "abstract public function forms();", "public function populateForm() {}", "public function listForms();", "function configurar_formulario (toba_ei_formulario $form){\n switch ($this->s__tipo){\n case \"Definitiva\" : $this->cargar_form_definitivo($form); break;\n case \"Periodo\" : $this->cargar_form_periodo($form); break;\n }\n }", "function form() \r\n {\r\n \t //El formateo va a ser realizado sobre una tabla en la que cada fila es un campo del formulario\r\n $table = &html_table($this->_width,0,2,2);\r\n $table->add_row($this->_showElement(\"Asunto\", '6', \"asunto_de_usuario\", 'Asunto', \"Asunto\", \"left\" )); \r\n $table->add_row($this->_showElement(\"Comentario\", '7', \"comentario\", 'Texto', \"Comentario\", \"left\" )); \r\n \r\n $this->set_form_tabindex(\"Aceptar\", '10'); \r\n $label = html_label( \"submit\" );\r\n $label->add($this->element_form(\"Aceptar\"));\r\n $table->add_row(html_td(\"\", \"left\", $label));\r\n \r\n return $table; \r\n }", "abstract function getForm();", "function geraClasseDadosFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.DadosFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoDadosFormularioCadastro.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n # varre a estrutura dos campos da tabela em questao\n $camposForm = $aModeloFinal = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n $nomeCampo \t = $nomeCampoOriginal;\n //$nomeCampo \t = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n switch ((string)$oCampo->TIPO) {\n case 'date':\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = Util::formataDataFormBanco(strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"]))));\";\n break;\n\n case 'datetime':\n case 'timestamp':\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = Util::formataDataHoraFormBanco(strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"]))));\";\n break;\n\n default:\n if((int)$oCampo->CHAVE == 1)\n if((string)$aTabela['TIPO_TABELA'] != 'NORMAL')\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\";\n else\n $camposForm[] = \"if(\\$acao == 2){\\n\\t\\t\\t\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\\n\\t\\t}\";\n else\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\";\n break;\n }\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) \n mkdir($dir);\n\n $fp = fopen(\"$dir/class.DadosFormulario.php\",\"w\");\n fputs($fp, $modeloFinal);\n fclose($fp);\n return true;\t\n }", "public function createForm();", "public function createForm();", "public static function form(){\n $fecha = mktime(date(\"Y\"), date(\"m\"), date(\"d\"));\n $tipoAct = 'Actividad'->'id_tipo_act';\n return ['nombre' => '', 'tipo_actividad' => '','fecha_desde' =>$fecha, 'fecha_hasta' =>$fecha,\n 'instancia' => '', 'puesto_mencion' =>'','inst_referente' => '',\n 'inst_oferente' => '', 'lugar' =>'','descripcion' =>''];\n\n }", "abstract protected function getForm();", "public function createComponentEditForm()\n\t{\n\t\t$form = new Form;\n\t\t$form->addGroup();\n\t\t$form->addHidden('ID_leku');\n\t\t$form->addText('nazev_leku', 'Názov lieku')\n\t\t\t->addRule(Form::FILLED, 'Zadajte názov lieku');\n\t\t$form->addSelect('typ_leku', 'Typ lieku', self::MEDICINE_TYPE)\n\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setAttribute('class', 'form-control');\n\n\t\t$form->addGroup(\"Poisťovne\");\n\t\t$removeEvent = [$this, 'removeElementClicked'];\n\t\t$insurences = $form->addDynamic(\n\t\t\t'insurences',\n\t\t\tfunction (Container $insurence) use ($removeEvent) {\n\t\t\t\t$insurence->addHidden('ID_leku');\n\t\t\t\t$insurence->addSelect('ID_pojistovny', 'Poisťovňa', $this->insurenceManager->getInsurenceToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$insurence->addText('cena', 'Cena lieku')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Cena musí byť číslo');\n\t\t\t\t$insurence->addText('doplatek', 'Doplatok na liek')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Doplatok musí byť číslo');\n\t\t\t\t$insurence->addSelect('hradene', 'Typ lieku', array('hradene' => 'Hradený', 'nehradene' => 'Nehradený', 'doplatok' => 'Liek s doplatkom'))\n\t\t\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$removeBtn = $insurence->addSubmit('remove', 'Odstrániť poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$insurences->addSubmit('add', 'Pridať poisťovňu')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup(\"Pobočky\");\n\t\t$offices = $form->addDynamic(\n\t\t\t'offices',\n\t\t\tfunction (Container $office) use ($removeEvent) {\n\t\t\t\t$office->addHidden('ID_leku');\n\t\t\t\t$office->addSelect('ID_pobocky', 'Pobočka', $this->officeManager->getOfficesToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte pobočku')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$office->addText('pocet_na_sklade', 'Počet kusov')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setDefaultValue('1')\n\t\t\t\t\t->addRule(Form::INTEGER, 'Počet kusov musí byť číslo')\n\t\t\t\t\t->addRule(Form::RANGE, 'Počet kusov musí byť kladné číslo', array(0, null));\n\n\t\t\t\t$removeBtn = $office->addSubmit('remove', 'Odstrániť pobočku')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$offices->addSubmit('add', 'Pridať pobočku')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup('');\n\t\t$form->addSubmit('submit', 'Uložiť liek')\n\t\t\t->setAttribute('class', 'btn-primary')\n\t\t\t->onClick[] = [$this, 'submitElementClicked'];\n\n\t\treturn $this->bootstrapFormRender($form);\n\t}", "function realizarHomologacionPendientes(){ \n $this->mostrarFormularioProyecto();\n }", "public function listaAction() \n { \n \n $form = new Formulario(\"form\");\n // valores iniciales formulario (C)\n $id = (int) $this->params()->fromRoute('id', 0);\n $form->get(\"id\")->setAttribute(\"value\",$id); \n // Niveles de aspectos\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $o=new \\Nomina\\Model\\Entity\\Turnos($this->dbAdapter);\n $arreglo='';\n $turnos = $o->getRegistro(); \n foreach ($turnos as $dat){\n $idc=$dat['id'];$nom=$dat['codigo'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"tipo\")->setValueOptions($arreglo); \n $form->get(\"tipo1\")->setValueOptions($arreglo); \n $form->get(\"tipo2\")->setValueOptions($arreglo); \n $form->get(\"idCar\")->setValueOptions($arreglo); \n \n $d = new AlbumTable($this->dbAdapter);\n \n $valores=array\n (\n \"titulo\" => $this->tfor,\n \"form\" => $form,\n 'url' => $this->getRequest()->getBaseUrl(),\n 'id' => $id,\n 'datos' => $d->getGeneral1(\"select * from n_turnos_g where id =\".$id), \n \"lin\" => $this->lin\n ); \n // ------------------------ Fin valores del formulario \n \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n if ($request->isPost()) {\n// print_r($_POST);\n \n // Zona de validacion del fomrulario --------------------\n $album = new ValFormulario();\n $form->setInputFilter($album->getInputFilter()); \n $form->setData($request->getPost()); \n $form->setValidationGroup('nombre'); // ------------------------------------- 2 CAMPOS A VALDIAR DEL FORMULARIO (C) \n // Fin validacion de formulario ---------------------------\n if ($form->isValid()) {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u = new TurnosG($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n // INICIO DE TRANSACCIONES\n $connection = null;\n try \n {\n $connection = $this->dbAdapter->getDriver()->getConnection();\n $connection->beginTransaction(); \n\n $id = $u->actRegistro($data);\n $d = new AlbumTable($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $connection->commit();\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);// El 1 es para mostrar mensaje de guardado\n }// Fin try casth \n catch (\\Exception $e) \n {\n if ($connection instanceof \\Zend\\Db\\Adapter\\Driver\\ConnectionInterface) \n {\n $connection->rollback();\n echo $e;\n } \n /* Other error handling */\n }// FIN TRANSACCION // return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n }\n }\n //exit(); \n return new ViewModel($valores);\n \n }else{ \n if ($id > 0) // Cuando ya hay un registro asociado\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new TurnosG($this->dbAdapter); // ---------------------------------------------------------- 4 FUNCION DENTRO DEL MODELO (C) \n $datos = $u->getRegistroId($id);\n $n = $datos['nombre'];\n // Valores guardados\n $form->get(\"nombre\")->setAttribute(\"value\",\"$n\"); \n \n \n } \n return new ViewModel($valores);\n }\n }", "function readForm() {\n\t\t$this->FiscaalGroepID = $this->formHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->formHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->formHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->formHelper(\"GewijzigdOp\", \"\");\n\t}", "function muestraFormularioMetas(){\n $name = $titulo = $urlfolio = \"\";\n $folio = $random = 0;\n if($this->data['folio'] != \"\"){\n $tmp=explode('-',$this->data['folio']);\n if($this->opc == 9){\n $name=\"guardaAvance\";\n $arrayProyecto = $this->regresaDatosProyecto($tmp[0]);\n $folio = $tmp[0];\n $urlfolio=$this->data['folio'];\n $titulo=CAPTURAREPORTEDEMETAS;\n $random=rand(1,10000000);\n }\n else{\n $name=\"actualizaAvance\";\n $arrayProyecto = $this->regresaDatosProyecto($tmp[1]);\n $folio = $tmp[1];\n $urlfolio=$tmp[1].\"-\".$tmp[2];\n $random=$tmp[0];\n }\n $this->arrayNotificaciones = $this->notificaciones ();\n $titulo = $arrayProyecto['proyecto'];\n $resultados = $this->consultaActividades($this->pages->limit);\n $arrayDisabled = $this->recuperaPermisos($arrayProyecto['unidadResponsable_id'],$arrayProyecto['programa_id']); \n $trimestreId = $this->obtenTrimestre($arrayDisabled);\n $arrayUnidadOperativas=$this->catalogoUnidadesOperativas($this->db);\n\t\t\t$campoTrimestre=\"estatus_avance_entrega\";\n\t\t\tif($campoTrimestre > 1){\n\t\t\t\t$campoTrimestre=\"estatus_avance_entrega\".$campoTrimestre;\n\t\t\t}\n\t\t\t\n $this->buffer=\"\n <input type='hidden' name='noAtributos' id='noAtributos' value='\".( count($resultados) + 0).\"'>\n <input type='hidden' name='valueId' id='valueId' value='\".($this->arrayAvanceMetas['id'] + 0).\"'>\n <input type='hidden' name='folio' id='folio' value='\".$folio.\"'>\n <input type='hidden' name='random' id='random' value='\".$random.\"'>\n <input type='hidden' name='trimestreId' id='trimestreId' value='\".$trimestreId.\"'>\n <div class='panel panel-danger spancing'>\n <div class='panel-heading titulosBlanco'>\".$titulo.\"</div>\n <div class='panel-body'>\n <table align='center' border='0' class='table table-condensed'>\n <tr class='active alturaComponentesA'>\n <td class='tdleft' colspan='2' width='25%'>\".PROYECTO.\"</td>\n <td class='tdleft' colspan='2'>\".$arrayProyecto['proyecto'].\"</td>\n </tr>\n <tr class='alturaComponentesA'>\n <td class='tdleft' colspan='2' >\".UNIDADOPERATIVA.\"</td>\n <td class='tdleft' colspan='2'>\".$arrayUnidadOperativas[$arrayProyecto['unidadOperativaId']].\"</td>\n </tr>\n <tr class='alturaComponentesA'>\n <td class='tdleft' colspan='2' >\".TRIMESTRE.\"</td>\n <td class='tdleft' colspan='2'>\".$trimestreId.\"</td>\n </tr>\n \n </table>\n <table width='100%' class='table'>\n <tr>\n <td class='tdcenter fondotable' rowspan='2' width='30%'>\".ACTIVIDAD.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE1C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE2C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE3C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE4C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TOTAL.\"</td>\n <td class='tdcenter fondotable' rowspan='2' width='14%'>\".MEDIDA.\"</td>\n <td class='tdcenter fondotable' rowspan='2' width=' 8%'>\".ucfirst(substr(PONDERACION,0,4)).\"</td>\n <td class='tdcenter fondotable' rowspan='2' width=' 8%'>\".ucfirst(substr(TIPOACT,8,3)).\"</td>\n </tr>\n <tr>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n </tr>\";\n $contadorTab1=1;\n $contadorTab2=2;\n $contadorTab3=3;\n $contadorTab4=4; \n $contadorRen = $total = $totales = $rtotal = $rtotales = 0;\n $disabled_t1 = $disabled_t2 = $disabled_t3 = $disabled_t4 = \"\";\n $fondo_t1 = 'background-color:#ffff99;';\n $fondo_t2 = 'background-color:#ffff99;';\n $fondo_t3 = 'background-color:#ffff99;';\n $fondo_t4 = 'background-color:#ffff99;';\n if($arrayDisabled[1]['dis'] + 0 == 0){\n $disabled_t1=\" readonly ='true' \";\n $fondo_t1 = '';\n }\n if($arrayDisabled[2]['dis'] + 0 == 0){\n $disabled_t2=\" readonly ='true' \";\n $fondo_t2 = '';\n }\n if($arrayDisabled[3]['dis'] + 0 == 0){\n $disabled_t3=\" readonly ='true' \";\n $fondo_t3 = '';\n }\n if($arrayDisabled[4]['dis'] + 0 == 0){\n $disabled_t4=\" readonly ='true' \";\n $fondo_t4 = '';\n }\n $arrayEditable=array(1,3,4,6,7,8,9);\n \n foreach($resultados as $id => $resul){\n $rand = rand(1,99999999999999);\n $class=\"\";\n if($contador % 2 == 0)\n $class=\"active\";\n $campo=\"estatus_avance_entrega_t\".$trimestreId; \n $idEstatusActividad =$resul[$campo] ;\n $varTemporalId = $resul['id'].\"-\".$arrayProyecto['id'].\"-\".$trimestreId;\n $varTemporalIdE = $resul ['id'] . \"-\" . $arrayProyecto['id'].\"-\".$trimestreId.\"-\".$idEstatusActividad; \n $idact= $resul['id'];\n $totales = $totales + $this->arrayDatos[$idact][5] + 0;\n $tmp=\"\";\n \n if($resul['tipo_actividad_id'] != 0){\n $this->buffer.=\"\n <tr class=' $class alturaComponentesA'>\n <td class='tdleft' rowspan='2'>\".$resul['actividad'].\"</td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][1] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' tabindex='\".$contadorTab1.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab1.\"-1-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][1] + 0).\"' style='width:35px;$fondo_t1' \".$disabled_t1.\">\n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][2] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab2.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab2.\"-2-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][2] + 0).\"' style='width:35px;$fondo_t2' \".$disabled_t2.\"> \n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][3] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab3.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab3.\"-3-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][3] + 0).\"' style='width:35px;$fondo_t3' \".$disabled_t3.\">\n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][4] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab4.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab4.\"-4-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][4] + 0).\"' style='width:35px;$fondo_t4' \".$disabled_t4.\">\n </td>\n <td class='tdcenter' rowspan='2'>\n <span id='total\".$contadorRen.\"' class='totales'>\".number_format(($this->arrayDatos[$idact][1] + $this->arrayDatos[$idact][2] + $this->arrayDatos[$idact][3] + $this->arrayDatos[$idact][4] + 0),0,',','.').\"</span>\n </td>\n <td class='tdcenter' rowspan='2'>\n <span id='rtotal\".$contadorRen.\"' class='totales'>\".number_format($this->arrayAvanceMetas[$idact][1] + $this->arrayAvanceMetas[$idact][2] + $this->arrayAvanceMetas[$idact][3] +$this->arrayAvanceMetas[$idact][4],0,',','.').\"</span>\n </td>\n <td class='tdcenter'>\".$resul['medida'].\"</td>\n <td class='tdcenter'>\".$resul['ponderacion'].\"</td>\n <td class='tdcenter'>\".$resul['tipo_actividad_id'].\"</td>\n </tr>\n <tr>\n <td colspan='8' class='tdleft $class'>\".$this->regresaUltimoComentario($arrayProyecto['id'],$resul['id']).\"<br>\".$this->regresaNoAdjuntos($arrayProyecto['id'],$resul['id']).\"<span id='avance'></span></td>\";\n $rtotales = $rtotales + $this->arrayAvanceMetas[$idact][5]; \n if($this->session['rol'] == 1 || $this->session['rol'] >=3){\n $this->buffer.=\"<td class='tdcenter $class' colspan='3'>\"; \n if($this->session['rol'] == 1 || $this->session['rol'] >=4){\n $classb=\"mComentariosConsulta\";\n if(in_array($arrayProyecto[$campoTrimestre],$arrayEditable)){\n $classb=\"mComentarios\";\n }\n $this->buffer.=\"<button type='button' class='btn btn-success btn-sm $classb' id='\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'><span class='glyphicon glyphicon-pencil'></span>&nbsp;&nbsp;Comentarios</button>\";\n }\n if($this->session['rol'] >=3){\n $this->buffer.=\"<button type='button' class='btn btn-warning btn-sm masFile' id='m-\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'>&nbsp;&nbsp;M&aacute;s</button>\";\n }\n $this->buffer.=\"</td>\";\n }\n if($this->session['rol'] == 2){\n $this->buffer.=\"\n <td class='tdcenter $class'><button type='button' class='btn btn-success btn-sm mComentariosConsulta' id='\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'><span class='glyphicon glyphicon-pencil'></span>&nbsp;&nbsp;Comentarios</button></td>\n <td class='tdcenter $class'>\n <button type='button' class='btn btn-default aprobadosavances' data-toggle='tooltip' data-placement='bottom'\n title='\".PROYECTOAPROBADO.\"' id='aaa-\".$varTemporalIdE.\"'><span class='glyphicon glyphicon-ok'></span>\n </button>\n </td>\n <td class='tdcenter $class'>\n <button type='button' class='btn btn-default noaprobadosavances' data-toggle='tooltip' data-placement='bottom'\n title='\".PROYECTONOAPROBADO.\"' id='ann-\".$varTemporalIdE.\"'><span class='glyphicon glyphicon-remove'></span>\n </button></td>\";\n }\n \n \n $this->buffer.=\"</tr><tr><td colspan='11'>&nbsp;</td>\";\n if( ($idEstatusActividad!= 3) && ($idEstatusActividad!= 6) && ($idEstatusActividad!= 9)){\n $this->buffer .= \"<td class='tdleft' colspan='3' id='v-\".$varTemporalIdE.\"' style='background-color:\" . $this->arrayNotificaciones [$idEstatusActividad] ['color'] . \";color:#000000;'>\" . $this->arrayNotificaciones [$idEstatusActividad] ['nom'] . \"</td>\";\n }\n else{\n $this->buffer .= \"<td class='tdleft verComentariosNoAprobados' colspan='3' id='v-\".$varTemporalIdE.\"' style='cursor:pointer;background-color:\" . $this->arrayNotificaciones [$idEstatusActividad] ['color'] . \";color:#000000;' data-toggle='tooltip' data-placement='bottom' title='\" . TOOLTIPMUESTRACOMENTARIOS . \"'>\" . $this->arrayNotificaciones [$idEstatusActividad] ['nom'] . \"</td>\";\n }\n $this->buffer .= \"</tr>\";\n $contadorTab1 = $contadorTab1 + 4;\n $contadorTab2 = $contadorTab2 + 4;\n $contadorTab3 = $contadorTab3 + 4;\n $contadorTab4 = $contadorTab4 + 4;\n $contadorRen++;\n $contador++;\n }\n }\n $contadorTab4++;\n \n /*$this->buffer.=\"<tr><td colspan='8'></td>\n <td class='tdleft'>Total:</td><td class='tdcenter'><span id='totales' class='totales'>\".($totales + 0).\"</span></td>\n <td class='tdcenter'><span id='rtotales' class='totales'>\".($rtotales + 0).\"</span></td>\n <td colspan='3'>&nbsp;</td></tr></table>*/\n $this->buffer.=\"</table>\n </div>\n <div class=\\\"central\\\"><br>\"; \n if( (in_array($arrayProyecto[$campoTrimestre],$arrayEditable)) or ($this->session['rol']<=2 or $this->session['rol']<=5) ){\n \n $this->buffer.=\"<button type='button' tabindex='\".$contadorTab4.\"' class='btn btn-success btn-sm' id='\".$name.\"' name='\".$name.\"'><span class='glyphicon glyphicon-floppy-saved'></span>&nbsp;\".AGREGAREPORTEMETA.\"</button>&nbsp;&nbsp;\";\n }\n $this->buffer.=\"<button type='button' class='btn btn-primary btn-sm'\n onclick=\\\"location='\".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=0'\\\">\".REGRESA.\"</button>\n </div>\".$this->procesando(4).\"<br></div>\";\n }else{\n header(\"Location: \".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=1\");\n } \n }", "abstract function form();", "protected function createComponentNastaveniUraduForm()\n {\n\n $client_config = GlobalVariables::get('client_config');\n $Urad = $client_config->urad;\n $stat_select = Subjekt::stat();\n\n\n $form1 = new Form();\n $form1->addText('nazev', 'Název:', 50, 100)\n ->setValue($Urad->nazev)\n ->addRule(Nette\\Forms\\Form::FILLED, 'Název úřadu musí být vyplněn.');\n $form1->addText('plny_nazev', 'Plný název:', 50, 200)\n ->setValue($Urad->plny_nazev);\n $form1->addText('zkratka', 'Zkratka:', 15, 30)\n ->setValue($Urad->zkratka)\n ->addRule(Nette\\Forms\\Form::FILLED, 'Zkratka úřadu musí být vyplněna.');\n\n $form1->addText('ulice', 'Ulice:', 50, 100)\n ->setValue($Urad->adresa->ulice);\n $form1->addText('mesto', 'Město:', 50, 100)\n ->setValue($Urad->adresa->mesto);\n $form1->addText('psc', 'PSČ:', 12, 50)\n ->setValue($Urad->adresa->psc);\n $form1->addSelect('stat', 'Stát:', $stat_select)\n ->setValue($Urad->adresa->stat);\n\n $form1->addText('ic', 'IČ:', 20, 50)\n ->setValue($Urad->firma->ico);\n $form1->addText('dic', 'DIČ:', 20, 50)\n ->setValue($Urad->firma->dic);\n\n $form1->addText('telefon', 'Telefon:', 50, 100)\n ->setValue($Urad->kontakt->telefon);\n $form1->addText('email', 'E-mail:', 50, 100)\n ->setValue($Urad->kontakt->email);\n $form1->addText('www', 'URL:', 50, 150)\n ->setValue($Urad->kontakt->www);\n\n\n $form1->addSubmit('upravit', 'Uložit')\n ->onClick[] = array($this, 'nastavitUradClicked');\n $form1->addSubmit('storno', 'Zrušit')\n ->setValidationScope(FALSE)\n ->onClick[] = array($this, 'stornoClicked');\n\n return $form1;\n }", "abstract function setupform();", "public function get_form($metodo,$usuario,$form,$data=0,$ciclo=1,$codSubM=null,$cMet=\"\"){\n #traemos el formulario\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaFormulario($form,$usuario,$data,$ciclo,$codSubM,$this->_modulo,'\".$cMet.\"') as formulario; \";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) {\t\t\t\t\n $this->_formulario[] = $va;\n if($this->_formulario[0]['formulario'] == ''){\t\t\t\t\n $mensjFrm = getMenssage('danger','Ocurrio un error','No tiene permisos para acceder a esta opcion. ');\n $this->_formulario[0] = array('formulario'=>$mensjFrm);\n }\n }\n }\t\n #traemos el formulario modal\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaFormularioModal($form,$usuario) as modal; \";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) { \n $this->_formulario_modal[] = $va;\n if($this->_formulario_modal[0]['modal'] == ''){ \n $mensjFrm = '';\n $this->_formulario_modal[0] = array('modal'=>$mensjFrm);\n }\n }\n } \n #traemos la ayuda del form\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaAyudaFormulario($form,$usuario,1) as formulario_ayuda\";\n $this->get_results_from_query();\n if (count($this->rows) >= 1) {\n foreach ($this->rows as $pro => $va) {\n $this->_formulario_ayuda[] = $va;\n if ($this->_formulario_ayuda[0]['formulario_ayuda'] == '') {\n $mensjFrm = getMenssage('info', 'Ocurrio un error', 'No hay ayuda registrada para este proceso,consulte al administrador del sistema. ');\n $this->_formulario_ayuda[0] = array('formulario_ayuda' => $mensjFrm);\n }\n }\n }\n #Traemos los botones por formulario y usuario\n ModeloFacturacion::get_boton($metodo,$usuario,$form,$cMet);\n }", "public function addform() {\n require_once 'modeles/etudiant_modele.php';\n require_once 'vues/etudiants/etudiants_addform_vue.php';\n }", "public function getEditForm();", "public function getForm()\n {\n \t$niches = Niche::all();\n\n $sources = Source::all();\n $fields = Field::all();\n \treturn view('ideas.form')->with([\n 'niches'=>$niches,\n 'sources'=>$sources,\n 'fields'=>$fields\n ]);\n }", "public function listforms()\n {\n\t\t\n }", "public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}", "public function listiAction()\n {\n $form = new Formulario(\"form\");\n $id = (int) $this->params()->fromRoute('id', 0);\n $form->get(\"id\")->setAttribute(\"value\",$id); \n if($this->getRequest()->isPost()) \n {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Zona de validacion del fomrulario --------------------\n $album = new ValFormulario();\n //$form->setInputFilter($album->getInputFilter()); \n //$form->setData($request->getPost()); \n //$form->setValidationGroup('nombre'); // ------------------------------------- 2 CAMPOS A VALDIAR DEL FORMULARIO (C) \n // Fin validacion de formulario ---------------------------\n //if ($form->isValid()) {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d = new AlbumTable($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n $d->modGeneral(\"insert into n_turnos_g_h (idTur, idHor)\n values(\".$data->id.\", \".$data->tipo.\")\");\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'i/'.$id);\n //}\n }\n } \n$this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter'); \n $o=new \\Nomina\\Model\\Entity\\Turnos($this->dbAdapter);\n $form->get(\"id\")->setAttribute(\"value\",\"$id\"); \n $form->get(\"ubicacion\")->setValueOptions(array('1'=>'Encabezado')); \n $arreglo='';\n $turnos = $o->getRegistro(); \n foreach ($turnos as $dat){\n $idc=$dat['id'];$nom=$dat['codigo'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"tipo\")->setValueOptions($arreglo); \n\n $d = new AlbumTable($this->dbAdapter); \n $datos = $d->getGeneral1(\"Select * from n_turnos_g where id=\".$id);\n $valores=array\n (\n \"titulo\" => 'Horarios del turno '.$datos['nombre'],\n \"datos\" => $d->getTurnoHorarios($id), \n \"ttablas\" => 'dia, Tipo, Ok,Eliminar',\n 'url' => $this->getRequest()->getBaseUrl(),\n \"form\" => $form, \n \"lin\" => $this->lin,\n \"id\" => $id,\n ); \n return new ViewModel($valores); \n }", "function _GetFrm(){\n\t\t// Valido\n\t\tif(!isset($_POST['diagramacion']) || $_POST['diagramacion'] == 0){\n\t\t\t$this->Error .= \"Es requerido seleccionar una diagramación.\\n\";\n\t\t}\n\t\tif(trim($_POST['titulo']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un título de noticia.\\n\";\n\t\t}\n\t\tif(trim($_POST['copete']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un texto inicial de noticia.\\n\";\n\t\t}\n\t\tif(trim($_POST['cuerpo']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un texto principal de noticia.\\n\";\n\t\t}\n\t\tif($this->Error == \"\"){\n\t\t\t// Cargo desde el formulario\n\t\t\t$this->Registro['id_noticia'] = $_POST['id_noticia'];\n\t\t\t$this->Registro['diagramacion'] = addslashes($_POST['diagramacion']);\n\t\t\t$this->Registro['titulo'] = addslashes($_POST['titulo']);\n\t\t\t$this->Registro['copete'] = addslashes($_POST['copete']);\n\t\t\t$this->Registro['cuerpo'] = stripslashes($_POST['cuerpo']);\n\t\t\t$this->Registro['visible'] = $_POST['visible'] ? 1 : 0;\n\t\t\tif($this->Registro['id_noticia'] == \"\"){\n\t\t\t\t$this->Registro['fecha_creacion'] = date('Y').\"-\".date('m').\"-\".date('d').\" \".date('H').\":\".date('i').\":00\";\n\t\t\t}\n\t\t}\n\t}", "function mostrarFormulario($tipo){\n $cod_proyecto = $this->proyecto[0][0]; \n $nom_proyecto = $this->proyecto[0][1]; \n $indice=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n $ruta=\"pagina=admin_homologacionTransferenciaInterna\";\n $ruta.=\"&opcion=realizarHomologacionTransferenciaInterna\";\n $ruta.=\"&cod_proyecto=\".$cod_proyecto;\n \n\n ?>\n <script src=\"<? echo $this->configuracion[\"host\"]. $this->configuracion[\"site\"]. $this->configuracion[\"javascript\"] ?>/funciones.js\" type=\"text/javascript\" language=\"javascript\"></script>\n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<? echo $this->formulario ?>'>\n \n <div align=\"center\" ><b><?echo \"HOMOLOGACIONES POR TRANSFERENCIA INTERNA - \".$cod_proyecto.\" \".$nom_proyecto; ?></b></div><hr>\n <table>\n <tr id=\"fila\" >\n <td class=\"sigma centrar\" colspan=\"6\" width=\"100%\">Seleccione el n&uacute;mero de estudiantes:\n <select id=\"filas\" name=\"filas\" onchange=\"removeLastRow(),nuevaFila(document.getElementById('filas').value-1,<?echo $_REQUEST['cod_proyecto']?>)\">\n <?$opciones=1?>\n <option selected class=\"boton\" value=\"1\" onClick=\"removeLastRow(),nuevaFila(0,<?echo $_REQUEST['cod_proyecto']?>)\">1</option>\n <?for($opciones=5;$opciones<=50;$opciones+=5){?>\n <option id=\"<?echo $opciones-1?>\" class=\"boton\" value=\"<?echo $opciones?>\"><?echo $opciones?></option>\n <?}?>\n </select>&nbsp;&nbsp;\n <?//opciones para agregar 1 estudiante y opcion para borrar todas las filas?>\n <input type=\"button\" value=\"Adicionar filas\" onClick=\"nuevaFila(1,<?echo $_REQUEST['cod_proyecto']?>)\" alt=\"Adicionar\">\n <input type=\"button\" value=\"Reiniciar filas\" onClick=\"removeLastRow()\" alt=\"Remover\">\n <input type=\"button\" value=\"Borrar fila\" onClick=\"removeLastestRow()\" alt=\"Remover\">\n </td>\n </tr></table>\n <table id=\"tabla\" class=\"contenidotabla\" width=\"100%\">\n \n <?//opciones para agregar 5,10,15...50 estudiantes?>\n\n <thead class='sigma'>\n <th class='niveles centrar' > Código Actual</th>\n <th class='niveles centrar' > Estudiante</th>\n <th class='niveles centrar' > Código Proyecto Curricular Anterior</th>\n <th class='niveles centrar' > Proyecto Curricular Anterior</th>\n </thead>\n <tr >\n <td width=\"13%\" class='cuadro_plano centrar'>\n 1 <input type=\"text\" id=\"codEstudiante0\" name=\"codEstudiante[0]\" size=\"11\" onKeyPress=\"return solo_numero(event)\" onBlur=\"xajax_nombreEstudiante(document.getElementById('codEstudiante0').value,0,<? echo $cod_proyecto;?>)\">\n <input type=\"hidden\" name=\"opcion\" value=\"registrar\">\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->formulario ?>\">\n <input type=\"hidden\" name=\"tipo_homologacion\" value=\"estudiantes\">\n <input type=\"hidden\" name=\"cod_proyecto\" value=\"<? echo $cod_proyecto; ?>\">\n </td>\n <td width=\"20%\" class='cuadro_plano centrar'>\n <div id=\"div_nombreEstudiante0\" ></div>\n </td>\n <td width=\"17%\" class='cuadro_plano centrar'>\n <input type=\"text\" id=\"codProyectoAnt0\" name=\"codProyectoAnt[0]\" size=\"11\" maxlength='3' onKeyPress=\"return solo_numero(event)\" onBlur=\"xajax_nombreProyecto(document.getElementById('codProyectoAnt0').value,0)\">\n </td>\n \n </td>\n <td width=\"30%\" class='cuadro_plano centrar'>\n <div id=\"div_proyectoAnt0\" ></div>\n </td>\n\n </tr>\n </table>\n <table width=\"100%\">\n <tr>\n <td align=\"center\">\n <input type=\"button\" value=\"Registrar\" onclick=\"if(verificarFormulario(<?echo $this->formulario?>)){document.forms['<? echo $this->formulario?>'].submit()}else{false}\">\n </td>\n </tr>\n </table>\n </form>\n<?\n \n }", "function mostrarFormulario(){\n\n echo \"<br><br>\";\n echo \"<h2>FORMULARIO PARA ALUMNOS</h2>\"; \n?>\n\n <form method=\"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n Matricula: <input type=\"text\" name=\"matricula\" value=\"<?php echo $this->matricula;?>\">\n <br><br>\n Nombre: <input type=\"text\" name=\"nombree\" value=\"<?php echo $this->nombre;?>\">\n <br><br>\n Carrera: <input type=\"text\" name=\"carreraa\" value=\"<?php echo $this->carrera;?>\">\n <br><br>\n <span class=\"error\">* <?php echo $this->nameErr;?></span>\n <br><br>\n E-mail: <input type=\"text\" name=\"email\" value=\"<?php echo $this->email;?>\">\n <span class=\"error\">* <?php echo $this->emailErr;?></span>\n <br><br>\n Telefono: <input type=\"tel\" name=\"telefonoo\"value=\"<?php echo $this->telefono;?>\">\n <br><br>\n <input type=\"submit\" name=\"submitt\" value=\"Submit\">\n </form>\n\n<?php\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "function formulario(){\n\t\tglobal $main_menu, $usuarioid, $username, $ruta, $controller, $funcion, $subfuncion, $modulos_totales;\n\n\t\t$main_view=false;\n\t\t$data['username']=$username;\n\t\t$data['usuarioid']=$usuarioid;\n\t\t$data['modulos_totales']=$modulos_totales;\n\t\t$data['colect1']=$main_menu;\n\t\t$data['title']=$this->accion->get_title(\"$subfuncion\");\n\t\t$accion_id=$this->accion->get_id(\"$subfuncion\");\n\t\t$row=$this->usuario->get_usuario($usuarioid);\n\t\t$grupoid=$row->grupo_id;\n\t\t$puestoid=$row->puesto_id;\n\t\t$data['ruta']=$ruta;\n\t\t$data['controller']=$controller;\n\t\t$data['funcion']=$funcion;\n\t\t$data['subfuncion']=$subfuncion;\n\t\t$data['permisos']=$this->usuario_accion->get_permiso($accion_id, $usuarioid, $puestoid, $grupoid);\n\n\t\t//Validacion del arreglo del menu, usuarioid y permisos especificos\n\t\tif(is_array($data['colect1']) and $usuarioid>0 and $data['permisos']!= false and $this->session->userdata('logged_in') == TRUE){\n\n\t\t\t$main_view=true;\n\t\t\tif ($subfuncion==\"rep_general_recetas\"){\n\t\t\t\t//Cargar los datos para el formulario\n\t\t\t\t$data['frames']=1;\n\t\t\t\t$data['recetas'] = $this->receta->get_recetas_pdf();\n\t\t\t\tif ($data['recetas']){\n\t\t\t\t\t$this->load->view(\"produccion/rep_general_recetas_pdf\", $data);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo \"<html> <script>alert(\\\"No hay aun Registros de Recetas en la Base de Datos favor de verificar.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/produccion/menu';</script></html>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($subfuncion==\"rep_etiquetas_codigo_barras\"){\n\t\t\t\t$data['principal']=$ruta.\"/\".$subfuncion;\n\t\t\t\t$data['title']=\"Impresi�n de Etiquetas con C�digo de Barras\";\n\t\t\t\t$data['productos']=$this->producto->get_cproductos_etiquetas();\n\t\t\t}\n\t\t}\n\t\tif($main_view){\n\t\t\t//Llamar a la vista\n\t\t\t$this->load->view(\"ingreso\", $data);\n\t\t} else {\n\t\t\tredirect(base_url().\"index.php/inicio/logout\");\n\t\t}\n\t}", "abstract public function getForm() : void;", "public function form(){\n\n }", "function geraClasseValidadorFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.ValidadorFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoValidaFormularioCadastro.tpl');\n\n # abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $aModeloFinal = array();\n \n # varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeClasse = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # ==== varre a estrutura dos campos da tabela em questao ====\n $camposForm = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n # processa nome original da tabela estrangeira\n $nomeFKClasse = (string)$oCampo->FKTABELA;\n $objetoFKClasse = \"\\$o$nomeFKClasse\";\n\n $nomeCampo = $nomeCampoOriginal;\n //$nomeCampo = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n $label = ($nomeFKClasse != '') ? ucfirst(strtolower($nomeFKClasse)) : ucfirst(str_replace($nomeClasse,\"\",$nomeCampoOriginal));;\t\t\t\t\t\n $camposForm[] = ((int)$oCampo->CHAVE == 1) ? \"if(\\$acao == 2){\\n\\t\\t\\tif(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\" : \"if(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\treturn false;\\n\\t\\t}\\t\";\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis já processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) mkdir($dir);\n\n $fp = fopen(\"$dir/class.ValidadorFormulario.php\",\"w\"); fputs($fp, $modeloFinal); fclose($fp);\n\n return true;\t\n }", "public function getAddForm();", "public static function getForm();", "function chargeForm($form,$label,$titre){\n\n \t\t$liste = $this->getAll();\n \t\t$array[0] = \"\";\n \t\tfor ($i = 0; $i < count($liste); $i++)\n \t{\n \t\t$j = $liste[$i]->role_id;\n \t\t$array[$j] = $liste[$i]->role_name;\n \t\t//echo 'array['.$j.'] = '.$array[$j].'<br>';\n \t}\n \t\t$s = & $form->createElement('select',$label,$titre);\n \t\t$s->loadArray($array);\n \t\treturn $s;\n \t}", "public function buildForm()\n {\n }", "function formulario($id = NULL, $ie = NULL)\n\t{\t\t\t\n\t\tif ($id == 0)\n\t\t{\n\t\t\t$id = NULL;\n\t\t}\n\t\t\n\t\t$data['id'] = NULL;\n\t\t$data['titulo'] = NULL;\n\t\t$data['texto'] = NULL;\n\t\t$data['tags'] = NULL;\n\t\t$data['doclink'] = NULL;\t\t\n\t\t$data['categorias_selected'] = NULL;\n\t\t$data['files'] = NULL;\n\t\t$data['localizar'] = 'peru';\n\t\t$data['ie6'] = $ie != NULL ? TRUE:$this->_is_ie6();\n\t\t$data['has_category'] = FALSE; \n\t\t//$data['ie6'] = $this->_is_ie6();\n\t\t\n\t\t$this->load->library('combofiller');\n\t\t\n\t\t$data['categorias'] = $this->combofiller->categorias();\n\t\t$data['categorias_selected'] = NULL;\n\t\t\n\t\t$data['departamentos'] = $this->combofiller->states(TRUE);\t\n\t\t$data['departamentos_selected'] = NULL;\n\t\t$data['provincias_selected'] = NULL;\n\t\t$data['distritos_selected'] = NULL;\n\t\t\t\n\t\t$data['paices'] = $this->combofiller->countries(TRUE);\n\t\t$data['paices_selected'] = NULL;\t\n\t\t\n\t\tif ($id != NULL)\n\t\t{\n\t\t\t$data = $this->_show($id, $data);\n\t\t}\n\t\t$data['form'] = $this->form;\n\t\t\n\t\t\n\t\t\n\t\t$this->load->helper('form');\n\t\t$this->load->library('form_validation');\n\t\t$this->load->view('videos/video', $data);\n\t\t\n\t\t\t \n\t\t\n\t\t$this->__destruct();\t\t\n\t}", "public function form() {\n\t\treturn array();\n\t}", "public function createForm()\n {\n }", "function mostrarFormulario()\r\n{\r\n\tglobal $use;\r\n\tglobal $priv;\r\n\r\n\tif(!isset($_GET['num_soc']))\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se recibió num_soc como parametro de la función\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use'));\t\r\n\t\treturn;\r\n\t}\r\n\r\n\t\r\n\tif(!isset($_GET['cod_servicio']))\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se recibió cod_servicio como parametro de la función\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t\r\n\t$numero_socio = $_GET['num_soc'];\r\n\t$cod_servicio = $_GET['cod_servicio'];\r\n\r\n\t$resultado = $GLOBALS['db']->select(\"SELECT * FROM socios, persona\r\n\t\t\t\t\t\t\t\t\t\tWHERE socios.numero_soc = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t\tAND socios.id_persona=persona.id_persona\");\r\n\r\n\t$id_persona;\r\n\tif($resultado)\r\n\t{\r\n\t\tdate_default_timezone_set('America/Argentina/Catamarca');\r\n\t\t$fecha['year']=date(\"Y\");\r\n\t\t$fecha['mon']=date(\"m\");\r\n\t\t$fecha['mday']=date(\"d\");\r\n\t\t$fecha['hours']=date(\"H\");\r\n\t\t$fecha['minutes']=date(\"i\");\r\n\t\tforeach($resultado as $res)\r\n\t\t{\r\n\t\t\t$persona =[\r\n\t\t\t\t\t'nro'\t\t=>\t$res['numero_soc'],\r\n\t\t\t\t\t'sexo'\t\t=>\t$res['sexo'],\r\n\t\t\t\t\t'nombre'\t=>\t$res['nombre'],\r\n\t\t\t\t\t'doc' \t\t=>\t$res['numdoc'],\r\n\t\t\t\t\t'tel' \t\t=>\t$res['tel_fijo'],\r\n\t\t\t\t\t'cel'\t\t=>\t$res['tel_cel'],\r\n\t\t\t\t\t'fecha' \t=>\t$fecha,\r\n\t\t\t\t\t'dom'\t\t=>\t$res['domicilio'],\r\n\t\t\t\t\t'nro_casa'\t\t=>\t$res['casa_nro'],\r\n\t\t\t\t\t'barrio'\t\t=>\t$res['barrio'],\r\n\t\t\t\t\t'localidad'\t\t=>\t$res['localidad'],\r\n\t\t\t\t\t'cod_postal'\t\t=>\t$res['codpostal'],\r\n\t\t\t\t\t'dpmto'\t\t=>\t$res['dpmto'],\r\n\t\t\t\t\t'cod_serv'\t=>\t$cod_servicio,\r\n\t\t\t\t\t'id_persona' => $res['id_persona']\r\n\t\t\t\t\t];\r\n\t\t\tif($res['numero_soc']==$res['soc_titula'])\r\n\t\t\t{\r\n\t\t\t\t$persona['doctit'] = $res['numdoc'];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$soc_titular=$res['soc_titula'];\r\n\t\t\t\t$resultado2 = $GLOBALS['db']->select(\"SELECT * FROM socios, persona\r\n\t\t\t\t\t\t\t\t\t\tWHERE socios.numero_soc='$soc_titular'\r\n\t\t\t\t\t\t\t\t\t\tAND persona.id_persona=socios.id_persona\");\r\n\t\t\t\tforeach($resultado2 as $res2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$persona['doctit'] = $res2['numdoc'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$id_persona=$res['id_persona'];\r\n\t\t}\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se encontraron datos para el socio '$numero_socio'\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$resultado_historia = $GLOBALS['db']->select(\"SELECT * FROM historia_clinica\r\n\t\t\t\t\t\t\t\t\t\tWHERE id_persona='$id_persona'\");\r\n\tif($resultado_historia){\r\n\t\tforeach($resultado_historia as $res_historia){\r\n\t\t\t$historia =[\r\n\t\t\t\t\t'paperas'\t\t=>\t$res_historia['paperas'],\r\n\t\t\t\t\t'rubeola'\t\t=>\t$res_historia['rubeola'],\r\n\t\t\t\t\t'varicela'\t=>\t$res_historia['varicela'],\r\n\t\t\t\t\t'epilepsia' \t\t=>\t$res_historia['epilepsia'],\r\n\t\t\t\t\t'hepatitis' \t\t=>\t$res_historia['hepatitis'],\r\n\t\t\t\t\t'sinusitis'\t\t=>\t$res_historia['sinusitis'],\r\n\t\t\t\t\t'diabetes' \t=>\t$res_historia['diabetes'],\r\n\t\t\t\t\t'apendicitis'\t\t=>\t$res_historia['apendicitis'],\r\n\t\t\t\t\t'amigdalitis'\t\t=>\t$res_historia['amigdalitis'],\r\n\t\t\t\t\t'comidas'\t\t=>\t$res_historia['comidas'],\r\n\t\t\t\t\t'medicamentos'\t\t=>\t$res_historia['medicamentos'],\r\n\t\t\t\t\t'otras'\t\t=>\t$res_historia['otras'],\r\n\t\t\t\t\t];\r\n\t\t\t\t\t\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\t$historia =[\r\n\t\t\t\t'paperas'\t\t=>\t0,\r\n\t\t\t\t'rubeola'\t\t=>\t0,\r\n\t\t\t\t'varicela'\t=>\t0,\r\n\t\t\t\t'epilepsia' \t\t=>\t0,\r\n\t\t\t\t'hepatitis' \t\t=>\t0,\r\n\t\t\t\t'sinusitis'\t\t=>\t0,\r\n\t\t\t\t'diabetes' \t=>\t0,\r\n\t\t\t\t'apendicitis'\t\t=>\t0,\r\n\t\t\t\t'amigdalitis'\t\t=>\t0,\r\n\t\t\t\t'comidas'\t\t=>\t'',\r\n\t\t\t\t'medicamentos'\t\t=>\t'',\r\n\t\t\t\t'otras'\t\t=>\t'',\r\n\t\t\t\t];\r\n\t}\r\n\r\n\t$profesionales = $GLOBALS['db']->select(\"SELECT * FROM profesionales,persona_sistema\r\n\t\t\t\t\t\t\t\t\t\tWHERE profesionales.id_persona = persona_sistema.id_persona\");\r\n\r\n\tif(!$profesionales){\r\n\t\t$error=[\r\n\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t'descripcion'\t=>\"No hay ningun profesional que pueda realizar la atención\"\r\n\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\r\n\techo $GLOBALS['twig']->render('/Atenciones/nueva_atencion_formulario.html', compact('persona','historia','profesionales','use','priv'));\r\n}", "private function IndexValidacionFormulario() {\n\t\t\t$Val = new NeuralJQueryFormularioValidacion(true, true, false);\n\t\t\t$Val->Requerido('AVISO', 'Debe Ingresar el Número del Aviso');\n\t\t\t$Val->Numero('AVISO', 'El Aviso debe Ser Numérico');\n\t\t\t$Val->CantMaxCaracteres('AVISO', 10, 'Debe ingresar aviso con 10 Números');\n\t\t\t$Val->Requerido('PRIORIDAD', 'Debe Seleccionar una Opción');\n\t\t\t$Val->Requerido('RAZON', 'Debe Seleccionar una Opción');\n\t\t\t$Val->Requerido('REGIONAL[]', 'Seleccione la Regional a Reportar');\n\t\t\t$Val->Requerido('NODO', 'Debe ingresar el Nodo al que pertenece la Matriz');\n\t\t\t$Val->Requerido('HORAFIN', 'Defina la fecha-hora que termina el Aviso');\n\t\t\t$Val->Requerido('MATRIZ', 'Debe informar el Número de la Matriz');\n\t\t\t$Val->ControlEnvio('peticionAjax(\"FormularioGuion\", \"Respuesta\");');\n\t\t\treturn $Val->Constructor('FormularioGuion');\n\t\t}", "public function listAction()\n {\n $form = new Formulario(\"form\"); \n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d = new AlbumTable($this->dbAdapter); // ---------------------------------------------------------- 1 FUNCION DENTRO DEL MODELO (C)\n\n $t = new LogFunc($this->dbAdapter);\n $dt = $t->getDatLog();\n\n $dat = $d->getGeneral1(\"select id \n from n_supervisores \n where idEmp = \".$dt['idEmp']) ; \n $idSup = $dat['id'];\n $dat = $d->getGeneral1(\"select id, cedEmp, nombre, apellido \n from a_empleados \n where id = \".$dt['idEmp']) ; \n $super = ' Coordinador : ('.$dat['nombre'].' '.$dat['apellido'].')';\n $datP = $d->getProgramaPeriodo();\n // Supervisores\n $arreglo='';\n $datos = $d->getSupervisoresNombresActivos(''); \n $sw = 0; \n foreach ($datos as $dat)\n {\n $idc=$dat['id'];$nom = $dat['nomComp'];\n if ($sw == 0)\n {\n $sw = $dat['id'];\n }\n $arreglo[$idc]= $nom;\n } \n $form->get(\"tipoC\")->setValueOptions($arreglo); \n $form->get(\"tipoC\")->setAttribute(\"value\", $sw); \n\n // Puestos\n $arreglo='';\n //if ( $dt['admin'] == 1 )\n // $datos = $d->getPuesSuper(' '); \n //else \n $datos = $d->getPuesSuper(' and f.idEmp = '.$dt['idEmp']); \n $sw = 0; \n foreach ($datos as $dat)\n {\n $idc=$dat['id'];$nom = $dat['nombre'];\n if ($sw == 0)\n {\n $sw = $dat['id'];\n }\n $arreglo[$idc]= $nom;\n } \n if ( $arreglo != '' ) \n $form->get(\"tipo\")->setValueOptions($arreglo); \n //$form->get(\"tipoC\")->setAttribute(\"value\", $sw); \n\n\n $valores=array\n (\n \"titulo\" => $this->tlis.' de '.$datP['mes'].' del '.$datP['ano'].$super ,\n \"ttablas\" => $this->ttab,\n \"form\" => $form,\n 'url' => $this->getRequest()->getBaseUrl(), \n \"idUsu\" => $idSup,\n \"lin\" => $this->lin\n ); \n $view = new ViewModel($valores); \n $this->layout('layout/layoutTurnos'); \n return $view; \n \n }", "public function formularioNuevo(){\n\t\t$template = file_get_contents('tpl/proyecto_form_tpl.html');\n\t\t$tipos = $this->listaTipos();\n\t\t$tipos_proy = '<select name=\"tipo_proyecto\" size=\"1\" size=\"10\" id=\"tipo_proyecto\">';\n\t\tforeach($tipos as $key => $tipo){\n\t\t\t$tipos_proy = $tipos_proy.'<option value=\"'.utf8_encode($tipo['gral_param_propios']['GRAL_PAR_PRO_COD']).'\">'.\n\t\t\t\t\t\t utf8_encode($tipo['gral_param_propios']['GRAL_PAR_PRO_DESC']).'</option>';\n\t\t}\n\t\t$tipos_proy = $tipos_proy.'</select >';\n\t\t$template = str_replace('{proyecto_tipo}', $tipos_proy, $template);\n print($template);\n\t}", "function form_mostrar($conp,$nreg,$pg,$bo,$filtro,$arc,$pefedi,$pefeli){\n\t\t$mempresa = new mempresa();\n\t\t$pa = new mpaginacion();\n\t\t$txt = '';\n\t\t//Creamos el cuadro de buscar (filtros-Busquedas)\n\t\t$txt .= \"<table>\";\n\t\t\t//Una Fila\n\t\t\t$txt .= \"<tr>\";\n\t\t\t\t//1ra Columna - Formulario buscar\n\t\t\t\t$txt .= '<td>';\n\t\t\t\t$txt .= '<form id=\"formfil\" name=\"frmfil\" method=\"GET\" action=\"'.$arc.'\" class=\"txtbold\">';\n\t\t\t\t$txt .= '<input name=\"pg\" type=\"hidden\" value=\"'.$pg.'\" />';\n\t\t\t$txt .= '<input class=\"search-box\" type=\"text\" name=\"filtro\" value=\"'.$filtro.'\" placeholder=\"Nombre De Empresa\"\n\t\t\t\t\tonChange=\"this.form.submit();\">';\n\t\t\t\t\t$txt .= '<label for=\"search-box\"><span class=\"glyphicon fas fa-search search-icon\"></span></label>';\n\t\t\t\t$txt .= '</form>';\n\t\t\t$txt .= '</td>';\n\t\t\t\t//2da Columna control de paginacion\n\t\t\t\t$txt .= \"<td align='right' style='padding-left: 10px;'>\";\n\t\t\t\t\t$bo = \"<input type='hidden' name='filtro' value='\".$filtro.\"' />\";\n\t\t\t\t\t//Llamamos el metodo de contar la cantida de paginas\n\t\t\t\t\t$txt .= $pa->spag($conp,$nreg,$pg,$bo,$arc);\n\t\t\t\t\t//Llamar los datos para completar la paginacion\n\t\t\t\t\t$result = $mempresa->sel_empresa($filtro,$pa->rvalini(),$pa->rvalfin());\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t//Cierre Fila\n\t\t\t$txt .= \"</tr>\";\n\t\t$txt .= \"</table>\";\n\t\t\n\t\tif($result){\n\t\t$txt .= '<div class=\"cuad1\" style=\"width: 90%; \">';\n\t\t\t$txt .= '<table1 width=\"100%\" cellspacing=\"0px\" align=\"center\">';\n\t\t\t\t\t\t\t$txt .= \"<table class='table table-hover'>\";\n\t\t\t\t//Inicio de la (Cabecera_Tb)\t\t\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Foto';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Empresa';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t//Cierre de la (Cabecera_Tb)\n\t\t\t\tforeach ($result as $f) {\n\t\t\t\t//Inicio ROW - Datos de la tabla\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\n\t\t\t\t\t$txt .= '<img src=\"'.$f['logemp'].'\" width=\"25px\" />';\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= \"<td class='active lefi'>\";\n\t\t\t\t\t$txt .= \"<span style='font-size: 20px;'><strong>\".$f['nitemp'].\" - \".$f['razsocialemp'].\"</strong></span>\";\n\t\t\t\t\t$txt .= \"<br><strong>Sede: </strong>\".$f['sedecentemp'];\n\t\t\t\t\t$txt .= \"<br><strong>Email: </strong>\".$f['emailemp'];\n\t\t\t\t\t$txt .= \"<br><strong>Telefono: </strong>\".$f['telemp'];\n\t\t\t\t\t$txt .= \"</td>\";\n\t\t\t\t\t\t//ICONOS-MOdificar (Boton)\n\t\t\t\t\t\t$txt .= \"<td class='warning' align='center'>\";\n\t\t\t\t\t\t$txt .= \"<a href='home.php?pg=002&idemp=\".$f['idemp'].\"'><ul class='social-icons icon-circle icon-zoom list-unstyled list-inline'><li><i class='fas fa-pen' title='Actualizar'></i></li></ul></a>\";\n\t\t\t\t\t\t//ICONOS-Eliminar (Boton)\n\t\t\t\t\t\t$txt .= \"<a href='home.php?pg=002&del=\".$f['idemp'].\"'><ul class='social-icons icon-circle icon-zoom list-unstyled list-inline'><li><i class='fas fa-times' title='Eliminar'></i></li></ul></td></a>\";\t\n\t\t\t\t\t\t$txt .= \"</td>\";\n\n\t\t\t\t//Cierre ROW - Datos de la tabla\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t}\n\t\t\t$txt .= '</table>';\n\t\t\t$txt .= '<BR>';\n\t\t\t\t\t$txt .= '<BR>';\n\t\t\t\t\t$txt .= '<BR>';\n\t\t$txt .= '</div>';\n\t\t}else{\n\t\t$txt .= '<div class=\"cuad\" style=\"width: 90%;\">';\n\t\t$txt .= '<h3>No existen datos registrado en la base de datos...</h3>';\n\t\t$txt .= '</div>';\t\t\n\t}\n\t\techo $txt;\n\t}", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "function mostrarFormularioProyecto(){\n include_once($this->configuracion[\"raiz_documento\"] . $this->configuracion[\"clases\"] . \"/html.class.php\");\n $html = new html();\n $this->verificar = \"seleccion_valida(\".$this->formulario2.\",'cod_proyecto')\";\n \n //$cod_proyecto = $this->proyecto[0][0]; \n //$nom_proyecto = $this->proyecto[0][1];\n $tmp_proyectos = $this->consultarProyectos();\n for($i=0;$i<count($tmp_proyectos);$i++) {\n $proyectos[$i][0]=$tmp_proyectos[$i]['CRA_COD'];\n $proyectos[$i][1]=$tmp_proyectos[$i]['NOMBRE'];\n }\n $_REQUEST['cod_proyecto']=isset($_REQUEST['cod_proyecto'])?$_REQUEST['cod_proyecto']:'';\n \n ?>\n <script src=\"<? echo $this->configuracion[\"host\"]. $this->configuracion[\"site\"]. $this->configuracion[\"javascript\"] ?>/funciones.js\" type=\"text/javascript\" language=\"javascript\"></script>\n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<? echo $this->formulario2 ?>'>\n <table id=\"tabla\" class=\"contenidotabla\" width=\"100%\">\n <div align=\"center\" ><b><?echo \"HOMOLOGACIONES PENDIENTES POR PROYECTO CURRICULAR \"; ?></b></div><hr>\n <?//opciones para agregar 5,10,15...50 estudiantes?>\n\n <thead class='sigma'>\n <th class='niveles centrar' > Proyecto Curricular</th>\n </thead>\n <tr >\n <td width=\"20%\" class='cuadro_plano centrar'>\n <?\n $mi_cuadro = $html->cuadro_lista($proyectos, \"cod_proyecto\", $this->configuracion,$_REQUEST['cod_proyecto'], 0, FALSE, 1, \"\",400);\n echo $mi_cuadro ;\n ?>\n <input type=\"hidden\" name=\"opcion\" value=\"consultarProyecto\">\n <input type=\"hidden\" name=\"pagina\" value=\"<? echo $this->formulario2 ?>\">\n \n </td>\n \n </tr>\n </table>\n <table width=\"100%\">\n <tr>\n <td align=\"center\">\n <input type=\"button\" value=\"Homologar\" onclick=\"if(<? echo $this->verificar; ?>){document.forms['<? echo $this->formulario2?>'].submit()}else{false}\"> </td>\n </tr>\n </table>\n </form>\n<?\n\n }", "public function listaAction() \n { \n $form = new Formulario(\"form\");\n // valores iniciales formulario (C)\n $id = (int) $this->params()->fromRoute('id', 0);\n $form->get(\"id\")->setAttribute(\"value\",$id); \n // Lista de cargos\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d = New AlbumTable($this->dbAdapter); \n $arreglo[0]='( NO TIENE )';\n $datos = $d->getCargos();// Listado de cargos\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom=$dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idCar\")->setValueOptions($arreglo); \n $arreglo = '';\n $datos = $d->getNcargos();\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom=$dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idNcar\")->setValueOptions($arreglo); \n $arreglo = '';\n $datos = $d->getCencos();// Listado de centros de costos\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom=$dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idDep\")->setValueOptions($arreglo); \n $arreglo = '';\n $datos = $d->getSedes();// Listado de sedes\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom=$dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idSed\")->setValueOptions($arreglo); \n $arreglo = '';\n $datos = $d->getDepar();\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom=$dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idGdot\")->setValueOptions($arreglo); \n $arreglo = '';\n $datos = $d->getGdot();// Grupo de dotaciones\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom=$dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idGdot\")->setValueOptions($arreglo); \n $arreglo = '';\n $datos = $d->getNasp();// Nivel de aspecto del cargo\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom=$dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idNasp\")->setValueOptions($arreglo); \n // Tipos de salarios\n $arreglo = '';\n $datos = $d->getSalarios(''); \n $arreglo='';\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom=number_format($dat['salario']).' (COD: '.$dat['codigo'].')';\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idTnomm\")->setValueOptions($arreglo); \n // Fin valor de formularios\n $valores=array\n (\n \"titulo\" => $this->tfor,\n \"form\" => $form, \n 'url' => $this->getRequest()->getBaseUrl(),\n 'id' => $id,\n \"lin\" => $this->lin\n ); \n // ------------------------ Fin valores del formulario \n \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Zona de validacion del fomrulario --------------------\n $album = new ValFormulario();\n $form->setInputFilter($album->getInputFilter()); \n $form->setData($request->getPost()); \n $form->setValidationGroup('nombre','numero'); // ------------------------------------- 2 CAMPOS A VALDIAR DEL FORMULARIO (C) \n // Fin validacion de formulario ---------------------------\n if ($form->isValid()) {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u = new Cargos($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n if ($data->id==0)\n $id = $u->actRegistro($data); // Trae el ultimo id de insercion en nuevo registro \n else \n {\n $u->actRegistro($data); \n $id = $data->id;\n }\n // Guardar tipos de nominas afectado por automaticos\n $f = new CargosS($this->dbAdapter);\n // Eliminar registros de tipos de nomina afectados por automaticos \n $d->modGeneral(\"Delete from t_cargos_sa where idCar=\".$id); \n $i=0;\n foreach ($data->idTnomm as $dato){\n $idSal = $data->idTnomm[$i];$i++; \n $f->actRegistro($idSal,$id); \n } \n $this->flashMessenger()->addMessage(''); \n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'a/'.$data->id);\n }\n }\n return new ViewModel($valores);\n \n }else{ \n if ($id > 0) // Cuando ya hay un registro asociado\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new Cargos($this->dbAdapter); // ---------------------------------------------------------- 4 FUNCION DENTRO DEL MODELO (C) \n $datos = $u->getRegistroId($id);\n $a = $datos['nombre'];\n $b = $datos['deno'];\n $c = $datos['idCar_a'];\n $d = $datos['plazas'];\n $e = $datos['respo'];\n $f = $datos['mision'];\n $g = $datos['idNcar'];\n\n $i = $datos['idGdot'];\n $j = $datos['idNasp'];\n // Valores guardados\n $form->get(\"nombre\")->setAttribute(\"value\",\"$a\"); \n $form->get(\"deno\")->setAttribute(\"value\",\"$b\"); \n $form->get(\"numero\")->setAttribute(\"value\",$d); // Plazas\n $form->get(\"respo\")->setAttribute(\"value\",\"$e\"); \n $form->get(\"mision\")->setAttribute(\"value\",\"$f\"); \n $form->get(\"idSed\")->setAttribute(\"value\",$datos['idSed']); \n $form->get(\"idDep\")->setAttribute(\"value\",$datos['idCcos']); \n // Jefe directo\n $d = New AlbumTable($this->dbAdapter); \n $datos = $d->getCargos();\n $form->get(\"idCar\")->setAttribute(\"value\",\"$c\"); \n $form->get(\"idNcar\")->setAttribute(\"value\",\"$g\"); \n\n $form->get(\"idGdot\")->setAttribute(\"value\",\"$i\"); \n $form->get(\"idNasp\")->setAttribute(\"value\",\"$j\"); \n // Escalas salariales\n $datos = $d->getSalCargos(' and idCar='.$id);\n $arreglo=''; \n foreach ($datos as $dat){\n $arreglo[]=$dat['idSal'];\n } \n $form->get(\"idTnomm\")->setValue($arreglo); \n return new ViewModel($valores);\n } \n \n }\n }", "function formulario_registro()\n {\n \t\t$data=$this->cunsultas();\n \t\treturn view('paginas.registrar_producto',$data);\n }", "public function form()\n {\n\n $this->hidden('key', '字段名')->rules('required');\n $this->editor('val', '平台规则')->rules('required');\n }", "function inscription_jesa_direct($form, &$form_state) {\n $form['#tree'] = TRUE;\n\n $form['description'] = array(\n '#type' => 'item',\n '#title' => t('Allow to register a new participant. if the participant does\\'t exist he(she) will be created. For a new member you must provide the name, firstname, the gender and a contact method (mail or phone).'),\n );\n $form['stagiaire'] = array(\n '#type' => 'fieldset',\n '#title' => t('Member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stagiaire']['existant'] = array(\n '#type' => 'fieldset',\n '#title' => t('Existing member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stagiaire']['existant']['user_name'] = array(\n '#title' => t('Existing member'),\n '#type' => 'textfield',\n '#autocomplete_path' => 'inscriptions/jeunes/admin/direct/stagiaire_autoc',\n );\n $form['stagiaire']['nouveau'] = array(\n '#type' => 'fieldset',\n '#title' => t('New member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $selection = array(\n 'nom' => array('required' => FALSE,),\n 'prenom' => array('required' => FALSE,),\n 'date_naissance' => array('required' => FALSE,),\n 'mail' => array('required' => FALSE,),\n 'telephone' => array('required' => FALSE,),\n 'adresse_1' => array('required' => FALSE,),\n 'adresse_2' => array('required' => FALSE,),\n 'sexe' => array('required' => FALSE,),\n );\n $form['stagiaire']['nouveau'] += _inscription_jesa_get_form_user_fields($selection);\n $form['stage'] = array(\n '#type' => 'fieldset',\n '#title' => t('Events'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stage']['list'] = array(\n '#type' => 'radios',\n '#options' => _inscription_jesa_get_next_stages(4),\n '#title' => t('Events'),\n );\n $selection = array(\n 'train' => array('required' => FALSE,),\n );\n $form['stage'] += _inscription_jesa_get_form_incscription_fields($selection);\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Submit'),\n ); \n\n return $form;\n}", "function form_editar(){\n\t\t// $this->fmt->class_pagina->crear_head_form(\"Editar Sistema\", $botones,\"\");// nombre, botones-left, botones-right\n\t\t$id = $this->id_item;\n\t\t$sql=\"select sis_id, sis_nombre, sis_descripcion, sis_tipo, sis_icono, sis_color, sis_activar, sis_orden from sistema\twhere sis_id='\".$id.\"'\";\n\t\t$rs=$this->fmt->query->consulta($sql,__METHOD__);\n\t\t$num=$this->fmt->query->num_registros($rs);\n\t\t\tif($num>0){\n\t\t\t\t$row=$this->fmt->query->obt_fila($rs);\n\t\t\t\t$fila_id=$row[\"sis_id\"];\n\t\t\t\t$fila_nombre=$row[\"sis_nombre\"];\n\t\t\t\t$fila_descripcion=$row[\"sis_descripcion\"];\n\t\t\t\t$fila_tipo=$row[\"sis_tipo\"];\n\t\t\t\t$fila_icono=$row[\"sis_icono\"];\n\t\t\t\t$fila_color=$row[\"sis_color\"];\n\t\t\t\t$fila_activar=$row[\"sis_activar\"];\n\t\t\t\t// $orden\n\t\t\t}\n $this->fmt->class_pagina->crear_head_form(\"Editar Sistema\", \"\",\"\");// nombre, botones-left, botones-right\n \t\t//echo \"<a href='javascript:location.reload()'><i class='icn-sync'></i></a>\";\n $id_form=\"form-editar\";\n\t\t?>\n\t\t<div class=\"body-modulo\">\n\t\t\t<form class=\"form form-modulo\" method=\"POST\" id=\"<?php echo $id_form?>\">\n\t\t\t\t<div class=\"form-group\" id=\"mensaje-login\"></div> <!--Mensaje form -->\n <div class=\"form-group\">\n\t\t\t\t\t<label>Nombre Sistema:</label>\n\t\t\t\t\t<div class=\"input-group controls input-icon-addon\">\n\t\t\t\t\t\t<span class=\"input-group-addon form-input-icon\"><i class=\"<?php echo $fila_icono; ?>\" style=\"color:<?php echo $fila_color; ?>\"></i></span>\n\t\t\t\t\t\t<input class=\"form-control input-lg color-border-gris-a color-text-gris form-nombre\" id=\"inputNombre\" name=\"inputNombre\" placeholder=\" \" value=\"<?php echo $fila_nombre; ?>\" type=\"text\" autofocus />\n <!-- <input type=\"hidden\" id=\"inputId\" name=\"inputId\" value=\"<?php echo $fila_id; ?>\" /> -->\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n <?php $this->fmt->form->input_form('Id:','inputId','',$fila_id,'','',''); ?>\n\t\t\t\t<div class=\"form-group form-descripcion\">\n\t\t\t\t\t<label>Descripción:</label>\n\t\t\t\t\t<textarea class=\"form-control\" rows=\"5\" id=\"inputDescripcion\" name=\"inputDescripcion\" placeholder=\"\"><?php echo $fila_descripcion; ?></textarea>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label>Icono sistema:</label>\n\t\t\t\t\t<input class=\"form-control box-md-4\" id=\"inputIcono\" name=\"inputIcono\" placeholder=\"\" value=\"<?php echo $fila_icono; ?>\"/>\n <span class=\"input-link\"><a href=\"<?php echo _RUTA_WEB_NUCLEO; ?>includes/icons.php\" target=\"_blank\">ver iconos</a></span>\n </div>\n\t\t\t\t\t<div class=\"form-group form-group-color\">\n\t\t\t\t\t\t<label>Color</label>\n <?php\n \t\t\t\t\t if (empty($fila_color)){\n \t\t\t\t\t\t $color=\"#333333\";\n \t\t\t\t\t }else{\n \t\t\t\t\t\t $color= $fila_color;\n \t\t\t\t\t }\n //echo _RUTA_HOST;\n \t\t\t\t\t?>\n\t\t\t\t\t\t<input type=\"color\" class=\"form-control box-md-2\" id=\"inputColor\" name=\"inputColor\" value=\"<?php echo $color; ?>\" />\n\t\t\t\t\t \t<?php\n\t\t\t\t\t\t\trequire_once( _RUTA_NUCLEO.\"includes/color.php\");\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\n\t\t\t\t<div class=\"form-group form-fluid\">\n\t\t\t\t\t<label>Modulos: </label>\n <div class=\"group\">\n <?php echo $this->fmt->class_modulo->opciones_modulos($fila_id); ?>\n </div>\n\t\t\t\t</div>\n\n <?php\n //$this->fmt->form->input_check_form_bd(\"Permisos para Roles\",\"inputSistemasRoles\",\"rol_\",\"rol\",\"sis_rol_\",\"sistema_roles\",\"sis_rol_sis_id\",$fila_id,\"sis_rol_sis_id\",\"\",\"1\",\"1\")\n ?>\n\n\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label>Tipo Sistema: </label>\n\t\t\t\t\t<select class=\"form-control form-select\" name=\"inputTipo\" id=\"inputTipo\">\n\t\t\t\t\t\t<?php echo $this->opciones_tipo($fila_tipo); ?>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n <?php\n // $this->fmt->form->input_form(\"Orden:\",\"inputOrden\",\"\",$orden,\"box-md-2\");\n $this->fmt->form->radio_activar_form($fila_activar);\n\t\t\t\t\t$this->fmt->form->btn_actualizar($id_form,$this->id_mod,\"modificar\"); //$id_form,$id_mod,$tarea\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n $this->fmt->class_modulo->modal_script($this->id_mod);\n\t\t// $this->fmt->class_modulo->script_form(\"modulos/sistemas/sistemas.adm.php\",$this->id_mod);\n\t}", "protected function form()\n {\n $form = new Form(new Client);\n\n // dd(Gender::LakiLaki());\n $gender = [\n Gender::LakiLaki()->value => Gender::LakiLaki()->description,\n Gender::Perempuan()->value => Gender::Perempuan()->description,\n ];\n\n $marital_statuses = [\n MaritalStatus::BelumKawin()->value => MaritalStatus::BelumKawin()->description,\n MaritalStatus::Kawin()->value => MaritalStatus::Kawin()->description,\n MaritalStatus::CeraiHidup()->value => MaritalStatus::CeraiHidup()->description,\n MaritalStatus::CeraiMati()->value => MaritalStatus::CeraiMati()->description,\n ];\n\n $blood_types = ['A', 'B', 'AB', 'O'];\n\n $form->display('id', 'ID');\n\n $form->text('nik', \"NIK\")->inputmask([\"mask\" => 9, \"repeat\" => 16]);\n $form->text('name', \"Nama\");\n $form->select('gender', 'Jenis Kelamin')->options($gender);\n $form->text('birth_place', \"Tempat Lahir\");\n $form->date('birth_date', \"Tanggal Lahir\");\n $form->text('occupation', \"Pekerjaan\")->icon('fa-briefcase');\n $form->text('latest_education', \"Pendidikan Terakhir\")->icon('fa-school');\n $form->text('religion', \"Agama\");\n $form->select('marital_status', \"Status Perkawinan\")->options($marital_statuses);\n $form->select('blood_type', \"Golongan Darah\")->options($blood_types);\n $form->text('postal_code', \"Kode Pos\")->inputmask([\"mask\" => 99999])->icon('fa-map-pin');\n $form->textarea('address', \"Alamat\");\n $form->text('rtrw', 'RT/RW')->inputmask([\"mask\" => \"999/999\"]);\n $form->text('location_address', \"Lokasi\");\n $form->select('provinces', 'Provinsi')->options(function ($id) {\n return Province::options($id);\n })->ajax('/admin/api/v1/indonesian/provinces');\n $form->hidden('extras');\n\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n\n if ($form->isCreating())\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n // $tools->disableView();\n // $tools->disableList();\n });\n \n $form->ignore(['rtrw', 'location_address', 'provinces']);\n $form->saving(function (Form $form) {\n $form->extras = json_encode($form->rtrw);\n // dump(request()->all());\n // dump($form->rtrw);\n });\n\n return $form;\n }", "protected function Campos()\n {\n $select = [\n ['value' => 'id1', 'text' => 'texto1'],\n ['value' => 'id2', 'text' => 'texto2']\n ];\n $this->text('unInput')->Validator(\"required|maxlength:20\");\n $this->text('unSelect')->Validator(\"required\")->type('select')->in_options($select);\n $this->date('unDate')->Validator(\"required\");\n }", "abstract public function createForm();", "abstract public function createForm();", "protected function form()\n {\n $Adv=new Adv();\n $form = new Form($Adv);\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"text\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"select\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"select\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>[\"start_time\",\"end_time\"],\"title\"=>\"活动时间\",\"type\"=>\"datetimeRange\"),\n array(\"field\"=>\"font1\",\"title\"=>\"字段1\",\"type\"=>\"text\"),\n array(\"field\"=>\"font2\",\"title\"=>\"字段2\",\"type\"=>\"text\"),\n array(\"field\"=>\"font3\",\"title\"=>\"字段3\",\"type\"=>\"text\"),\n array(\"field\"=>\"font4\",\"title\"=>\"字段4\",\"type\"=>\"text\"),\n array(\"field\"=>\"font5\",\"title\"=>\"字段5\",\"type\"=>\"text\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"switch\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::set_form($form,$list_array);\n return $form;\n }", "public function listiAction()\n {\n $form = new Formulario(\"form\");\n $id = (int) $this->params()->fromRoute('id', 0);\n $form->get(\"id\")->setAttribute(\"value\",$id); \n \n if($this->getRequest()->isPost()) \n {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Zona de validacion del fomrulario --------------------\n $album = new ValFormulario();\n $form->setInputFilter($album->getInputFilter()); \n $form->setData($request->getPost()); \n $form->setValidationGroup('nombre'); // ------------------------------------- 2 CAMPOS A VALDIAR DEL FORMULARIO (C) \n // Fin validacion de formulario ---------------------------\n if ($form->isValid()) {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u = new Lcheqi($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n $u->actRegistro($data,$id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n }\n }\n } \n // $form->get(\"id\")->setAttribute(\"value\",\"$id\"); \n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u = New AlbumTable($this->dbAdapter); // ---------------------------------------------------------- 1 FUNCION DENTRO DEL MODELO (C)\n $con=\"Select idNasp, nombre from t_cargos where id=\".$id;// Consula personalizada\n $resul=$u->getGeneral($con);\n foreach ($resul as $dat){\n $id2 = $dat['idNasp'];\n }\n // ---\n $valores=array\n (\n \"titulo\" => 'Ítems de aspectos del cargo '.$dat['nombre'],\n \"datos\" => $u->getAsp(\"where idNasp=$id2\"), \n \"ttablas\" => 'Aspectos, tipo, Opciones',\n 'url' => $this->getRequest()->getBaseUrl(),\n \"form\" => $form,\n \"idCar\" => $id,\n \"lin\" => $this->lin\n ); \n return new ViewModel($valores); \n }", "public function formuAction(){\t\n \t$cn = new Model_DbDatos_Datos();\n\t\t$fn = new Libreria_Pintar();\n\t\t$ar = new Libreria_ArraysFunctions();\n\n \t$codCarta = $this->_request->getParam('codCarta',''); \n\t\t\n\t\t\n\t\t//Cargando combos fiscalizadores\n\n\t\tunset($parametros);\n \t$parametros[] = array('@mquery',22);\n \t$parametros[] = array('@idCarta',$codCarta);\n\t\t$rowFicalizadores = $cn->ejec_store_procedura_sql('[SP_FISCA_CARTA_REQ]',$parametros);\n\n\t\t$fiscalizadoresCombo = $ar->RegistrosComboc($rowFicalizadores,0,1,'');\n\t\t$val[] = array('#cbNotificadores',$fn->ContenidoCombo($fiscalizadoresCombo,'[Seleccione]',''),'html');\n\t\t \t\n\n\t\t//Cargando cabecera del cargo de notificacion\t\t\n\t\tunset($parametros);\n\t\t$parametros[] = array('@mquery',20);\n \t$parametros[] = array('@idCarta',$codCarta);\n \t$rowCabecera = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\n \tif ($rowCabecera[0]) {\n \t\t$row = $rowCabecera[1][0]; \n\n \t\t$codCargoNotificacion = $row[0];\n \t\t$nroCargoNotificacion = $row[1].\" - \".$row[9];\n \t\t$codContrib = $row[2];\n \t\t$contribuyente = trim(utf8_encode( strtoupper($row[3].\" \".$row[4].\" \".$row[5])));\n \t\t$idTipoDocIdent = $row[6];\n \t\t$nroDocIdent = $row[7];\n \t\t$domicilioFiscal = strtoupper(utf8_encode( $row[8]));\n \t\t$anio = $row[9];\n \t\t$nroCartareq = $row[10].\" - \".$row[9];\n \t\n \t\t$val[] = array('#hcodCartaReq',$codCarta,'val');\n \t\t$val[] = array('#txtNroNotificacion',$nroCargoNotificacion,'val');\n \t\t$val[] = array('#hcodNotificacion',$codCargoNotificacion,'val');\n \t\t$val[] = array('#txtCodigoContribuyenteN',$codContrib,'val');\n \t\t$val[] = array('#txtContribuyenteN',$contribuyente,'val');\n \t\t$val[] = array('#hTipoDocIdent',$idTipoDocIdent,'val');\n \t\t$val[] = array('#hNroDocIdent',$nroDocIdent,'val');\n \t\t$val[] = array('#txtDomicilioFiscal',$domicilioFiscal,'val');\n \t\t$val[] = array('#txtAnioN',$anio,'val');\n \t\t$val[] = array('#txtNroCartaReqN',$nroCartareq,'val');\n\n \t\t//CARGANDO DATOS DE LA PERSONA QUIEN RECEPCIONA\n \t\tunset($parametros);\n\t\t\t$parametros[] = array('@mquery',21);\n\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t \t$rowDatosPersona = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t\t\n\n\t \tif ($rowDatosPersona[0]) {\n\t \t\t\n\t \t\t$row = $rowDatosPersona[1][0];\n\n\t\t\t unset($parametros);\n\t\t\t\t$parametros[] = array('@mquery',7);\n\t\t \t$rowTDoc = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_T_DOC_IDEN]',$parametros);\n\t\t \t$row2 = $rowTDoc[1];\n\t\t \t\n\t\t \tforeach ($row2 as $f) {\n\t\t \t\tif ($f[0]==1) {\t$val[]= array('#hmaxDni',$f[2],'val');}\n\t\t \t\tif ($f[0]==5) {\t$val[]= array('#hmaxIdentidad',$f[2],'val');}\n\t\t \t\tif ($f[0]==9) {\t$val[]= array('#hmaxExtranjeria',$f[2],'val');}\n\t\t \t}\n\n\t \t\t$nomRecepciona = trim(utf8_encode($row[0]));\n\t \t\t$idTipoDocIdent = trim($row[1]);\n\t \t\t$nomTDocIden = trim(utf8_encode($row[2]));\n\t \t\t$nroDocIdent = trim($row[3]);\n\t \t\t$fechaNotifica = (!empty($row[4]) && !empty($row[5]) && !empty($row[6]))? $row[4].\"/\".$row[5].\"/\".$row[6] : '';\n\t \t\t$horaNotifica = trim($row[7]);\n\t \t\t$NegoIdentificar = trim($row[8]);\n\t \t\t$NegoFirmar = $row[9];\n\t \t\t$NegoRecibir = $row[10];\n\t \t\t$firma = $row[11];\n\t \t\t$idVinculo = $row[12];\n\t \t\t$vinculo = $row[13];\n\t \t\t$vinculo_otros = trim($row[14]);\n\n\t \t\t$val[] = array('#txtNomApeRecepciona',$nomRecepciona,'val');\n\t \t\tif($idTipoDocIdent==1){$evt[] = array('#chkDni','checked','true');}\n\t \t\tif($idTipoDocIdent==5){$evt[] = array('#chkIdentidad','checked','true');}\n\t \t\tif($idTipoDocIdent==9){$evt[] = array('#chkExtranjeria','checked','true');}\n\t \t\t$val[] = array('#txtNroDocIdent',$nroDocIdent,'val');\n\t \t\t$val[] = array('#dpFechaNotifica',$fechaNotifica,'val');\n\t \t\t$val[] = array('#txtHoraNotifica',$horaNotifica,'val');\n\t \t\tif($NegoIdentificar==1){$evt[] = array('#chkNegoIdentificar','checked','true');}\n\t \t\tif($NegoFirmar==1){$evt[] = array('#chkNegoFirmar','checked','true');}\n\t \t\tif($NegoRecibir==1){$evt[] = array('#chkNegoRecibir','checked','true');}\n\t \t\t$evt[] = array(( ($firma==1) ? \"#rdFirmaRecepcionaSi\" : \"#rdFirmaRecepcionaNo\"),\"checked\",\"true\");\n\t \t\tif($idVinculo==1){$evt[] = array('#chkTitular','checked','true');}\n\t \t\tif($idVinculo==2){$evt[] = array('#chkFamiliar','checked','true');}\n\t \t\tif($idVinculo==3){$evt[] = array('#chkVigilante','checked','true');}\n\t \t\tif($idVinculo==4){$evt[] = array('#chkEmpleado','checked','true');}\n\t \t\tif($idVinculo==5){$evt[] = array('#chkRepresentante','checked','true');}\n\t \t\tif($idVinculo==6){$evt[] = array('#chkVinculoOtros','checked','true');$val[] = array('#txtVinculoOtros',$vinculo_otros,'val');}\n\n\n\t \t\t//CARGANDO DATOS DEL CEDULON Y MOTIVOS DE NO ENTREGA\n\n\t \t\tunset($parametros);\n\t\t\t\t$parametros[] = array('@mquery',22);\n\t\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t\t \t$rowCedulonMovNoEntrega = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t \t\n\t\t \tif ($rowCedulonMovNoEntrega[0]) {\n\t\t \t\t$row = $rowCedulonMovNoEntrega[1][0]; \n\n\t\t \t\t$codCedulon = trim($row[0]);\n\t\t \t\t$PersonaIncapaz = trim($row[1]);\n\t\t \t\t$DomicilioCerrado = trim($row[2]);\n\t\t \t\t$fechaCedulon = (!empty($row[3]) && !empty($row[4]) && !empty($row[5])) ? $row[3].\"/\".$row[4].\"/\".$row[5] : '' ;\n\t\t \t\t$horaCedulon = trim($row[6]);\n\t\t \t\t$direcccionIncorrecta = trim($row[7]);\n\t\t \t\t$direccionInexistente = trim($row[8]);\n\t\t \t\t$otrosMotNoEntrega = $row[9];\n\t\t \t\t$otrosValor = trim($row[10]);\n\t\t \t\t$codInmueble = trim($row[11]);\n\t\t \t\t$nroPisos = trim($row[12]);\n\t\t \t\t$color = trim($row[13]);\n\t\t \t\t$casa = trim($row[14]);\n\t\t \t\t$edificio = trim($row[15]);\n\t\t \t\t$PuertaMadera = trim($row[16]);\n\t\t \t\t$PuertaFierro = trim($row[17]);\n\t\t \t\t$SuminElect = trim($row[18]);\n\t\t \t\t$in_Otros = trim($row[19]);\n\t\t \t\t$in_OtrosValor = trim($row[20]);\n\n\t\t \t\t$val[] = array('#hcodCedulon',$codCedulon,'val');\n\t\t \t\tif($PersonaIncapaz==1){ $evt[] = array('#chkPersonaIncapaz','checked','true');}\n\t\t \t\tif($DomicilioCerrado==1){ $evt[] = array('#chkDomicilioCerrado','checked','true');}\n\t\t \t\t$val[] = array('#dpFechaCedulon',$fechaCedulon,'val');\n\t\t \t\t$val[] = array('#txtHoraCedulon',$horaCedulon,'val');\n\t\t \t\tif($direcccionIncorrecta==1){ $evt[] = array('#chkDireccionIncorrecta','checked','true');}\n\t\t \t\tif($direccionInexistente==1){ $evt[] = array('#chkDireccionInexistente','checked','true');}\n\t\t \t\tif($otrosMotNoEntrega==1){$evt[]=array('#chkMotNoEntregaOtros','checked','true');$val[] = array('#txtNoEntregaOtros',$otrosValor,'val');}\n\t\t \t\t\n\t\t \t\t$val[] = array('#hcodInmueble',$codInmueble,'val');\n\t\t \t\t$val[] = array('#txtNroPisos',$nroPisos,'val');\n\t\t \t\t$val[] = array('#txtColor',$color,'val');\n\t\t \t\tif($casa==1){ $evt[] = array('#chkCasa','checked','true');}\n\t\t \t\tif($edificio==1){ $evt[] = array('#chkEdificio','checked','true');}\n\t\t \t\tif($PuertaMadera==1){ $evt[] = array('#chkMadera','checked','true');}\n\t\t \t\tif($PuertaFierro==1){ $evt[] = array('#chkFierro','checked','true');}\n\t\t \t\t$val[] = array('#txtSuministroElectrico',$SuminElect,'val');\n\t\t \t\tif($in_Otros==1){$evt[]=array('#chkInmuebleOtros','checked','true');$val[] = array('#txtInmuebleOtros',$in_OtrosValor,'val');}\n\t\t \t\t\n\n\n\t\t \t\t//CARGA DE DATOS DE VISITA EFECTUADA\n\t\t \t\tunset($parametros);\n\t\t\t\t\t$parametros[] = array('@mquery',23);\n\t\t\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t\t\t \t$rowVisitaEfectuada = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t\t \t\n\t\t\t \tif ($rowVisitaEfectuada[0]) {\n\t\t\t \t\t$row = $rowVisitaEfectuada[1][0]; \n\n\t\t\t \t\t$fechaVisita = (!empty($row[0]) && !empty($row[1]) && !empty($row[2])) ? $row[0].\"/\".$row[1].\"/\".$row[2] : '' ;\n\t\t\t \t\t$codNotificador = trim($row[3]);\n\t\t\t \t\t$dniNotificador = trim($row[4]);\n\t\t\t \t\t$firmaNotificador = trim($row[5]);\n\n\t\t\t \t\t$val[] = array('#dpFechaVisita',$fechaVisita,'val');\n\t\t\t \t\t$val[] = array('#cbNotificadores',$codNotificador.'-'.$dniNotificador,'val');\n\t\t\t \t\t$val[] = array('#txtdniNotificador',$dniNotificador,'val');\n\t\t\t \t\t$evt[] = array((($firmaNotificador==1) ? \"#rdFirmaNotSi\" : \"#rdFirmaNotNo\"),\"checked\",\"true\");\n\n\n\t\t\t \t}else{\n\t\t\t \t\techo utf8_encode($rowVisitaEfectuada[1]); \n\t\t\t \t}\n\n\t\t \t}else{\n\t\t\t\t\techo utf8_encode($rowCedulonMovNoEntrega[1]); \n\t\t \t} \n\n\t \t}else{\n\t \t\techo utf8_encode($rowDatosPersona[1]); \n\t \t}\n\n \t}else{\n \t\techo utf8_encode($rowCabecera[1]);\n \t}\n\n\t\t$evt[] = array('#contentBox6',\"tabs\",\"\");\t\n\t\t$evt[] = array('#contentBox7',\"tabs\",\"\");\t\n\t\t$evt[] = array('#contentBox8',\"tabs\",\"\");\t\t\t\t\n\t\t$evt[] = array('#tabsNotificacion',\"tabs\",\"\");\n\t\t$evt[] = array('#radioFirmaRecep',\"buttonset\",\"\");\n\t\t$evt[] = array('#radioFirmaNot',\"buttonset\",\"\");\n\t\t\n\t\t\n\n\t\t$fn->PintarEvento($evt);\n\t\t$fn->PintarValor($val);\n }", "public function CreateForm();", "function mostrarFormulario(){\n \n echo \"<br><br>\";\n echo \"<h2>FORMULARIO PARA PROFESORES</h2>\";\n?>\n\n <form method=\"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n noEmpleado: <input type=\"text\" name=\"noEmpleado\" value=\"<?php echo $this->noEmpleado;?>\">\n <br><br>\n Carrera: <input type=\"text\" name=\"carrera\" value=\"<?php echo $this->carrera;?>\">\n <br><br>\n Nombre: <input type=\"text\" name=\"nombre\" value=\"<?php echo $this->nombre;?>\">\n <br><br>\n <span class=\"error\">* <?php echo $this->nombreErr;?></span>\n <br><br>\n Telefono: <input type=\"tel\" name=\"telefono\"value=\"<?php echo $this->telefono;?>\">\n <br><br>\n <input type=\"submit\" name=\"submit\" value=\"Submit\">\n </form>\n\n<?php\n }", "function form_mostrar($conp,$nreg,$pg,$bo,$filtro,$arc){\n\t\t$mtipo_documento = new mtipo_documento();\n\t\t //Instanciamos en [$pa] la clase mpagina\n\t\t$pa = new mpaginacion();\n\t\t$txt = '';\n\t\t//Creamos el cuadro de buscar (filtros-Busquedas)\n\t\t$txt .= \"<table>\";\n\t\t\t//Una Fila\n\t\t\t$txt .= \"<tr>\";\n\t\t\t\t//1ra Columna - Formulario buscar\n\t\t\t\t$txt .= \"<td>\";\n\t\t\t\t\t$txt .= \"<form name='forfil' method='GET' action='\".$arc.\"'>\";\n\t\t\t\t\t\t$txt .= \"<input type='hidden' name='pg' value='\".$pg.\"' />\";\n\t\t\t\t\t\t//Campo de texto para escribir el dato a buscar\n\t\t\t\t\t\t$txt .= \"Buscar:<input type='text' name='filtro' value='\".$filtro.\"' placeholder='Ingrese El Nombre Del Empleado' onChange= 'this.form.submit();' />\";\n\t\t\t\t\t$txt .= \"</form>\";\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t\t//2da Columna control de paginacion\n\t\t\t\t$txt .= \"<td align='right' style='padding-left: 10px;'>\";\n\t\t\t\t\t$bo = \"<input type='hidden' name='filtro' value='\".$filtro.\"' />\";\n\t\t\t\t\t//Llamamos el metodo de contar la cantida de paginas\n\t\t\t\t\t$txt .= $pa->spag($conp,$nreg,$pg,$bo,$arc);\n\t\t\t\t\t//Llamar los datos para completar la paginacion\n\t\t\t\t\t$result = $mtipo_documento->sel_tipo_documento($filtro,$pa->rvalini(),$pa->rvalfin());\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t//Cierre Fila\n\t\t\t$txt .= \"</tr>\";\n\t\t$txt .= \"</table>\";\n\t\tif ($result) {\n\n\t\t$txt .= '<div class=\"cuad1\" style=\"width: 90%;\">';\n\t\t\t$txt .= '<table width=\"100%\" cellspacing=\"0px\" align=\"center\">';\n\t\t\t\t//Inicio de la (Cabecera_Tb)\t\t\t\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'id_tpdoc(s)';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Tipo de Documento';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'extencion';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t//Cierre de la (Cabecera_Tb)\n\t\t\t\tforeach ($result as $f) {\n\t\t\t\t//Inicio ROW - Datos de la tabla\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"id_tpdoc\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"nom_tpdoc\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"extencion\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t//ICONOS-MOdificar (Boton)\n\t\t\t\t\t$txt .= '<td align=\"center\"><a href=\"home.php?pg=010&id_tpdoc='.$f[\"id_tpdoc\"].'\">\n\t\t\t\t\t\t<img src=\"img/actua.png\" title=\"Actualizar\"</a></td>';\n\t\t\t\t\t//ICONOS-Eliminar (Boton)\n\t\t\t\t\t$txt .= '<td align=\"center\"><a href=\"home.php?pg=010&del='.$f[\"id_tpdoc\"].'\">\n\t\t\t\t\t\t<img src=\"img/elemi.png\" title=\"Eliminar\"</a></td>';\n\t\t\t\t//Cierre ROW - Datos de la tabla\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t}\n\t\t\t$txt .= '</table>';\n\t\t$txt .= '</div>';\n\t\t}else{\n\t\t$txt.= '<div class=\"cuad\" style=\" width\": 90%;\">';\n\t\t $txt.= '<h3> No existen datos registrado en la base de datos...</h3>';\n\t\t $txt.='</div>';\n }\n\t\techo $txt;\n\t}", "function cargar_formulario($datos_necesarios){\n if(isset($datos_necesarios['acta'])){\n $ar = array();\n \n $ar[0]['votos'] = $datos_necesarios['acta']['total_votos_blancos'];\n $ar[0]['id_nro_lista'] = -1;\n $ar[0]['nombre'] = \"VOTOS EN BLANCO\";\n \n $ar[1]['votos'] = $datos_necesarios['acta']['total_votos_nulos'];\n $ar[1]['id_nro_lista'] = -2;\n $ar[1]['nombre'] = \"VOTOS NULOS\";\n \n $ar[2]['votos'] = $datos_necesarios['acta']['total_votos_recurridos'];\n $ar[2]['id_nro_lista'] = -3;\n $ar[2]['nombre'] = \"VOTOS RECURRIDOS\";\n\n //obtener los votos cargados, asociados a este acta\n $votos = $this->dep('datos')->tabla($datos_necesarios['tabla_voto'])->get_listado_votos($datos_necesarios['acta']['id_acta']);\n \n if(sizeof($votos) > 0){//existen votos cargados\n $ar = array_merge($votos, $ar);\n \n }\n else{//no existen votos cargados\n $listas = $this->dep('datos')->tabla($datos_necesarios['tabla_listas'])->get_listas_a_votar($datos_necesarios['acta']['id_acta']);\n \n if(sizeof($listas)>0)//Existen listas\n $ar = array_merge($listas, $ar); \n \n }\n \n return $ar;\n }\n }", "protected function form()\n {\n $form = new Form(new Customer());\n /*if (Admin::user()->isRole('Editor')){\n $form->text('name', __('Name'))->readonly();\n $form->datetime('birthday', __('Birthday'))->default(date('Y-m-d H:i:s'))->readonly();\n $form->text('room_no', __('Room no'))->readonly();\n $form->text('phone_number', __('Phone number'))->readonly();\n $form->select('block_no', __('Toà nhà'))->options(Constant::BLOCK)->setWidth(2, 2)->readonly();\n $form->select('telco', __('Nhà mạng'))->options(Constant::TELCO)->setWidth(2, 2)->readonly();\n $form->select('sale_id', __('Nhân viên chăm sóc'))->options(AuthUser::all()->pluck('name','id'))->readonly();\n } else {*/\n $form->text('name', __('Name'));\n //$form->datetime('birthday', __('Birthday'))->default(date('Y-m-d H:i:s'));\n $form->text('room_no', __('Room no'));\n $form->mobile(\"phone_number\", \"Số điện thoại\")->options(['mask' => '9999999999']);\n $form->select('block_no', __('Địa chỉ'))->options(Constant::BLOCK)->setWidth(2, 2)->default(100);\n $form->text('address', __('Địa chỉ'));\n $form->select('telco', __('Nhà mạng'))->options(Constant::TELCO)->setWidth(2, 2);\n if (Admin::user()->isRole('Pt') || Admin::user()->isRole('Fm')) {\n $form->select('pt_id', __('Nhân viên chăm sóc'))->options(AuthUser::all()->pluck('name', 'id'))->default(Admin::user()->id);\n } else {\n $form->select('sale_id', __('Nhân viên chăm sóc'))->options(AuthUser::all()->pluck('name', 'id'))->default(Admin::user()->id);\n }\n //}\n\n $form->text('setup_at', __('Lịch hẹn gặp'));\n $form->text('pt_setup_at', __('Lịch PT hẹn gặp'));\n $form->text('plan', __('Gói hiện tại'));\n $form->select('source', __('Nguồn khách'))->options(Constant::SOURCE)->setWidth(2, 2);\n $form->textarea('note', __('Ghi chú'));\n $form->text('pt_note', __('PT Ghi chú'));\n $form->date('end_date', __('Ngày hết hạn'));\n if (Admin::user()->isRole('Pt') || Admin::user()->isRole('Fm')) {\n $form->select('pt_status', __('Trạng thái PT'))->options(Constant::CUSTOMER_STATUS)->setWidth(2, 2);\n } elseif (Admin::user()->isRole('Pt') || Admin::user()->isRole('Fm')) {\n $form->select('status', __('Trạng thái'))->options(Constant::CUSTOMER_STATUS)->setWidth(2, 2);\n } else {\n $form->select('status', __('Trạng thái'))->options(Constant::CUSTOMER_STATUS)->setWidth(2, 2);\n $form->select('pt_status', __('Trạng thái PT'))->options(Constant::CUSTOMER_STATUS)->setWidth(2, 2);\n }\n\n $form->select('like', __('Quan tâm'))->options(Constant::FAVORITE)->setWidth(2, 2);\n return $form;\n }", "public function form()\n {\n $this->setData();\n }", "function actionFormulario($model, $form, $datos = 0 )\n\t{\n \n\t\t\n\t\t$proyectos = new IsaRomProyectos();\n\t\t$proyectos = $proyectos->find()->orderby(\"id\")->all();\n\t\t$proyectos = ArrayHelper::map($proyectos,'id','descripcion');\n\t\t\n\t\t$estados= $this->obtenerParametros(45);\n\t\t// $ecProyectos = EcProyectos::find()->where( 'estado=1' )->orderby('id ASC')->all();\n\t\t\n\t\t\n\t\t//acordeon de los proyecto \n\t\tforeach ($proyectos as $idProyecto => $v)\n\t\t{\n\t\t\t\n\t\t\t $contenedores[] = \t\n\t\t\t\t[\n\t\t\t\t\t'label' \t\t=> $v,\n\t\t\t\t\t'content' \t\t=> $this->renderPartial( 'procesos', \n\t\t\t\t\t\t\t\t\t\t\t\t\t[ \n 'idProyecto' => $idProyecto,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'form' => $form,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//'modelProyectos' => $modelProyectos,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'datos'=>$datos,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'estados'=>$estados,\n\t\t\t\t\t\t\t\t\t\t\t\t\t] \n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'contentOptions'=> ['class' => 'in'],\n\t\t\t\t\t'options' => ['class' => ' panel-primary']\n\t\t\t\t\t\n\t\t\t\t];\n\t\t\t\t\n\t\n\t\t}\n\t\t\n\t\t echo Collapse::widget([\n\t\t\t'items' => $contenedores,\n\t\t\t\n\t\t]);\n\t\t\n\t}", "public function init()\n {\n\t\t$this->setName('Velatorio');\n\n //campo hidden para guardar id del velatorio\n $idvelatorio = new Zend_Form_Element_Hidden('idvelatorio'); \n $idvelatorio->addFilter('Int');\n\n //creamos <input text> para escribir nombre del velatorio\n $RUC = new Zend_Form_Element_Text('RUC');\n $RUC->setLabel('RUC:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t\n //creamos <input text> para escribir nombre del velatorio\n $nombre = new Zend_Form_Element_Text('nombre');\n $nombre->setLabel('Nombre del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t \n\t\t \n //creamos <input text> para escribir direccion del velatorio\n $direccion = new Zend_Form_Element_Text('direccion');\n $direccion->setLabel('Direccion del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t\t\n //Combo del Departamento \n $iddepartamento = new Zend_Form_Element_Select('iddepartamento');\n $iddepartamento->setLabel('Seleccione departamentos:')->setRequired(true); \n\t\t\n\t\t$iddepartamento->addMultiOption(0, \"select\");\t\t\n\n\t\t//cargo en un select los departamentos\n $table = new Application_Model_DbTable_Departamento();\n //obtengo listado de todos los departamentos y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $iddepartamento->addMultiOption($c->iddepartamento, $c->nombre);\n }\n\n\t\t\n\t\t//Combo de la Provincia\n $idprovincias = new Zend_Form_Element_Select('idprovincias');\n $idprovincias->setLabel('Seleccione provincias:')->setRequired(true); \n\t\t\n\t\t//cargo en un select las provincias\n /* $table = new Application_Model_DbTable_Provincia();\n //obtengo listado de todas los provincias y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $idprovincias->addMultiOption($c->idprovincia, $c->nombre);\n }\n\t\t*/\n\t\t\t\t\n\t\t//Combo del Distrito\n $iddistrito = new Zend_Form_Element_Select('iddistrito');\n $iddistrito->setLabel('Seleccione distritos:')->setRequired(true); \n\n\t\t//cargo en un select los distritos\n /*$table = new Application_Model_DbTable_Distrito();\n //obtengo listado de todos los distritos y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $iddistrito->addMultiOption($c->iddistrito, $c->nombre);\n }\n\t\t*/\n\t\t\n\t\t\n\t\t//creamos <input text> para escribir telefono del velatorio\n $telefono_fijo = new Zend_Form_Element_Text('telefono_fijo');\n $telefono_fijo->setLabel('Telefono del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\t\t \n\t\t//creamos <input text> para escribir celular del velatorio\n $telefono_celular = new Zend_Form_Element_Text('telefono_celular');\n $telefono_celular->setLabel('Celular del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\t\t \n\t\t//creamos <input text> para escribir correo electronico del velatorio\n $mail = new Zend_Form_Element_Text('mail');\n $mail->setLabel('Correo Electronico del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t//creamos <input text> para escribir costo alquiler del velatorio\n $costo = new Zend_Form_Element_Text('costo');\n $costo->setLabel('Costo Alquiler del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t//creamos <input text> para escribir observacion del velatorio\n $observacion = new Zend_Form_Element_Textarea('observacion');\n $observacion->setLabel('Observaciones:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\n\t\t\t\n\t\t \n //boton para enviar formulario\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setAttrib('id', 'submitbutton');\n\n //agregolos objetos creados al formulario\n //$this->addElements(array($id, $nombre,$Descripccion,$profesores,$submit));\t\n\t\t$this->addElements(array($idvelatorio,$RUC,$nombre,$direccion,$iddepartamento,$idprovincias,$iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion,$submit));\t\n\t\t\n\t\t//DECORATOR GRUPOS\n\t\t$this->addDisplayGroups(array(\n\t\t\t'left' => array(\n\t\t\t\t'options' => array('description' => 'Left Column'),\n\t\t\t\t'elements' => array($RUC,$nombre,$direccion,$iddepartamento,$idprovincias),\n\t\t\t),\n\t\t\t'right' => array(\n\t\t\t\t'options' => array('description' => 'Right Column'),\n\t\t\t\t'elements' => array($iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion),\n\t\t\t),\n\t\t\t'bottom' => array(\n\t\t\t\t'elements' => array($submit),\n\t\t\t)\n\t\t));\n\t\t \n\t\t//$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));\t\t\n\t\t$this->setDisplayGroupDecorators(array('FormElements', 'Fieldset'));\n\t\t\n\t\t//DECORATOR GRUPOS\n\t\t$this->addDisplayGroups(array(\n\t\t\t'left' => array(\n\t\t\t\t'options' => array('description' => 'Left Column'),\n\t\t\t\t'elements' => array($RUC,$nombre,$direccion,$iddepartamento,$idprovincias),\n\t\t\t),\n\t\t\t'right' => array(\n\t\t\t\t'options' => array('description' => 'Right Column'),\n\t\t\t\t'elements' => array($iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion),\n\t\t\t),\n\t\t\t'bottom' => array(\n\t\t\t\t'elements' => array($submit),\n\t\t\t)\n\t\t));\n\t\t \n\t\t//$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));\t\t\n\t\t$this->setDisplayGroupDecorators(array('FormElements', 'Fieldset'));\n\t\t\n\t\t\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "public function dodajformAction()\n {\n $this->params->tryb='Dodawanie';\n $this->template='admin/rabat/form.html.twig';\n $this->params->rabaty=$this->model->lista();\n $this->params->samochody=$this->loadModel('Samochod')->lista();\n }", "protected function form()\n {\n $form = new Form(new Facility);\n\n $form->text('facility_name', '施設名');\n $form->text('type', 'タイプ');\n $form->number('room', '部屋数');\n $form->number('floor', 'フロア数');\n $form->select('transaction_status')->options(TransactionStatus::pluck('transaction_status', 'id'));\n $form->select('sales_status')->options(SalesStatus::pluck('sales_status', 'id'));\n $form->text('postalcode', '郵便番号');\n $form->text('prefecture', '都道府県');\n $form->text('address', '住所');\n $form->text('katagaki', '方書');\n $form->text('tel', '電話番号');\n $form->text('manager', '支配人');\n $form->text('manager_phone_number', '支配人 携帯電話');\n // $form->text('division1', '担当事業部1');\n $form->select('division1')->options(Division::pluck('division', 'id'));\n // $form->text('department1', '部署1');\n $form->select('department1')->options(Department::pluck('department', 'id'));\n $form->text('staff1', '担当者名1');\n $form->text('staff_phone_number1', '担当者携帯1');\n $form->text('remarks1', '備考1');\n // $form->text('division2', '担当事業部2');\n $form->select('division2')->options(Division::pluck('division', 'id'));\n // $form->text('department2', '部署2');\n $form->select('department2')->options(Department::pluck('department', 'id'));\n $form->text('staff2', '担当者名2');\n $form->text('staff_phone_number2', '担当者携帯2');\n $form->text('remarks2', '備考2');\n // $form->text('division3', '担当事業部3');\n $form->select('division3')->options(Division::pluck('division', 'id'));\n // $form->text('department3', '部署3');\n $form->select('department3')->options(Department::pluck('department', 'id'));\n $form->text('staff3', '担当者名3');\n $form->text('staff_phone_number3', '担当者携帯3');\n $form->text('remarks3', '備考3');\n $form->number('customer_id', '顧客ID');\n $form->text('wifi', 'WiFi販売');\n $form->text('fixtures', '備品販売');\n $form->text('tv', 'TV販売');\n $form->text('tableware', '食器販売');\n\n return $form;\n }", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "private function createEditForm(Liquidaciones $entity, $modo)\n {\n //$tipoguardia = array(515=>'12',514=>'24',517=>'12 Hs Feriado',516=>'24 Hs Feriado');\n ///// Verifico si la fecha es un feriado //////////////////\n \tif ($modo == 'rg') {\n if ($entity->getRGFecha() != null) {\n\n\n\t $sqlFeriados = \"EXEC haberes.web.spTraerFeriadoPorFecha_Dependencia '\".$entity->getRGFecha()->format('Y-m-d').\"',\".$entity->getCuposhatipoliquidacion()->getCupos()->getIdDependencia();\n\n\t $conn = $this->getDoctrine()->getManager(\"ms_haberes_web\")->getConnection();\n\n\t $stmtFeriados = $conn->prepare($sqlFeriados);\n\n\t $stmtFeriados->execute();\n\t $rResultFeriados = 0;\n\t $rResultFeriados = $stmtFeriados->fetchAll();\n\t } else {\n\t \t$rResultFeriados = 0;\n\t }\n //die(var_dump($rResultFeriados));\n ////// FIN ///////////////////\n\n\n ///// Verifico la cantidad de horas que me quedan segun las guardias del agente y del reemplazado //////\n $sqlSaldoHoras = 'EXEC haberes.haberes.spValidaReemplazoMismoDiaSemana '.$entity->getRGIdPersonalCargo().','.$entity->getIdPersonalCargo().','.$entity->getRGFecha()->format('N').\",'\".$entity->getRGFecha()->format('Y-m-d').\"'\";\n\n $conn = $this->getDoctrine()->getManager(\"ms_haberes_web\")->getConnection();\n\n $stmtSaldoHoras = $conn->prepare($sqlSaldoHoras);\n\n $stmtSaldoHoras->execute();\n $rResultSaldoHoras = 0;\n $rResultSaldoHoras = $stmtSaldoHoras->fetchAll();\n //die(var_dump($rResultSaldoHoras[0]['computed']));\n $valores = explode(\"/\", $rResultSaldoHoras[0]['computed']);\n\n $observacionConcepto = '';\n $tipoguardia = array(0=>'No posee horas');\n if ($valores[0]==0) {\n $observacionConcepto = $valores[1];\n } else {\n\n $observacionConcepto = \"Horas Disponibles en fecha elegida: \".(abs($valores[1])==0 ? '24' : abs($valores[1])).\" hs\";\n\n\n if (($entity->getRGFecha()->format('N') == 6) || ($entity->getRGFecha()->format('N') == 7) || ($rResultFeriados[0]['computed'] == 1)) {\n switch (abs($valores[1])) {\n case 24:\n $tipoguardia = array(517=>'12 Hs Feriado',516=>'24 Hs Feriado');\n\n break;\n case 12:\n $tipoguardia = array(517=>'12 Hs Feriado');\n break;\n case 0:\n $tipoguardia = array(517=>'12 Hs Feriado');\n\n break;\n default:\n $tipoguardia = array(0=>'No posee horas');\n break;\n }\n } else {\n switch (abs($valores[1])) {\n case 24:\n $tipoguardia = array(515=>'12 Hs',514=>'24 Hs');\n\n break;\n case 12:\n $tipoguardia = array(515=>'12 Hs');\n break;\n case 0:\n $tipoguardia = array(515=>'12 Hs',514=>'24 Hs');\n\n break;\n default:\n $tipoguardia = array(0=>'No posee horas');\n break;\n }\n }\n\n }\n }\n // RG invalido: Hace guardia ese dia\n\n // Solo puede 12 horas\n\n //die(var_dump($rResultSaldoHoras));\n\n ///// FIN ////////////////////////////////\n switch ($modo) {\n case 'rg':\n $form = $this->createForm(new \\Liquidaciones\\CuposAnualesBundle\\Form\\LiquidacionesType($tipoguardia), $entity, array(\n 'action' => $this->generateUrl('liquidaciones_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n break;\n case 'horas':\n $form = $this->createForm(new \\Liquidaciones\\CuposAnualesBundle\\Form\\LiquidacionesTypeHS(), $entity, array(\n 'action' => $this->generateUrl('liquidaciones_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n break;\n case 'monto':\n $form = $this->createForm(new \\Liquidaciones\\CuposAnualesBundle\\Form\\LiquidacionesTypeM(), $entity, array(\n 'action' => $this->generateUrl('liquidaciones_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n break;\n default:\n throw $this->createNotFoundException('Unable to find Liquidaciones entity.');\n break;\n }\n\n\n //$form->add('submit', 'submit', array('label' => 'Modificar'));\n\n return $form;\n }", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "protected function form()\n {\n return [];\n }", "protected function form()\n {\n return [];\n }", "protected function procesaFormulario($datos)\n {\n\n $result = array();\n $app = Aplicacion::getSingleton();\n \n $id = $datos['id'] ?? null;\n\n $title = $datos['title'] ?? null;\n if ( empty($title) ) {\n $result['title'] = \"El nombre de la película no puede quedar vacío.\";\n }\n\n $date_released = $datos['date_released'] ?? null;\n if ( empty($date_released) ) {\n $result['date_released'] = \"La fecha no puede quedar vacía.\";\n }\n\n $duration = $datos['duration'] ?? null;\n if (!is_numeric($duration)) {\n $result['duration'] = \"La duración debe ser un número\";\n } else if ( empty($duration) || $duration < 0 ) {\n $result['duration'] = \"La película debe tener una duración positiva\";\n }\n\n $country = $datos['country'] ?? null;\n if ( empty($country)) {\n $result['country'] = \"El país no puede quedar vacío\";\n }\n\n $plot = $datos['plot'] ?? null;\n if ( empty($plot)) {\n $result['plot'] = \"La película debe tener una trama\";\n }\n\n $link = $datos['link'] ?? null;\n $price = $datos['price'] ?? null;\n if (empty($link) && !empty($price)) {\n $result['link'] = \"Has añadido el precio, pero no el link. Añádelo\";\n } else if (!empty($link) && empty($price)) {\n $result['price'] = \"Has añadido el link, pero no el precio. Añádelo\";\n } else if (!empty($link) && !empty($price)) {\n if (!is_numeric($price)) {\n $result['price'] = \"El precio debe ser un número\";\n }else if ( $price < 2 ) {\n $result['price'] = \"El precio debe ser mayor que 0\";\n }\n }\n\n $image = $datos['image'] ?? null;\n $dir_subida = './img/peliculas/';\n $fichero_subido = $dir_subida . basename($_FILES['image']['name']);\n if (!move_uploaded_file($_FILES['image']['tmp_name'], $fichero_subido) && !empty($_FILES['image']['name'])) {\n $result['image'] = $_FILES['image']['name'].\"El fichero no se ha podido subir correctamente\";\n }\n\n $genres = $datos['genres'] ?? null;\n\n $actors = $datos['actors'] ?? null;\n\n $directors = $datos['directors'] ?? null;\n \n $prevPage = $datos['prevPage'] ?? null;\n\n if (count($result) === 0) {\n if ($app->usuarioLogueado() && ($app->esGestor() || $app->esAdmin())) {\n $pelicula = Pelicula::editar($id, $title, $_FILES['image']['name'], $date_released, $duration, $country, $plot, $link, $price);\n\n Pelicula::actualizarGeneros($pelicula, $genres);\n\n Pelicula::actualizarActoresDirectores($pelicula, $actors, $directors);\n if ( ! $pelicula ) {\n $result[] = \"La película ya existe\";\n } else {\n $result = \"{$prevPage}\";\n }\n }\n }\n return $result;\n }", "protected function generaCamposFormulario($datosIniciales)\n\t\t{\n\t\t\tif(empty($datosIniciales)){\n\t\t\t\t$html = '<fieldset>';\n\t\t\t\t$html.= '<legend>Rellene los datos para finalizar su compra: </legend>';\n\t\t\t\t$html.= '<p>Nombre: <input type=\"text\" name=\"nombre\" required>';\n\t\t\t\t$html.= ' Apellidos: <input type=\"text\" name=\"apellido\" required></p>';\n\t\t\t\t$html.= '<p>País: <input type=\"text\" name=\"pais\" required></p>';\n\t\t\t\t$html.= '<p>Dirección: <input type=\"text\" name=\"direccion\" required>';\n\t\t\t\t$html.=' Código postal: <input type=\"text\" name=\"cp\" required></p>';\n\t\t\t\t$html.= '<p>Localidad/Ciudad: <input type=\"text\" name=\"localidad\" required>';\n\t\t\t\t$html.= ' Provincia: <input type=\"text\" name=\"provincia\" required></p>';\n\t\t\t\t$html.= '<p>Teléfono: <input type=\"text\" name=\"telefono\" required></p>';\n\t\t\t\t$html.= '<p>Dirección de correo electrónico: <input type=\"text\" name=\"correo\" required></p>';\n\t\t\t\t$html.= '</fieldset>';\n\t\t\t\t$html .= '<div id=\"fc\"><fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos de pago: </legend>';\n\t\t\t\t$html .='<p><input type=\"checkbox\" id=\"tipoV\" name=\"tipoT\" value=\"Visa\" >';\n\t\t\t\t$html .='<img src=\"img/visa.jpg\" class=\"visa\" style=\"width:8%; height:6%;\"/>';\n\t\t\t\t$html .='<input type=\"checkbox\" id=\"tipoMC\" name=\"tipoT\" value=\"MasterCard\" >';\n\t\t\t\t$html .='<img src=\"img/mastercard.png\" class=\"MasterCard\" style=\"width:5%; height:3%;\"/></p>';\n\t\t\t\t$html .='<p>Numero de tarjeta: <input type=\"text\" name=\"tarjeta\" required></p>';\n\t\t\t\t$html .='<p>Fecha de caducidad: <input type=\"text\" name=\"mesC\" required> / <input type=\"text\" name=\"añoC\" required> </p>';\n\t\t\t\t$html .='<p>CVV: <input type=\"text\" name=\"cvv\" required></p>';\n\t\t\t\t$html .='<?php echo \"La cantidad total a pagar es \"'. $_SESSION[\"totalCompra\"] .'\"€.\" ?>';\n\t\t\t\t$html.= '<p><input type=\"submit\" name=\"aceptar\" value=\"PAGAR\"></p>';\n\t\t\t $html.= '</fieldset></div>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$html = '<fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos para finalizar su compra: </legend>';\n\t\t\t\t$html.= '<p>Nombre: <input type=\"text\" name=\"nombre\" value=\"'.$datosIniciales['nombre'].'\" required>';\n\t\t\t\t$html.= ' Apellido: <input type=\"text\" name=\"apellido\" value=\"'.$datosIniciales['apellido'].'\" required></p>';\n\t\t\t\t$html.= '<p>País: <input type=\"text\" name=\"pais\" value=\"'.$datosIniciales['pais'].'\" required></p>';\n\t\t\t\t$html.= '<p>Dirección: <input type=\"text\" name=\"direccion\" value=\"'.$datosIniciales['direccion'].'\" required>';\n\t\t\t\t$html.=' Código postal: <input type=\"text\" name=\"cp\" value=\"'.$datosIniciales['cp'].'\" required></p>';\n\t\t\t\t$html.= '<p>Localidad/Ciudad: <input type=\"text\" name=\"localidad\" value=\"'.$datosIniciales['localidad'].'\" required>';\n\t\t\t\t$html.= ' Provincia: <input type=\"text\" name=\"provincia\" value=\"'.$datosIniciales['provincia'].'\" required></p>';\n\t\t\t\t$html.= '<p>Teléfono: <input type=\"text\" name=\"telefono\" value=\"'.$datosIniciales['telefono'].'\" required></p>';\n\t\t\t\t$html.= '<p>Dirección de correo electrónico: <input type=\"text\" name=\"correo\" value=\"'.$datosIniciales['correo'].'\" required></p>';\n\t\t\t $html.= '</fieldset>';\n\t\t\t\t$html .= '<div id=\"fc\"><fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos de pago: </legend>';\n\t\t\t\t$html .='<p><input type=\"checkbox\" id=\"tipoV\" name=\"tipoT\" value=\"Visa\" >';\n\t\t\t\t$html .='<img src=\"img/visa.jpg\" class=\"visa\" style=\"width:8%; height:6%;\"/>';\n\t\t\t\t$html .='<input type=\"checkbox\" id=\"tipoMC\" name=\"tipoT\" value=\"MasterCard\" >';\n\t\t\t\t$html .='<img src=\"img/mastercard.png\" class=\"MasterCard\" style=\"width:5%; height:3%;\"/></p>';\n\t\t\t\t$html .='<p>Numero de tarjeta: <input type=\"text\" name=\"tarjeta\" required></p>';\n\t\t\t\t$html .='<p>Fecha de caducidad: <input type=\"text\" name=\"mesC\" required> / <input type=\"text\" name=\"añoC\" required> </p>';\n\t\t\t\t$html .='<p>CVV: <input type=\"text\" name=\"cvv\" required></p>';\n\t\t\t\t$html .='<?php echo \"La cantidad total a pagar es \"'. $_SESSION[\"totalCompra\"] .'\"€.\" ?>';\n\t\t\t\t$html.= '<p><input type=\"submit\" name=\"aceptar\" value=\"PAGAR\"></p>';\n\t\t\t $html.= '</fieldset></div>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}", "protected function form()\n {\n \n return Admin::form(MPenilaianSla::class, function (Form $form) {\n $roles = Admin::user()->roles;\n $idRoles = $roles[0]['id'];\n $user = Admin::user();\n $idGroupArea = $user['groupArea'];\n $idGroupWill = $user['groupWil'];\n $idAset = $user['aset_id'];\n\n $param = Parameter::where('id' , 1)->get();\n $Thn = $param[0]['value'];\n\n\n\n switch ($idRoles) {\n case 4:\n\n $will = WilayahArea::whereIn('wilayah_id' , $idGroupWill)->get(['id']);\n\n \n break;\n\n case 5:\n\n $will = WilayahArea::where('id' , $idGroupArea)->get(['id']);\n \n break;\n \n default:\n $will = WilayahArea::all(['id']);\n break;\n }\n $form->text('tahun' , 'Tahun')->Attribute(['value' => $Thn , 'readonly' => 'true']);\n $form->select('bulan_id' , 'Period')->options(\n bulan::all()->pluck('uraian' , 'id')\n );\n $form->select('aset_id' , 'Aset')->options(\n Aset::whereIn('wilayah_area_id' , $will)->pluck('nama' , 'id')\n );\n $form->text('sales_area_name' , 'Sales Area');\n \n\n // $form->saving(function ($form) {\n // $DataMPenilaian = MPenilaianSla::where('aset_id' , dump($form->aset_id))\n // ->where('bulan_id' , dump($form->bulan_id))\n // ->get();\n // if(Count($DataMPenilaian) != 0)\n // {\n // $error = new MessageBag([\n // 'title' => 'Kesalahan!',\n // 'message' => 'Penilaian Untuk Aset dan Period ini Sudah Tersedia!',\n // ]); \n // return back()->with(compact('error'));\n // }\n // });\n });\n }", "public function createComponentEditForm(){\n $frm = $this->formFactory->create();\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n \n //query database for listing type\n $FE = $this->listings->isFE($listingID);\n $MS = $this->listings->isMultisig($listingID);\n \n //checkbox value rendering logic\n $checkVal = array();\n \n if ($MS){\n $checkVal[\"ms\"] = \"ms\";\n }\n \n if ($FE){\n $checkVal[\"fe\"] = \"fe\";\n }\n \n $this->lHelp->constructCheckboxList($frm)->setValue($checkVal);\n \n //discard option array\n unset($checkVal);\n\n $cnt = count ($this->postageOptions); \n $session = $this->hlp->sess(\"postage\");\n\n \n for ($i = 0; $i<$cnt; $i++){\n\n $frm->addText(\"postage\" . $i, \"Doprava\");\n $frm->addText(\"pprice\" . $i, \"Cena dopravy\");\n\n }\n \n //additional postage textboxes logic\n $counter = $session->counterEdit;\n $values = $session->values;\n \n if (!is_null($counter)){\n \n $frm->addGroup(\"Postage\");\n \n for ($i =0; $i<$counter; $i++){\n $frm->addText(\"postage\" .$i. \"X\", \"Doprava\"); \n $frm->addText(\"pprice\" .$i. \"X\", \"Cena\");\n }\n }\n \n $frm->addSubmit(\"submit\", \"Upravit\");\n $frm->addSubmit(\"add_postage\", \"Přidat dopravu\")->onClick[] = \n \n function() use($listingID) {\n \n //inline onlclick handler, that counts postage options\n $session = $this->hlp->sess(\"postage\");\n $counter = &$session->counterEdit;\n \n if ($counter <= self::MAX_POSTAGE_OPTIONS){\n $counter++;\n } else {\n $this->flashMessage(\"Dosáhli jste maxima poštovních možností.\");\n }\n \n $form = $this->getComponent(\"editForm\");\n $session->values = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:editListing\", $listingID);\n };\n \n $this->lHelp->fillForm($frm, $values); \n $frm->onSuccess[] = array($this, 'editSuccess');\n $frm->onValidate[] = array($this, 'editValidate');\n \n return $frm; \n }", "function loadClienteForm(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_GET';//'\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t$this->captura('v_valor','varchar');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('nombre_completo1','text');\n\t\t$this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t/*$this->captura('v_id_cliente','int4');\n\t\t$this->captura('v_genero','varchar');\n\t\t$this->captura('v_ci','varchar');\n\t\t$this->captura('v_email','varchar');\n\t\t$this->captura('v_direccion','varchar');\n\t\t$this->captura('v_celular','varchar');\n\t\t$this->captura('v_nombre','varchar');\n\t\t$this->captura('v_lugar_expedicion','varchar');\n\t\t$this->captura('v_apellido_paterno','varchar');\n\t\t$this->captura('v_telefono','varchar');\n\t\t$this->captura('v_ciudad_residencia','varchar');\n\t\t$this->captura('v_id_pais_residencia','int4');\n\t\t$this->captura('v_nacionalidad','varchar');\n\t\t$this->captura('v_barrio_zona','varchar');\n\t\t//$this->captura('estado_reg','varchar');\n\t\t$this->captura('v_apellido_materno','varchar');\n\t\t//$this->captura('id_usuario_ai','int4');\n\t\t//$this->captura('fecha_reg','timestamp');\n\t\t//$this->captura('usuario_ai','varchar');\n\t\t//$this->captura('id_usuario_reg','int4');\n\t\t//$this->captura('fecha_mod','timestamp');\n\t\t//$this->captura('id_usuario_mod','int4');\n\t\t//$this->captura('usr_reg','varchar');\n\t\t//$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('v_completo','text');\n\t\t$this->captura('v_nombre_completo2','text');\n\t\t$this->captura('v_pais_residencia','varchar');*/\n\t\t//$this->captura('nombre','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function __construct($datos_formulario = NULL){\r\n?>\r\n\r\n<div class=\"inner-heading\">\r\n\t <div class=\"container\">\r\n\t <div class=\"row\">\r\n\t <div class=\"span12\">\r\n\t <h1 class=\"animated fadeInDown delay1\">Agregar <span>Grupo</span></h1> <!--El span sirve para colocar una palabra a resaltar en negritas--> \r\n\t <p class=\"animated fadeInDown delay2\"></p>\r\n\t </div>\r\n\t </div>\r\n\t </div>\r\n</div>\r\n<form id=\"form_grupo\" action=\"#\">\r\n\t<input type=\"hidden\" name=\"opc\" value=\"2\"/> <!-- La opcion del controlador a la que se va a llamar -->\r\n\t <input type=\"hidden\" name=\"gr_estado_aprobacion\" value=\"f\" /> \r\n\t\t<fieldset>\r\n\t\r\n\t<table>\r\n <th>Datos del Grupo</th>\r\n\t\t<tr>\r\n\t\t\t<td>Clave del grupo<span>*</span></td>\r\n\t\t\t<td><input type=\"text\" name=\"gr_nombre\" id=\"gr_nombre\" class=\"required\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td>Taller<span>*</span></td>\r\n\t\t\t<td><select name='ta_id' id=\"ta_id\" class=\"required\">\r\n\t\t\t\t<?php \r\n\t\t\t\t\t\tforeach($datos_formulario[\"taller\"] as $id_taller=>$valor){\r\n\t\t\t\t\t\t\techo \"<option value='$id_taller'>\".$valor.\"</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t</select></td>\r\n\t\t\t<td>Aulas</td>\r\n\t\t\t<td><select name='au_id' id=\"au_id\">\r\n\t\t\t\t<?php \r\n\t\t\t\t\t\tforeach($datos_formulario['aula'] as $id_aula => $valor){\r\n\t\t\t\t\t\t\techo \"<option value='$id_aula'>$valor</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t</select></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t<td>Docente<span>*</span></td>\r\n\t\t\t<td><select name='pr_id' id=\"pr_id\" class=\"required\">\r\n\t\t\t\t<?php \r\n\t\t\t\t\t\tforeach($datos_formulario['profesor'] as $id_profesor => $valor){\r\n\t\t\t\t\t\t\techo \"<option value='$id_profesor'>$valor</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t</select></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td align=\"center\" >Fecha inicio</td>\r\n <td><input type=\"text\" id=\"gr_fecha_inicio\" name=\"gr_fecha_inicio\" class=\"required cal\" value=\"\" /></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td align=\"center\" >Fecha fin</td>\r\n <td><input type=\"text\" id=\"gr_fecha_fin\" name=\"gr_fecha_fin\" class=\"required cal\" value=\"\" /></td>\r\n\t\t</tr>\r\n\t\t\t</table>\r\n\t\t<table class=\"tab_form\">\r\n\t\t<tr>&nbsp;</tr>\r\n\t\t<tr><td>Los campos marcados con (<span>*</span>) son obligatorios</td></tr>\r\n\t\t<tr>\r\n\t\t<td>\r\n\t\t\t\t\t<input type=\"button\" value=\"Agregar\" id=\"btn_enviarForm\"/>\r\n\t\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\r\n\t</fieldset>\r\n</form>\r\n<div id=\"mensajes\"></div>\r\n\r\n<script type=\"text/javascript\" src=\"./webroot/js/function_calendario.js\">\r\n</script>\r\n\r\n<script>\r\n\r\n//validar campos que no este vacios\r\nfunction validar(formulario_id){\r\n\t$('label.error').remove();\r\n\tvar valido = true;\r\n\t$('#'+formulario_id+' .required').each(function(index,element){\t\r\n\t\tif( $(this).val() == null || $(this).val() == \"\"){\r\n\t\t\tvalido = false;\r\n\t\t\t$(this).after(\"<label class='error'>Campo Obligatorio*</label>\");\r\n\t\t}\r\n\t});\r\n\treturn valido;\r\n\t\r\n}\r\n\r\n$(document).ready(function(){\r\n\t/*Pantalla para mostrar mensajes a la hora de agregar**/\r\n\t$('#mensajes').dialog({\r\n\t\tautoOpen: false,\r\n\t\tmodal: true});\r\n\t//funcion evento onclick de agregar grupo\r\n\t$('#btn_enviarForm').click(function(){\r\n\t\tif(validar('form_grupo') == true){\r\n\t\t\t/*Serialize toma todos los datos del formulario**/\r\n\t\t\t$.get('controllers/gestionarGrupo/CtlGrupo.php',$('#form_grupo').serialize(),function(data){\r\n\t\t\t\t/**Data es el string que nos manda de respuesta el metodo**/\r\n\t\t\t\t\t$('#mensajes').append(data);\r\n\t\t\t\t\t$('#mensajes').dialog(\"open\");\r\n\t\t\t\t});//fin get\r\n\t\t}\r\n\t});\r\n\r\n}); \r\n</script>\r\n\r\n<?php \r\n\t}", "public function form_informacion_basica(){\n //Tomamos los datos del productor logeado\n $datos = \\DB::table('enc_productores')->orderBy('id_productor', 'desc')->where('object_id', Auth::user()->object_id)->where('activo', 1)->get();\n\n //Si esta vacio, significa que no hay el registro, envìa a formulario vacio\n if (empty($datos->first())) {\n return $this->form_informacion_basica_agregar();\n }\n else {\n //Por el contrario, si hay el registro, envìa a actualizar\n return $this->form_informacion_basica_editar();\n }\n //return view(\"formularios.encuestas.form_informacion_basica_agregar\");\n }", "private function generateFormConstantes()\n {\n $inputs = array();\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Seuil de Calcul Prime fichier',\n 'name' => 'co_seuil_prime_fichier',\n 'desc' => 'Montant du seuil de calcul de la prime',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime fichier',\n 'name' => 'co_prime_fichier',\n 'desc' => 'Montant de la prime fichier',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime parrainage',\n 'name' => 'co_prime_parrainage',\n 'desc' => 'Montant de la prime parrainage',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par jour',\n 'name' => 'co_prospects_jour',\n 'desc' => 'Nombre de prospects affectés par jour travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par heure',\n 'name' => 'co_prospects_heure',\n 'desc' => 'Nombre de prospects par heure travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Ancienneté des prospects',\n 'name' => 'co_prospects_jour_max',\n 'desc' => 'Nombre de jour maximum d\\'ancienneté des prospects pour l\\'atribution',\n 'class' => 'input fixed-width-md',\n 'suffix' => 'jour'\n );\n\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-cogs'\n ),\n 'input' => $inputs,\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => 'submitConfiguration'\n )\n )\n );\n\n $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));\n $helper = new HelperForm();\n $helper->default_form_language = $lang->id;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name\n . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigConfiguration(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n return $helper->generateForm(array($fields_form));\n\n }", "private function generate()\n\t{\n//\t\t$arrContrato = $contrato->getContratoPorTipoDeObjeto(true, 'P');\n\n\t\t$unidade = new Unidade();\n\t\t$arrUnidade = $unidade->getUnidade(true);\n\t\t\n\t\t$this->setName('projeto_previsto');\n\t\t$this->addDecorator('HtmlTag', array('tag'=>'div', 'class'=>'span-14'));\n\n\t\t$cd_contrato = new Base_Form_Element_Select('cd_contrato_projeto_previsto', array('class'=>'span-5 float-l'));\n\t\t$cd_contrato->setLabel(Base_Util::getTranslator('L_VIEW_CONTRATO').':')\n\t\t->addDecorator('Label', array('class'=>'float-l span-3 right'))\n\t\t->setRegisterInArrayValidator(false)\n\t\t->setRequired(true);\n//\t\t$cd_contrato->addMultiOptions($arrContrato);\n\n\t\t$cd_unidade = new Base_Form_Element_Select('cd_unidade_projeto_previsto', array('class'=>'span-5 float-l'));\n\t\t$cd_unidade->setLabel(Base_Util::getTranslator('L_VIEW_UNIDADE').':')\n\t\t->addDecorator('Label', array('class'=>'span-3 float-l clear-l right'))\n\t\t->setRegisterInArrayValidator(false)\n\t\t->setRequired(true);\n\t\t$cd_unidade->addMultiOptions($arrUnidade);\n\t\t\n\t\t$cd_projeto_previsto = new Base_Form_Element_Hidden('cd_projeto_previsto');\n\t\t$tx_projeto_previsto = new Base_Form_Element_Text('tx_projeto_previsto', array('class'=>'span-10 float-l'));\n\t\t$tx_projeto_previsto->setLabel(Base_Util::getTranslator('L_VIEW_PROJETO_PREVISTO').':')\n\t\t->addDecorator('Label', array('class'=>'span-3 float-l clear-l right'))\n\t\t->setRequired(true)\n\t\t->addFilter('StripTags')\n\t\t->addFilter('StringTrim')\n\t\t->addValidator('NotEmpty');\n\n\t\t$ni_horas_projeto_previsto = new Base_Form_Element_SoNumero('ni_horas_projeto_previsto', array('class'=>'span-2 float-l'));\n\t\t$ni_horas_projeto_previsto->setLabel(Base_Util::getTranslator('L_VIEW_UNID_METRICA_PREVISTA').':')\n\t\t->addDecorator('Label', array('class'=>'span-3 float-l clear-l right'))\n\t\t->setRequired(true)\n\t\t->addFilter('StripTags')\n\t\t->addFilter('StringTrim')\n\t\t->addValidator('NotEmpty');\n\n\t\t$objDefinicaoMetrica = new DefinicaoMetrica();\n\t\t$arrSiglaMetrica\t = $objDefinicaoMetrica->getComboSiglaDefinicaoMetrica(true);\n\n\t\t$cd_metrica_unidade_prevista_projeto_previsto = new Base_Form_Element_Select('cd_metrica_unidade_prevista_projeto_previsto', array('class'=>'float-l span-3'));\n\t\t$cd_metrica_unidade_prevista_projeto_previsto->addMultiOptions($arrSiglaMetrica)\n\t\t->setLabel('&nbsp;')\n\t\t->addDecorator('Label', array('class'=>'float-l right lb_combo_sigla_metrica_unidade_prevista_projeto_previsto', 'style'=>'margin-left: 5px;'))\n\t\t->addDecorator('HtmlTag', array('tag'=>'div', 'class'=>'float-l', 'style'=>'height:27px;'))\n\t\t->setRequired(true)\n ->setRegisterInArrayValidator(false);\n\n\t\t$arrProjetoPrevisto = array();\n\t\t$arrProjetoPrevisto['0'] = Base_Util::getTranslator('L_VIEW_COMBO_SELECIONE');\n\t\t$arrProjetoPrevisto['E'] = Base_Util::getTranslator('L_VIEW_COMBO_EVOLUTIVO');\n\t\t$arrProjetoPrevisto['N'] = Base_Util::getTranslator('L_VIEW_COMBO_NOVO');\n\t\t\n\t\t$st_projeto_previsto = new Base_Form_Element_Select('st_projeto_previsto', array('class'=>'span-5 float-l'));\n\t\t$st_projeto_previsto->setLabel(Base_Util::getTranslator('L_VIEW_TIPO_PROJETO').':')\n\t\t->addDecorator('Label', array('class'=>'span-3 float-l clear-l right'))\n\t\t->setRegisterInArrayValidator(false)\n\t\t->setRequired(true);\n\t\t$st_projeto_previsto->addMultiOptions($arrProjetoPrevisto);\n\t\t\n\t\t$tx_descricao_projeto_previsto = new Base_Form_Element_Textarea('tx_descricao_projeto_previsto', array('class'=>'span-14 height-4 float-l'));\n\t\t$tx_descricao_projeto_previsto->setLabel(Base_Util::getTranslator('L_VIEW_DESCRICAO').':')\n\t\t->addDecorator('Label', array('class'=>'float-l span-3 right'))\n\t\t->addDecorator('HtmlTag', array('tag'=>'div', 'class'=>'span-22 float-l clear gap-1'))\n\t\t->addFilter('StripTags')\n\t\t->addFilter('StringTrim')\n\t\t->addValidator('NotEmpty');\t\t\t\t\t\t\n\t\t\n\t\t$this->addElements(array(\n\t\t\t\t\t\t\t\t$cd_projeto_previsto, \n\t\t\t\t\t\t\t\t$cd_contrato, \n\t\t\t\t\t\t\t\t$cd_unidade, \n\t\t\t\t\t\t\t\t$st_projeto_previsto,\n\t\t\t\t\t\t\t\t$tx_projeto_previsto, \n\t\t\t\t\t\t\t\t$ni_horas_projeto_previsto,\n\t\t\t\t\t\t\t\t$cd_metrica_unidade_prevista_projeto_previsto,\n\t\t\t\t\t\t\t\t$tx_descricao_projeto_previsto));\n\t}", "function consultaFacultades() {\r\n include_once($this->configuracion[\"raiz_documento\"].$this->configuracion[\"clases\"].\"/html.class.php\");\r\n $this->html = new html();\r\n $facultades=$this->consultarFacultades();\r\n \r\n foreach ($facultades as $key=>$facultad) {\r\n $registro[$key][0]=$facultad['COD_FACULTAD'];\r\n $registro[$key][1]=$facultad['NOMBRE_FACULTAD'];\r\n }?>\r\n\t\t<form enctype='multipart/form-data' method='POST' action='index.php' name='<? echo $this->formulario?>'>\r\n <table width=\"100%\" align=\"center\" border=\"1\" cellpadding=\"10\" cellspacing=\"0\" >\r\n <tr>\r\n <td>Seleccione la Facultad: \r\n <?$mi_cuadro=$this->html->cuadro_lista($registro,'facultad',$this->configuracion,-1,\"\",FALSE,\"\",\"facultad\");\r\n echo $mi_cuadro;?>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <input type=\"hidden\" name=\"opcion\" value=\"consultaProyectos\">\r\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->bloque ?>\">\r\n <input class=\"boton\" type=\"button\" value=\"Continuar\" onclick=\"document.forms['<? echo $this->formulario?>'].submit()\">\r\n </td>\r\n </tr>\r\n </table>\r\n\t\t</form>\t\r\n <?\r\n \r\n \r\n }", "public static function formularioMarcas()\n {\n //Variable con los permisos del usuario\n $dato_tipo = Sentencias::Seleccionar(\"tipos_usuarios\", \"id\", array($_SESSION[\"tipo\"]), 0, null);\n\n //Variables de los campos de la tabla marcas\n $marca = null;\n\n \n\n //Se empiezan a validar los datos del formulario de marcas\n if(isset($_POST[\"formulario\"]))\n {\n //Se valida que no se dejen espacios vacios\n if($_POST[\"marca\"] != \"\")\n {\n //Se valida que la marca cumpla con los criterios\n if(Validaciones::alfanumerico($_POST[\"marca\"]) && Validaciones::longitud($_POST[\"marca\"], 20))\n {\n //Se divide en si es ingresar un registro o modificar uno existente\n //Aqui es donde se modifica el registro\n if(!empty($_GET[\"id_marca\"]))\n {\n //Se valida si el parametro es un numero\n if(is_numeric($_GET[\"id_marca\"]))\n {\n //Se divide entre solo actualizar marca, imagen y ambas a la vez\n //Aqui se actualiza el nombre y la imagen\n if(is_uploaded_file($_FILES[\"archivo\"][\"tmp_name\"]))\n {\n $img = $_POST[\"marca\"].time().\".jpg\";\n\n $campos_valores = array\n (\n 'marca' => $_POST[\"marca\"],\n 'imagen' => $img\n );\n\n $condiciones_parametros = array\n (\n 'id' => $_GET[\"id_marca\"]\n );\n\n Sentencias::Actualizar(\"marcas\", $campos_valores, $condiciones_parametros, 1, \"marcas.php\");\n move_uploaded_file($_FILES['archivo']['tmp_name'], \"../img/marcas/$img\");\n }\n\n //Aqui solo se actualizara el nombre\n else\n {\n $campos_valores = array\n (\n 'marca' => $_POST[\"marca\"]\n );\n\n $condiciones_parametros = array\n (\n 'id' => $_GET[\"id_marca\"]\n );\n\n Sentencias::Actualizar(\"marcas\", $campos_valores, $condiciones_parametros, 1, \"marcas.php\"); \n }\n }\n\n else\n {\n header(\"Location: marcas.php\");\n }\n }\n\n //Aqui es donde se agrega un nuevo registro\n else\n {\n //Se valida si ya se subio la imagen\n if(is_uploaded_file($_FILES[\"archivo\"][\"tmp_name\"]))\n {\n //Se validan los valores de la iamgen\n if(Validaciones::imagen($_FILES[\"archivo\"]))\n {\n $img = $_POST[\"marca\"].time().\".jpg\";\n $campos_valores = array\n (\n 'marca' => $_POST[\"marca\"],\n 'imagen' => $img\n );\n\n Sentencias::Insertar(\"marcas\", $campos_valores, 1, \"marcas.php\");\n move_uploaded_file($_FILES['archivo']['tmp_name'], \"../img/marcas/$img\");\n }\n\n else\n {\n Ventanas::Mensaje(2, \"La imagen no es valida\", null);\n }\n }\n\n else\n {\n Ventanas::Mensaje(2, \"Debe ingresar una imagen\", null);\n }\n }\n } \n\n else\n {\n Ventanas::Mensaje(2, \"El nombre de la marca no es valido\", null);\n }\n }\n\n else\n {\n Ventanas::Mensaje(2, \"No deje campos vacios\", null);\n }\n }\n\n //Renderiza el formulario de marcas\n echo\n (\"\n <form method='post' enctype='multipart/form-data' id='registro'>\n <div class='row'>\n <div class='container'>\n <div class='col s12 center-align'>\n <h4>Aqui puedes ingresar una nueva marca</h4>\n </div>\n <div class='input-field col s10 offset-s1'>\n <input id='marca' value='$marca' name='marca' type='text' class='validate' autocomplete='off'>\n <label for='marca' class='blue-text text-darken-4'>Nombre de la marca</label>\n </div>\n <div class='file-field input-field col s10 offset-s1'>\n <div class='btn blue darken-4'>\n <span>Imagen</span>\n <input type='file' name='archivo'>\n </div>\n <div class='file-path-wrapper'>\n <input class='file-path validate' type='text' placeholder='Seleccione una imagen para el usuario'>\n </div>\n </div>\n \");\n\n //Se renderiza el boton dependiendo de si es para crear o modificar\n if(empty($_GET[\"id_marca\"]))\n {\n //Se valida si tiene permisos para ingresar\n if($dato_tipo[\"marcas\"] == 2 || $dato_tipo[\"marcas\"] == 5 || $dato_tipo[\"marcas\"] == 6 || $dato_tipo[\"marcas\"] == 9)\n {\n echo\n (\"\n <div class='col s3 offset-s1'>\n <button name='formulario' class='waves-effect waves-light btn blue darken-4'>Ingresar marca</button>\n </div> \n \");\n } \n }\n\n else\n {\n //Se valida si tiene permisos para modificar\n if($dato_tipo[\"marcas\"] == 3 || $dato_tipo[\"marcas\"] == 5 || $dato_tipo[\"marcas\"] > 6)\n {\n echo\n (\"\n <div class='col s3 offset-s1'>\n <button name='formulario' class='waves-effect waves-light btn blue darken-4'>Actualizar marca</button>\n </div> \n \");\n } \n }\n\n echo\n (\" \n <div class='col s3'>\n <a href='marcas.php' class='waves-effect waves-light btn blue darken-4'>Limpiar campos</a>\n </div> \n </div>\n </div> \n </form>\n \");\n }", "public function newform()\n {\n return view('firma.unos');\n }", "abstract protected function _setNewForm();", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}", "function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}", "public function form()\n\t{\n\t?>\n\t<table class=\"form-table\">\n\t\t<tbody>\n\t\t<?php foreach( (array) $this->InstanceRegistred as $id => $args ) : ?>\n\t\t\t<tr>\n\t\t\t\t<th><?php echo $args['title'];?></th>\n\t\t\t\t<td>\n\t\t\t\t<?php \n\t\t\t\t\twp_dropdown_pages(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' \t\t\t\t=> $args['name'],\n\t\t\t\t\t\t\t'post_type' \t\t=> $args['post_type'],\n\t\t\t\t\t\t\t'selected' \t\t\t=> $args['selected'],\n\t\t\t\t\t\t\t'sort_column' \t\t=> $args['listorder'],\n\t\t\t\t\t\t\t'show_option_none' \t=> $args['show_option_none']\t\t\t\t\t\t\t\n\t\t\t\t\t\t)\n\t\t\t\t\t);\t\t\t\t\n\t\t\t\t?>\t\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach;?>\n\t\t</tbody>\n\t</table>\n\t<?php\t\t\n\t}", "public function form()\n {\n\t\t$xapp = Xapp::findOrFail(request('id'));\n\t\t$xapp_fields = Schema::getColumnListing($xapp->table);\n\t\t$this->hidden('id');\n\t\tforeach(config('xapp.xappset') as $name=>$set){\t\t\n\t\t\tif( empty($set['field']) ){\n\t\t\t\t$this->switch($name, '启用'.$set['title'])->help('是否启用'.$set['title'].'功能');\n\t\t\t}elseif(in_array($set['field'],$xapp_fields)){\n\t\t\t\t$this->switch($name, '启用'.$set['title'])->help('是否启用'.$set['title'].'功能,本功能依赖'.$set['field'].'字段');\n\t\t\t}\n\t\t}\n }", "protected function form()\n {\n $form = new Form(new Information);\n \n \n\n $form->text('name', __('项目名称'))->autofocus()->placeholder('例:上汽大众新能源汽车工厂项目')->required();\n $form->text('industry', __('行业类别'))->required();\n $form->currency('investment', __('投资金额'))->icon('fa-usd')->required(); \n $form->text('cont_name', __('资方联系人'))->placeholder('选填内容,可为空');\n $form->text('cont_phone', __('资方联系方式'))->placeholder('选填内容,可为空');\n $form->text('staff_name', __('工作人员姓名'));\n $form->text('staff_phone', __('工作人员电话'));\n $form->hidden('adminuser_id', __('adminuser_id'))->value(Admin::user()->id);\n $form->textarea('content', __('项目情况'))->required()->placeholder('请填写项目介绍(包括项目投资额度、产业类别等)、项目需求(如土地、排放、能耗等)、谈判进度等......');\n\n\n\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n $form->setAction('../admin/myinfo');\n\n return $form;\n }" ]
[ "0.7728805", "0.7504237", "0.7490525", "0.7358229", "0.7096914", "0.70932436", "0.70505834", "0.6982112", "0.69566774", "0.69428587", "0.685742", "0.6827723", "0.6826842", "0.67774266", "0.6765608", "0.6765608", "0.6759496", "0.67495155", "0.6748402", "0.67030346", "0.6697272", "0.6670448", "0.66615736", "0.6657487", "0.66564035", "0.66425145", "0.66225433", "0.6614082", "0.6610776", "0.66071314", "0.66018355", "0.6572828", "0.6571871", "0.655374", "0.65509796", "0.6538558", "0.65384096", "0.6534824", "0.65320486", "0.65251523", "0.652004", "0.6516426", "0.6514008", "0.6511545", "0.65079665", "0.6497586", "0.6489411", "0.64888835", "0.647487", "0.6471244", "0.64619356", "0.6459177", "0.6449855", "0.6446276", "0.64398456", "0.64330196", "0.6431854", "0.6424586", "0.64239234", "0.6409033", "0.640401", "0.638687", "0.63858", "0.63858", "0.63857406", "0.6382421", "0.6378555", "0.6372347", "0.63682765", "0.63528264", "0.63507897", "0.6341172", "0.63328606", "0.6332674", "0.63236976", "0.6322628", "0.6321484", "0.63205576", "0.6304916", "0.63028103", "0.62962407", "0.62939954", "0.62939954", "0.6287658", "0.62847537", "0.628147", "0.6281005", "0.6279992", "0.6265934", "0.62655836", "0.6264065", "0.626333", "0.62607944", "0.6260072", "0.62600327", "0.6259825", "0.6257041", "0.6255296", "0.62462926", "0.6232167", "0.6231096" ]
0.0
-1
validocreo la peli y la guardo
public function nuevaPelicula(Request $request){ $this->validate($request, [ 'title' => 'required|unique:movies', 'rating' => 'required|numeric|between:1,10', 'awards' => 'required', 'length' => 'required', 'dia' => 'required', "mes" => 'required', "anio" => 'required' ], [ 'title.required' => 'el campo titulo es requerido', 'rating.required' => 'el campo rating es requerido', 'rating.numeric' => 'el campo rating deben ser solo numeros' ] ); $pelicula = new Movie($request->all()); $release_date = $request->input('anio').'-'.$request->input('mes').'-'.$request->input('dia'); $pelicula->release_date = date('Y-m-d', strtotime($release_date)); $pelicula->save(); return redirect()->route('todas_las_pelis'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isValid()\n\t{\n\t\tif (empty($this->titre)) $this->titre = \"TITRE A REMPLACER\";\n\t\telse $this->titre = trim (preg_replace('/\\s+/', ' ', $this->titre) ); // Suppression des espaces\n\t\tif (!empty($this->contenu)) $this->contenu = trim (preg_replace('/\\s+/', ' ', $this->contenu) ); // Suppression des espaces\n\t\tif (empty($this->statut)) $this->statut = 0;\n\t\tif (empty($this->id_type)) $this->id_type = 1;\n\t\tif (empty($this->id_membre)) $this->id_membre = 0;\n\t}", "public function valid(){ }", "function validateProveidor() {\n $validation = new Validation(true, '');\n $patroLletres = \"/^[\\A-Za-z]+$/i\";\n\n if ($validation->getOk() && trim($this->getNom()) == '') {\n $validation->setMsg(\"El nom no pot està buit.\");\n $validation->setOK(false);\n }\n if ($validation->getOk() && !preg_match($patroLletres, trim($this->getNom()))) {\n $validation->setMsg(\"El nom només pot ser alfabètic.\");\n $validation->setOK(false);\n }\n\n if ($validation->getOk() && trim($this->getCodi()) == '') {\n $validation->setMsg(\"El codi no pot està buit.\");\n $validation->setOK(false);\n }\n\n return $validation;\n }", "public function validar()\n {\n foreach ($this->reglas as $campo => $listadoReglas) {\n foreach ($listadoReglas as $regla) {\n $this->aplicarValidacion($campo, $regla);\n }\n }\n }", "function validarRegistro()\n {\n $mensaje=\"\";\n $adicionado=\"\";\n $idSolicitud=(isset($_REQUEST['idSolicitud'])?$_REQUEST['idSolicitud']:'');\n \n if(is_numeric($idSolicitud) && $idSolicitud){\n $this->solicitud= $this->consultarDetalleSolicitud($idSolicitud);\n\n $datosRegistro=array('solicitante'=>$this->solicitud[0]['SOL_NRO_IDEN_SOLICITANTE'],\n 'identificacion'=>$this->solicitud[0]['SOL_CODIGO'],\n 'correo'=>$this->solicitud[0]['CORREO_ELECTRONICO'],\n 'tipo_documento'=>$this->solicitud[0]['UWD_TIPO_IDEN'],\n 'tipo_contrato'=>$this->solicitud[0]['SOL_TIPO_VINCULACION'],\n 'fecha_inicio'=>$this->solicitud[0]['SOL_FECHA_INICIO'],\n 'fecha_fin'=>(isset($this->solicitud[0]['SOL_FECHA_FIN'])?$this->solicitud[0]['SOL_FECHA_FIN']:''),\n 'tipo_cuenta'=> $this->solicitud[0]['SOL_USUWEBTIPO'],\n 'tipo_usuario'=> $this->solicitud[0]['TIPO_USUARIO'],\n 'estado_usuario'=> 'A',\n 'secuencia'=>1,\n 'anexo'=>''\n );\n //busca si existe registro ya de usuario para rescatar la clave \n $registro = $this->buscarRegistroUsuario($datosRegistro['identificacion']);\n if(is_array($registro)){\n $datosRegistro['clave']=$registro[0]['CLA_CLAVE'];\n \n }else{\n $datosRegistro['clave']=$this->asignarClave();\n $datosRegistro['asigna_clave']='ok';\n }\n \n $datosRegistro = $this->asignarDependencia($datosRegistro);\n if(is_array($datosRegistro)){\n $usuario_existe = $this->buscarRegistroUsuarioYaExiste($datosRegistro[0]);\n \n if(is_array($usuario_existe) && $usuario_existe){\n $adicionado=$this->actualizarUsuario($datosRegistro[0]);\n $adicionadoMysql=$this->actualizarCuentaUsuarioMysql($datosRegistro[0]);\n \n }else{\n $adicionado=$this->adicionarCuentaUsuario($datosRegistro[0]);\n $adicionadoMysql=$this->adicionarCuentaUsuarioMysql($datosRegistro[0]);\n }\n\n foreach ($datosRegistro as $key => $registroUsuario) {\n \n $usuarioWeb = $this->buscarRegistroUsuarioWeb($registroUsuario['identificacion'], $registroUsuario['tipo_cuenta'], $registroUsuario['dependencia']);\n \n if(is_array($usuarioWeb)){\n $actualizadoweb[$key]=$this->actualizarCuentaUsuarioWeb($registroUsuario);\n \n }else{\n $adicionadoweb[$key]=$this->adicionarCuentaUsuarioWeb($registroUsuario);\n \n }\n }\n }\n var_dump($adicionado);\n var_dump($adicionadoMysql);\n if($adicionado && $adicionadoMysql){\n $modificado=$this->actualizarEstadoSolicitud($idSolicitud,3);\n \n $mensaje='Usuario creado con exito';\n $variablesRegistro=array('usuario'=>$this->usuario,\n 'evento'=>'66',\n 'descripcion'=>'Registro de usuario '.$datosRegistro[0]['identificacion'],\n 'registro'=>\" id_solicitud->\".$idSolicitud.\", usuario-> \".$datosRegistro[0]['identificacion'],\n 'afectado'=>$datosRegistro[0]['identificacion']);\n\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n if((isset($datosRegistro[0]['asigna_clave'])?$datosRegistro[0]['asigna_clave']:'')=='ok'){\n $variable=\"pagina=registro_aprobarSolicitudUsuario\";\n $variable.=\"&opcion=enlace\";\n $variable.=\"&mail=\".$datosRegistro[0]['correo'];\n $variable.=\"&usu=\".$datosRegistro[0]['identificacion'];\n $variable.=\"&tipoUsu=\".$datosRegistro[0]['tipo_usuario'];\n }else{\n $variable=\"pagina=admin_consultarSolicitudesUsuario\";\n $variable.=\"&opcion=consultar\";\n }\n \n $variable=$this->cripto->codificar_url($variable,$this->configuracion);\n \n $this->retornar($pagina,$variable,$variablesRegistro,$mensaje);\n }else{\n $mensaje='Error al crear Usuario. '.$this->mensaje;\n\n $variablesRegistro=array('usuario'=>$this->usuario,\n 'evento'=>'66',\n 'descripcion'=>'Error al registrar usuario -'.$mensaje,\n 'registro'=>\" id_solicitud->\".$idSolicitud.\", usuario-> \".$this->solicitud[0]['SOL_CODIGO'],\n 'afectado'=>$this->solicitud[0]['SOL_CODIGO']);\n\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n $variable=\"pagina=admin_consultarSolicitudesUsuario\";\n $variable.=\"&opcion=consultar\";\n $variable=$this->cripto->codificar_url($variable,$this->configuracion);\n\n $this->retornar($pagina,$variable,$variablesRegistro,$mensaje);\n }\n }\n }", "public function validateSave() {\n\t\t//0. Pobranie parametrów z walidacją\n\t\t$this->form->id = getFromRequest('id',true,'Błędne wywołanie aplikacji');\n\t\t$this->form->volt1 = getFromRequest('v1',true,'Błędne wywołanie aplikacji');\n\t\t$this->form->volt2 = getFromRequest('v2',true,'Błędne wywołanie aplikacji');\n\t\t$this->form->amps = getFromRequest('amp',true,'Błędne wywołanie aplikacji');\n $this->form->resis = getFromRequest('resistor',true,'Błędne wywołanie aplikacji');\n\n\t\tif ( getMessages()->isError() ) return false;\n\n\t\t// 1. sprawdzenie czy wartości wymagane nie są puste\n\t\tif (empty(trim($this->form->volt1))) {\n\t\t\tgetMessages()->addError('Wprowadź napięcie zasilania');\n\t\t}\n\t\tif (empty(trim($this->form->volt2))) {\n\t\t\tgetMessages()->addError('Wprowadź napięcie przewodzenia diody');\n\t\t}\n\t\tif (empty(trim($this->form->amps))) {\n\t\t\tgetMessages()->addError('Wprowadź prąd przewodzenia diody');\n\t\t}\n\n\t\tif ( getMessages()->isError() ) return false;\n\t\t\n\t\treturn ! getMessages()->isError();\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "function validar_datos() {\n\t\t\tglobal $nombre, $mail, $apellido, $psw, $psw1, $telefono, $desc;\n\n\t\t\t$errores = 0;\n $msj = \"\"; \n\t\t\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t\t{\t\t\t\t\n\t\t\t\t if ($nombre == null || trim($nombre)==\"\")\n\t\t\t\t {\n\t\t\t\t\t$msj .= \"Debe ingresar un nombre\" . '\\n';\n\t\t\t\t\t$errores++;\n\t\t\t\t }\n\t\t\t\t if ($errores == 0)\n \t\treturn true;\n \t\t else\n\t\t\t\t\techo \"<script language='javascript'>alert('$msj');window.location.href='abm_marcas.php'</script>\";\n\t\t\t\t\texit; \t\t\n\t\t\t}\t\t\n\t\t}", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "function validar_Validado()\n {\n\n $this->resource = 'Actividades';\n\n if ($this->no_vacio($this->validado) === false) {\n $this->code = '70032';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->es_validado($this->validado) === false) {\n $this->code = '70033';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }", "abstract public function valid();", "public function validate()\n {\n // FUTURE FIXME: no se deberia retornar un simple true/false, sino que \n // si una condicion no se cumple deberia devolverse un mensaje \n // indicando qué no se ha cumplido, posiblemente usando una excepcion \n // para cada caso, para que el controlador la capture y muestre el \n // mensaje adecuado a la vista y no un simple mensaje de error \n // generico.\n\n // name solo puede tener letras, números y guiones\n if (!filter_var($this->name, FILTER_VALIDATE_REGEXP, [\"options\" => [\"regexp\" => \"/[a-zA-Z0-9\\-]+/\"]]))\n return false;\n\n // descrpicion debe limpiarse para prevenir ataques XSS\n $this->description = filter_var($this->description, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n // nombre debe tener como minimo 4 caracteres y como maximo 255\n if (strlen($this->name) <4 || strlen($this->name) > 255)\n return false;\n\n // estado debe ser \"pendiente\", \"subasta\" o \"venta\" exclusivamente\n if ($this ->state !== \"pendiente\" && $this->state !== \"subasta\" && $this->state !== \"venta\")\n return false;\n\n // el propietario debe existir como usuario en la BD\n $user = new User($this->owner);\n if (!$user->fill()) return false;\n\n // todas las condiciones se han cumplido, retorna true\n return true;\n }", "function validarDatosRegistro() {\r\n // Recuperar datos Enviados desde formulario_nuevo_equipo.php\r\n $datos = Array();\r\n $datos[0] = (isset($_REQUEST['marca']))?\r\n $_REQUEST['marca']:\"\";\r\n $datos[1] = (isset($_REQUEST['modelo']))?\r\n $_REQUEST['modelo']:\"\";\r\n $datos[2] = (isset($_REQUEST['matricula']))?\r\n $_REQUEST['matricula']:\"\";\r\n \r\n //-----validar ---- //\r\n $errores = Array();\r\n $errores[0] = !validarMarca($datos[0]);\r\n $errores[1] = !validarModelo($datos[1]);\r\n $errores[2] = !validarMatricula($datos[2]);\r\n \r\n // ----- Asignar a variables de Sesión ----//\r\n $_SESSION['datos'] = $datos;\r\n $_SESSION['errores'] = $errores; \r\n $_SESSION['hayErrores'] = \r\n ($errores[0] || $errores[1] ||\r\n $errores[2]);\r\n \r\n}", "function inscription_jesa_direct_validate($form, &$form_state) {\n //**************************\n // Validation Utilisateur \n //**************************\n //Si le champ stagiaire existant est rempli, on ne regade pas les champs nouveau\n if (!empty($form_state['values']['stagiaire']['existant']['user_name'])) {\n //Controle si le stagiaire existe déjà et si les champs sont corrects\n $user_by_name = user_load_by_name($form_state['values']['stagiaire']['existant']['user_name']);\n if (empty($user_by_name)) {\n form_set_error('stagiaire][existant][user_name', 'The member doesn\\'t exist.'); \n }\n $form_state['values']['stagiaire']['uid'] = is_object($user_by_name) ? $user_by_name->uid : 0;\n } \n else {\n // Le champs utilisateur existant n'a pas été rempli, on controle les champs\n // du nouvel utilisateur\n $stagiaire = _inscription_jesa_get_user_data($form_state['values']['stagiaire']['nouveau']);\n // Validité de la date de naissance\n if (empty($stagiaire['date_naissance'])) {\n form_set_error('stagiaire][nouveau][date_naissance', ucfirst(t('the birthdate is mandatory for a new member.')));\n }\n else { \n $date_naissance_dt = _inscription_jesa_chek_birthdate($stagiaire['date_naissance']);\n if (is_int($date_naissance_dt)) {\n $form_state['values']['stagiaire']['nouveau']['date_naissance_ts'] = $date_naissance_dt;\n } \n else {\n form_set_error('stagiaire][nouveau][date_naissance', $date_naissance_dt);\n unset($form_state['values']['stagiaire']['nouveau']['date_naissance_ts']);\n }\n }\n\n if (empty($stagiaire['nom'])) {\n form_set_error('stagiaire][nouveau][nom', ucfirst(t('the name is mandatory for a new member.')));\n }\n if (empty($stagiaire['prenom'])) {\n form_set_error('stagiaire][nouveau][prenom', ucfirst(t('the fisrtname is mandatory for a new member.')));\n }\n //Controle si le stagiaire existe déjà et si les champs sont corrects\n $stagiaire_account = _inscription_jesa_validate_user($stagiaire);\n if (is_string($stagiaire_account)) {\n // le résultat est un string => c'est un message d'erreur.\n form_set_error('stagiaire][nouveau', $stagiaire_account); \n }\n $form_state['values']['stagiaire']['uid'] = is_object($stagiaire_account) ? $stagiaire_account->uid : 0;\n if ($stagiaire_account === FALSE) {\n //C'est un nouveau stagiaire => certains champs deviennent obligatoires\n if (empty($stagiaire['adresse_1']) || empty($stagiaire['adresse_2'])) {\n form_set_error('stagiaire][nouveau', ucfirst(t('the address is mandatory for a new member.')));\n form_set_error('stagiaire][nouveau][adresse_2', ' ');\n array_pop($_SESSION['messages']['error']); \n }\n if (empty($stagiaire['sexe'])) {\n form_set_error('stagiaire][nouveau][sexe', ucfirst(t('the gender is mandatory for a new member.')));\n } \n if (empty($stagiaire['mail']) && empty($stagiaire['nouveau']['telephone'])) {\n form_set_error(\n 'stagiaire][nouveau][mail', \n ucfirst(t('the email address or the phone number is mandatory for a new member.'))\n );\n form_set_error('stagiaire][telephone', ' ');\n array_pop($_SESSION['messages']['error']); \n } \n } \n }\n \n //**************************\n // Validation Stage\n //**************************\n if (empty($form_state['values']['stage']['list'])) {\n form_set_error('stage][list' ,t('Please select an event.'));\n }\n}", "public function guardar(){\n\t}", "function evt__validar_datos()\r\n\t{}", "public function validaEstoque(): bool\n {\n echo \"Registro de retirada efetuado com sucesso\";\n return true;\n }", "function validaAbrirCaptura(){\n return true;\n }", "public function valid()\n {\n }", "public function valid()\n {\n }", "public function valid()\n {\n }", "public function valid()\n {\n }", "private function _validasi()\n {\n // $this->form_validation->set_rules('sejarah', 'Sejarah Ormawa', 'required|trim');\n // $this->form_validation->set_rules('ad_art', 'AD/ART Ormawa', 'required|trim');\n // $this->form_validation->set_rules('gbho', 'GBHO Ormawa', 'required|trim');\n // $this->form_validation->set_rules('gbhk', 'GBHK Ormawa', 'required|trim');\n // $this->form_validation->set_rules('struktur', 'Struktur Organisasi', 'required|trim');\n // $this->form_validation->set_rules('id_rumpun', 'Struktur Organisasi', 'required|trim');\n\t\t\n // $this->form_validation->set_rules('nama_lpj', 'Nama Proposal', 'required|trim');\n $this->form_validation->set_rules('nama_lpj', 'Nama LPJ', 'required|trim');\n $this->form_validation->set_rules('status', 'Status', 'required|trim');\n $this->form_validation->set_rules('catatan', 'Catatan', 'required|trim');\n }", "public function validaDatos(){\n\t\t\t\t\n\t\t\t\tif( $this->nombre == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su nombre por favor.</strong><br />\";\n\t\t\t\t\t}else if( strlen($this->nombre) > 20 ){\n\t\t\t\t\t\t$errores.= \"<strong>* Escriba un nombre con menos caracteres. (20 caracteres maximo - sin espacios)</strong><br />\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif( $this->email == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su email por favor.</strong><br />\";\n\t\t\t\t\t}else if( !preg_match($this->sintax,$this->email)){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese formato correcto de email</strong><br /> 'ej: [email protected]' .<br />\";\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $this->asunto == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su asunto por favor. </strong><br />\";\n\t\t\t\t\t}else if( strlen($this->asunto) > 20 ){\n\t\t\t\t\t\t$errores.= \"<strong>* Escriba un asunto con menos caracteres. (20 caracteres maximo - sin espacios) </strong><br />\";\n\t\t\t\t\t}\n\t\t\t\t\t\t\t \n\t\t\t\tif( $this->msj == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su mensaje por favor. </strong><br />\";\n\t\t\t\t\t}else if( strlen($this->msj) > 200 ){\n\t\t\t\t\t$this->errores.= \"<strong>* Maximo permitido 200 caracteres. </strong><br />\";\n\t\t\t\t\t}\n\t\t\t}", "function validar() {\n leerClase('Formulario');\n Formulario::validar('login' , $this->login , 'texto', 'El Nombre de Usuario');\n Formulario::validar('clave', $this->clave, 'texto', 'Contraseña');\n \n }", "function validar_vale() {\n $validaciones = [];\n\n // Reviso si el GET tiene algo\n if(!empty($_GET)){\n if(empty($_GET['turno'])){\n $validaciones['turno'] = 'El campo turno es requerido';\n }\n\n if(empty($_GET['idsupervisor'])){\n $validaciones['idsupervisor'] = 'El campo idsupervisor es requerido' ;\n }\n\n if(empty($_GET['supervisor'])){\n $validaciones['supervisor'] = 'El campo supervisor es requerido' ;\n }\n\n if (count($_GET['detalle']) === 0){\n $validaciones['detalle'] = 'debe Llenar los Campos Necesarios para Continuar' ;\n }else{\n foreach($_GET['detalle'] as $item){\n foreach($item as $key => $value){\n //echo $key; // Nombre de la variable(nom, des, rut, etc)\n //echo $value; // Su valor\n if(empty ($value)){\n $validaciones['detalle'] = $key.' Tiene un Valor vacio,debe Llenar los Campos Necesarios para Continuar' ;\n break 2;\n }\n }\n }\n }\n\n if (isset($_GET['detallecomprado'])){\n if (count($_GET['detallecomprado']) === 0 && trim ($_GET['tipo']) === \"COMPRADO\" ){\n $validaciones['detallecomprado'] = 'debe Selecionar al Menos una Entrada' ;\n }\n }\n\n if (count($validaciones) === 0){\n $validaciones['id_vale'] = guardar_vale() ;\n }else{\n $validaciones['id_vale'] = 0 ;\n\n }\n\n //header('Content-Type: application/json');\n echo json_encode([\n 'response' => count($validaciones) === 0,\n 'errors' => $validaciones\n ],JSON_UNESCAPED_UNICODE);\n\n }\n}", "function _guardar($id) {\r\n $this->_vista->errorForm = array();\r\n $val = new Validador($_POST);\r\n\r\n /* logica */\r\n // V A L I D A C I O N E S D E L F O R M U L A R I O\r\n // por php si javaScript no tuvo exito\r\n\r\n /*\r\n * Id:\r\n * Debe ser igual por Get y Post\r\n */\r\n if ($id != $this->getEntero('Id')) {\r\n $this->redireccionar('error/tipo/Registro_NoID');\r\n }\r\n $id = $this->getEntero('Id');\r\n\r\n /*\r\n * Select_Asignatura:\r\n * Requerido\r\n * Numerico\r\n */\r\n $campo = 'Select_Asignatura';\r\n $val->requerido($campo);\r\n $val->numerico($campo);\r\n $select_Asignatura = $val->getValor($campo);\r\n\r\n /*\r\n * Select_Carrera:\r\n * Requerido\r\n * Numerico\r\n */\r\n $campo = 'Select_Carrera';\r\n $val->requerido($campo);\r\n $val->numerico($campo);\r\n $select_Carrera = $val->getValor($campo);\r\n\r\n /*\r\n * Select_Grupo:\r\n * Requerido\r\n * Numerico\r\n */\r\n $campo = 'Select_Grupo';\r\n $val->requerido($campo);\r\n $val->numerico($campo);\r\n $select_Grupo = $val->getValor($campo);\r\n\r\n /*\r\n * Select_Ciclo:\r\n * Requerido\r\n * Numerico\r\n */\r\n $campo = 'Select_Ciclo';\r\n $val->requerido($campo);\r\n $val->numerico($campo);\r\n $select_Ciclo = $val->getValor($campo);\r\n\r\n /*\r\n * Descripcion\r\n * Letras y Numeros\r\n */\r\n $campo = 'Descripcion';\r\n $val->alfanumerico($campo);\r\n $descripcion = $val->getValor($campo);\r\n\r\n /*\r\n * Select_Espacio:\r\n * Requerido\r\n * Numerico\r\n */\r\n $campo = 'Select_Espacio';\r\n $val->requerido($campo);\r\n $val->numerico($campo);\r\n $select_Espacio = $val->getValor($campo);\r\n\r\n //errores\r\n $this->_vista->errorForm = $val->getErrorLista();\r\n\r\n if (count($this->_vista->errorForm)) {\r\n // se encontraron errores\r\n /* script o css a utilizar por la vista */\r\n $this->_vista->setJs('bootstrapValidator.min');\r\n $this->_vista->setCss('bootstrapValidator.min');\r\n $this->_vista->setJs('validarForm', 'curso');\r\n\r\n $this->_vista->curso = new Curso();\r\n\r\n $this->_vista->curso->setId($id);\r\n $this->_vista->curso->getAsignatura()->setId($select_Asignatura);\r\n $this->_vista->curso->getCarrera()->setId($select_Carrera);\r\n $this->_vista->curso->getGrupo()->setId($select_Grupo);\r\n $this->_vista->curso->getCiclo()->setId($select_Ciclo);\r\n $this->_vista->curso->setDescripcion($descripcion);\r\n $this->_vista->curso->getEspacio()->setId($select_Espacio);\r\n\r\n // listas\r\n $this->_vista->listaAsignaturas = $this->_vista->curso->getAsignatura()->lista();\r\n $this->_vista->listaCarreras = $this->_vista->curso->getCarrera()->lista();\r\n $this->_vista->listaGrupos = $this->_vista->curso->getGrupo()->lista();\r\n $this->_vista->listaCiclos = $this->_vista->curso->getCiclo()->lista();\r\n $this->_vista->listaEspacios = $this->_vista->curso->getEspacio()->lista();\r\n\r\n\r\n //redirigir a la vista\r\n $id ?\r\n $this->_vista->render('curso/editar') :\r\n $this->_vista->render('curso/nuevo');\r\n } else {\r\n // no se encontraron errores\r\n $curso = new Curso();\r\n\r\n $curso->getAsignatura()->setId($select_Asignatura);\r\n $curso->getCarrera()->setId($select_Carrera);\r\n $curso->getGrupo()->setId($select_Grupo);\r\n $curso->getCiclo()->setId($select_Ciclo);\r\n $curso->setDescripcion($descripcion);\r\n $curso->getEspacio()->setId($select_Espacio);\r\n\r\n if ($id == 0) {\r\n //insertar\r\n // comprobar que campo Uda, grupo, ciclo no repetido en curso\r\n if ($curso->existe($select_Asignatura, $select_Carrera, $select_Grupo, $select_Ciclo, $select_Espacio)) {\r\n $this->redireccionar('error/tipo/Registro_SiExiste');\r\n }\r\n $curso->insertar();\r\n } else {\r\n //actualizar\r\n /*\r\n * Validar Repetido:\r\n * No Repetido\r\n */\r\n $existe = $curso->existe($select_Asignatura, $select_Carrera, $select_Grupo, $select_Ciclo, $select_Espacio);\r\n if ($existe != $id && $existe != 0) {\r\n $this->redireccionar('error/tipo/Registro_SiExiste');\r\n }\r\n\r\n $curso->setId($id);\r\n $curso->actualizar();\r\n }\r\n\r\n $this->redireccionar(\"curso/index/{$curso->getEspacio()->getId()}\");\r\n }\r\n }", "public function valida_objetivos_estrategicos(){\n if ($this->input->post()) {\n $post = $this->input->post();\n\n $codigo = $this->security->xss_clean($post['codigo']);\n $descripcion = $this->security->xss_clean($post['descripcion']);\n $configuracion=$this->model_proyecto->configuracion_session();\n\n /*--------------- GUARDANDO OBJETIVO ESTRATEGICO ----------------*/\n $data_to_store = array(\n 'obj_codigo' => strtoupper($codigo),\n 'obj_descripcion' => strtoupper($descripcion),\n 'obj_gestion_inicio' => $configuracion[0]['conf_gestion_desde'],\n 'obj_gestion_fin' => $configuracion[0]['conf_gestion_hasta'],\n 'fun_id' => $this->fun_id,\n );\n $this->db->insert('_objetivos_estrategicos',$data_to_store);\n $obj_id=$this->db->insert_id();\n /*---------------------------------------------------------------*/\n\n if(count($this->model_mestrategico->get_objetivos_estrategicos($obj_id))==1){\n $this->session->set_flashdata('success','SE REGISTRO CORRECTAMENTE');\n redirect(site_url(\"\").'/me/objetivos_estrategicos');\n }\n else{\n $this->session->set_flashdata('danger','ERROR AL REGISTRAR');\n redirect(site_url(\"\").'/me/objetivos_estrategicos');\n }\n\n } else {\n show_404();\n }\n }", "function validarFormulario()\n\t\t{\n\t\t}", "function guardare(){\n\t\t$m = intval($_POST['totalitem']);\n\t\t$t = 0;\n\t\t// calcula el total de\n\t\tfor ( $i=0; $i < $m; $i++ ){\n\t\t\t$t += $_POST['cana_'.$i];\n\t\t}\n\t\tif ( $t <= 0 ) {\n\t\t\techo \"No hay cambios\";\n\t\t\treturn;\n\t\t}\n\n\t\t$ids = '';\n\t\tfor ( $i=0; $i < $m; $i++ ){\n\t\t\t// Guarda\n\t\t\t$cana = $_POST['cana_'.$i];\n\t\t\t$id = intval($_POST['codigo_'.$i]);\n\t\t\t$mSQL = \"UPDATE itprdop SET producido = ${cana} WHERE id= ${id}\";\n\t\t\t$this->db->query($mSQL);\n\t\t}\n\n\t\t$data['fechap'] = substr($_POST['fechap'],-4).substr($_POST['fechap'],3,2).substr($_POST['fechap'],0,2);\n\n\t\t$id = intval($_POST['codigo_0']);\n\t\t$numero = $this->datasis->dameval(\"SELECT numero FROM itprdop WHERE id=$id\");\n\n\t\t$this->db->where('numero',$id);\n\t\t$this->db->update('prdo', $data);\n\n\t\techo \"Produccion Guardada \".substr($_POST['fechap'],-4).substr($_POST['fechap'],3,2).substr($_POST['fechap'],0,2);\n\t}", "function validar(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n\n if (empty($_POST[\"noEmpleado\"])) {\n $this->numEmpErr = \"El numero de empleado es requerido\";\n } else {\n $this->noEmpleado = $this->test_input($_POST[\"noEmpleado\"]);\n if (is_numeric($this->noEmpleado)) {\n $this->numEmpErr = \"Solo se permiten numeros\";\n }\n }\n\n if (empty($_POST[\"nombre\"])) {\n $this->nameErr = \"El nombre es requerido\";\n } else {\n $this->nombre = $this->test_input($_POST[\"nombre\"]);\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->nombre)) {\n $this->nameErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"carrera\"])) {\n $this->carreraErr = \"La carrera es requerida\";\n } else {\n $this->carrera = $this->test_input($_POST[\"carrera\"]);\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->carrera)) {\n $this->carreraErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"telefono\"])) {\n $this->telErr = \"El telefono es requerido\";\n } else {\n $this->telefono = $this->test_input($_POST[\"telefono\"]);\n if (is_numeric($this->telefono)) {\n $this->telErr = \"Solo se permiten numeros\";\n }\n }\n\n }\n }", "public function validacion(){\n\t\t$this->inicializa();\n\t\t$client=Cliente::find(1);\n\t\t$id=$client->transaccion.\"\";\n\t\t// si en la transaccion aparece el id del cliente que esta en la base de datos entonces la transaccion le pertenece\n\t\t// y por tanto es valida\n\t\t$transaction = $this->pasarela->transaction()->find(\"{$id}\");\n\t\t\n\t\tif($client->token==$transaction->customer['id'])\n\t\t\treturn true;\n\t\treturn false;\n\t\t//return response()->json($transaction);\n\t}", "function validarDatosRegistro() {\r\n // Recuperar datos Enviados desde formulario_nuevo_equipo.php\r\n $datos = Array();\r\n $datos[0] = (isset($_REQUEST['titulo']))?\r\n $_REQUEST['titulo']:\"\";\r\n $datos[0] = limpiar($datos[0]);\r\n $datos[1] = (isset($_REQUEST['url']))?\r\n $_REQUEST['url']:\"\";\r\n\r\n //-----validar ---- //\r\n $errores = Array();\r\n $errores[0] = !validarTitulo($datos[0]);\r\n $errores[1] = !validarURL($datos[1]);\r\n\r\n // ----- Asignar a variables de Sesión ----//\r\n $_SESSION['datos'] = $datos;\r\n $_SESSION['errores'] = $errores; \r\n $_SESSION['hayErrores'] = \r\n ($errores[0] || $errores[1]);\r\n \r\n}", "public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}", "public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}", "function validar(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n\n if (empty($_POST[\"matricula\"])) {\n $this->matriculaErr = \"La matricula es requerida\";\n } else {\n $this->matricula = $this->test_input($_POST[\"matricula\"]);\n // check if name only contains letters and whitespace\n if (is_numeric($this->matricula)) {\n $this->nameErr = \"Solo se permiten numeros\";\n }\n }\n\n if (empty($_POST[\"nombree\"])) {\n $this->nameErr = \"El nombre es requerido\";\n } else {\n $this->nombre = $this->test_input($_POST[\"nombree\"]);\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->nombre)) {\n $this->nameErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"carreraa\"])) {\n $this->nameErr = \"La carrera es requerida\";\n } else {\n $this->carrera = $this->test_input($_POST[\"carreraa\"]);\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->carrera)) {\n $this->carreraErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"email\"])) {\n $this->emailErr = \"Email is required\";\n } else {\n $this->email = $this->test_input($_POST[\"email\"]);\n // check if e-mail address is well-formed\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->emailErr = \"Invalid email format\";\n }\n }\n\n if (empty($_POST[\"telefonoo\"])) {\n $this->telErr = \"El telefono es requerido\";\n } else {\n $this->telefono = $this->test_input($_POST[\"telefonoo\"]);\n // check if name only contains letters and whitespace\n if (is_numeric($this->telefono)) {\n $this->telErr = \"Solo se permiten numeros\";\n }\n }\n\n }\n }", "public function Valid();", "public function Guardar()\n \t{\n if(!$this->id)\n {\n\n \n \t\tif(empty($this->fv_error_message))\n \t\t{\n\n $this->account_id = $this->account_id?$this->account->id:$this->fv_account_id;\n $this->name =$this->fv_name;\n\n $this->number_branch= $this->fv_number_branch;\n $this->address2 = $this->fv_address2;\n $this->address1 = $this->fv_address1;\n $this->work_phone = $this->fv_workphone;\n $this->city = $this->fv_city;\n $this->state = $this->fv_state;\n $this->deadline = $this->fv_deadline;\n $this->key_dosage = $this->fv_key_dossage;\n $this->economic_activity = $this->fv_economic_activity;\n $this->number_process = $this->fv_number_process;\n $this->number_autho = $this->fv_nummber_autho;\n \n $this->law = $this->fv_law;\n $this->type_third = $this->getType_thrird();\n $this->invoice_number_counter = 1;\n $this->save();\n\n foreach ($this->fv_type_documents_branch as $documento) {\n # code...\n $tipo = new TypeDocumentBranch();\n $tipo->branch_id = $this->id;\n $tipo->type_document_id = $documento;\n $tipo->save();\n }\n\n \t\t\t$this->fv_error_message = \"Registro Existoso\";\n \t\t\treturn true;\n \t}\n }\n $this->fv_error_message = $this->fv_error_message . ' Sucursal '.ERROR_DUPLICADO .'<br>' ;\n\t\treturn false;\n \t}", "private function validate() {\n $this->valid = (1 === count($this->marriages));\n }", "function validacao($post, &$erro){\n $array = array('nome_autor','sobrenome_autor');\n //FOREACH PERCORRERÁ O ARRAY...\n foreach($array as $campo){\n //VERIFICARÁ SE CAMPOS EXISTEM...\n if(isset($post[$campo])){\n //E SE ESTÃO VAZIOS...\n if(!empty($post[$campo])){\n //DEPOIS VERIFICARÁ SE CAMPOS FORAM PREENCHIDOS DE FORMA CORRETA...\n switch($campo){\n case 'nome_autor':\n if(!(strlen($post[$campo]) <= 50)){\n echo 'erro na validacao do campo ' . $campo;\n $erro[$campo] = 'O campo deve ter no máximo 50 caracteres!';\n return false;\n }\n break;\n \n case 'sobrenome_autor':\n if(!(strlen($post[$campo]) <= 50)){\n $erro = 'O campo deve ter no máximo 50 caracteres!';\n return false;\n }\n break;\n \n default:\n break;\n }\n }else{\n $erro[$campo] = 'Campo obrigatório';\n }\n }else{\n $erro[$campo] = 'Campo obrigatório';\n }\n }\n \n if(empty($erro)){\n return true;\n }else{\n return false;\n }\n \n\t}", "public function guardar(){\n \n $_vectorpost=$this->_vcapitulo;\n $_programadas=[1,3,4,5,6,7,8,2,11,15,26];\n \n if(!empty($this->_relaciones)){\n \n $_vpasspregunta=explode(\"%%\",$this->_relaciones);\n \n /*Iniciando Transaccion*/\n $_transaction = Yii::$app->db->beginTransaction();\n try {\n foreach($_vpasspregunta as $_clguardar){\n\n /*Aqui se debe ir la funcion segun el tipo de pregunta\n * la variable $_clguardar es un string que trae\n * name_input ::: id_pregunta ::: id_tpregunta ::: id_respuesta\n * cada funcion de guardar por tipo se denomina gr_tipo...\n */\n\n $_ldata=explode(\":::\",$_clguardar);\n\n //Recogiendo codigos SQL\n //Se envia a la funcion de acuerdo al tipo\n // @name_input \"0\"\n // @id_pregunta \n // @id_tpregunta\n // @id_respuesta ==========================//\n \n /*Asociando Respuesta*/\n $_nameq = 'rpta'.$_ldata[0];\n \n \n \n if(!empty($_ldata[2]) and in_array($_ldata[2], $_programadas) === TRUE and isset($_vectorpost['Detcapitulo'][$_nameq])){\n \n \n //Yii::trace(\"Llegan tipos de preguntas \".$_ldata[2].\" Para idpregunta \".$_ldata[1],\"DEBUG\");\n /*Recogiendo Id_respuesta si existe*/ \n $_idrespuesta=(!empty($_ldata[3]))? $_ldata[3]:'';\n $id_pregunta= $_ldata[1];\n $this->_idcapitulo = $_ldata[4];\n \n \n /*Armando Trama SQL segun el tipo de pregunta*/\n $_valor = $_vectorpost['Detcapitulo'][$_nameq];\n \n //Yii::trace(\"que respuestas llegan \".$_valor,\"DEBUG\");\n \n if(isset($this->_agrupadas[$id_pregunta])){\n \n /*1) Buscando si existe una respuesta asociada a la agrupacion*/\n $idrpta_2a = Yii::$app->db->createCommand(\n 'SELECT id_respuesta FROM fd_respuesta\n LEFT JOIN fd_pregunta ON fd_pregunta.id_pregunta = fd_respuesta.id_pregunta\n WHERE fd_pregunta.id_agrupacion= :agrupacion \n and fd_respuesta.id_conjunto_pregunta= :idconjprta \n and fd_respuesta.id_conjunto_respuesta= :idconjrpta\n and fd_respuesta.id_capitulo= :idcapitulo\n and fd_respuesta.id_formato = :idformato\n and fd_respuesta.id_version = :idversion ')\n ->bindValues([\n ':idconjrpta' => $this->_idconjrpta,\n ':idcapitulo' =>$this->_idcapitulo,\n ':idformato' =>$this->_idformato,\n ':idconjprta' => $this->_idconjprta,\n ':idversion' =>$this->_idversion, \n ':agrupacion' =>$this->_agrupadas[$id_pregunta],\n ])->queryOne();\n \n $_idrespuesta = $idrpta_2a['id_respuesta'];\n \n /*2) Si existe respuesta asociada se envia como _idrespuesta*/\n \n $v_rpta= $this->{\"gr_tipo2a\"}($_idrespuesta,$_valor,$id_pregunta); //Preguntas tipo 2 agrupadas\n $_ldata[1]= $v_rpta[2];\n \n }else{\n \n //Averiguando si la pregunta es tipo multiple y si la respuesta es null si es asi \n //Salta a la siguiente pregunta\n if(!empty($this->multiples[$id_pregunta]) and empty($_valor)){\n continue;\n }else if(!empty($this->multiples[$id_pregunta]) and !is_null($_valor)){\n $_idrespuesta=''; \n } \n \n /*Si la pregunta es tipo 3 se averigua si la respuesta es tipo especifique*/\n $_otros=null;\n if($_ldata[2]=='3' and isset($_vectorpost['Detcapitulo']['otros_'.$_ldata[0]])){\n \n $_otros = $_vectorpost['Detcapitulo']['otros_'.$_ldata[0]];\n $v_rpta= $this->{\"gr_tipo\".$_ldata[2]}($_idrespuesta,$_valor,$_otros);\n \n }else{\n \n if($_ldata[2]==11 and isset($this->_tipo11[$_nameq])){\n $_valor=count($this->_tipo11[$_nameq]);\n $v_rpta= $this->{\"gr_tipo\".$_ldata[2]}($_idrespuesta,$_valor);\n }else if ($_ldata[2]!=11 and !isset($this->_tipo11[$_nameq])){\n $v_rpta= $this->{\"gr_tipo\".$_ldata[2]}($_idrespuesta,$_valor,$_otros,$id_pregunta);\n }else{\n continue;\n } \n }\n } \n \n /*Asignando valor == null*/\n $v_rpta[1]=(!isset($v_rpta[1]))? NULL:$v_rpta[1];\n \n \n /*Generado comando SQL*/\n if(!empty($v_rpta[0])){\n \n if(empty($this->_idjunta))$this->_idjunta=0;\n if(is_null($_otros)){ \n \n if (strpos($v_rpta[0], ';') !== false) {\n $sep_qu = explode(\";\", $v_rpta[0]);\n \n Yii::$app->db->createCommand($sep_qu[0])\n ->bindValues([\n ':valor' => $v_rpta[1],\n ':idconjrpta' => $this->_idconjrpta,\n ':idpregunta' => $_ldata[1],\n ':idtpregunta' => $_ldata[2],\n ':idcapitulo' =>$this->_idcapitulo,\n ':idformato' =>$this->_idformato,\n ':idconjprta' => $this->_idconjprta,\n ':idversion' =>$this->_idversion,\n ':idjunta' =>$this->_idjunta,\n ])->execute();\n \n Yii::$app->db->createCommand($sep_qu[1])\n ->bindValues([\n ':valor' => $v_rpta[1],\n ])->execute();\n \n \n }\n else\n {\n Yii::$app->db->createCommand($v_rpta[0])\n ->bindValues([\n ':valor' => $v_rpta[1],\n ':idconjrpta' => $this->_idconjrpta,\n ':idpregunta' => $_ldata[1],\n ':idtpregunta' => $_ldata[2],\n ':idcapitulo' =>$this->_idcapitulo,\n ':idformato' =>$this->_idformato,\n ':idconjprta' => $this->_idconjprta,\n ':idversion' =>$this->_idversion,\n ':idjunta' =>$this->_idjunta,\n ])->execute();\n }\n \n \n }else{ \n Yii::$app->db->createCommand($v_rpta[0])\n ->bindValues([\n ':valor' => $v_rpta[1],\n ':idconjrpta' => $this->_idconjrpta,\n ':idpregunta' => $_ldata[1],\n ':idtpregunta' => $_ldata[2],\n ':idcapitulo' =>$this->_idcapitulo,\n ':idformato' =>$this->_idformato,\n ':idconjprta' => $this->_idconjprta,\n ':idversion' =>$this->_idversion,\n ':idjunta' =>$this->_idjunta,\n ':otros' =>$_otros, \n ])->execute();\n }\n\n /*Se averigua con que id quedo guardada la respuesta si es tipo 11 -> guarda en SOP SOPORTE*/\n if($_ldata[2]=='11' and !empty($this->_tipo11[$_nameq])){\n\n $id_rpta = Yii::$app->db->createCommand(\n 'SELECT id_respuesta FROM fd_respuesta '\n . 'WHERE id_pregunta = :_prta'\n . ' and fd_respuesta.id_conjunto_pregunta= :idconjprta \n and fd_respuesta.id_conjunto_respuesta= :idconjrpta\n and fd_respuesta.id_capitulo= :idcapitulo\n and fd_respuesta.id_formato = :idformato\n and fd_respuesta.id_version = :idversion' )\n ->bindValues([\n ':_prta' => $_ldata[1], \n ':idconjrpta' => $this->_idconjrpta,\n ':idcapitulo' =>$this->_idcapitulo,\n ':idformato' =>$this->_idformato,\n ':idconjprta' => $this->_idconjprta,\n ':idversion' =>$this->_idversion, \n ])->queryOne();\n\n\n foreach($this->_tipo11[$_nameq] as $_cltp11){\n\n $_vctp11=explode(\":::\",$_cltp11);\n $_namefile = $_vctp11[0].\".\".$_vctp11[2];\n\n $_sqlSOP=\"INSERT INTO sop_soportes ([[ruta_soporte]],[[titulo_soporte]],[[tamanio_soportes]],[[id_respuesta]]) VALUES (:ruta, :titulo, :tamanio, :_idrpta)\";\n\n Yii::$app->db->createCommand($_sqlSOP)\n ->bindValues([\n ':ruta' => $_vctp11[1],\n ':titulo' => $_namefile,\n ':tamanio' => $_vctp11[3],\n ':_idrpta' => $id_rpta[\"id_respuesta\"],\n ])->execute();\n\n }\n \n }\n /*Fin guardando en SOP_SOPORTES para tipo 11*/\n \n } \n }\n\n }\n \n \n \n $_transaction->commit();\n \n }catch (\\Exception $e) {\n $_transaction->rollBack();\n throw $e;\n return FALSE;\n } catch (\\Throwable $e) {\n $_transaction->rollBack();\n throw $e;\n return FALSE;\n } \n \n }\n return TRUE;\n }", "public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n \n if (!isset($this->payment)) {\n $this->errors[1] = 'Wybierz sposób płatności!';\n }\n \n if (!isset($this->category)) {\n $this->errors[2] = 'Wybierz kategorię!';\n }\n }", "public function validarCargo() {\n if (!$this->getTexto('cargo')) {\n $this->_view->assign('_error', 'Debe introducir la descripcion del cargo');\n $this->_view->renderizar('nuevo_cargo', 'acl');\n exit;\n }\n }", "public function validateSave() {\r\n //0. Pobranie parametrów z walidacją\r\n $this->form->id = ParamUtils::getFromRequest('id', true, 'Błędne wywołanie aplikacji');\r\n $this->form->distance = ParamUtils::getFromRequest('distance', true, 'Błędne wywołanie aplikacji');\r\n $this->form->startTime = ParamUtils::getFromRequest('startTime', true, 'Błędne wywołanie aplikacji');\r\n $this->form->endTime = ParamUtils::getFromRequest('endTime', true, 'Błędne wywołanie aplikacji');\r\n $this->form->cityFrom = ParamUtils::getFromRequest('cityFrom', true, 'Błędne wywołanie aplikacji');\r\n $this->form->cityTo = ParamUtils::getFromRequest('cityTo', true, 'Błędne wywołanie aplikacji');\r\n $this->form->personId = ParamUtils::getFromRequest('personId', true, 'Błędne wywołanie aplikacji');\r\n $this->form->carId = ParamUtils::getFromRequest('carId', true, 'Błędne wywołanie aplikacji');\r\n\r\n if (App::getMessages()->isError())\r\n return false;\r\n\r\n // 1. sprawdzenie czy wartości wymagane nie są puste\r\n if (empty(trim($this->form->distance))) {\r\n Utils::addErrorMessage('Wprowadź dystans');\r\n }\r\n if (empty(trim($this->form->startTime))) {\r\n Utils::addErrorMessage('Wprowadź datę wyjazdu');\r\n }\r\n if (empty(trim($this->form->endTime))) {\r\n Utils::addErrorMessage('Wprowadź datę przyjazdu na miejsce');\r\n }\r\n if (empty(trim($this->form->cityFrom))) {\r\n Utils::addErrorMessage('Wprowadź miejsce początkowe');\r\n }\r\n if (empty(trim($this->form->cityTo))) {\r\n Utils::addErrorMessage('Wprowadź miejsce końcowe');\r\n }\r\n if (empty(trim($this->form->personId))) {\r\n Utils::addErrorMessage('Wprowadź pracownika');\r\n }\r\n if (empty(trim($this->form->carId))) {\r\n Utils::addErrorMessage('Wprowadź pojazd');\r\n }\r\n\r\n if (App::getMessages()->isError())\r\n return false;\r\n\r\n // 2. sprawdzenie poprawności przekazanych parametrów\r\n $check_distance = is_numeric($this->form->distance);\r\n if ($check_distance === false) {\r\n Utils::addErrorMessage('Dystans musi być liczbą');\r\n }\r\n\r\n //sprawdzenie poprawnosci daty\r\n\r\n $sT = $this->form->startTime;\r\n $eT = $this->form->endTime;\r\n\r\n $check_timeStart = checkdate(substr($sT, 5, 2), substr($sT, 8, 2), substr($sT, 0, 4));\r\n $check_timeEnd = checkdate(substr($eT, 5, 2), substr($eT, 8, 2), substr($eT, 0, 4));\r\n\r\n if ($check_timeEnd === false) {\r\n Utils::addErrorMessage('Zły format daty. Przykład: 2018-01-01 00:00:00 lub czeski błąd');\r\n }\r\n\r\n if ($check_timeStart === false) {\r\n Utils::addErrorMessage('Zły format daty. Przykład: 2018-01-01 00:00:00 lub czeski błąd');\r\n }\r\n\r\n return !App::getMessages()->isError();\r\n }", "function comprobar_apellidos()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->apellidos) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"apellidos vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->apellidos) > 51)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"apellidos demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\t}\n\n\tif (strlen($this->apellidos) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos son alfabeticos\n\tif (ctype_alpha($this->apellidos))\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"apellidos no valido, solo se admiten caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "public function validarLotesxEstado(){\n log_message('INFO','#TRAZA | #TRAZ-PROD-TRAZASOFT | Etapa | validarLotesxEstado() ');\n $etap_id=$this->input->post('etap_id');\n\t\t$aux= $this->Etapas->validarLotesxEstado($etap_id)->lotes->lote;\n if(!empty($aux)){\n $i=0;\n while(($aux[$i]->estado !== 'finalizado') && $i < count($aux)){\n $i++;\n }\n if($i <= count($aux)){\n echo json_encode(array(\"status\" => false,\"msj\" => \"Error, la etapa tiene Lotes asociado\"));\n }else{\n $aux['status'] = true;\n echo json_encode($aux);\n }\n }else{\n echo json_encode(array(\"status\" => true,\"msj\" => \"Se elimino la etapa que no posee lotes\"));\n }\n }", "function evt__form_integrante_e__guardar($datos)\r\n\t{\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n if($pi['estado']<>'A' and $pi['estado']<>'I'){\r\n toba::notificacion()->agregar('No pueden agregar participantes al proyecto', 'error'); \r\n }else{ \r\n $band=$this->dep('datos')->tabla('integrante_externo_pi')->es_docente($datos['desde'],$datos['hasta'],$datos['integrante'][0],$datos['integrante'][1]);\r\n if($band){\r\n //toba::notificacion()->agregar('Este integrante es docente, ingreselo en la solapa Participantes con Cargo Docente en UNCO');\r\n throw new toba_error(\"Este integrante es docente, ingreselo en la solapa Participantes con Cargo Docente en UNCO\");\r\n } else{\r\n if($datos['desde']>=$datos['hasta']){\r\n throw new toba_error(\"La fecha desde debe ser menor a la fecha hasta!\");\r\n }else{\r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){\r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{\r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n //toba::notificacion()->agregar('Resolucion CD Invalida. Debe ingresar en formato XXXX/YYYY','error');\r\n throw new toba_error('Resolucion CD Invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if ( isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n throw new toba_error('Resolucion CD de Baja o Modificacion Invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n $datos['pinvest']=$pi['id_pinv'];\r\n $datos['nro_tabla']=1;\r\n $datos['tipo_docum']=$datos['integrante'][0];\r\n $datos['nro_docum']=$datos['integrante'][1];\r\n $datos['check_inv']=0;\r\n $this->dep('datos')->tabla('integrante_externo_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_externo_pi')->sincronizar();\r\n $this->dep('datos')->tabla('integrante_externo_pi')->resetear();\r\n $this->s__mostrar_e=0;\r\n toba::notificacion()->agregar('El integrante se ha dado de alta correctamente', 'info'); \r\n }\r\n } \r\n }\r\n }\r\n }\r\n }\r\n\t}", "public function validar(){\n\t\tif($this->rest->_getRequestMethod()!= 'POST'){\n\t\t\t$this->_notAuthorized();\n\t\t}\n\n\t\t$request = json_decode(file_get_contents('php://input'), true);\n\t\t$facPgPedido = $request['factura_pagos_pedido'];\n\t\t#verificamos que el registro existe\n\t\t$this->db->where('nro_pedido', $facPgPedido['nro_pedido']);\n\t\t$this->db->where('id_factura_pagos', $facPgPedido['id_factura_pagos']);\n\t\t$this->db->where('concepto', $facPgPedido['concepto']);\n\n\t\t$this->resultDb = $this->db->get($this->controllerSPA);\n\t\tif($this->resultDb->num_rows() != null && \n\t\t\t\t\t\t\t\t\t\t\t\t$request['accion'] == 'create'){\n\t\t\t$this->responseHTTP['message'] =\n\t\t\t\t\t\t\t 'Ya existe un registro con el mismo identificador';\n\t\t\t$this->responseHTTP[\"appst\"] = 2300;\n\t\t\t$this->responseHTTP['data'] = $this->resultDb->result_array();\n\t\t\t$this->responseHTTP['lastInfo'] = $this->mymodel->lastInfo();\n\t\t\t$this->__responseHttp($this->responseHTTP, 400);\n\t\t}else{\n\t\t#validamos la informacion\n\t\t\t$status = $this->_validData( $facPgPedido );\n\t\t\tif ($status['status']){\n\n\t\t\t\t#anulamos las fechas en blanco\n\t\t\t\t$facPgPedido['fecha_inicio'] = \n\t\t\t\t(empty($facPgPedido['fecha_inicio'])) ?\tnull : \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $facPgPedido['fecha_inicio'];\n\n\t\t\t\t$facPgPedido['fecha_fin'] = (empty($facPgPedido['fecha_fin'])) ? \n\t\t\t\t\t\t\t\t\t\t\tnull : $facPgPedido['fecha_fin'];\n\n\t\t\t\tif ($request['accion'] == 'create'){\n\t\t\t\t\t$this->db->insert($this->controllerSPA, $facPgPedido);\n\t\t\t\t\t$this->responseHTTP['message'] = \n\t\t\t\t\t\t\t\t\t\t\t\t'Registro creado existosamente';\n\t\t\t\t\t$this->responseHTTP[\"appst\"] = 1200;\n\t\t\t\t\t$this->responseHTTP['lastInfo'] = \n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->mymodel->lastInfo();\n\t\t\t\t\t$this->__responseHttp($this->responseHTTP, 201);\n\t\t\t\t}else{\n\t\t\t\t\t$facPgPedido['last_update'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$this->db->where('id_factura_pagos_pedido',\n\t\t\t\t\t\t\t\t\t\t $request['id_factura_pagos_pedido']);\n\t\t\t\t\t$this->db->update($this->controllerSPA, $facPgPedido);\n\t\t\t\t\t$this->responseHTTP['appst'] = 'Registro actualizado';\n\t\t\t\t\t$this->responseHTTP[\"appst\"] = 1300;\n\t\t\t\t\t$this->__responseHttp($this->responseHTTP, 201);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->responseHTTP['message'] = 'Uno de los registros'.\n\t\t\t\t \t\t\t\t'ingresados es incorrecto, vuelva a intentar';\n\t\t\t\t$this->responseHTTP[\"appst\"] = 1400;\n\t\t\t\t$this->responseHTTP['data'] = $status;\n\t\t\t\t$this->__responseHttp($this->responseHTTP, 400);\n\t\t\t}\n\t\t}\n\n\t}", "function comprobar_sexo()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->sexo) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"sexo\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"sexo vacio\"]);\n\n\t\t$correcto = false;\n\t}\n\n\treturn $correcto;\n}", "public function validarRegistroMedico($id,$nombres,$apes,$tel,$fecha,$sexo,$clave1,$clave2,$correo,$ask,$ans,$id_esp){\n $feedback=\"\";\n if($clave1 == $clave2 ){//verifica que las claves sean iguales\n if($this->validarPass($clave1) == ' '){//verifica que la clave sea valida\n if($this->validarCorreo($correo) == 0){//verifica validas del correo\n if($ask != 0){\n if($ask==1)\n $askf=\"Nombre de su primer mascota\";\n if($ask==2)\n $askf=\"Direccionde su primer lugar de residencia\";\n if($ask==3)\n $askf=\"Nombre mejor amigo de la infancia\";\n if($ask==4)\n $askf=\"Nombre de su localidad de residencia\";\n if($ask==5)\n $askf=\"Color de su camisa favorita\";\n if($sexo != '0' ){\n if($this->verificarIdMedico($id)==0){\n if($this->insertMedico($id,$id_esp,$nombres,$apes,$tel,$fecha,$sexo,$clave1,$correo,$askf,$ans) == true){ \n $feedback='bien';\n }else{\n $feedback='5';//no insert medico \n }\n }else{\n $feedback='8';\n }\n }else{\n $feedback='7';//error de sexo\n }\n }else{\n $feedback='6';//error de pregunta\n } \n }else{\n $feedback='3';//el mail ya esta en la bd\n }\n }else{//envia tipos de error en clave\n $resultado=$this->validarPass($clave1);\n $feedback=$resultado;\n }\n }\n else{\n $feedback='2';//error las claves no son iguales\n }\n \n return $feedback; \n }", "function valid();", "public function addCustomValidate()\n {\n if($this->id_soldier_tmp != $this->id_soldier){\n $this->errors = \"Niepoprawny żołnierz.\";\n return false;\n }\n \n // sprawdzanie czy misja istnieje i jest aktywna\n $item = new ClassMission($this->id_mission);\n \n if(!$item->load_class){\n $this->errors = \"Misja nie istnieje.\";\n return false;\n }\n \n if($item->active != '1'){\n $this->errors = \"Misja jest wyłączona.\";\n return false;\n }\n \n // sprawdzenie czy zolnierz posiada misje\n $soldier_missions = self::sqlGetSoldierMissions($this->id_soldier);\n \n if($soldier_missions)\n {\n foreach($soldier_missions as $soldier_mission)\n {\n // sprawdzenie czy zolnierz chce 2x do tej samej misji zostac przypisany\n if($soldier_mission['id_mission'] == $this->id_mission && $soldier_mission['detached'] == '0'){\n $this->errors = \"Żołnierz posiada już tą misję.\";\n return false;\n }\n \n // sprawdzanie czy nowa misja koliduje z jakas inna misja, na ktorej zolnierz jest\n if($soldier_mission['detached'] == '0' && self::checkInterferingDates($soldier_mission['date_start'], $item->date_start, $soldier_mission['date_end'], $item->date_end)){\n $this->errors = \"Misja <b>{$item->name}</b> koliduje czasowo z misją <b>{$soldier_mission['name']}</b>.\";\n return false;\n }\n }\n }\n \n // sprawdzenie czy zolnierz posiada szkolenia\n $soldier_trainings = ClassSoldier2Training::sqlGetSoldierTrainings($this->id_soldier);\n \n if($soldier_trainings)\n {\n foreach($soldier_trainings as $soldier_training)\n {\n // sprawdzanie czy nowa misja koliduje z jakas inna misja, na ktorej zolnierz jest\n if($soldier_training['returned'] == '0' && self::checkInterferingDates($soldier_training['date_start'], $item->date_start, $soldier_training['date_end'], $item->date_end)){\n $this->errors = \"Misja <b>{$item->name}</b> koliduje czasowo ze szkoleniem <b>{$soldier_training['name']}</b>.\";\n return false;\n }\n }\n }\n \n $this->date_mission_add = date('Y-m-d H:i:s', strtotime($this->date_mission_add));\n \n // return false;\n return true;\n }", "function geraClasseValidadorFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.ValidadorFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoValidaFormularioCadastro.tpl');\n\n # abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $aModeloFinal = array();\n \n # varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeClasse = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # ==== varre a estrutura dos campos da tabela em questao ====\n $camposForm = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n # processa nome original da tabela estrangeira\n $nomeFKClasse = (string)$oCampo->FKTABELA;\n $objetoFKClasse = \"\\$o$nomeFKClasse\";\n\n $nomeCampo = $nomeCampoOriginal;\n //$nomeCampo = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n $label = ($nomeFKClasse != '') ? ucfirst(strtolower($nomeFKClasse)) : ucfirst(str_replace($nomeClasse,\"\",$nomeCampoOriginal));;\t\t\t\t\t\n $camposForm[] = ((int)$oCampo->CHAVE == 1) ? \"if(\\$acao == 2){\\n\\t\\t\\tif(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\" : \"if(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\treturn false;\\n\\t\\t}\\t\";\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis já processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) mkdir($dir);\n\n $fp = fopen(\"$dir/class.ValidadorFormulario.php\",\"w\"); fputs($fp, $modeloFinal); fclose($fp);\n\n return true;\t\n }", "public function validarProfesion() {\r\n if (!$this->hasErrors()) {\r\n if ($this->profesion != null) {\r\n $objProfesion = ProfesionCliente::model()->findByPk($this->profesion);\r\n \r\n if($objProfesion==null)\r\n $this->addError('profesion', 'Profesión no válida');\r\n }\r\n }\r\n }", "public static function Znevalidni_kolize_ucastnika_vsechny($iducast) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and uc_kolize_table.valid\" ;\r\n\r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute(); \r\n while($zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC)) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "public function rangoValido()\r\n\t {\r\n\t \tif ( trim($this->fecha_desde) !== '' && trim($this->fecha_hasta) !== '' ) {\r\n\r\n\t \t\t$fDesde = date('Y-m-d', strtotime($this->fecha_desde));\r\n\t \t\t$fHasta = date('Y-m-d', strtotime($this->fecha_hasta));\r\n\r\n\t \t\tif ( (int)date('Y', strtotime($fDesde)) == (int)date('Y', strtotime($fHasta)) ) {\r\n\t \t\t\tif ( (int)date('m', strtotime($fDesde)) == (int)date('m', strtotime($fHasta)) ) {\r\n\t \t\t\t\tif ( (int)date('d', strtotime($fDesde)) > (int)date('d', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\r\n\t \t\t\t\t}\r\n\r\n\t \t\t\t} elseif ( (int)date('m', strtotime($fDesde)) > (int)date('m', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\r\n\t \t\t\t}\r\n\r\n\t \t\t} elseif ( (int)date('Y', strtotime($fDesde)) < (int)date('Y', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\t \t\t}\r\n\t \t}\r\n\t }", "function guardarParcelaIndividual($idCalle,$r){\n $parcela = new Parcela();\n\n //Asignamos los atributos a la parcela/panteon\n $parcela->numero = $r->input(\"numero\");\n $parcela->tamanyo = $r->input(\"tam_ind\");\n $parcela->GC_CALLE_id = $idCalle;\n $parcela->save();\n\n //Comprobamos si hemos insertado tramadas en la parcela individual\n $tramadasParcela = $r->input(\"tramadas_parcela\");\n\n if($tramadasParcela > 0){\n\n //asignamos las tramadas a la parcela\n for($i = 1; $i <= $tramadasParcela ; $i++)\n {\n //Creamos un objeto tramada\n $tramada = new Tramada();\n\n //obtemos los parámetros del objeto request\n $numNichos = $r->input(\"tramada\". $i .\"_ind\");\n\n //Asignamos las propiedades del objeto\n $tramada->tramada = $i;\n $tramada->nichos = $numNichos;\n $tramada->GC_PARCELA_id = $parcela->id;\n $tramada->save();\n\n //Guardamos los x nichos de la tramada $i\n $this->guardarNichos($tramadasParcela * $numNichos,$tramada->id,$i,$tramadasParcela,2);\n }\n }\n }", "public function validate()\n {\n // Nombre\n //Requerido\n if ($this->name == '') {\n $this->errors[] = 'El nombre es requerido';\n }\n\n // Dirección de E-mail\n\n //Devuelve el mensaje si el e-mail no es un e-mail valido\n if (filter_var($this->email, FILTER_VALIDATE_EMAIL) === false) {\n $this->errors[] = 'La dirección de e-mail es inválida. Reintentar';\n }\n //Si la función emailExists devuelve true, genera el error de e-mail en uso\n //El segundo parámetro de emailExists puede ser null o el ID de usuario si existe (ejemplo: el usuario esta registrado)\n if(static::emailExists($this->email, $this->id ?? null)) {\n $this->errors[] = 'La dirección de E-mail ya está en uso';\n }\n\n // Password\n\n if (isset($this->password)) {\n\n //Devuelve el mensaje si $password no tiene por lo menos 6 caracteres\n if (strlen($this->password) < 6) {\n $this->errors[] = 'La contraseña debe tener por lo menos 6 caracteres';\n }\n //Usa regexp para matchear si no encuentra por lo menos una letra\n if (preg_match('/.*[a-z]+.*/i', $this->password) == 0) {\n $this->errors[] = 'La contraseña debe tener por lo menos una letra';\n }\n\n //Usa regexp para matchear si no encuentra por lo menos un numero\n if (preg_match('/.*\\d+.*/i', $this->password) == 0) {\n $this->errors[] = 'La contraseña debe tener por lo menos una número';\n }\n }\n \n }", "public function validarAction()\n {\n\n\n if($this->request->isPost())\n {\n try\n {\n //Obtengo los datos ingresado en el form.\n $nombre = $this->request->getPost('nombre');\n $pass = $this->request->getPost('password');\n //Busco el usuario en la bd a partir de los datos ingresados.\n $usuario = Usuario::findFirst(array(\n \"(usuario_nick = :usuario_nick:) AND (usuario_pass = :usuario_pass:) AND (usuario_habilitado = 1)\",\n 'bind' => array('usuario_nick' => $nombre, 'usuario_pass' => base64_encode($pass))\n ));\n\n if($usuario!=false)\n {\n $this->_registrarSesion($usuario);\n $miSesion = $this->session->get('auth');\n $this->flash->success('Bienvenido/a '.$miSesion['usuario_nombre'] . \" - Rol: \".$miSesion['rol_nombre']);\n //Redireccionar la ejecución si el usuario es valido\n return $this->redireccionar('index/index');\n\n }\n else{\n $this->flash->error(\"No se encontro el Usuario, verifique contraseña/nick\");\n\n }\n }\n catch(\\Phalcon\\Annotations\\Exception $ex)\n {\n $this->flash->error($ex->getMessage());\n }\n\n }\n return $this->redireccionar('sesion/index');\n\n }", "public function validateSave() {\r\n //0. Pobranie parametrów z walidacją\r\n $this->form->id = ParamUtils::getFromRequest('id', true, 'Błędne wywołanie aplikacji');\r\n $this->form->name = ParamUtils::getFromRequest('name', true, 'Błędne wywołanie aplikacji');\r\n $this->form->surname = ParamUtils::getFromRequest('surname', true, 'Błędne wywołanie aplikacji');\r\n $this->form->birthdate = ParamUtils::getFromRequest('birthdate', true, 'Błędne wywołanie aplikacji');\r\n $this->form->jobTitle = ParamUtils::getFromRequest('jobTitle', true, 'Błędne wywołanie aplikacji');\r\n $this->form->jobPlace = ParamUtils::getFromRequest('jobPlace', true, 'Błędne wywołanie aplikacji');\r\n $this->form->userName = ParamUtils::getFromRequest('userName', true, 'Błędne wywołanie aplikacji');\r\n $this->form->role = ParamUtils::getFromRequest('role', true, 'Błędne wywołanie aplikacji');\r\n $this->form->password = ParamUtils::getFromRequest('password', true, 'Błędne wywołanie aplikacji');\r\n\r\n if (App::getMessages()->isError())\r\n return false;\r\n\r\n // 1. sprawdzenie czy wartości wymagane nie są puste\r\n if (empty(trim($this->form->name))) {\r\n Utils::addErrorMessage('Wprowadź imię');\r\n }\r\n if (empty(trim($this->form->surname))) {\r\n Utils::addErrorMessage('Wprowadź nazwisko');\r\n }\r\n if (empty(trim($this->form->birthdate))) {\r\n Utils::addErrorMessage('Wprowadź datę urodzenia');\r\n }\r\n if (empty(trim($this->form->jobTitle))) {\r\n Utils::addErrorMessage('Wprowadź nazwę stanowiska');\r\n }\r\n if (empty(trim($this->form->jobPlace))) {\r\n Utils::addErrorMessage('Wprowadź miejsce');\r\n }\r\n if (empty(trim($this->form->userName))) {\r\n Utils::addErrorMessage('Wprowadź nazwę użytkownika');\r\n }\r\n if (empty(trim($this->form->role))) {\r\n Utils::addErrorMessage('Wprowadź role użytkownika');\r\n }\r\n if (empty(trim($this->form->password)) && empty(trim($this->form->id))) {\r\n Utils::addErrorMessage('Wprowadź hasło');\r\n }\r\n\r\n if (App::getMessages()->isError())\r\n return false;\r\n\r\n // 2. sprawdzenie poprawności przekazanych parametrów\r\n\r\n \r\n\r\n $check_birth = $this->form->birthdate;\r\n $check_name = $this->form->name;\r\n $check_surname = $this->form->surname;\r\n\r\n $d = checkdate(substr($check_birth, 5, 2), substr($check_birth, 8, 2), substr($check_birth, 0, 4));\r\n if ($d === false || strlen($check_birth) <> 10) {\r\n Utils::addErrorMessage('Zły format daty. Przykład: 2018-12-20 lub data nie istnieje');\r\n }\r\n \r\n\r\n function my_mb_ucfirst($str) {\r\n $fc = mb_strtoupper(mb_substr($str, 0, 1));\r\n return $fc . mb_substr($str, 1);\r\n }\r\n\r\n $this->form->name = my_mb_ucfirst($check_name);\r\n $this->form->surname = my_mb_ucfirst($check_surname);\r\n\r\n// $test = App::getDB()->get('person', '*', [\r\n// 'user_name' => $this->form->userName\r\n// ]);\r\n// $testUser = $test['user_name'];\r\n// var_dump($test); \r\n// var_dump($test['user_name'] === $testUser);die;\r\n// \r\n// if($test['user_name'] === $testUser)\r\n// {\r\n// Utils::addErrorMessage('Podany użytkownik już istnieje');\r\n// }\r\n return !App::getMessages()->isError();\r\n }", "public function validarRegistroUser($id,$nombres,$apes,$tel,$fecha,$sexo,$clave1,$clave2,$correo,$ask,$ans,$tipod){\n $feedback=\"\";\n if($tipod != '0'){\n if($clave1 == $clave2){\n if($this->validarPass($clave1) == ' '){\n if($this->validarCorreo($correo) == 0){//verifica validas del correo\n if($ask != '0'){\n if($ask==1)\n $askf=\"Nombre de su primer mascota\";\n if($ask==2)\n $askf=\"Direccion de su primer lugar de residencia\";\n if($ask==3)\n $askf=\"Nombre mejor amigo de la infancia\";\n if($ask==4)\n $askf=\"Nombre de su localidad de residencia\";\n if($ask==5)\n $askf=\"Color de su camisa favorita\";\n if($sexo != '0' ){\n //error\n if($this->verificarIdMedico($id)==0){\n if($this->insertarUser($id,$nombres,$apes,$tel,$fecha,$sexo,$clave1,$correo,$askf,$ans,$tipod) == true){\n $feedback='ok';\n }else{\n $feedback='1';//error en el insert\n }\n }else{\n $feedback='2';//id existe en la bd\n }\n }else{\n $feedback='3';//no selecciono sexo\n }\n }else{\n $feedback='4';//no selecciono pregunta\n }\n }else{\n $feedback='5';//correo existe\n }\n }else{\n $feedback=$this->validarPass($clave1);//contraseña no valida\n }\n }else{\n $feedback='6';//las claves no son iguales\n }\n}else{\n $feedback='7';//no se ingreso tipo\n}\n return $feedback; \n }", "public function validarPregunta($tipo,$id,$respuesta){//funcion para validar clave y correo/id\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->readall(); //error en datos\n $resul2=$objM->readall();\n $resul3=$objP->readall();\n if($tipo==1){\n for($i=0;$i<count($resul1);$i++){\n if($resul1[$i]['id_admon'] == $id){\n if(strtoupper($resul1[$i]['respuesta']) == strtoupper($respuesta)){\n return true;\n } \n }\n }\n }\n \n for($i=0;$i<count($resul2);$i++){\n if($resul2[$i]['id_medico'] == $id){\n if(strtoupper($resul2[$i]['respuesta']) == strtoupper($respuesta)){\n return true;\n } \n }\n }\n \n for($i=0;$i<count($resul3);$i++){\n if($resul3[$i]['id_paciente'] == $id){\n if(strtoupper($resul3[$i]['respuesta']) == strtoupper($respuesta)){\n return true;\n } \n }\n }\n return false;\n }", "public function guardar()\n\t{\n\t\t//================= INICIO REGRAS DE VALIDAÇÃO DO FORMULÁRIO =================\n\t\t$this->form_validation->set_error_delimiters('<div class=\"text-danger mt-1\">','</div>');\n\t\t$regras = array(\n\t\t\tarray(\n\t\t\t\t'field' => 'nome',\n\t\t\t\t'label' => 'nome',\n\t\t\t\t'rules' => 'trim'\n\t\t\t), array(\n\t\t\t\t'field' => 'genero_aluno',\n\t\t\t\t'label' => 'género',\n\t\t\t\t'rules' => ''\n\t\t\t), array(\n\t\t\t\t'field' => 'nascimento_aluno',\n\t\t\t\t'label' => 'data',\n\t\t\t\t'rules' => ''\n\t\t\t), array(\n\t\t\t\t'field' => 'contacto_aluno',\n\t\t\t\t'label' => 'telemóvel',\n\t\t\t\t'rules' => 'trim|is_unique[aluno.contacto_aluno]'\n\t\t\t), array(\n\t\t\t\t'field' => 'tipo_documento',\n\t\t\t\t'label' => 'tipo de documento',\n\t\t\t\t'rules' => 'trim|required'\n\t\t\t), array(\n\t\t\t\t'field' => 'num_documento',\n\t\t\t\t'label' => 'nº do documento',\n\t\t\t\t'rules' => 'trim|is_unique[aluno.num_documento]'\n\t\t\t), array(\n\t\t\t\t'field' => 'pais',\n\t\t\t\t'label' => 'país',\n\t\t\t\t'rules' => 'trim'\n\t\t\t), array(\n\t\t\t\t'field' => 'provincia',\n\t\t\t\t'label' => 'província',\n\t\t\t\t'rules' => 'trim'\n\t\t\t), array(\n\t\t\t\t'field' => 'municipio',\n\t\t\t\t'label' => 'município',\n\t\t\t\t'rules' => 'trim'\n\t\t\t), array(\n\t\t\t\t'field' => 'data_emissao_doc',\n\t\t\t\t'label' => 'data de emissão',\n\t\t\t\t'rules' => 'trim|is_unique[aluno.data_emissao_doc]'\n\t\t\t), array(\n\t\t\t\t'field' => 'endereco_aluno',\n\t\t\t\t'label' => 'endereço',\n\t\t\t\t'rules' => 'trim'\n\t\t\t), array(\n\t\t\t\t'field' => 'nome_pai',\n\t\t\t\t'label' => 'nome do pai',\n\t\t\t\t'rules' => 'trim'\n\t\t\t), array(\n\t\t\t\t'field' => 'nome_mae',\n\t\t\t\t'label' => 'nome da mãe',\n\t\t\t\t'rules' => 'trim'\n\t\t\t)\n\t\t);\t\n\t\t//\tFIM REGRAS DE VALIDAÇÃO DO FORMULÁRIO \n\t\t$this->form_validation->set_rules($regras);\n\t\t//\tCONDICAO DE VALIDACAO \n\t\tif ($this->form_validation->run() == FALSE ) {\n\t\t$dados['pais'] = $this->Select_Dinamico_Model->busca_pais(); // Carrega Todos os Paises da BD num Select Dinamico\n\t\t//\tCHAMA A VIEW do FURMULARIO CRIAR ALUNO \n\t\t$this->load->model(\"Aluno_Model\", \"aluno\");\n\t\t$this->load->view('layout/cabecalho_secretaria');\n\t \t$this->load->view('layout/menu_lateral_secretaria');\n\t\t$this->load->view('conteudo/_secretaria/_aluno/criar_aluno', $dados);\n\t\t$this->load->view('layout/rodape');\n\t\t$this->load->view('layout/script');\n\t\t} else {\t\n\t\t$this->Aluno_Model->novoaluno(); // Carrega o Model novoaluno\t\t\n\t\techo $this->session->set_flashdata('msg',\"<div class='alert alert-success text-center'>ALUNO ADICIONADO COM SUCESSO</div>\");\t\n\t\t$id_aluno = $this->db->insert_id(); // Pega o ultimo ID inserido na BD\n\t\tredirect('secretaria/aluno/detalhe?id_aluno='.$id_aluno); // Redireciona Para o Pefil do Aluno\n\t\t}\n\t}", "function ValidaCampos(){\n\t\t\n\t\t $this->form_validation->set_rules(\"id_clase\", \"Id_clase\", \"callback_select_clase\");\n\t\t $this->form_validation->set_rules(\"ofrenda_clase\", \"Ofrenda_clase\", \"trim|required\");\n\t\t $this->form_validation->set_rules(\"fecha_ofrenda\", \"Fecha_ofrenda\", \"trim|required\");\n\t\t \n\t}", "public function validasi()\n {\n $form = $this->setRules();\n $this->form_validation->set_rules($form);\n\n if ($this->form_validation->run()) {\n return TRUE;\n }else{\n return FALSE;\n }\n }", "public function deleteCustomValidate()\n {\n // sprawdzanie czy zolnierz jest na misji\n if(self::checkSoldierIsOnMission($this->id)){\n $this->errors = \"Żołnierz przebywa aktualnie lub będzie przebywać na misji.\";\n return false;\n }\n \n // sprawdzanie czy zolnierz jest na szkoleniu\n if(self::checkSoldierIsOnTraining($this->id)){\n $this->errors = \"Żołnierz przebywa aktualnie lub będzie przebywać na szkoleniu.\";\n return false;\n }\n \n return true;\n }", "public function valid() {\n $errors = array(); \n \n if (strlen($this->nick) < 1) {\n $errors[] = \"Proszę się przedstawić.\";\n }\n if (strlen($this->nick) > 40) {\n $errors[] = \"Proszę podać nick krótszy niż 40 znaków.\";\n }\n if (!empty($this->email) && !filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $errors[] = \"Proszę wprowadzić poprawny adres poczty elektronicznej.\";\n }\n if (!empty($this->www) && !filter_var($this->www, FILTER_VALIDATE_URL)) {\n $errors[] = \"Proszę podać poprawny adres swojej strony internetowej.\";\n } \n if (strlen($this->content) < 5) {\n $errors[] = \"Proszę napisać coś treściwszego.\";\n }\n if (strlen($this->content) > 65535) {\n $errors[] = \"Podziwiam Twój zapał literacki, jednak Twój wpis jest zbyt obszerny. Proszę napisać coś krótszego niż 65 535 znaków. Oto wpisany przed chwilą tekst:<br />\".$this->content;\n }\n \n if (count($errors) > 0) {\n $this->errors = $errors;\n \n return false;\n } else {\n return true; \n }\n }", "public function _validacion_busqueda_producto(){\n\t\t$this->form_validation->set_rules('textdescripcion', 'Texto de busqueda', 'required'); //callback_username_check\n\t\n\n if ($this->form_validation->run() == FALSE)\n {\n // $this->form_validation->set_message('_validacion_producto', 'The {field} field can not be the word \"test\"');\n\t\t\t\t\t return false;\n }else{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t}", "public function _validacion_producto(){\n\t\t$this->form_validation->set_rules('textcodigo', 'Codigo Producto', 'required'); //callback_username_check\n $this->form_validation->set_rules('textdescrip', 'Descripcion Producto', 'required');\n\t\t$this->form_validation->set_rules('txtcantidad', 'Cantidad Producto', 'required');\n\t\t$this->form_validation->set_rules('txtstockminimo', 'Stock Minimo Producto', 'required');\n\t\t$this->form_validation->set_rules('txtstockmaximo', 'Stock Maximo Producto', 'required');\n\t\t$this->form_validation->set_rules('select_tipoproducto', 'Tipo de Producto', 'required');\n\t\t$this->form_validation->set_rules('select_categoriaproducto', 'Categoria de Producto', 'required');\n\t\t$this->form_validation->set_rules('txtfechanac', 'Vecha Vencimiento Producto', 'required');\n\n if ($this->form_validation->run() == FALSE)\n {\n // $this->form_validation->set_message('_validacion_producto', 'The {field} field can not be the word \"test\"');\n\t\t\t\t\t return false;\n }else{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\n \n\t}", "function validar_techo_ptto(){\n if($this->input->post()){\n $proy_id=$this->security->xss_clean($this->input->post('proy_id'));\n $ptofecg_id=$this->security->xss_clean($this->input->post('ptofecg_id'));\n\n $ffofet=$this->model_faseetapa->fase_presupuesto_id($ptofecg_id);\n\n if (!empty($_POST[\"ffofet_id\"]) && is_array($_POST[\"ffofet_id\"]) ) {\n foreach ( array_keys($_POST[\"ffofet_id\"]) as $como ) {\n $get_ffofet=$this->model_faseetapa->get_techo_id($_POST[\"ffofet_id\"][$como]);\n if(count($get_ffofet)!=0){\n $update_ffofet = array(\n 'ff_id' => $_POST[\"ffin\"][$como],\n 'of_id' => $_POST[\"ofin\"][$como],\n 'ffofet_monto' => $_POST[\"importe\"][$como],\n );\n $this->db->where('ffofet_id', $_POST[\"ffofet_id\"][$como]);\n $this->db->update('_ffofet', $update_ffofet);\n }\n else{\n $data = array(\n 'ptofecg_id' => $ptofecg_id,\n 'ff_id' => $_POST[\"ffin\"][$como],\n 'of_id' => $_POST[\"ofin\"][$como],\n 'ffofet_monto' => $_POST[\"importe\"][$como],\n );\n $this->db->insert('_ffofet',$data);\n $ffofet_id=$this->db->insert_id();\n }\n \n }\n }\n\n // $this->session->set_flashdata('success','SE REGISTRO CORRECTAMENTE EL TECHO PRESUPUESTARIO DE LA OPERACIÓN - PROYECTO DE INVERSIÓN');\n redirect(site_url(\"admin\").'/proy/list_proy_fin');\n // echo 'true';\n }else{\n show_404();\n }\n }", "public function is_valid()\n {\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "public function is_valid()\n {\n }", "public function validateEdit() {\r\n //pobierz parametry na potrzeby wyswietlenia danych do edycji\r\n //z widoku listy osób (parametr jest wymagany)\r\n $this->form->id = ParamUtils::getFromCleanURL(1, true, 'Błędne wywołanie aplikacji');\r\n return !App::getMessages()->isError();\r\n }", "public function validateEdit() {\r\n //pobierz parametry na potrzeby wyswietlenia danych do edycji\r\n //z widoku listy osób (parametr jest wymagany)\r\n $this->form->id = ParamUtils::getFromCleanURL(1, true, 'Błędne wywołanie aplikacji');\r\n return !App::getMessages()->isError();\r\n }", "public function _validarHelado()\n {\n $listaHelados = Helado::_traerHelados();\n //Son distintos, pasa la validación.(Si y solo si se queda en este valor)\n $retorno = -1;\n if($this->_precio < 0 || $this->_tipo != \"agua\" && $this->_tipo != \"crema\" || $this->_cantidad < 0)\n {\n return 1;\n }\n foreach($listaHelados as $helado)\n { \n if($this->_sabor == $helado->_sabor && $this->_tipo == $helado->_tipo)\n {\n $helado->_cantidad = $this->_cantidad;\n $helado->_precio = $this->_precio;\n Helado::_actualizarHelado($listaHelados);\n $retorno = 0;\n break;\n }\n }\n return $retorno;\n }", "function save_user_management_validation() {\n global $pesan_error; //memanggil global variabel 2 ini\n global $conn;\n //mengecek jika datanya tidak sama dengan datanya yang lama alias diubah\n if ($_POST['nama-pengguna']!=pengguna()['nama_pengguna']) {\n //melakukan select pada pengguna dengan where kondisi data baru\n $q = $conn->prepare(\"SELECT * FROM pengguna WHERE nama_pengguna='{$_POST['nama-pengguna']}' AND aktif='1'\");\n $q->execute();\n //jika method fetchAll ini menghasilkan setidaknya 1 (tidak bernilai false) maka dianggap sudah ada yang menggunakan data itu\n if (@$q->fetchAll()) $pesan_error['nama-pengguna'] = 'Nama pengguna sudah digunakan';\n }\n validasi_masukan_alfanumerik($pesan_error, 'nama-pengguna'); //menvalidasi nama pengguna untuk alfanumerik\n validasi_masukan_wajib($pesan_error, 'nama-pengguna'); //masukan wajib juga\n if ($_POST['sandi']!='') { //jika kolom sandi diisi, dianggap melakukan perubahan pada kata sandi, dan akan divalidasi\n validasi_masukan_minimal($pesan_error, 'sandi', 4); //setidaknya terdapat 4 huruf\n validasi_masukan_sama($pesan_error, 'konfirmasi-sandi', 'sandi', 'Sandi'); //divalidasi juga dengan kolom konfirmasi, harus sama\n }\n validasi_masukan_alfabet($pesan_error, 'nama'); //validasi alfabet untuk nama\n validasi_masukan_wajib($pesan_error, 'nama'); //wajib juga\n if ($_POST['nomor-hp']!=pengguna()['nomor_hp']) { //jika ada perbedaan dengan nomor hp yang lama, maka dianggap diubah dan divalidasi\n //melakukan select pada database dengan data hp\n $q = $conn->prepare(\"SELECT * FROM pengguna WHERE nomor_hp='{$_POST['nomor-hp']}'\");\n $q->execute();\n //jika true (ada datanya) dianggap sudah ada yang menggunakan data tsb\n if (@$q->fetchAll()) $pesan_error['nomor-hp'] = 'Nomor HP sudah digunakan';\n }\n validasi_masukan_panjang($pesan_error, 'nomor-hp', 10, 15); //validasi panjang untuk hp min 10 dan max 15 karakter\n validasi_masukan_numerik($pesan_error, 'nomor-hp'); //harus angka\n validasi_masukan_wajib($pesan_error, 'nomor-hp'); //dan masukan wajib\n if ($_POST['email']!=pengguna()['email']) { //email juga demikian, jika beda dianggap melakukan perubahan dan divalidasi\n $q = $conn->prepare(\"SELECT * FROM pengguna WHERE email='{$_POST['email']}'\"); //select berdasarkan email\n $q->execute();\n if (@$q->fetchAll()) $pesan_error['email'] = 'E-mail sudah digunakan'; //jika data ada maka dianggap sudah ada yang menggunakan\n }\n validasi_masukan_email($pesan_error, 'email'); //validasi format email untuk kolom email\n validasi_masukan_wajib($pesan_error, 'email'); //validasi wajib juga\n if (!empty($pesan_error)) return; //jika ada pesan kesalahan, maka sampai disini (return, kebawahnya tidak akan diproses)\n $nama_pengguna = pengguna()['nama_pengguna']; //mengambil data nama pengguna yang lama dari fungsi pengguna()\n if ($_POST['sandi']!='') { //jika kolom sandi diisi, maka otomatis sandi akan diubah\n //mengupdate database berdasarkan nama pengguna saat ini\n $q = $conn->prepare(\"UPDATE pengguna SET sandi=SHA2('{$_POST['sandi']}', 0) WHERE nama_pengguna='$nama_pengguna' AND aktif='1'\");\n $q->execute();\n }\n //mengupdate data lainnya, meskipun data sama tetap akan melakukan ini\n $q = $conn->prepare(\"UPDATE pengguna SET nama_pengguna='{$_POST['nama-pengguna']}', nama='{$_POST['nama']}', alamat='{$_POST['alamat']}', nomor_hp='{$_POST['nomor-hp']}', email='{$_POST['email']}' WHERE nama_pengguna='$nama_pengguna' AND aktif='1'\");\n $q->execute();\n //mengubah data pada session, karena data nama-pengguna dianggap sudah berbeda, sehingga user tetap tercatat sudah login\n $_SESSION['nama-pengguna'] = $_POST['nama-pengguna'];\n}", "public function validation();", "public function validateEdit() {\n\t\t//pobierz parametry na potrzeby wyswietlenia danych do edycji\n\t\t//z widoku listy osób (parametr jest wymagany)\n\t\t$this->form->id = getFromRequest('id',true,'Błędne wywołanie aplikacji');\n\t\treturn ! getMessages()->isError();\n\t}", "protected function _validate() {\n\t}", "function _validate_uso_controladorModulos($idModulo, $idPermiso = null, $rolSessName) {\n $CI =& get_instance();\n if(!isset($_COOKIE[$CI->config->item('sess_cookie_name')])) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n $idPersona = $CI->session->userdata('nid_persona');\n $idRol = $CI->session->userdata($rolSessName);\n if($idPersona == null || $idRol == null) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n $CI->load->model('../m_utils', 'utiles');\n //VALIDAR QUE EL ROL TENGA EL PERMISO\n if($idPermiso != null) {\n if($CI->utiles->checkIfRolHasPermiso($idRol, $idModulo, $idPermiso) == false) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n }\n //VALIDAR QUE EL USUARIO TENGA EL ROL\n if($CI->utiles->checkIfUserHasRol($idPersona, $idRol) == false && $idRol != ID_ROL_FAMILIA) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n }", "function isValid() ;", "public function validate()\n {\n // Tipo de validación\n $type = $this->request->get('type');\n $type = ($type == 'email') ? 'email' : 'username';\n \n Core::getService('account.validate')->$type($this->request->get('value'));\n $status = 'taken';\n \n if (Core_Error::isPassed())\n {\n $status = 'ok'; \n }\n \n $this->call(\"var obj = $('#\" . $this->request->get('obj') . \"'); signup.show_status(obj, '{$status}');\");\n }", "private function validateData ($data){\n if(isset($data[\"nombres\"]) && !preg_match('/^[a-zA-ZáéíóúÁÉÍÓÚñÑ ]+$/',$data[\"nombres\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, no se permiten numeros en el nombre del usuario\");\n print json_encode($json, true);\n return false;\n }\n if(isset($data[\"apellidos\"]) && !preg_match('/^[a-zA-ZáéíóúÁÉÍÓÚñÑ ]+$/',$data[\"apellidos\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, no se permiten numeros en el apellido del usuario\");\n print json_encode($json, true);\n return false;\n }\n if(isset($data[\"email\"]) && !preg_match('/^(([^<>()\\[\\]\\\\.,;:\\s@”]+(\\.[^<>()\\[\\]\\\\.,;:\\s@”]+)*)|(“.+”))@((\\[[0–9]{1,3}\\.[0–9]{1,3}\\.[0–9]{1,3}\\.[0–9]{1,3}])|(([a-zA-Z\\-0–9]+\\.)+[a-zA-Z]{2,}))$/',$data[\"email\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, el email no es valido\");\n print json_encode($json, true);\n return false;\n \n }\n if(isset($data[\"email\"])){\n $conn = clientesModels::validateEmail('clientes',$data[\"email\"]);\n if($conn != 0){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, El email {$data[\"email\"]} ya esta registrado\");\n print json_encode($json, true);\n return false;\n }\n }\n \n \n return true;\n }", "public function rechargeEspeceValidation()\n {\n $telephone = $this->utils->securite_xss($_POST['telephone']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $soldeAgence = $this->utils->securite_xss($_POST['soldeagence']);\n $montant = $this->utils->securite_xss($_POST['montant']);\n $frais = $this->utils->securite_xss($_POST['frais']);\n $fkagence = $this->utils->securite_xss($_POST['fkagence']);\n $codevalidation = $this->utils->securite_xss($_POST['code']);\n $user_creation = $this->userConnecter->rowid;\n $service = ID_SERVICE_RECHARGE_ESPECE;\n $frais = $this->compteModel->calculFrais($service, $montant);\n\n $numtransact = $this->utils->Generer_numtransaction();\n $statut = 0;\n $commentaire = 'Recharge Espece';\n\n if ($codevalidation != '' && $telephone != '' && $montant > 0 && $frais > 0 && $soldeAgence != '' && strlen($numtransact) == 15) {\n //if ($soldeAgence >= ($montant + $frais)) {\n if ($soldeAgence >= $montant) {\n $codeValidation = $this->utils->rechercherCoderechargement($codevalidation, $fkagence);\n if ($codeValidation > 0) {\n $typecompte = $this->compteModel->getTypeCompte($telephone);\n if ($typecompte == 0) {\n $username = 'Numherit';\n $userId = 1;\n $token = $this->utils->getToken($userId);\n $soldeavant = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $jjs = json_decode($soldeavant);\n $soldeavant = $jjs->{'statusMessage'};\n\n $response = $this->api_numherit->crediterCompte($username, $token, $telephone, $montant, $service, $user_creation, $fkagence);\n\n $decode_response = json_decode($response);\n if ($decode_response->{'statusCode'} == 000) {\n $soldeapres = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $jjs = json_decode($soldeapres);\n $soldeapres = $jjs->{'statusMessage'};\n @$this->utils->addMouvementCompteClient($numtransact, $soldeavant, $soldeapres, $montant, $telephone, $operation = \"CREDIT\", $commentaire = \"RECHARGEMENTESPECE\");\n\n $statut = 1;\n $message = $decode_response->{'statusMessage'};\n $transactId = $decode_response->{'NumTransaction'};\n $this->utils->changeStatutCoderechargement($codeValidation);\n $this->agenceModel->debiter_soldeAgence($montant, $fkagence);\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $crediterCarteCommission = $this->utils->crediter_carteParametrable($frais, 1);\n if ($crediterCarteCommission == 1) {\n $observation = 'Commission Recharge Espece';\n $this->utils->addCommission($frais, $service, $fkcarte, $observation, $fkagence);\n\n } else {\n $observation = 'Commission Recharge Espece à faire';\n $this->utils->addCommission_afaire($frais, $service, $fkcarte, $observation, $fkagence);\n }\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $decode_response->{'statusMessage'}, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('ok') . '/' . base64_encode($telephone) . '/' . base64_encode($montant) . '/' . base64_encode($frais) . '/' . base64_encode($numtransact));\n } else {\n $message = $decode_response->{'statusMessage'};\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $decode_response->{'statusMessage'}, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n }\n } else if ($typecompte == 1) {\n $numcarte = $this->compteModel->getNumCarte($telephone);\n $numeroserie = $this->utils->returnCustomerId($numcarte);\n $last4digitclient = $this->utils->returnLast4Digits($numcarte);\n\n $statut = 0;\n $json = $this->api_gtp->LoadCard($numtransact, $numeroserie, $last4digitclient, $montant, 'XOF', 'RechargementEspece');\n $return = json_decode($json);\n $response = $return->{'ResponseData'};\n if ($response != NULL && is_object($response)) {\n if (array_key_exists('ErrorNumber', $response)) {\n $errorNumber = $response->{'ErrorNumber'};\n $message = $response->{'ErrorMessage'};\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $errorNumber . '-' . $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n } else {\n $transactionId = $response->{'TransactionID'};\n $message = 'Succes';\n if ($transactionId > 0) {\n $statut = 1;\n $this->utils->changeStatutCoderechargement($codeValidation);\n $this->agenceModel->debiter_soldeAgence($montant, $fkagence);\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactionId);\n $crediterCarteCommission = $this->utils->crediter_carteParametrable($frais, 1);\n if ($crediterCarteCommission == 1) {\n $observation = 'Commission Recharge Espece';\n $this->utils->addCommission($frais, $service, $fkcarte, $observation, $fkagence);\n\n\n } else {\n $observation = 'Commission Recharge Espece à faire';\n $this->utils->addCommission_afaire($frais, $service, $fkcarte, $observation, $fkagence);\n }\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('ok') . '/' . base64_encode($telephone) . '/' . base64_encode($montant) . '/' . base64_encode($frais) . '/' . base64_encode($numtransact));\n }\n }\n } else {\n $message = 'Response GTP not object';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n }\n }\n } else {\n $message = 'Code de validation incorrect';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok2'));\n }\n } else {\n $message = 'Solde agence insuffisant';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok3'));\n }\n } else {\n $message = 'Paramétres renseignés incorrects';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok4') . '/' . base64_encode($telephone));\n }\n }", "public function absen(){\n $pass = $this->request->getVar('pass'); \n $pass = preg_replace('/\\s+/', '', $pass); // hapus whitespace \n $pass = strtolower($pass); // konversi lowercase\n\n $absen_id = $this->request->getVar('absen_id');\n if($absen_id == 1 && $pass == strtolower(preg_replace('/\\s+/', '', info('webinar_pass_1')))){\n $kode = 2;\n } elseif($absen_id == 2 && $pass == strtolower(preg_replace('/\\s+/', '', info('webinar_pass_2')))){\n $kode = 2;\n } elseif($absen_id == 3 && $pass == strtolower(preg_replace('/\\s+/', '', info('webinar_pass_3')))){\n $kode = 2;\n } elseif($absen_id == 4 && $pass == strtolower(preg_replace('/\\s+/', '', info('webinar_pass_4')))){\n $kode = 2;\n } else {\n $kode = $this->request->getVar('pass');\n }\n // === END VALIDASI PASSWORD === //\n\n $data = [\n 'id' => $this->request->getVar('peserta_id'),\n 'webinar_'.$absen_id => $kode,\n ];\n $model = new M_Webinar();\n $model->save($data);\n $judul = $this->request->getVar('judul');\n if($kode == 2){\n if($absen_id == 4){\n session()->setFlashdata('pesan-success', \"Absen $judul berhasil.\");\n } else {\n session()->setFlashdata('pesan-success', \"Absen $judul berhasil. Silakan Anda mengunduh sertifikat pada tautan yang telah disediakan\");\n }\n } else {\n session()->setFlashdata('pesan-error', \"Maaf, password yang Anda input salah. Silakan Anda menghubungi CP agar panitia dapat memvalidasi password Anda secara manual.\");\n }\n return redirect()->to(base_url('webinar/dashboard'));\n\n }", "function comprobar_nombre()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->nombre) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"nombre vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\tif (strlen($this->nombre) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->nombre) > 31)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"nombre demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\t}\n\n\t//si los atributos son alfabeticos\n\tif (ctype_alpha($this->nombre))\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"nombre no valido, solo se admiten caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "function validate()\n{\n $check = true;\n\n $v_id_vehicle = $_POST['id_vehicle'];\n $v_marca = $_POST['marca'];\n $v_modelo = $_POST['modelo'];\n $v_HP = $_POST['HP'];\n $v_Km = $_POST['Km'];\n $v_Anyo_produccion = $_POST['Anyo_produccion'];\n $v_color = $_POST['color'];\n $v_precio = $_POST['precio'];\n\n\n $r_id_vehicle = validate_id_vehicle($v_id_vehicle);\n $r_marca = validate_marca($v_marca);\n $r_modelo = validate_modelo($v_modelo);\n $r_HP = validate_HP($v_HP);\n $r_Km = validate_Km($v_Km);\n $r_Anyo_produccion = validate_Anyo_produccion($v_Anyo_produccion);\n $r_color = validate_color($v_color);\n $r_precio = validate_precio($v_precio);\n\n if ($r_id_vehicle !== 1) {\n $error_id_vehicle = \" * El id_vehicle introducido no es valido\";\n $check = false;\n } else {\n $error_id_vehicle = \"\";\n }\n if ($r_marca !== 1) {\n $error_marca = \" * La marca introducida no es valida\";\n $check = false;\n } else {\n $error_marca = \"\";\n }\n if ($r_modelo !== 1) {\n $error_modelo = \" * El modelo introducido no es valido\";\n $check = false;\n } else {\n $error_modelo = \"\";\n }\n if ($r_HP !== 1) {\n $error_HP = \" * El HP introducido no es valido\";\n $check = false;\n } else {\n $error_HP = \"\";\n }\n if (!$r_Km) {\n $error_Km = \" * No has indicado kilometraje\";\n $check = false;\n } else {\n $error_Km = \"\";\n }\n if (!$r_Anyo_produccion) {\n $error_Anyo_produccion = \" * No has introducido ninguna Anyo_produccion\";\n $check = false;\n } else {\n $error_Anyo_produccion = \"\";\n }\n\n if (!$r_color) {\n $error_color = \" * No has seleccionado ningun color\";\n $check = false;\n } else {\n $error_color = \"\";\n }\n if (!$r_precio) {\n $error_precio = \" * El texto introducido no es valido\";\n $check = false;\n } else {\n $error_precio = \"\";\n }\n\n return $check;\n}", "function save_user_management_validation_admin() {\n global $pesan_error; //memanggil tempat menyimpan pesan error di global\n global $conn; //memanggil koneksi juga di global\n //jika nama pengguna yang di $_POST tidak sama dengan pengguna rinci di database (kasarnya sudah diubah), maka akan dilakukan validasi\n if ($_POST['nama-pengguna']!=pengguna_rinci($_GET['nama-pengguna'])['pengguna']['nama_pengguna']) {\n //select berdasarkan nama pengguna yang baru diasukkan tadi\n $q = $conn->prepare(\"SELECT * FROM pengguna WHERE nama_pengguna='{$_POST['nama-pengguna']}' AND aktif='1'\");\n $q->execute();\n //jika menghasilkan nilai, maka jelas nama pengguna sudah ada dan ada peringatan berikut\n if (@$q->fetchAll()) $pesan_error['nama-pengguna'] = 'Nama pengguna sudah digunakan';\n }\n validasi_masukan_alfanumerik($pesan_error, 'nama-pengguna'); //validasi alfanumerik juga\n validasi_masukan_wajib($pesan_error, 'nama-pengguna'); //masukan wajib juga\n if ($_POST['sandi']!='') { //jika kolom sandi diisi, dianggap melakukan perubahan dan akan divalidasi\n validasi_masukan_minimal($pesan_error, 'sandi', 4); //validasi minimail 4\n validasi_masukan_sama($pesan_error, 'konfirmasi-sandi', 'sandi', 'Sandi'); //harus sama dengan kolom konfirmasi\n }\n validasi_masukan_alfabet($pesan_error, 'nama'); //validasi alfabet untuk nama\n validasi_masukan_wajib($pesan_error, 'nama'); //validasi wajib juga\n if ($_POST['nomor-hp']!=pengguna_rinci($_GET['nama-pengguna'])['pengguna']['nomor_hp']) { //jika nomor hp berbeda dengan data yang lama, akan divalidasi juga\n $q = $conn->prepare(\"SELECT * FROM pengguna WHERE nomor_hp='{$_POST['nomor-hp']}'\"); //select berdasarkan nomor hp yang baru\n $q->execute();\n //jika ada nilai, maka dianggap sudah ada, dan ada peringatan\n if (@$q->fetchAll()) $pesan_error['nomor-hp'] = 'Nomor HP sudah digunakan';\n }\n validasi_masukan_panjang($pesan_error, 'nomor-hp', 10, 15); //validasi no hp min 10 max 15\n validasi_masukan_numerik($pesan_error, 'nomor-hp'); //validasi numerik juga\n validasi_masukan_wajib($pesan_error, 'nomor-hp'); //validasi wajib diisi juga\n if ($_POST['email']!=pengguna_rinci($_GET['nama-pengguna'])['pengguna']['email']) { //email jika berbeda dengan data yang lama, akan divalidasi\n $q = $conn->prepare(\"SELECT * FROM pengguna WHERE email='{$_POST['email']}'\"); //select berdasarkan email baru\n $q->execute();\n //jika ada data, maka dianggap sudah ada\n if (@$q->fetchAll()) $pesan_error['email'] = 'E-mail sudah digunakan';\n }\n validasi_masukan_email($pesan_error, 'email'); //masukan format email pada kolom email\n validasi_masukan_wajib($pesan_error, 'email'); //masukan wajib juga\n if (!empty($pesan_error)) return; //jika ada error, maka ke bawah ini tidak dieksekusi, ditahan oleh return\n if ($_POST['sandi']!='') { //jika kolom sandi terisi, maka akan dianggap melakukan perubahan dan akan diupdate di database\n //melakukan update terhadap pengguna bersarkan nama pengguna di data $_GET (ini khusus admin)\n $q = $conn->prepare(\"UPDATE pengguna SET sandi=SHA2('{$_POST['sandi']}', 0) WHERE nama_pengguna='{$_GET['nama-pengguna']}' AND aktif='1'\");\n $q->execute();\n }\n //jika ternyata yang diupdate adalah dirinya sendiri, maka akan dilakukan update juga pada session, agar tidak merusak data login pada sesi\n if (pengguna_rinci($_GET['nama-pengguna'])['pengguna']['nama_pengguna']==pengguna()['nama_pengguna']) $_SESSION['nama-pengguna'] = $_POST['nama-pengguna'];\n //melakukan update pada tabel pengguna berdasarkan nama pengguna yang ada dalam data $_GET\n $q = $conn->prepare(\"UPDATE pengguna SET nama_pengguna='{$_POST['nama-pengguna']}', nama='{$_POST['nama']}', alamat='{$_POST['alamat']}', nomor_hp='{$_POST['nomor-hp']}', email='{$_POST['email']}' WHERE nama_pengguna='{$_GET['nama-pengguna']}' AND aktif='1'\");\n $q->execute();\n}", "public static function Znevalidni_kolize_ucastnika_formulare($iducast,$formular) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and s_typ_kolize.formular='\" . $formular . \"' and uc_kolize_table.valid\" ;\r\n \r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika_formulare: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n \r\n while($zaznam_kolize = $sth->fetch()) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "function validarCodigoActivacion ($codigo) {\n\n $data = $this->select()->filtro(['validacion' => $codigo])->fila();\n if ($this->bd->totalRegistros > 0) {\n $this->establecerAtributos($data);\n $this->activo = 1;\n $this->validacion = 1;\n $this->id_estatus = 1;\n if ($this->salvar()->ejecutado()) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }" ]
[ "0.7165514", "0.699201", "0.69832176", "0.69681996", "0.6948327", "0.6936795", "0.6910715", "0.6910715", "0.6910715", "0.6910715", "0.6910715", "0.6910715", "0.6910715", "0.6910715", "0.6906036", "0.6891829", "0.6891829", "0.6891829", "0.6891829", "0.6819342", "0.6815187", "0.6765332", "0.6744838", "0.6714817", "0.6703122", "0.6702807", "0.66986036", "0.66805726", "0.6665432", "0.6665432", "0.6665432", "0.6665432", "0.6649406", "0.66454065", "0.6635774", "0.6617031", "0.66150993", "0.66034466", "0.6599555", "0.65933084", "0.658418", "0.6579915", "0.65604657", "0.65602446", "0.65602446", "0.6553919", "0.6544378", "0.6529634", "0.64814764", "0.6470985", "0.6470025", "0.6468274", "0.64604086", "0.64515835", "0.64280176", "0.6426217", "0.6420693", "0.64057153", "0.64016443", "0.639461", "0.63906187", "0.6386032", "0.6381451", "0.6378157", "0.6376004", "0.63706976", "0.63474065", "0.63433766", "0.63423914", "0.6337344", "0.63312477", "0.6326472", "0.6326281", "0.6324068", "0.6318583", "0.6314686", "0.6298472", "0.6293898", "0.6286882", "0.628471", "0.62706554", "0.62704146", "0.6269667", "0.6250084", "0.6250084", "0.62400895", "0.6219307", "0.62175703", "0.6214056", "0.62119764", "0.6211088", "0.6209996", "0.6196045", "0.61867726", "0.618325", "0.61824405", "0.6180352", "0.6170276", "0.6166403", "0.6166321", "0.6164906" ]
0.0
-1
Display the home page.
public function home() { return view('pages.home'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function Home()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'home');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Home')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/homepage');\n }", "public function homePage()\n {\n return $this->render(\"homePage.html.twig\");\n }", "public function home()\n {\n $params = [\n 'name' => 'xEiBi'\n ];\n\n return $this->render('home', $params);\n }", "public function home()\n {\n $this->render('home/content');\n }", "public function index()\n {\n $this->render('home/home');\n }", "public function home()\n {\n global $user;\n\n // Example data to use in the home page.\n $context['user'] = $user;\n $context['allPosts'] = Post::tenMostRecent();\n $context['allComments'] = Comment::tenMostRecent();\n $context['allImages'] = Image::tenMostRecent();\n return render('views/pages/home.php', $context);\n }", "public function home()\n {\n $listItem = $this->Item->getAll();\n $this->set(['title' => 'Home', 'items' => $listItem]);\n $this->render('home');\n }", "public function showHomePage()\n\t{\n\t\t# call the API\n\t\tif($accessKey = getAccessKey()) {\n\t\t\t$headers = ['accessKey' => $accessKey];\n\t\t}\n\t\telse {\n\t\t\t$headers = [];\n\t\t}\n\n\t\t$response = App::make(\"ApiClient\")->get(\"home\", [], $headers);\n\n\t\t# if we got some data back successfully then do something with it\n\t\tif($response['success'])\n\t\t{\n\t\t\t# short cut the data response\n\t\t\t$data = $response['success']['data'];\n\n\t\t\t# if we don't have the nav stored in the session then store it\n\t\t\tif (! Session::has('nav') ) {\n\t\t\t Session::put('nav', $data['channels']);\n\t\t\t}\n\n\t\t\t# set the browser page title\n\t\t\t$data['pageTitle'] = \"Bristol news, what's on, food and drink, lifestyle\";\n\n\t\t\t# set the pages meta description value\n\t\t\t$data['metaDescription'] = \"Bristol news, comprehensive what's on listings, reviews and special offers online, on mobile, in print - check out our FREE app and monthly magazine\";\n\n\t\t\t# make the view\n\t\t\treturn View::make('home.index', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// do something here!!!\n\t\t}\n\t}", "public function home()\n\t{\n\n\t\tView::show(\"home.php\", \"Accueil Mon MVC !\");\n\t}", "public function home()\n\t{\n\t\tView::show(\"home.php\", \"Accueil !\");\n\t}", "public function home()\r\n {\r\n\r\n $view = new Template();\r\n echo $view->render('views/home.html');\r\n }", "public function home()\n {\n session_start();\n $posts = new PostManager;\n $resultat = $posts->getPosts(4);\n echo $this->getRender()->render('homeView.twig', [\n 'resultat' => $resultat,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }", "public function home() {\n $posts = $this->postManager->getPosts();\n $view = new View(\"Home\");\n $view->generate(array('posts' => $posts));\n }", "public function route_home() {\n\t\techo '<h1>It wurks!</h1>';\n\t}", "public function homeAction()\n {\n View::render('Pages/home.html.twig');\n }", "public function showHome()\n {\n //user authentication\n $user = UserAccountController::getCurrentUser();\n if ($user === null) {\n return;\n }\n $view = new View(\"userHome\");\n $view->addData(\"userName\", $user->getNickName());\n echo $view->render();\n }", "public function index() {\n\n\t\t$data['content'] = 'Homepage';\n\t\t$this->flexi->title('Homepage')\n\t\t\t\t\t->make('home', $data);\n\n\t}", "public function home()\n\t{\n\t\t$this->sidebar_template = 'news';\n\t\t$this->news = R::dispense('news', 5);\n\t\t$this->render();\n\t}", "public function home()\n\t{\n\t // show the form\n\t return $this->homeRepository->home();\n\t}", "public function home()\n {\n $this->privateAccess(true);\n //Set content type as html page\n $this->contentType(\n 'html',\n 'Management Proof',\n [\n $this->_assets_path . 'js/Core/datatables.min.js',\n $this->_assets_path . 'js/Apps/ManagementResults/home.js'\n ], [\n $this->_assets_path . 'css/Core/datatables.min.css'\n ]\n );\n\n //add management subject view\n include 'Apps/ManagementResults/view/home.php';\n\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function home()\n {\n $lastUpdates = ArticleManager::findLastUpdates();\n\n $this->renderView('home.twig',\n [\n 'articleList' => $this->articleList,\n 'lastUpdates' => $lastUpdates, \n ]\n );\n }", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function home()\n {\n\t\tif(!$_SESSION['logged_in'])\n\t\t\tredirect('administrator');\n\t\t\n $data = array(\n 'admin' => $_SESSION['username']\n );\n $this->page('administrator/home',$data);\n }", "public function actionHome(){\n\t\t\n\t\t$this->getContent('home');\n\t\t\n\t}", "public function index () {\n\n return $this->app->render('home.tpl.php');\n \n }", "public static function index()\n {\n self::create_view(\"home.view\", [\n \"user\" => Session::retrieve_object(\"user\")\n ]);\n\n exit;\n }", "public function index()\n {\n// $pageData = $this->_pageService->getPage(PageConstant::HOME_PAGE);\n return $this->renderView($this->getView('home.welcome'), [], 'Home');\n }", "public function index()\n {\n if (session()->get('logged_in')) {\n \techo render(HOME_PAGE, ['title' => 'Accueil']);\n }\n // Otherwise, the login page is displayed\n else $this->login();\n }", "private function home() {\n // busca as categorias do bd\n $categorias = $this->model->visualizarCategorias();\n // seta as categorias para a view\n $this->view->setCategorias($categorias);\n // passa o arquivo home\n $file = $this->templates . 'home.php';\n \n // retorna o conteudo da tela home para o usuario\n $this->telaUser = $this->view->retornaTela($file);\n }", "public function home()\n {\n return view('core::home.index');\n }", "public static function showHomePage()\n {\n $vd = new ViewDescriptor();\n $vd->setTitolo(\"SardiniaInFood: Profilo\");\n $vd->setLogoFile(\"../view/in/logo.php\");\n $vd->setMenuFile(\"../view/in/menu_home_azienda.php\");\n $vd->setContentFile(\"../view/in/azienda/home_page_azienda.php\");\n $vd->setErrorFile(\"../view/in/error_in.php\");\n $vd->setFooterFile(\"../view/in/footer_empty.php\");\n \n require_once \"../view/Master.php\";\n }", "public function homeAction(){\n return $this->render('HMMainBundle:Default:index.html.twig');\n }", "public function home()\n\t{\n\t\t$header = $this->loaded_module(0);\n\t\t$footer = $this->loaded_module(1);\n\t\t\n\t\t$data = $this->settings();\n\t\t\n\t\t$product = $this->loaded_module(7);\n\t\t$data[\"product_special\"] = $product->special_product_list(8);\n\t\t$data[\"latest_product\"] = $product->latest_product_list(6);\n\t\t$data[\"latest_product2\"] = $product->latest_product_list(6);\n\t\t$data[\"latest_product3\"] = $product->latest_product_list(6);\n\t\t\n\t\t$banner = $this->loaded_module_admin(7)->get_active_banner();\n\t\t$data[\"banner\"] = $banner;\n\t\t\n\t\t$header->header_view();\n\t\t$this->load->view(\"Home_v\", $data);\n\t\t$footer->footer_view();\n\t}", "public function home()\n\t{\n\t\t$this->load->view('homepage_view');\n\t}", "public function home() {\n\t\treturn View::make('home', array('pageTitle' => 'Home'));\n\t}", "function home()\n\t{\n\t\t$data['active_page'] = 'home';\n\t\t$data['cart_items_count'] = $this->m_cart->get_cart_count();\n\t\t$data['settings'] = $this->m_settings->get_all();\n\t\t$this->load->view('frontend/templates/header',$data);\n\t\t$this->load->view('frontend/templates/main_home_top_bg');\n\t\t$this->load->view('frontend/pages/boss/home');\n\t\t$this->load->view('frontend/templates/footer', $data);\n\n\t}", "public function home()\n\t{\n\t\t$page = 'home';\n\t\treturn view('dashboard.home', compact('page'));\n\t}", "public function home()\n\t{\n\t\t$data = $this->Service->get_latest_blogs();\n\n\t\t// Get the only one latest blog among all the categories.\n\t\t$data['latest_blog'] = $this->Blogs_model->get_latest_blog();\n\n\t\t// load the view\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('blogs/home', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "public function homePage()\n\t{\n $data[\"base_url\"] = $this->config->item(\"base_url\");\n $data['header'] = $this->load->view('user/header', $data, TRUE);\n\t\t$data['footer'] = $this->load->view('user/footer', $data, TRUE);\n\t\t$this->load->view('user/home',$data,true);\n }", "public function index() {\n $this->home(); \n }", "public function index()\n\t{\n\t\t$data['logo'] = \"/img/ilih.png\";\n\t\t$data['users'] = $this->User->getAll();\n\n\t\t$this->parser->parse('home', $data);\n\t}", "public function home()\n\t{\n\t\treturn View::make('newhome');\n\t}", "public function index() {\n\t\t$data = $this->homePageData();\n\n\t\treturn view( \"frontend.home\", $data );\n\t}", "public function home () {\n\t\t//deteccion\n\t\tif(Agent::isMobile()){\n\t\t\treturn View::make(\"movil.home\");\n\t\t} else {\n\t\t\treturn View::make(\"desktop.pre\");\n\t\t}\n\t}", "public function userHome() {\n\n $this->page->getPage('userhome.tpl');\n }", "public function homeAction()\n {\n return $this->render('AdvertBundle:Default:index.html.twig');\n }", "public function home() {\n //We could set this as guest and then get it from SESSION once a user has logged in\n $first_name = 'Lisa';\n $last_name = 'Simpson';\n require_once('views/pages/home.php');\n }", "public function index() {\n\t\t\t$this->render('home.twig.html', ['flash' => $this->session->getFlash(), 'token' => $this->session->getToken()]);\n\t\t}", "function Home()\n {\n $this->requestSessionInfo();\n\n // muestra solo 2\n $recent_artworks = $this->modelArtwork->GetFrontArtworks(2);\n $this->view->ShowHome($recent_artworks);\n }", "public function home(){\n $itemsHome = $this->itemsModel->listenerItems(); // Recupération des items de ma bdd ( par default les 8 permier items)\n include(\"home.php\"); // Chargement de la view (page home.php)\n }", "public function frontpage() {\n\t\t\n\t\t$this->set('page_title', 'Welcome'); // this is hardcoded for index page\n\t\t$this->render('index');\n\t}", "public function home() {\n\n\t\t// echo $user = User::find(1)->username;\n\t\t// echo '<pre>', print_r($user), '</pre>';\n\t\t\n\t\treturn View::make('home', array('new'=>'You are in Home'));\n\t}", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function home($data){\r\n if(!$this->isLogged()){\r\n header(\"Location:\".url(\"admin/login\"));\r\n }\r\n echo $this->view->render(\"home.php\",[\r\n \"title\"=> \"Admin Home | \". SITE,\r\n ]);\r\n }", "public function index()\n\t{\n\t\t$data = array(\n\t\t\t'title' => 'Home',\n\t\t\t'item' => $this->m_home->getData(),\n\t\t\t'contents' => 'v_home',\n\t\t);\n\t\t$this->load->view('layout/v_wrapper_frontend', $data, false);\n\t}", "public function homePage()\n {\n return cq()->homePage();\n }", "public function home()\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$data['username']\t\t\t= $this->session->userdata('username');\n\t\t\t\t$this->load->view('admin/home', $data);\n\t\t\t}", "public function actionMultiregionalHome() {\n return $this->render('multiregional/multiregional-home');\n }", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function home()\n {\n return view(\"home\");\n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function homePageAction(Application $app){\n \n $spectacles = $app['dao.spectacle']->LastNineArticles();\n $archives= $app['dao.spectacle']->ArchiveShow();\n $presses = $app['dao.press']->findAll();\n return $app['twig']->render('index.html.twig', array('spectacles'=>$spectacles,\n 'archives'=>$archives,\n 'presses'=>$presses));\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "public function index()\n {\n $this->layout\n ->add('../students/home/index')\n ->launch();\n }", "public function homepage()\n {\n return view('statics.home');\n }", "public function home() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '/../PHPIncludes/pageLinkScriptsCSS.php');\n\n //Make an object of the pageLinkScriptsCSS class for storing the CSS requirements for the header:\n $pageRequirements = new pageLinkScriptsCSS();\n \n $pageRequirements->add(\"css\", ['DashStyles.css','animate.min.css']);\n\n $pageRequirements->add(\"title\", 'DashBorad');\n\n $pageRequirements->add(\"js\", ['assets/JS/dashHome.js']);\n\n\n\n callStructural('header','stdBS2',$pageRequirements);\n\n require_once('views/dash/home.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'stdBS2', $pageRequirements); \n\n\n }", "public function home()\n {\n return view('home.page');\n }", "public function actionKnprHome()\n { \n return $this->render('knpr/knpr-home');\n }", "public function home()\n\t{\n\t\t//Se valida la existencia de los datos del usuario que inicio sesion dentro de la session\n\t\tif($this->session->userdata('id_usuario_prueba') != null){\n\t\t\t$data = [\n\t\t\t\t\"page\" => \"Home\"\n\t\t\t];\n\t\t\t$this->load->view('layout/layout_open');\n\t\t\t$this->load->view('layout/layout_menu', $data);\n\t\t\t$this->load->view('home');\n\t\t\t$this->load->view('layout/layout_close');\n\t\t}else{\n\t\t\theader(\"Location:\" . base_url());\n\t\t}\n\t}", "public function actionIndex()\n {\n //$this->redirect(array('site/login'));\n $this->render('home', array());\n }", "public function home()\n {\n return view('page.home');\n }", "public function index()\n\t{\n\t\tif (ENVIRONMENT=='development')\n\t\t\t$this->render('home');\n\t\telse\n\t\t\tredirect();\n\t}", "public function index()\n\t{\n\t\tif (ENVIRONMENT=='development')\n\t\t\t$this->render('home');\n\t\telse\n\t\t\tredirect();\n\t}", "protected function goHomePage()\n {\n $this->_redirect($this->homeURL);\n }", "public function showWelcome()\n\t{\n\t\t$this->layout->content = View::make('home');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function home()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\n if (!isset ($_GET['id'])) {\n show_view('views/pages/home.php', [\n 'posts' => Posts::readAll(),\n 'bodyParts' => BodyPart::all(),\n 'difficulty' => Difficulty::all(),\n ]);\n } else {\n show_view('views/pages/home.php', [\n 'posts' => Posts::findByBodyPart($_GET['id']),\n 'bodyParts' => BodyPart::all(),\n 'difficulty' => Difficulty::all(),\n ]);\n }\n }\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function renderHomepage() {\n\t\tif ($this->logged)\n\t\t\t$this->template->invites = CourseListModel::getMyInvites();\n\t}", "public function home()\n {\n $page = Page::isPublish()->where('blade', 'front.pages.home')->firstOrFail();\n\n return view('front.pages.home', compact('page'));\n }", "public function index()\n\t{\n// $page = Page::whereTitle('home')->first();\n// if(! $page){\n// $page=nulls;\n// }\n\n\t\treturn view('admin.home.index');\n\n\n\t}", "function home(){\n\n\t\tredirect('home');\n\t}", "function home()\n\t{\n\t\t$data = $this->model->user_info();\n\t\t$this->load->view('mainView.php', $data);\n\t}", "public function showHomepage($params)\n {\n $manager = new EpisodeManager();\n $episodes = $manager->findAll();\n\n $myView = new View('homepage');\n $myView->render(array('episodes' => $episodes));\n }", "public function home()\n {\n return view('pages.home');\n }", "public function home()\n {\n return view('pages.home');\n }", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index ($sPageName = 'home')\n\t{\n\t\t// Check if the user is logged in\n\t\tif ( !$this->session->has_userdata('user') ) {\n\t\t\tredirect(base_url('login'));\n\t\t}\n\n\t\t$data['pageName'] = 'home';\n\n\t\t$this->load->view('partials/header', $data);\n\t\t$this->load->view('home', $data);\n\t\t$this->load->view('partials/footer', $data);\n\t}", "public function actionHome()\n\t{\n $this->setMetaTag();\n \n $user_id = Yii::$app->user->getId();\n $issue = isset($_GET['issue']) ? $_GET['issue'] : null;\n $service = $this->serviceFactory->getService(ServiceFactory::SITE_SERVICE);\n $home = $service->getHomeInfo($user_id, $issue, new SiteVoBuilder());\n $create_thread_form = new CreateThreadForm();\n $selected = $home->getHomeSelected();\n return $this->render('home', ['home' => $home,\n 'feed_selected' => $selected,\n 'change_email_form' => new ResendChangeEmailForm(),\n 'create_thread_form' => $create_thread_form]);\n\t}", "public function showHome()\n {\n return view('content.index.index.home');\n }", "public function home()\n {\n return view('home'); //Le paso la vista principal\n }", "public function home()\n {\n $slug = $this->getHomeSlug();\n\n if ( ! $slug) {\n return abort(404, \"No wiki home page defined\");\n }\n\n return redirect()->to(cms_route('wiki.page', [ $slug ]));\n }", "public function index()\n {\n $title = 'JT Soft | Home';\n return view('pages.new-home', ['title' => $title]);\n }", "public function index()\n {\n return view( 'admin.home' );\n }", "public function index(){\n $data['title'] = \"Rodolfo Peixoto | Home\";\n $data['description'] = \"Desenvolvimento da página Institucional\";\n $this->load->view('home', $data);\n }", "public function index()\n {\n // $data['aspek_penilaian'] = $this->Aspek_penilaian_model->get_all_aspek_penilaian();\n $data['title'] = ['title' => 'Home'];\n $data['_view'] = 'user/home';\n $this->load->view('user/template/main', $data);\n }", "public function index()\n\t{\n return View::make('home');\n\t}" ]
[ "0.82676667", "0.81921226", "0.8163398", "0.8163141", "0.8163099", "0.815788", "0.8120239", "0.8098712", "0.80809695", "0.805725", "0.8051684", "0.8038964", "0.7997249", "0.79417497", "0.79288447", "0.7925146", "0.7909189", "0.78484595", "0.784098", "0.7832303", "0.7816332", "0.77971995", "0.7789306", "0.77586645", "0.7743593", "0.77250326", "0.7723711", "0.76888466", "0.76881754", "0.76547915", "0.7649357", "0.76356363", "0.76303226", "0.76296455", "0.7618294", "0.76170915", "0.76052034", "0.76012796", "0.75806046", "0.75673944", "0.75525576", "0.7549925", "0.7547581", "0.7546971", "0.7545075", "0.75398105", "0.7524803", "0.750404", "0.74989885", "0.74888784", "0.7486841", "0.7476264", "0.747428", "0.7466967", "0.74544996", "0.74532115", "0.74471354", "0.74450296", "0.74421024", "0.74269575", "0.7411582", "0.7393138", "0.7390747", "0.7386333", "0.7384175", "0.73780864", "0.7359102", "0.7358071", "0.7352895", "0.7350912", "0.73481226", "0.73373824", "0.73243564", "0.7303684", "0.7303684", "0.7298567", "0.7285388", "0.7283203", "0.7277255", "0.7260301", "0.7260301", "0.7257014", "0.72557306", "0.72398525", "0.7233617", "0.7233101", "0.7224133", "0.7218188", "0.7218188", "0.7211248", "0.72086346", "0.71964425", "0.71877766", "0.718769", "0.717907", "0.7163292", "0.71629053", "0.71542543", "0.71532", "0.71520954" ]
0.7701059
27
Display the trainingen page.
public function trainingen() { return view('pages.trainingen'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function training()\n {\n return view('training');\n }", "public function show(Training $training)\n {\n //\n }", "public function traininglist()\n {\n return view('training.opentraining.index');\n }", "public function index()\n {\n return view('training::index');\n }", "public function show(Train $train)\n {\n //\n }", "public function index()\n {\n $training_data = Training::all()->sortByDesc(\"id\");\n return view('admin.training.index', compact('training_data'));\n }", "function training_page_html() {\n return t('This is the landing page of the Training module');\n}", "public function index()\n {\n $trainers=Trainer::all();\n return view('backend.trainer.index',compact('trainers'));\n }", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function index(){\n \n $this->display();\n }", "public function index()\n {\n $datas = $this->_model->getTakes();\n $this->render('Take/index', ['datas' => $datas, 'title' => 'Page d\\'emprunt']);\n }", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function list(TrainingRepository $repo) {\n\n $trainings = $repo->findAllInOrder();\n\n return $this->render('admin/training/index.html.twig', [\n 'trainings' => $trainings\n ]);\n }", "private function printLessonPage() {\n\t\t$correctVocabulary = mt_rand ( 0, 4 );\n\t\tinclude ('html/vocabularyTest.php');\n\t}", "public function show(TrainingInstitute $trainingInstitute)\n {\n //\n }", "function run() {\n\t\t$view = new View();\n\t\t\n\t\t$students = new Student();\n\t\tif ($view->students_tbl = $students->get_students_as_tbl_arr() ) {\n\t\t\t$view->error = $students->get_error();\n\t\t}\n\n\t\t$view->student_desc = $students->get_student_desc();\n\t\t$view->render('main_page.php');\n\t}", "public function show(UserTrainingAuth $userTrainingAuth)\n {\n //\n }", "public function index()\n {\n //\n $trainers = Trainer::all();//almacena coleccion(array) de entrenadores utiliza metodo all consulta todos los entradores \n return view(\"trainers.index\", compact(\"trainers\")); //la vista recibe parametro compact genera un array con la informacion asignada\n //return 'Hola controladortrainer';\n }", "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function index()\n {\n $trainers = Trainer::orderby('branch_id')->orderby('index')->paginate(6);\n\n return view('admin.Trainer.index', compact('trainers'));\n }", "public function index()\n {\n $exercises = Exercise::all();\n $trainings = Training::all();\n \n return view('exercises.index')->with('exercises', $exercises)->with('trainings', $trainings);\n \n }", "public function indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }", "public function index(){\r\n $this->display(index);\r\n }", "public function index()\n {\n return Training::latest()->paginate();\n }", "public function index(){\r\n $this->display();\r\n }", "function index() {\n\t\t$faculties = $this->user->get_list_by_role(2); // all faculty list\n\t\t$logged_in = $this->session->userdata('logged_in');\n\n\t\t// Not student\n\t\tif ( $logged_in->role != '1' ) {\n\t\t\t$faculties = $this->evaluation->get_faculty_list($logged_in->id);\n\t\t}\n\n\t\t$this->data['title'] = 'Evaluate';\n\t\t$this->data['content'] = 'evaluate';\n\t\t$this->data['faculties'] = $faculties;\n\t\t$this->load->view('page-user', $this->data);\n\t}", "public function index()\n {\n $trainings = Training::all();\n if (Auth::user()->role == 'admin') {\n $trainings = Training::withCount('trainee')->orderBy('trainee_count', 'DESC')->take(4)->get();\n return view('admin.home')->with('trainings', $trainings);\n } elseif (Auth::user()->role == 'writer') {\n $posts = News::all();\n $comments = Comments::all();\n return view('admin.writer')->with([\n 'posts' => $posts,\n 'comments' => $comments,\n ]);\n } elseif (Auth::user()->role == 'pm') {\n return view('admin.pm');\n } else {\n return redirect()->route('index');\n };\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()\r\n\t{\r\n\t\t$data = array(\"title\" => \"Evaluacion\");\r\n\t\t$this->load->view('inicio', $data);\r\n \r\n\t\t\r\n\t}", "public function index()\n\t{\n\n\t\t$data['wi'] = $this->Backsep_model->get_wi_picking('');\n\t\t$this->Backsystem_model->checksession();\n\t\t$this->output('',$data);\n\t\t// $this->output('starter_view');\n\t}", "public function show(Trainer $trainer)\n {\n //\n }", "public function Index() {\n $this->Display();\n }", "public function index()\n\t{\n\t\t$this->load->model('Model_testimoni');\n\n\t\t$data = array(\n\t\t\t'testimoni' => $this->Model_testimoni->getTestimoniForLandingPage(5),\n\t\t);\n\n\t\t// dd($data);\n\t\t$this->load->view('landingpage/index' ,$data);\n\t}", "public function Sciences_director()\r\n\t{\r\n\t\t$this->load->view('inc/header');\r\n $this->load->view('site/sciences_department');\r\n $this->load->view('inc/footer');\r\n\t}", "public function index()\n {\n $uni_courses=TrainingInstitute::all();\n return view('Backend.Institute.TrainingCentre.Courses.index',compact('uni_courses'));\n }", "public function index()\n\t{\n\t\t$trainers = [];\n\t\t$roleId = 3;\n\t\t$trainers = $this->User->getData($roleId);\n\t\treturn view('backend.TrainerManagement.list',compact('trainers'));\n\t}", "function result()\n\t{\n\t\t$page_data['page_info']\t=\t'Student Result';\n\t\t$page_data['page_name']\t=\t'admin/result';\n\t\t$page_data['page_title']=\t'Student Result';\n\t\t$this->load->view('index' , $page_data);\n\t}", "public function index(){\n //\n return view('trainer.index');\n }", "protected function makePage() {\n // \n // get the user's constituency\n // \n // get the candidates for this election in this constituency\n // \n // make the page output\n }", "public function index()\n\t{\n\t\t$trainings = Training::select(DB::raw('id, title'))\n\t\t\t\t\t\t\t->where('isActive','=',true)\n\t\t\t\t\t\t\t->where('isInternalTraining','=',true)\n\t\t\t\t\t\t\t->where('isTrainingPlan','=',true)\n\t\t\t\t\t\t\t->get();\n\n\t\t$consecutive_trainings = array();\n\t\t$separated_trainings = array();\n\n\t\tforeach ($trainings as $key => $value) {\n\t\t\tif($value->is_consecutive)\n\t\t\t{\n\t\t\t\tarray_push($consecutive_trainings, $value);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ($value->all_date as $k => $v) {\n\t\t\t\t\tarray_push($separated_trainings, array('id' => $value->id, 'title' => $value->title, 'start' => $v->date_scheduled));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\treturn View::make('training_plan.index')\n\t\t\t\t\t->with('consecutive_trainings',$consecutive_trainings)\n\t\t\t\t\t->with('separated_trainings',$separated_trainings);\n\t}", "public function display() {\n $data = $this->container->get('data');\n $people = $data->load('people');\n $this->render('people', ['people' => $people]);\n }", "public function indexAction()\n {\n $this->view->title = ' - Themenübersicht';\n\n $topics = new TopicModel();\t\t\t//loads table\n $this->view->topics = $topics->fetchAll();\t//sends table to view\n }", "public function index()\t\n { \n\n\t\t$data = Emp_Training::orderBy('id')->get();\t\t\n\t\treturn View::make('emp_training.index')->with('data',$data);\n\t}", "public function index()\n {\n $title = 'Daftar Materi E-Learning';\n $subjects = Subject::all();\n $semesters = Semester::all();\n $gradeLevels = GradeLevel::all();\n $schoolYears = SchoolYear::all();\n $majors = Major::all();\n return view('backend.e-learning.index', compact('title', 'subjects', 'semesters', 'gradeLevels', 'schoolYears', 'majors'));\n }", "public function index()\n\t{\n\t\t$data['token'] = $this->private_token();\n\t\t$data['soal'] = $this->tampilan_pertanyaan_new();\n\t\t$data['js_soal'] = $this->get_pertanyaan();\n\t\t$this->load->view('screening', $data);\n\t}", "public function index()\n\t{\n $this->data['pagebody'] = 'homepage'; // this is the view we want shown\n $teams = $this->team->all();\n $list = array();\n\n\t foreach ($teams as $team) {\n\t $list[$team[\"code\"]] = $team[\"name\"];\n\t }\n\n\t $this->data['selection'] = form_dropdown('teams', $list, '', 'id=\"teams\"');\n\n\t\t\t$this->data['additionalJs'] = '<script src=\"/assets/js/prediction.js\"></script>';\n $this->render();\n\t}", "public function view(){\n\t\t$this->buildListing();\n\t}", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function index()\n {\n //\n $fitness_id = session()->get('fitness_id');\n $classes = Session::where('fitness_id', $fitness_id)->orderBy('id', 'desc');\n $trainers = FitnessUser::where('fitness_id', $fitness_id)->where('role_id', 3);\n return view('admin.class.index', compact('trainers', 'classes'));\n }", "private function loadPage()\n\t{\n\t $data = $this->getData();\n \t \n\t $this->load->view('index', $data);\n\t}", "public function index()\n {\n $upcoming = Training::where('date', '>=', date('Y-m-d'))->with(['replies' => function ($query) {\n $query->where('user_id', '=', Auth::user()->id)->get();\n }])->orderBy('date', 'asc')->get();\n $past = Training::where('date', '<', date('Y-m-d'))->with(['replies' => function ($query) {\n $query->where('user_id', '=', Auth::user()->id)->get();\n }])->orderBy('date', 'asc')->get();\n\n $view_variables = [\n 'upcoming' => $upcoming,\n 'past' => $past,\n 'title' => 'Trainings',\n 'sidebar' => true,\n 'active' => $this->active,\n 'reply_legend' => true,\n ];\n\n if(count($upcoming) > 0) {\n $next_training = $upcoming[0];\n\n $date1 = new \\DateTime($next_training->date . ' ' . $next_training->start_time);\n $now = new \\DateTime();\n\n $next_training->diff = $date1->diff($now);\n\n $view_variables['next_training'] = $next_training;\n }\n\n if($max_players = $this->getMaxPlayers('trainings')) {\n $view_variables['game_name'] = 'Trainings';\n $view_variables['max_players'] = $max_players;\n }\n\n return view('games.trainings.index')->with($view_variables);\n }", "public function index() {\n\t\t$this->display('index');\n\t}", "public function show()\n {\n $user = Auth::user();\n $pt = $user->trainings;\n \n return view('trainings.show',compact('pt'));\n }", "public function indexTrainer()\n {\n // Check Access\n has_access(generate_method(__METHOD__), Auth::user()->role);\n\n\t\tif(Auth::user()->is_admin == 1){\n // Data Sertifikat\n $sertifikat = Pelatihan::join('users','pelatihan.trainer','=','users.id_user')->orderBy('tanggal_pelatihan_from','desc')->get();\n\t\t\t\n // View\n return view('faturcms::admin.sertifikat.trainer', [\n 'sertifikat' => $sertifikat,\n ]);\n\t\t}\n\t\telseif(Auth::user()->is_admin == 0){\n\t\t\t// Data Sertifikat\n\t\t\t$sertifikat = Pelatihan::join('users','pelatihan.trainer','=','users.id_user')->where('users.id_user','=',Auth::user()->id_user)->orderBy('tanggal_pelatihan_from','desc')->get();\n\t\t\t\n\t\t\t// View\n\t\t\treturn view('faturcms::member.sertifikat.trainer', [\n\t\t\t\t'sertifikat' => $sertifikat,\n\t\t\t]);\n\t\t}\n }", "function index()\n {\n $data = array(\n \"site\" => $_SERVER['SERVER_NAME'],\n \"page\" => \"Our Partner\",\n \"tbl_ourpartner\" => $this->Tbl_ourpartner_model->get_all_tbl_ourpartner()\n );\n \n $this->load->view('layout/admin/header', $data);\n $this->load->view('index', $data);\n $this->load->view('layout/admin/footer');\n }", "public function index() {\n\t\t$template = new \\WordPress\\CMS\\Template( 'erd/display.html' );\n\t\t$template->title = 'ERD';\n\t\t$template->tables = $this->tables;\n\t\t$template->selected_tables = $this->selected_tables;\n\n\t\t$dot = new \\WordPress\\CMS\\Template( 'erd/erd.dot' );\n\t\t$dot->tables = $this->tables;\n\t\t$dot->selected_tables = $this->selected_tables;\n\t\t$gv = new \\TFO_Graphviz();\n\t\t$gv->init();\n\t\t$template->graphviz = $gv->shortcode( array(), $dot->render() );\n\n\t\treturn $template->render();\n\t}", "function run()\r\n\t{\r\n//\t\t$trail->add(new Breadcrumb($this->get_browse_cda_languages_url(), Translation :: get('Cda')));\r\n//\t\t$trail->add(new Breadcrumb($this->get_variable_translations_searcher_url(), Translation :: get('SearchVariableTranslations')));\r\n\r\n\t\t$this->display_header($trail);\r\n\t\techo $this->display_form();\r\n\t\techo '<br />';\r\n echo $this->get_table();\r\n\t\t$this->display_footer();\r\n\t}", "public function vocab() {\n\t\t$pageTitle = 'Vocabulary';\n\t\t// $stylesheet = '';\n\n\t\tinclude_once SYSTEM_PATH.'/view/header.php';\n\t\tinclude_once SYSTEM_PATH.'/view/academic-help/vocab.php';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.php';\n\t}", "public function index()\n\t{\n\t\t$this->load->model('subgroepen_model');\n\t\t\n\t\t// Haal de subgroepen op, geordend op categorie\n\t\t$aSubgroepenOpCategorie = $this->subgroepen_model->get();\n\t\t\n\t\t// Laad de pagina\n\t\t\n\t\t$this->pagina->header();\n\t\t$this->load->view('verbanden',array('aSubgroepenOpCategorie'=>$aSubgroepenOpCategorie));\n\t\t$this->pagina->footer();\n\t}", "public function show()\n {\n /** Configure generic views */\n $this->setupViews();\n /** Render views */\n ?>\n <html>\n <body>\n <?php\n /** Render views */\n $this->head_view->render();\n $this->secondary_nav_bar->render();\n $this->tree_view->render();\n $this->title_view->render();\n $this->primary_nav_bar->render();\n $this->render_page();\n ?>\n </body>\n </html>\n <?php\n }", "public function run()\n {\n $langs = LaravelLocalization::getSupportedLocales();\n $this->seedPage('terms-of-use', $langs);\n $this->seedPage('privacy-policy', $langs);\n $this->seedPage('about-us', $langs);\n }", "public function action_index()\n {\n $this->model->show_test_data();\n //$this->view->generate('test_view.php', $this->template, $page, $this->data);\n }", "public function index()\n\t{\n\t\treturn \"este es la pagina central dee cargar la de show estaciones\";\n\t}", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function index()\n\t{\n\t\t//get all accessories\n\t\t$accessories = $this->Accessories->all();\n\t\t//get all categories\n\t\t$categories = $this->Categories->all();\n\t\t//inject model into controller\n\t\t$this->data['accessories'] = $accessories;\n\t\t//inject model into controller\n\t\t$this->data['categories'] = $categories;\n\t\t$this->data['pagebody'] = 'catalogue';\n\t\t$this->data['pagetitle'] = 'Catalog Page';\n\t\t$this->render();\n\t}", "public function show(Evaluation $evaluation)\n {\n //\n }", "public function index() {\n\t\t$title = trans( 'online_exam.online_exams' );\n\n\t\treturn view( 'online_exam.index', compact( 'title' ) );\n\t}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\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 index()\n {\n $classes = test_classifications::all();\n $types = test_types::all();\n $tests= test_records::all();\n\n return view('ars_homepage.homeTab',compact('classes','types','tests' ));\n }", "public function indexAction()\n\t{\n\t\t$this->render( View::make( 'schools/index' , array(\n\t\t\t'title' => 'Mes &Eacute;coles',\n\t\t\t'entities' => School::all()\n\t\t) ) );\n\t}", "public function index()\n {\n $lessons = Lesson::latest()->paginate(5);\n\n return view('lessons.index', compact('lessons'))->with('i', (request()->input('page', 1) - 1) * 5);\n // return view('lessons.index', compact('lessons'))->with('educations');\n }", "public function start()\n {\n $model = new NewModel();\n $listeNews = $model->getNews();\n\n $this->view->home($listeNews);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "function index()\n {\n $data['teachers'] = $this->Teacher_model->get_all_teachers();\n \n $data['_view'] = 'teacher/index';\n $this->load->view('layouts/main',$data);\n }", "function index(){\n\t\t$data['page_name'] = 'An example of bitrix24 cloud application on REST api';\n\t\t$user_name = $this->model->get_current_user_name();\n\t\tif($user_name){\n\t\t\t$data['user_name'] = $user_name;\n\t\t}\n\t\t$this->html = $this->model->load_view('example', $data);\n\t\t$this->output();\n\t}", "public static function view() \n {\n $articleDAO = new ArticleDAO();\n $articles = $articleDAO->load();\n\n $dispatch = new Dispatch();\n $dispatch->render(\n 'main_page', [\n 'articles' => $articles\n ]\n );\n }", "public function index(){\n\t\t$data['title'] = 'Lista de Precios';\n\t\t$data['active'] = 1;\n\t\t//Obtener la lista de articulos\n\t\t$data['articulos'] = $this->cila_model->getarticulos();\n $this->loadview('index.php',$data);\n }", "public function indexAction() {\n\t\t$this->view->title = \"Visualisations disponibles\";\n\t $this->view->headTitle($this->view->title, 'PREPEND');\n\t}", "public function indexAction() {\n\t\t$this->view->title = \"Visualisations disponibles\";\n\t $this->view->headTitle($this->view->title, 'PREPEND');\n\t}", "public function index()\n {\n $this->load->model('ProfesoresModel');\n $data = array(\n \"records\" => $this->ProfesoresModel->getAll(),\n \"title\" => \"Profesores\",\n );\n $this->load->view(\"shared/header\", $data);\n $this->load->view(\"profesores/index\", $data);\n $this->load->view(\"shared/footer\");\n }", "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 index()\n\t{\n $this->leaderBoard->calculate();\n $this->shareToView('entries', $this->leaderBoard->getEntries());\n\n $this->setTitle('Ranking');\n\n return $this->makeView('pages.game.player.index');\n\t}", "public function index() {\n\t\t\t$this->render();\n\t\t}", "public function Index() {\n\t \t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t \t\t$plantilla->Parametro('Sesion', AppSesion::obtenerDatos());\n\t\t\t$plantilla->Parametro('activo', __CLASS__);\n\t\t\t$plantilla->Parametro('URL', \\Neural\\WorkSpace\\Miscelaneos::LeerModReWrite());\n\t\t\t$plantilla->Parametro('listaAveria', $this->Modelo->listaAveria());\n\t\t\t$plantilla->Parametro('validacion', $this->IndexValidacionFormulario());\n \t\t\t$plantilla->Parametro('razonAveria', $this->Modelo->listadoRazonAveria());\n \t\t\techo $plantilla->MostrarPlantilla('TriplePlay', 'Index.html');\n\t\t}", "public function index()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_index');\n $view->title = 'Vereine';\n $view->heading = 'Vereine';\n $view->vereine = $vereinRepository->readAll();\n $view->display();\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function index()\n {\n $employees = Employee::all();\n $trainings = Training::all();\n\n return view('employee.index', compact(['employees','trainings']));\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display() {\n echo $this->render();\n }", "public function index() {\r\n\r\n\t\t$this->event->add(BOARD_LOAD);\r\n\t\t$this->constructMeasurePage();\r\n\t}", "public function index()\n {\n //\n $escuelas = DB::table('schools')\n ->select('name')->get();\n\n //dd($escuelas);\n return view('/teacher/topteacherperschool')->with(compact('escuelas'));\n }", "public function index() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t\n\t\t$data['reviews'] = $this->review_model->get();\n\n\t\t$template['body_content'] = $this->load->view('backend/reviews/index', $data, true);\t\n\t\t$this->load->view('backend/layouts/template', $template, false);\t\t\n\t}", "function index()\n {\n $data['kelas'] = $this->Kelas_model->get_all_kelas();\n \n $data['_view'] = 'kelas/index';\n $this->load->view('template/header',$data);\n $this->load->view('template/sidebar',$data);\n $this->load->view('kelas/index',$data);\n $this->load->view('template/footer',$data);\n }", "public function index()\n {\n $this->show();\n }", "public function index()\n {\n $main_view = 'kelas/index';\n $this->load->view('template',compact('main_view'));\n }" ]
[ "0.7517378", "0.7281552", "0.7074264", "0.70442677", "0.6984545", "0.6908189", "0.67756504", "0.6657752", "0.6559157", "0.6516138", "0.65024227", "0.6494711", "0.6492683", "0.649082", "0.64902055", "0.6475568", "0.6429362", "0.6416625", "0.6393047", "0.6390218", "0.6385416", "0.6344242", "0.6322351", "0.6300494", "0.62949044", "0.62738717", "0.6273537", "0.6267255", "0.62566924", "0.62480026", "0.62478226", "0.62430257", "0.623945", "0.62330467", "0.6225316", "0.621507", "0.62138504", "0.6207582", "0.61988145", "0.6183066", "0.617868", "0.6178498", "0.6177156", "0.61713654", "0.6167003", "0.6163305", "0.615164", "0.61367786", "0.61316365", "0.6127257", "0.6122462", "0.6121157", "0.6117041", "0.6114246", "0.6087785", "0.60738283", "0.60700595", "0.6069904", "0.6067715", "0.606568", "0.6065016", "0.60645324", "0.60633683", "0.6058561", "0.6058152", "0.6057622", "0.60558176", "0.6048115", "0.6046524", "0.6046524", "0.6046524", "0.60428625", "0.60377336", "0.6035551", "0.60333395", "0.60309833", "0.60202515", "0.6010301", "0.6006182", "0.600366", "0.60031563", "0.60031563", "0.59963447", "0.5996293", "0.5995369", "0.59936863", "0.5993515", "0.5991382", "0.5991289", "0.5991289", "0.59908646", "0.59903044", "0.59903044", "0.5990041", "0.5984387", "0.598208", "0.5977423", "0.5976356", "0.5973457", "0.5968817" ]
0.7941928
0
Display the About Us page.
public function about() { return view('pages.about'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function aboutUs()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | About Us')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/about_us');\n }", "public function actionAbout()\n\t{\n\t\t$this->render('about');\n\t}", "public function about()\n\t{\n\t return View::make('pages.about_us');\n\t}", "public function about() {\n $data = [\n 'title' => 'Welcome to the About page.' // associative array\n ];\n $this->view('pages/about', $data);\n }", "public function aboutUs()\n {\n return view('about-us');\n }", "public function manage_about_us()\n\t{\n\t\t$data['page']='Manage About-us';\n $data['about_us']=$this->ref_pages->get_section_by_pageId(1);\n\t\t$view = 'admin/admin_manage_about_us';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function index()\n {\n $this->addPageSeo();\n\n $page = $this->getCurrentPageEntry();\n\n return view('site.about', compact('page'));\n }", "function about_us() {\n\t\t$data2body [''] = \"\";\n\t\t$data2home ['header'] = $this->load->view ( 'homepage/header', $data2body, TRUE );\n\t\t$data2home ['body'] = $this->load->view ( 'pages/about_us', $data2body, TRUE );\n\t\t$data2home ['footer'] = $this->load->view ( 'homepage/footer', $data2body, TRUE );\n\t\t\n\t\t$data2home ['page'] = \"inpgs\";\n\t\t$this->load->view ( 'homepage', $data2home );\n\t}", "public function manage_about_us()\n\t{\n\t\t$data['page']='Manage About-us';\n $data['about_us']=$this->ref_pages->get_section_by_pageId(1);\n\t\t$view = 'Admin/admin_manage_about_us';\n\t\techo Modules::run('Template/admin_template', $view, $data);\t\n\t}", "public function about(){\n\t\t\t$this->load->view('front/about');\n\t\t}", "public function aboutus()\n\t{\n\t\t$about_us = Cms::where('id','=',1)->first();\n\t\t\n\t\t//dd($about_us);\n\t\treturn view('staticpage.about-us')->with('about',$about_us);\n\t}", "public function aboutAction()\n {\n return $this->render('TodoCerdoTodoCerdoBundle:Page:about.html.twig');\n }", "public function about()\n {\n return view('frontEnd.usersPanel.about');\n }", "public function about(){\n\t\t$data \t\t\t\t\t\t= $this->data;\n\t\t$data['menu']\t\t\t\t= \"about\";\n\t\techo $this->blade->nggambar('website.about.index',$data);\n\t}", "public function about()\n {\n\t\t$data = $this->Service->get_latest_blogs();\n\n $this->load->view('templates/header', $data);\n $this->load->view('pages/about', $data);\n $this->load->view('templates/footer');\n }", "public function about()\n {\n \t$name = 'Daniel Sandnes';\n \treturn view('pages.about')->with('name', $name);\n }", "public function about()\n {\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'A propos');\n // On fait le rendu de la vue signup.php\n $this->render('about');\n }", "public function about()\n {\n\t return view('pages.about');\n }", "public function about(){\n return view('pages.aboutus');\n }", "public function index()\n {\n $maininfo = MainInfo::get();\n return view('admin.about.about',compact('maininfo'));\n }", "public function about(){\n return view ('pages.about');\n }", "public function about()\n {\n $data ['footer'] = $this->page_model->getfooter();\n $this->load->view('templates/header');\n $this->load->view('home/about/head_about');\n $this->load->view('home/about/about', $data);\n $this->load->view('templates/footer', $data);\n }", "public function getAboutPage(){\n\n\t\treturn View::make('about.about');\n\t}", "public function about()\n {\n return view('pages.about');\n }", "public function aboutus (){\n $tweets = $this->getkofixtweet();\n return view('pages.aboutus',compact('tweets'));\n }", "public function about_us()\n {\n $navbar = NavBar::first();\n $whowe = WhoWe::first();\n $subscribe = SubscribeSection::first();\n $team_head = TeamHead::first();\n $whowe_features = WhoWeFeature::all();\n $partner_head = PartnerHead::first();\n $team_members = Team::all();\n $partners = Partner::all();\n\n return view('pages.home.about-us' , compact('navbar' , 'whowe' , 'whowe_features' , 'subscribe' , 'team_head' ,\n 'team_members' , 'partner_head' , 'partners'\n ));\n }", "public function show(AboutUs $aboutUs)\n {\n //\n }", "public function show(AboutUs $aboutUs)\n {\n //\n }", "public function getAbout()\n {\n return view('frontend.info.about');\n }", "public function about()\n {\n return view('frontend.pages.about');\n }", "public function aboutAction()\n {\n // test if 'username' stored in session ...\n $username = $this->userController->getAuthenticatedUserName($this->app);\n $argsArray = array(\n 'username' => $username\n );\n\n // render (draw) template\n // ------------\n $templateName = 'about';\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "public function about()\n {\n return view('templates.them8.about');\n }", "function about(){\n\t\techo \"About page!\";\n\t}", "function aboutLink() {\n\t\t// Core uses 'aboutsite' here but we want just 'about'\n\t\treturn $this->footerLink( 'about', 'aboutpage' );\n\t}", "public function getAbout()\n {\n $version = (new Codice)->getVersion();\n\n /**\n * Filters Codice core version in human readable form.\n *\n * @since 0.6.0\n *\n * @return string\n */\n $displayVersion = Filter::call('core.version.display', $version);\n\n return View::make('info.about', [\n 'changelog' => $this->fetchChangelog($version),\n 'title' => trans('info.about.title'),\n 'version' => $displayVersion,\n ]);\n }", "function index()\n\t{\n\t\t/* Get About Us Info */\n\t\t$about = $this->about->get_all()->result();\n\t\tif ( !empty( $about )) {\n\t\t\t$this->data['about'] = $about[0];\n\t\t}\n\n\t\t/* Load views */\n\t\t//$this->data['contactus_cover'] = true;\n\t\t$this->load->view( $this->theme .'header', $this->data );\n\t\t$this->load->view( $this->theme .'nav' );\n\t\t$this->load->view( $this->theme .'contact-us' );\n\t\t$this->load->view( $this->theme .'footer' );\n\t}", "public function about(){\n $data = [\n 'css' => array('about.css'),\n 'js' => array('about.js'),\n ];\n\n // Show views\n echo view('templates/header', $data);\n echo view('about', $data);\n echo view('templates/footer', $data);\n }", "public function index() {\n $about = $this->articleposition_model->get_position_name('about-us');\n $about_article = $about->id;\n\n $data['query'] = $this->article_model->get_active_article($about_article);\n\n $data['title'] = ucfirst('about Us'); // Capitalize the first letter\n\n $this->load->helper('url');\n $this->load->view('templates/header', $data);\n $this->load->view('pages/about');\n $this->load->view('templates/footer');\n }", "public function show(Aboutus $aboutus)\n {\n //\n }", "public function about()\n {\n return view('home.about');\n }", "public function actionAbout()\n\t{\n\t\t//$model=Event::model()->find('id=?',array(User::getUserSelectedEvent()));\n\t\t$this->render('pages/about');\n\t}", "public function index()\n {\n \t$item = AboutUs::first();\n \t$page = 'create';\n \tif($item) {\n \t\t$page = 'show';\n \t}\n return view('admin.about-us.'.$page, compact('item'));\n }", "function horizon_about_section() {\n\t\tget_template_part('inc/partials/homepage', 'about');\n\t}", "public function aboutAction()\n {\n $appName = 'Cuisine Tourism';\n $appDescription = 'Cuisine Tourism Website';\n /* Change layout */\n $this->layout()->setTemplate('layout/layout-front');\n /* Latest 3 posts */\n $latestPosts = $this->entityManager->getRepository(Post::class)->findLatestPosts(2);\n /* Countries List */\n $countries = $this->entityManager->getRepository(Post::class)->getCountries();\n /* Cuisine Types list */\n $types = $this->entityManager->getRepository(Post::class)->getCuisineTypes();\n // Render the view template.\n return new ViewModel([\n 'countries' => $countries,\n 'types' => $types,\n 'latestPosts' => $latestPosts\n ]);\n }", "public function get_index() {\n // 1. Load and validate parameters or form contents\n // 2. Query or update the database\n // 3. Render a template or redirect\n $this->view->renderTemplate(\n \"views/AboutUs.php\",\n array(\n 'title' => 'About Us',\n )\n );\n }", "public function about(){\n $this->load->view('about');\n }", "public function about()\n {\n return view('about');\n }", "public function about()\n {\n return view('about.index');\n }", "public function about()\n {\n return view('home.aboutme');\n }", "public function about ()\n {\n // $data['data']=$this->Diagnosa_model->data_statistisk();\n // $data['strategi'] = $this->Diagnosa_model->sqlstrategi()->result();\n $data['title'] = 'Tentang Aplikasi';\n $this->load->view('layout/header_user', $data);\n $this->load->view('layout/topbar_user', $data);\n $this->load->view('about', $data);\n $this->load->view('layout/footer_user', $data);\n }", "public function about()\n {\n return inertia(\"Student/AboutPage\");\n }", "public function get_index() {\n // 1. Load and validate parameters or form contents\n // 2. Query or update the database\n // 3. Render a template or redirect\n $this->view->renderTemplate(\n \"views/AboutIndex.php\",\n array(\n 'title' => 'About Us',\n )\n );\n }", "public function about(){\n $abouts = About::all();\n return view('admin.contents.about-admin', compact('abouts'));\n }", "public function index()\n\t{\n \t$this->data['pagetitle'] = 'Path of Exile - About';\n\t\t$this->data['pagebody'] = 'about';\n $role = $this->session->userdata('userrole');\n if ($role == \"\")\n $role = \"User Role\";\n $this->data['userrole'] = $role;\n\n\t\t$this->render(); \n\t}", "function quadro_site_about() {\n\tglobal $quadro_options;\n\tif ( esc_attr($quadro_options['about_text']) != '' ) {\n\t\techo '<h2 class=\"site-description\">' . esc_attr($quadro_options['about_text']) . '</h2>';\n\t}\n}", "public function about()\n {\n return view('blog.about.index');\n // return view('blog.testMenus');\n }", "public function index()\n {\n return view('admin.about.index');\n }", "public function index()\n {\n $aboutUs = AboutUs::all();\n return view('admin.about-us.index',compact('aboutUs'));\n }", "public function about(){\n msg($this->about);\n closeNode();\n }", "public function about(){\n //return a view showin info about the project\n return view('list/about');\n }", "public function index()\n {\n $description = Aboutme::first();\n return view('admin.aboutme', compact('description'));\n }", "public function index()\n {\n\n $about = About::find(1);\n\n return view('pages.admin.about.index', [\n 'about' => $about,\n ]);\n }", "public function about()\n\t{\t\t\n\t\treturn view('pages/tools.referee.index');\n\t}", "public function about() {\n\t\t?>\n\t\t<p><?php _e('This plugin was developed by <a href=\"http://andrewryno.com/\">Andrew Ryno</a>, a WordPress developer based in Phoenix, AZ who never found a decent solution to having sidebars on different pages.', self::TEXT_DOMAIN) ?></p>\n\t\t<p><?php _e('Like the plugin? Think it could be improved? Feel free to contribute over at <a href=\"http://github.com/andrewryno\">GitHub</a>!', self::TEXT_DOMAIN) ?></p>\n\t\t<p><?php _e('If you have any other feedback or need help, go ahead and <a href=\"http://andrewryno.com/plugins/unique-page-sidebars/\">leave a comment</a>.', self::TEXT_DOMAIN) ?></p>\n\t\t<?php\n\t}", "public function show(About $about)\n {\n //\n }", "public function show(About $about)\n {\n //\n }", "public function show(About $about)\n {\n //\n }", "public function __invoke()\n {\n return view('about-us');\n }", "public function getAbout()\n {\n return view('about');\n }", "public function index()\n {\n $about = About::first();\n return view('backend.pages.about.index', compact('about'));\n }", "public function aboutAction(Application $app, Request $request)\n {\n return $app['twig']->render('liveabout/index.html.twig');\n }", "public function index()\n {\n\n try {\n if (!$this->authorize('about')) {\n abort(403);\n }\n } catch (AuthorizationException $e) {\n abort(403);\n }\n\n $aboutus = Aboutus::where('lang', 'fa')->first();\n $seo = $aboutus->seo;\n return view('admin.aboutus.create', compact('aboutus','seo'));\n }", "public function about( )\n {\n\n if(!$this->view->isType( View::SUBWINDOW ))\n {\n $this->errorPage('Invalid Request');\n return false;\n }\n\n $view = $this->view->newWindow('WbfsysWindow', 'Default');\n //$view->setTitle('Calendar');\n\n $view->setTemplate( 'base/about_layer' );\n\n }", "public function show(about $about)\n {\n //\n }", "public function about()\n {\n $aboutme = Markdown::convertToHtml(SiteSetting::get('about'));\n\n foreach (Tag::all() as $tag) {\n $aboutme = preg_replace(\"/\\b{$tag->name}\\b/u\", $tag->getButton(), $aboutme);\n }\n\n return view('home.about', compact('aboutme'));\n }", "public function index()\n {\n $about = About::where('user_id', '=', Auth::user()->id)->first();\n if ($about === null) {\n return redirect('about/create');\n } else {\n return view('about.show', compact('about'));\n }\n }", "public function index()\n {\n $about = About::find(1);\n return view('backend.about.index', compact('about'));\n }", "public function index()\n {\n $abouts = About::orderBy('id','desc')->get();\n return view('backend.pages.aboutUs.manage',compact('abouts'));\n }", "public function index()\n\t{\n\t\t$abouts = $this->about->all();\n\n\t\treturn View::make('admin.abouts.index', compact('abouts'));\n\t}", "public function aboutus()\n {\n $hih = \\App\\HIH::first();\n if ($hih == null) {\n return redirect('/aboutus/create')->with('error', 'you must create the Hand In Hand\\'s information first!');\n }\n return view('hih.aboutus')->with('hih',$hih);\n }", "public function contactUs()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Contact Us')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/contact_us');\n }", "function wpbm_register_about_us_page(){\n add_submenu_page(\n 'edit.php?post_type=wpblogmanager', __( 'About Us', WPBM_TD ), __( 'About Us', WPBM_TD ), 'manage_options', 'wpbm-about-us', array( $this, 'wpbm_about_callback' ) );\n }", "public function aboutAction()\n {\n\n\n $oLicense = LicenseQuery::create()->findOne();\n\n\n // include symfony requirements class\n require_once dirname(__FILE__) . '/../../../../app/SymfonyRequirements.php';\n $symfonyRequirements = new \\SymfonyRequirements();\n\n // add additional requirement for mcrypt\n $symfonyRequirements->addRequirement(extension_loaded('mcrypt'), \"Check if mcrypt ist loaded for RSA encryption\", \"Please enable mcrypt-Extension. See <a href='http://php.net/manual/de/mcrypt.setup.php'>http://php.net/manual/de/mcrypt.setup.php</a>\");\n\n // fetch all data\n $aRequirements = $symfonyRequirements->getRequirements();\n $aRecommendations = $symfonyRequirements->getRecommendations();\n $aFailedRequirements = $symfonyRequirements->getFailedRequirements();\n $aFailedRecommendations = $symfonyRequirements->getFailedRecommendations();\n $iniPath = $symfonyRequirements->getPhpIniConfigPath();\n\n\n $sVersion = file_get_contents(dirname(__FILE__) . '/../../../../version.txt');\n\n\n return $this->render('SlashworksAppBundle:About:about.html.twig', array(\n \"license\" => $oLicense,\"version\" => $sVersion, \"iniPath\" => $iniPath, \"requirements\" => $aRequirements, \"recommendations\" => $aRecommendations, \"failedrequirements\" => $aFailedRequirements, \"failedrecommendations\" => $aFailedRecommendations\n ));\n }", "public function infos()\n {\n $this->render('home/infos');\n }", "public function getIndex()\n {\n $about = Page::where('slug', 'about')->first();\n\n return view('pages.about', [\n \"about\" => $about\n ]);\n }", "public function index()\n {\n $about = about::all();\n return view('admin.about.index',compact('about'));\n }", "public function index()\n {\n $about = About::all();\n return view('admin.contents.about.index', compact('about'));\n }", "public function contactAction()\n {\n $this->view->render('Contact Us');\n }", "public function index()\n {\n $aboutus_data = Aboutus::all();\n return view('frontend.pages.aboutus.index',compact('aboutus_data'));\n }", "public function index(){\n $data = About::first();\n $page_name = \"About me\";\n return view('backend.about',compact('data','page_name'));\n }", "public function aboutAction() {}", "public function percobaan2()\n {\n \treturn view('latihan.about');\n }", "public function index()\n {\n $about=about::get();\n return view('backend.about.index',compact('about'));\n\n }", "public function index()\n\t{\n\n\t\t$this->view('guest/contact-us');\n\t}", "public function about() {\n $post = Posts::whereAlias('o-kompanii.html')->first();\n $list = Posts::whereParent('71')->get();\n return view('about-company')->with(compact('post','list'));\n }", "protected function dlgAbout() {\n $notes = file_get_contents(LEPTON_PATH . '/modules/' . basename(dirname(__FILE__)) . '/CHANGELOG');\n $use_markdown = 0;\n if (file_exists(LEPTON_PATH.'/modules/lib_markdown/standard/markdown.php')) {\n require_once LEPTON_PATH.'/modules/lib_markdown/standard/markdown.php';\n $notes = Markdown($notes);\n $use_markdown = 1;\n }\n $data = array(\n 'img_url' => self::$img_url,\n 'release' => array(\n 'number' => sprintf('%01.2f', $this->getVersion()),\n 'notes' => $notes,\n 'use_markdown' => $use_markdown\n )\n );\n //_notes' => file_get_contents(LEPTON_PATH . '/modules/' . basename(dirname(__FILE__)) . '/info.txt'),);\n return $this->getTemplate('about.lte', $data);\n }", "public function index()\n {\n $all_abouts = About::all();\n return view('admin.about.about_list',compact('all_abouts'));\n }", "public function aboutPageTest()\n {\n $response = $this->get('/about');\n\n $response->assertStatus(200);\n }", "public function About($value='')\n {\n \treturn view('about');\n }", "public function index()\n {\n $this->title = __('admin.personal_info');\n\n //Page content definition\n $this->content = $this->getViewContent('personal_info.content',\n [\n 'personalInfoData' => $this->getPersonalInfoData(),\n 'title' => $this->title\n ]\n );\n\n return $this->renderCurrentView();\n }" ]
[ "0.8378115", "0.7992822", "0.7922845", "0.7779258", "0.76684725", "0.7654788", "0.76521933", "0.76422465", "0.7631374", "0.7596104", "0.75396305", "0.75085706", "0.746815", "0.7438367", "0.74268466", "0.7418046", "0.7410003", "0.7402891", "0.73937607", "0.73572487", "0.7337049", "0.7334566", "0.7329907", "0.73004866", "0.72601", "0.7248767", "0.72427326", "0.72427326", "0.7241529", "0.7239857", "0.72393876", "0.7222792", "0.72149575", "0.7209942", "0.720108", "0.7191082", "0.71813273", "0.71700776", "0.716414", "0.7151481", "0.71494746", "0.71485424", "0.7130143", "0.7104209", "0.7097687", "0.70938087", "0.7086164", "0.7074474", "0.7042613", "0.70378625", "0.70370597", "0.7006651", "0.69827974", "0.69576013", "0.6954926", "0.6946159", "0.6927714", "0.69274217", "0.6911687", "0.69026953", "0.68994796", "0.6885393", "0.68705624", "0.68647397", "0.68526644", "0.68526644", "0.68526644", "0.68470734", "0.6842868", "0.68244416", "0.6820301", "0.68174", "0.68157214", "0.6798302", "0.6796187", "0.6793816", "0.6763559", "0.67389303", "0.6736412", "0.67362887", "0.67083263", "0.6691565", "0.6680287", "0.6652758", "0.6647053", "0.6595707", "0.65808344", "0.65793496", "0.6576881", "0.6567001", "0.6518981", "0.65132713", "0.6497146", "0.6473469", "0.6468289", "0.64552206", "0.6454389", "0.6373602", "0.6372652", "0.6317379" ]
0.7578334
10
Display the biotim page.
public function biotim() { return view('pages.biotim'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function biowim()\n\t{\n\t\treturn view('pages.biowim');\n\t}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function show()\n {\n /** Configure generic views */\n $this->setupViews();\n /** Render views */\n ?>\n <html>\n <body>\n <?php\n /** Render views */\n $this->head_view->render();\n $this->secondary_nav_bar->render();\n $this->tree_view->render();\n $this->title_view->render();\n $this->primary_nav_bar->render();\n $this->render_page();\n ?>\n </body>\n </html>\n <?php\n }", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "public function display() {\n echo $this->render();\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 {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "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}", "public function index(){\n \n $this->display();\n }", "public function display()\n {\n return $this->page->output();\n }", "public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function reqBiblePage() {\n $this->instance = new Bible();\n $this->view($this->instance->getBible(false, false), 'bible', 'Bíblia');\n }", "public function show();", "public function show();", "public function show();", "public function show();", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public abstract function display();", "public function display(){}", "public function display() {\n\t}", "public function display() {}", "public function display() {}", "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 indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }", "public function display() {\n\t\t$this->init();\n\t\treturn $this->output();\n\t}", "public function Index() {\n $this->Display();\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 show()\n\t{\n\t\t\n\t}", "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 }", "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 function show()\n {\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-header.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-header.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.$this->template.'.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-footer.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-footer.php';\n }", "function display()\n{\n $obPage = new PageDisplay(\"CST Auction\");\n $obPage->pageHead();\n $obPage->nav(isset($_SESSION[\"user\"]));\n\n $obPage->mainBody(\"<div id='homePagePic' \"\n . \"class='col-lg-offset-3 col-lg-12 \"\n .\"col-md-offset-3 col-md-12 \"\n .\"col-xs-offset-1 col-xs-12 \"\n . \"col-sm-offset-1 col-sm-12' >\"\n . \"<img src='images/homepg.jpg' alt='home page image'/></div>\");\n echo $obPage->displayPage();\n}", "abstract function display();", "abstract function display();", "abstract protected function displayContent();", "abstract protected function show();", "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($pageName);", "public function index(){\r\n $this->display();\r\n }", "function display() {\r\n\t\tparent::display ();\r\n\t}", "public function display() {\r\n echo $this->template;\r\n }", "public function show() {\n\t\t$variables = $this->sanitize($this->data);\n\t\tif (is_array($variables)) {\n\t\t\textract($variables);\n\t\t}\n\n\t\t$this->setHeaders();\n\n\t\tob_start();\n\t\tif ($this->isPartial) {\n\t\t\trequire_once $this->pathToPartial;\n\t\t} else {\n\t\t\trequire_once $this->pathToLayout;\n\t\t}\n\t\t$this->performReplacements();\n\t\tif (ob_get_length() !== false) {\n\t\t\tob_end_flush();\n\t\t}\n\t}", "function run()\r\n {\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get('Gutenberg')));\r\n $trail->add_help('gutenberg general');\r\n\r\n $this->action_bar = $this->get_action_bar();\r\n\r\n $this->display_header($trail);\r\n echo '<a name=\"top\"></a>';\r\n echo $this->action_bar->as_html();\r\n echo '<div id=\"action_bar_browser\">';\r\n $renderer = GutenbergPublicationRenderer :: factory($this->get_renderer(), $this);\r\n echo $renderer->as_html();\r\n echo '</div>';\r\n $this->display_footer();\r\n }", "private function show_page()\n\t{\n\t\t$parse['user_link']\t= $this->_base_url . 'recruit/' . $this->_friends[0]['user_name'];\n\t\n\t\t$this->template->page ( FRIENDS_FOLDER . 'friends_view' , $parse );\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 show()\n\t{\n\n\t}", "public function displayContent(){\n\t\t\tinclude('/includes/homepage.inc.php');\t\n\t\t}", "public function show($page)\n {\n header('Content-Type: image/png');\n echo $this->image[$page]->encode('png');\n\n }", "public function HandlePage()\n\t{\n\t\tif(!gzte11(ISC_HUGEPRINT)) {\n\t\t\texit;\n\t\t}\n\n\t\t$this->SetVendorData();\n\n\t\tif($this->displaying == 'products') {\n\t\t\t$this->ShowVendorProducts();\n\t\t}\n\t\telse if($this->displaying == 'page') {\n\t\t\t$this->ShowVendorPage();\n\t\t}\n\t\telse if($this->displaying == 'profile') {\n\t\t\t$this->ShowVendorProfile();\n\t\t}\n\t\telse {\n\t\t\t$this->ShowVendors();\n\t\t}\n\t}", "public function show()\n\t{\n\t\t$this->process_post();\n\t\t$this->output();\n\t}", "public function createPage()\n {\n echo $this->output;\n }", "function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }", "public function show() {\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function overviewPage()\n {\n $this->seed(ImageSeeder::class);\n $user = factory(User::class)->create();\n $this->actingAs($user);\n $response = $this->get('/');\n $response->assertStatus(200);\n $response->assertSee('600,000 B');\n\n }", "public function display()\n \t{\n \t\t$this->assign(\"__view\", $this->_view);\n \t\tparent::display();\n \t}", "public function show(Kibb $kibb)\n {\n //\n }", "public function display() {\n $data = $this->container->get('data');\n $people = $data->load('people');\n $this->render('people', ['people' => $people]);\n }", "public function display() {\n\t\techo '<iframe src=\"http://norulesweb.com/contact/\" width=\"800\" height=\"400\"></iframe>';\n\t}", "public function initDisplay(){\n\t\tif (!$this->getPage()){\n\t\t\tif (\\Settings::DISPLAY_BREADCRUMB) Front::displayBreadCrumb($this->breadCrumb, $this->version);\n\t\t\t$this->mainDisplay();\n\t\t}\n\t}", "public function display()\n {\n $this->view->viewFile = \"404\";\n echo $this->view->generateMarkup();\n }", "public function display()\n {\n header(\"Content-Type: image/png; name=\\\"barcode.png\\\"\");\n imagepng($this->_image);\n }", "public function index(){\r\n $this->display(index);\r\n }", "public function displayContentOverview() {}", "public function index() {\n\t\t\t$this->render();\n\t\t}", "public function page() {\n\t\t$this->page = $this->plugin->factory->adminPage;\n\t\t$this->page->show();\n\t}", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-settings-page.php';\n }", "public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }", "public function show() {\n \n }", "public function index() {\n $this->html->displayHeaderAndFooter(true);\n $this->load_content();\n }", "public function start_display ()\n {\n $this->display_doc_type ();\n\n $opts = $this->page->template_options;\n if ($opts->css_class)\n {\n?>\n<html class=\"<?php echo $opts->css_class; ?>\" lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n else\n {\n?>\n<html lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n?>\n <head>\n <?php\n $this->display_head ();\n ?>\n </head>\n <body>\n<?php\n\n $this->_start_body ();\n }", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "public function display(){\n $bien = \\App\\Annonce_bien::orderBy('created_at')->get();\n return view('annonces.index', compact('bien'));\n }", "public function display() {\n\t\t$this->prepareForDisplay();\n\n\t\techo '<div class=\"panel-heading\">';\n\t\t$this->displayHeader($this->Header, $this->getNavigation());\n\t\techo '</div>';\n\t\techo '<div class=\"panel-content statistics-container\">';\n\t\t$this->displayContent();\n\t\techo '</div>';\n\t}", "function index() {\r\n $this->page();\r\n }", "function showPageNotice()\n {\n $instr = $this->getInstructions();\n $output = common_markup_to_html($instr);\n\n $this->elementStart('div', 'instructions');\n $this->raw($output);\n $this->elementEnd('div');\n }", "public function index() {\n\n\t\t\t$controller = $this->nav->getPageController();\n\t\t\tif(isset($controller) && is_object($controller)) {\n\t\t\t\tassert($controller instanceof \\Toeswade\\IController);\n\n\t\t\t\t$action = $this->nav->getPageAction();\n\t\t\t\t$params = $this->nav->getParams();\n\t\t\t\t\n\t\t\t\tif(isset($action)) {\n\t\t\t\t\t$view = $controller->$action($params);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$view = $controller->index();\n\t\t\t\t}\n\n\t\t\t\tassert($view instanceof \\Toeswade\\IView);\n\t\t\t\t$main = $view->getHTML();\n\t\t\t\t$title = $view->getTitle();\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$main = 'default';\n\t\t\t\t$title = $main;\n\t\t\t}\n\t\t\t$this->view->setTitle($title);\n\t\t\t$this->view->setMain($main);\n\t\t\t$this->view->setNav($this->nav->getMainNavigation());\n\n\t\t\t$this->view->render();\n\t\t}", "public static function display()\n {\n $page = self::getCurrentPage();\n\n template::serveTemplate('header');\n\n if (session::has('user') === FALSE) {\n user::setLoginUrl('~url::adminurl~');\n if (session::has('viewPage') === FALSE) {\n session::set('viewPage', $page);\n }\n user::process();\n return;\n }\n\n if (session::has('viewPage') === TRUE) {\n $page = session::get('viewPage');\n session::remove('viewPage');\n }\n\n /**\n * Set the default page title to nothing.\n * This is used for including extra information (eg the post subject).\n */\n template::setKeyword('header', 'pagetitle', '');\n\n $menuItems = array(\n '/' => array(\n 'name' => 'Home',\n 'selected' => TRUE,\n ),\n '/adminpost' => array(\n 'name' => 'Posts',\n ),\n '/admincomments' => array(\n 'name' => 'Comments',\n ),\n '/adminstats' => array(\n 'name' => 'Stats',\n ),\n );\n\n if (empty($page) === FALSE) {\n $bits = explode('/', $page);\n\n // Get rid of the '/admin' bit.\n array_shift($bits);\n\n if (empty($bits[0]) === FALSE) {\n $system = array_shift($bits);\n\n /**\n * Uhoh! Someone's trying to find something that\n * doesn't exist.\n */\n if (loadSystem($system, 'admin') === TRUE) {\n $url = '/'.$system;\n if (isset($menuItems[$url]) === TRUE) {\n $menuItems[$url]['selected'] = TRUE;\n unset($menuItems['/']['selected']);\n }\n\n $bits = implode('/', $bits);\n if (isValidSystem($system) === TRUE) {\n call_user_func_array(array($system, 'process'), array($bits));\n }\n } else {\n $url = '';\n if (isset($_SERVER['PHP_SELF']) === TRUE) {\n $url = $_SERVER['PHP_SELF'];\n }\n $msg = \"Unable to find system '\".$system.\"' for url '\".$url.\"'. page is '\".$page.\"'. server info:\".var_export($_SERVER, TRUE);\n messagelog::LogMessage($msg);\n template::serveTemplate('404');\n }\n }\n } else {\n // No page or default system?\n // Fall back to 'index'.\n template::serveTemplate('header');\n template::serveTemplate('index');\n }\n\n $menu = '';\n foreach ($menuItems as $url => $info) {\n $class = '';\n if (isset($info['selected']) === TRUE && $info['selected'] === TRUE) {\n $class = 'here';\n }\n\n $menu .= '<li class=\"'.$class.'\">';\n $menu .= '<a href=\"~url::adminurl~'.$url.'\">'.$info['name'].'</a>';\n $menu .= '</li>';\n $menu .= \"\\n\";\n }\n\n template::setKeyword('header', 'menu', $menu);\n\n template::serveTemplate('footer');\n template::display();\n\n }", "function showPage($db) {\n $this->user_info($db);\n $this->log_visitor($db,$_SERVER['PHP_SELF'],0);\n $this->showPage=true;\n }", "public function show()\n {\n //\n }", "abstract protected function showContent(): self;", "function homepage_display() {\n add_meta_box('shiba2_homepage', 'オプション', 'func_ishomepage', 'page', 'normal', 'default');\n}", "public function viewAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getViewRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html'), ['tiles' => $tiles ]);\n }", "public function display() { ImageLib::serve($this->source_image, $this->source_image_mimetype); }", "function run()\r\n {\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get(ucfirst($this->get_folder()))));\r\n\r\n $this->display_header($trail);\r\n echo $this->get_action_bar_html() . '';\r\n echo $this->get_publications_html();\r\n $this->display_footer();\r\n }", "public function show(Blogger $blogger)\n {\n //\n }", "public function info(){\n $this->display('Main/Person/info') ;\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 execute() {\n\t\twfSuppressWarnings();\n\t\t\n\t\t$this->html('headelement'); ?>\n\t\t\n\t\t<header class=\"header\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<nav class=\"navbar navbar-default hidden-print\" role=\"navigation\">\n\t\t\t\t\t<div class=\"navbar-header\"><?php\n\t\t\t\t\t\t// Create index link for wiki header\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $this->data['nav_urls']['mainpage']['href'] .'\" class=\"navbar-brand\">\n\t\t\t\t\t\t\t'. $this->data['sitename'] .'\n\t\t\t\t\t\t</a>'; ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"navbar-form navbar-right form-inline\"><?php\n\t\t\t\t\t\t// Create a search form for wiki header\n\t\t\t\t\t\t$this->searchBox(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</nav>\n\t\t\t</div>\n\t\t</header>\n\t\t<main class=\"wiki\">\n\t\t\t<nav class=\"navbar-wiki\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t// Print content actions nav items\n\t\t\t\t\t$this->contentActions(); ?>\n\t\t\t\t</div>\n\t\t\t</nav>\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<section class=\"col-md-10 col-sm-12 page\">\n\t\t\t\t\t\t<?php if($this->data['sitenotice']) { ?><div id=\"alert alert-info\"><?php $this->html('sitenotice'); ?></div><?php }; ?>\n\t\t\t\t\t\t<div class=\"page-header\">\n\t\t\t\t\t\t\t<h1><?php $this->html('title'); ?> <small class=\"visible-print\"><?php $this->msg('tagline'); ?></small></h1>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"page\">\n\t\t\t\t\t\t\t<div class=\"subtitle\"><?php $this->html('subtitle'); ?></div>\n\t\t\t\t\t\t\t<?php if($this->data['undelete']) { ?><div class=\"undelete\"><?php $this->html('undelete'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"newtalk\"><?php $this->html('newtalk'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['showjumplinks']) {\n\t\t\t\t\t\t\t\t// Todo: showing these for mobiles to easily navigate ?>\n\t\t\t\t\t\t\t\t<div class=\"jumplinks\">\n\t\t\t\t\t\t\t\t\t<?php $this->msg('jumpto'); ?><a href=\"#column-one\"><?php $this->msg('jumptonavigation'); ?></a>\n\t\t\t\t\t\t\t\t\t<?php $this->msg('comma-separator'); ?><a href=\"#searchInput\"><?php $this->msg('jumptosearch'); ?></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php };\n\t\t\t\t\t\t\t// Now print the acutal page content\n\t\t\t\t\t\t\t$this->html('bodytext');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print the catagory links for this content\n\t\t\t\t\t\t\tif($this->data['catlinks']) { $this->html('catlinks'); }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print any remaining data after the content\n\t\t\t\t\t\t\tif($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); }?>\n\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</section>\n\t\t\t\t\t<aside class=\"col-md-2 hidden-sm hidden-xs sidebar hidden-print\"><?php\n\t\t\t\t\t\t// Print the personal tools\n\t\t\t\t\t\t$this->personalTools();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Print all the other navigation blocks\n\t\t\t\t\t\t$this->renderPortals($this->data['sidebar']); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<footer class=\"footer\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t$validFooterIcons = $this->getFooterIcons('icononly');\n\t\t\t\t\t$validFooterLinks = $this->getFooterLinks('flat'); // Additional footer links\n\t\t\t\t\n\t\t\t\t\tif ( count( $validFooterLinks ) > 0 ) { ?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<ul class=\"list\"><?php\n\t\t\t\t\t\t\t\t\tforeach( $validFooterLinks as $aLink ) { ?>\n\t\t\t\t\t\t\t\t\t\t<li class=\"footer-<?php echo $aLink ?>\"><?php $this->html($aLink) ?></li>\n\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https://github.com/South-Paw/Bootstrap-MW\">Bootstrap MW Skin</a> v1.0</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t<div class=\"row\"><?php\n\t\t\t\t\t\tforeach ( $validFooterIcons as $blockName => $footerIcons ) { ?>\n\t\t\t\t\t\t\t\t<div class=\"col-md-6 icons footer-<?php echo htmlspecialchars($blockName); ?>\"><?php\n\t\t\t\t\t\t\t\t\tforeach ( $footerIcons as $icon ) {\n\t\t\t\t\t\t\t\t\t\techo $this->getSkin()->makeFooterIcon( $icon );\n\t\t\t\t\t\t\t\t\t}; ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</footer>\n\t\t</main>\n\t\t\n\t\t<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n\t\t<script src=\"skins/Bootstrap-MW/js/bootstrap.min.js\"></script>\n\t\t<?php $this->printTrail(); ?>\n\t</body>\n</html><?php\n\t\twfRestoreWarnings();\n\t}" ]
[ "0.70402324", "0.69638723", "0.69442993", "0.6780792", "0.67758614", "0.672785", "0.6688839", "0.66764104", "0.6649364", "0.6566488", "0.6566009", "0.65582913", "0.65241915", "0.65101755", "0.6497314", "0.6492671", "0.6492671", "0.6490646", "0.6490646", "0.648595", "0.64744717", "0.64744717", "0.64744717", "0.64744717", "0.6456679", "0.64538044", "0.64426965", "0.64362514", "0.6409727", "0.6409727", "0.64022356", "0.64022356", "0.64022356", "0.64021325", "0.6394437", "0.63921446", "0.63688886", "0.63477325", "0.63247573", "0.63241863", "0.6312409", "0.62979025", "0.62864166", "0.62864166", "0.6284388", "0.62803066", "0.62708175", "0.6260222", "0.6250772", "0.6198091", "0.61962605", "0.619328", "0.6189837", "0.61768234", "0.6168914", "0.61621577", "0.61452353", "0.61437905", "0.6135201", "0.61231476", "0.61182016", "0.6110764", "0.6098187", "0.60976994", "0.6092188", "0.60903984", "0.60801816", "0.6062638", "0.60541", "0.6041342", "0.60375905", "0.6037065", "0.60358065", "0.60350055", "0.60345334", "0.6033831", "0.60292524", "0.60281307", "0.60269105", "0.60245395", "0.6021089", "0.6018657", "0.6014502", "0.6006434", "0.6004646", "0.6001367", "0.59929806", "0.59834343", "0.59729606", "0.59604764", "0.59592307", "0.59480155", "0.59443754", "0.59423715", "0.59371644", "0.5936286", "0.5932135", "0.5930699", "0.5928314", "0.59095764" ]
0.75264925
0
Display the biowim page.
public function biowim() { return view('pages.biowim'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function biotim()\n\t{\n\t\treturn view('pages.biotim');\n\t}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function show()\n {\n /** Configure generic views */\n $this->setupViews();\n /** Render views */\n ?>\n <html>\n <body>\n <?php\n /** Render views */\n $this->head_view->render();\n $this->secondary_nav_bar->render();\n $this->tree_view->render();\n $this->title_view->render();\n $this->primary_nav_bar->render();\n $this->render_page();\n ?>\n </body>\n </html>\n <?php\n }", "public function display() {\n echo $this->render();\n }", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "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}", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function display()\n {\n return $this->page->output();\n }", "public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }", "public function index(){\n \n $this->display();\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\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()\n {\n //the board string is used in the view\n $data = $this->getBoardAsString();\n require VIEW_PATH.'web.php';\n\n }", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display() {\n\t}", "public function show();", "public function show();", "public function show();", "public function show();", "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 }", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function display($pageName);", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }", "public function Index() {\n $this->Display();\n }", "public function reqBiblePage() {\n $this->instance = new Bible();\n $this->view($this->instance->getBible(false, false), 'bible', 'Bíblia');\n }", "public function display(){}", "function run()\r\n {\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get('Gutenberg')));\r\n $trail->add_help('gutenberg general');\r\n\r\n $this->action_bar = $this->get_action_bar();\r\n\r\n $this->display_header($trail);\r\n echo '<a name=\"top\"></a>';\r\n echo $this->action_bar->as_html();\r\n echo '<div id=\"action_bar_browser\">';\r\n $renderer = GutenbergPublicationRenderer :: factory($this->get_renderer(), $this);\r\n echo $renderer->as_html();\r\n echo '</div>';\r\n $this->display_footer();\r\n }", "public function show()\n {\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-header.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-header.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.$this->template.'.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-footer.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-footer.php';\n }", "public function display() {\n\t\t$this->init();\n\t\treturn $this->output();\n\t}", "public function display() {}", "public function display() {}", "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 abstract function display();", "public function show() {\n\t\t$variables = $this->sanitize($this->data);\n\t\tif (is_array($variables)) {\n\t\t\textract($variables);\n\t\t}\n\n\t\t$this->setHeaders();\n\n\t\tob_start();\n\t\tif ($this->isPartial) {\n\t\t\trequire_once $this->pathToPartial;\n\t\t} else {\n\t\t\trequire_once $this->pathToLayout;\n\t\t}\n\t\t$this->performReplacements();\n\t\tif (ob_get_length() !== false) {\n\t\t\tob_end_flush();\n\t\t}\n\t}", "function display()\n{\n $obPage = new PageDisplay(\"CST Auction\");\n $obPage->pageHead();\n $obPage->nav(isset($_SESSION[\"user\"]));\n\n $obPage->mainBody(\"<div id='homePagePic' \"\n . \"class='col-lg-offset-3 col-lg-12 \"\n .\"col-md-offset-3 col-md-12 \"\n .\"col-xs-offset-1 col-xs-12 \"\n . \"col-sm-offset-1 col-sm-12' >\"\n . \"<img src='images/homepg.jpg' alt='home page image'/></div>\");\n echo $obPage->displayPage();\n}", "public function index(){\r\n $this->display();\r\n }", "abstract protected function displayContent();", "abstract protected function show();", "public function HandlePage()\n\t{\n\t\tif(!gzte11(ISC_HUGEPRINT)) {\n\t\t\texit;\n\t\t}\n\n\t\t$this->SetVendorData();\n\n\t\tif($this->displaying == 'products') {\n\t\t\t$this->ShowVendorProducts();\n\t\t}\n\t\telse if($this->displaying == 'page') {\n\t\t\t$this->ShowVendorPage();\n\t\t}\n\t\telse if($this->displaying == 'profile') {\n\t\t\t$this->ShowVendorProfile();\n\t\t}\n\t\telse {\n\t\t\t$this->ShowVendors();\n\t\t}\n\t}", "private function show_page()\n\t{\n\t\t$parse['user_link']\t= $this->_base_url . 'recruit/' . $this->_friends[0]['user_name'];\n\t\n\t\t$this->template->page ( FRIENDS_FOLDER . 'friends_view' , $parse );\t\n\t}", "public function run()\n {\n Html::addCssClass($this->wrapperOptions, 'page-header');\n\n echo Html::beginTag(\"div\", $this->wrapperOptions);\n\n if (!empty($this->buttons)) {\n echo ButtonGroup::widget(\n [\n 'options' => $this->buttonGroupOptions,\n 'buttons' => $this->buttons,\n ]\n );\n }\n\n echo Html::tag(\"h1\", $this->title, $this->titleOptions);\n\n echo Html::endTag(\"div\");\n }", "public function show()\n\t{\n\n\t}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "public function displayContent(){\n\t\t\tinclude('/includes/homepage.inc.php');\t\n\t\t}", "public function execute() {\n\t\twfSuppressWarnings();\n\t\t\n\t\t$this->html('headelement'); ?>\n\t\t\n\t\t<header class=\"header\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<nav class=\"navbar navbar-default hidden-print\" role=\"navigation\">\n\t\t\t\t\t<div class=\"navbar-header\"><?php\n\t\t\t\t\t\t// Create index link for wiki header\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $this->data['nav_urls']['mainpage']['href'] .'\" class=\"navbar-brand\">\n\t\t\t\t\t\t\t'. $this->data['sitename'] .'\n\t\t\t\t\t\t</a>'; ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"navbar-form navbar-right form-inline\"><?php\n\t\t\t\t\t\t// Create a search form for wiki header\n\t\t\t\t\t\t$this->searchBox(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</nav>\n\t\t\t</div>\n\t\t</header>\n\t\t<main class=\"wiki\">\n\t\t\t<nav class=\"navbar-wiki\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t// Print content actions nav items\n\t\t\t\t\t$this->contentActions(); ?>\n\t\t\t\t</div>\n\t\t\t</nav>\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<section class=\"col-md-10 col-sm-12 page\">\n\t\t\t\t\t\t<?php if($this->data['sitenotice']) { ?><div id=\"alert alert-info\"><?php $this->html('sitenotice'); ?></div><?php }; ?>\n\t\t\t\t\t\t<div class=\"page-header\">\n\t\t\t\t\t\t\t<h1><?php $this->html('title'); ?> <small class=\"visible-print\"><?php $this->msg('tagline'); ?></small></h1>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"page\">\n\t\t\t\t\t\t\t<div class=\"subtitle\"><?php $this->html('subtitle'); ?></div>\n\t\t\t\t\t\t\t<?php if($this->data['undelete']) { ?><div class=\"undelete\"><?php $this->html('undelete'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"newtalk\"><?php $this->html('newtalk'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['showjumplinks']) {\n\t\t\t\t\t\t\t\t// Todo: showing these for mobiles to easily navigate ?>\n\t\t\t\t\t\t\t\t<div class=\"jumplinks\">\n\t\t\t\t\t\t\t\t\t<?php $this->msg('jumpto'); ?><a href=\"#column-one\"><?php $this->msg('jumptonavigation'); ?></a>\n\t\t\t\t\t\t\t\t\t<?php $this->msg('comma-separator'); ?><a href=\"#searchInput\"><?php $this->msg('jumptosearch'); ?></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php };\n\t\t\t\t\t\t\t// Now print the acutal page content\n\t\t\t\t\t\t\t$this->html('bodytext');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print the catagory links for this content\n\t\t\t\t\t\t\tif($this->data['catlinks']) { $this->html('catlinks'); }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print any remaining data after the content\n\t\t\t\t\t\t\tif($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); }?>\n\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</section>\n\t\t\t\t\t<aside class=\"col-md-2 hidden-sm hidden-xs sidebar hidden-print\"><?php\n\t\t\t\t\t\t// Print the personal tools\n\t\t\t\t\t\t$this->personalTools();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Print all the other navigation blocks\n\t\t\t\t\t\t$this->renderPortals($this->data['sidebar']); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<footer class=\"footer\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t$validFooterIcons = $this->getFooterIcons('icononly');\n\t\t\t\t\t$validFooterLinks = $this->getFooterLinks('flat'); // Additional footer links\n\t\t\t\t\n\t\t\t\t\tif ( count( $validFooterLinks ) > 0 ) { ?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<ul class=\"list\"><?php\n\t\t\t\t\t\t\t\t\tforeach( $validFooterLinks as $aLink ) { ?>\n\t\t\t\t\t\t\t\t\t\t<li class=\"footer-<?php echo $aLink ?>\"><?php $this->html($aLink) ?></li>\n\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https://github.com/South-Paw/Bootstrap-MW\">Bootstrap MW Skin</a> v1.0</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t<div class=\"row\"><?php\n\t\t\t\t\t\tforeach ( $validFooterIcons as $blockName => $footerIcons ) { ?>\n\t\t\t\t\t\t\t\t<div class=\"col-md-6 icons footer-<?php echo htmlspecialchars($blockName); ?>\"><?php\n\t\t\t\t\t\t\t\t\tforeach ( $footerIcons as $icon ) {\n\t\t\t\t\t\t\t\t\t\techo $this->getSkin()->makeFooterIcon( $icon );\n\t\t\t\t\t\t\t\t\t}; ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</footer>\n\t\t</main>\n\t\t\n\t\t<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n\t\t<script src=\"skins/Bootstrap-MW/js/bootstrap.min.js\"></script>\n\t\t<?php $this->printTrail(); ?>\n\t</body>\n</html><?php\n\t\twfRestoreWarnings();\n\t}", "abstract function display();", "abstract function display();", "public function createPage()\n {\n echo $this->output;\n }", "public function show() {\n\t}", "function run()\r\n {\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get(ucfirst($this->get_folder()))));\r\n\r\n $this->display_header($trail);\r\n echo $this->get_action_bar_html() . '';\r\n echo $this->get_publications_html();\r\n $this->display_footer();\r\n }", "function index() {\r\n $this->page();\r\n }", "public function display_page_contents() {\n\t\tif ( ! $this->upgrader->table_is_ready() ) {\n\t\t\t// Page header.\n\t\t\t$this->display_error_page_header();\n\t\t\treturn;\n\t\t}\n\n\t\t// Get everything that is in the table.\n\t\t$this->table_contents = ( new CRUD( $this->table->get_table_definition() ) )->get( [ '*' ], [], OBJECT_K );\n\n\t\t// Page header.\n\t\t$this->display_page_header();\n\n\t\t// Display buttons to add/delete entries.\n\t\t$this->display_page_actions();\n\n\t\t// Display what is in the table.\n\t\t$this->display_table_contents();\n\t}", "public function show()\n\t{\n\t\t$this->process_post();\n\t\t$this->output();\n\t}", "public function index() {\n $this->html->displayHeaderAndFooter(true);\n $this->load_content();\n }", "public function index() {\n\t\t\t$this->render();\n\t\t}", "public function page() {\n\t\t$this->page = $this->plugin->factory->adminPage;\n\t\t$this->page->show();\n\t}", "public function display() {\r\n echo $this->template;\r\n }", "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 function index(){\r\n $this->display(index);\r\n }", "public function index() {\n\t\t$this->display('index');\n\t}", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-settings-page.php';\n }", "function display() {\r\n\t\tparent::display ();\r\n\t}", "function showPage($db) {\n $this->user_info($db);\n $this->log_visitor($db,$_SERVER['PHP_SELF'],0);\n $this->showPage=true;\n }", "public function display() {\n\t\techo '<iframe src=\"http://norulesweb.com/contact/\" width=\"800\" height=\"400\"></iframe>';\n\t}", "abstract function render_page();", "public function start_display ()\n {\n $this->display_doc_type ();\n\n $opts = $this->page->template_options;\n if ($opts->css_class)\n {\n?>\n<html class=\"<?php echo $opts->css_class; ?>\" lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n else\n {\n?>\n<html lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n?>\n <head>\n <?php\n $this->display_head ();\n ?>\n </head>\n <body>\n<?php\n\n $this->_start_body ();\n }", "public function show() {\n \n }", "public function display() {\n\t\t$this->prepareForDisplay();\n\n\t\techo '<div class=\"panel-heading\">';\n\t\t$this->displayHeader($this->Header, $this->getNavigation());\n\t\techo '</div>';\n\t\techo '<div class=\"panel-content statistics-container\">';\n\t\t$this->displayContent();\n\t\techo '</div>';\n\t}", "function run()\r\n\t{\r\n//\t\t$trail->add(new Breadcrumb($this->get_browse_cda_languages_url(), Translation :: get('Cda')));\r\n//\t\t$trail->add(new Breadcrumb($this->get_variable_translations_searcher_url(), Translation :: get('SearchVariableTranslations')));\r\n\r\n\t\t$this->display_header($trail);\r\n\t\techo $this->display_form();\r\n\t\techo '<br />';\r\n echo $this->get_table();\r\n\t\t$this->display_footer();\r\n\t}", "public static function display()\n {\n $page = self::getCurrentPage();\n\n template::serveTemplate('header');\n\n if (session::has('user') === FALSE) {\n user::setLoginUrl('~url::adminurl~');\n if (session::has('viewPage') === FALSE) {\n session::set('viewPage', $page);\n }\n user::process();\n return;\n }\n\n if (session::has('viewPage') === TRUE) {\n $page = session::get('viewPage');\n session::remove('viewPage');\n }\n\n /**\n * Set the default page title to nothing.\n * This is used for including extra information (eg the post subject).\n */\n template::setKeyword('header', 'pagetitle', '');\n\n $menuItems = array(\n '/' => array(\n 'name' => 'Home',\n 'selected' => TRUE,\n ),\n '/adminpost' => array(\n 'name' => 'Posts',\n ),\n '/admincomments' => array(\n 'name' => 'Comments',\n ),\n '/adminstats' => array(\n 'name' => 'Stats',\n ),\n );\n\n if (empty($page) === FALSE) {\n $bits = explode('/', $page);\n\n // Get rid of the '/admin' bit.\n array_shift($bits);\n\n if (empty($bits[0]) === FALSE) {\n $system = array_shift($bits);\n\n /**\n * Uhoh! Someone's trying to find something that\n * doesn't exist.\n */\n if (loadSystem($system, 'admin') === TRUE) {\n $url = '/'.$system;\n if (isset($menuItems[$url]) === TRUE) {\n $menuItems[$url]['selected'] = TRUE;\n unset($menuItems['/']['selected']);\n }\n\n $bits = implode('/', $bits);\n if (isValidSystem($system) === TRUE) {\n call_user_func_array(array($system, 'process'), array($bits));\n }\n } else {\n $url = '';\n if (isset($_SERVER['PHP_SELF']) === TRUE) {\n $url = $_SERVER['PHP_SELF'];\n }\n $msg = \"Unable to find system '\".$system.\"' for url '\".$url.\"'. page is '\".$page.\"'. server info:\".var_export($_SERVER, TRUE);\n messagelog::LogMessage($msg);\n template::serveTemplate('404');\n }\n }\n } else {\n // No page or default system?\n // Fall back to 'index'.\n template::serveTemplate('header');\n template::serveTemplate('index');\n }\n\n $menu = '';\n foreach ($menuItems as $url => $info) {\n $class = '';\n if (isset($info['selected']) === TRUE && $info['selected'] === TRUE) {\n $class = 'here';\n }\n\n $menu .= '<li class=\"'.$class.'\">';\n $menu .= '<a href=\"~url::adminurl~'.$url.'\">'.$info['name'].'</a>';\n $menu .= '</li>';\n $menu .= \"\\n\";\n }\n\n template::setKeyword('header', 'menu', $menu);\n\n template::serveTemplate('footer');\n template::display();\n\n }", "public function display()\n {\n $this->view->viewFile = \"404\";\n echo $this->view->generateMarkup();\n }", "public function display()\n \t{\n \t\t$this->assign(\"__view\", $this->_view);\n \t\tparent::display();\n \t}", "public function index() {\n\n\t\t\t$controller = $this->nav->getPageController();\n\t\t\tif(isset($controller) && is_object($controller)) {\n\t\t\t\tassert($controller instanceof \\Toeswade\\IController);\n\n\t\t\t\t$action = $this->nav->getPageAction();\n\t\t\t\t$params = $this->nav->getParams();\n\t\t\t\t\n\t\t\t\tif(isset($action)) {\n\t\t\t\t\t$view = $controller->$action($params);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$view = $controller->index();\n\t\t\t\t}\n\n\t\t\t\tassert($view instanceof \\Toeswade\\IView);\n\t\t\t\t$main = $view->getHTML();\n\t\t\t\t$title = $view->getTitle();\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$main = 'default';\n\t\t\t\t$title = $main;\n\t\t\t}\n\t\t\t$this->view->setTitle($title);\n\t\t\t$this->view->setMain($main);\n\t\t\t$this->view->setNav($this->nav->getMainNavigation());\n\n\t\t\t$this->view->render();\n\t\t}", "public function displayContentOverview() {}", "public function display() {\n $data = $this->container->get('data');\n $people = $data->load('people');\n $this->render('people', ['people' => $people]);\n }", "public function makePage()\n {\n $db = new DB();\n $page_color = !empty($db->getOptions('page_color')) ? 'style=\"background-color:' . $db->getOptions('page_color') . ';\"' : '';\n $footer_color = !empty($db->getOptions('footer_color')) ? 'style=\"background-color:' . $db->getOptions('footer_color') . ';\"' : '';\n echo '<!DOCTYPE html>\n<html lang=\"en\">\n<head>';\n\n $this->makeMeta();\n $this->setTitle();\n $this->makeStyles();\n $this->makeHeaderScripts();\n echo '<!-- header code -->' . PHP_EOL;\n if (!empty($this->getHeaderCode())) {\n echo $this->getHeaderCode() . PHP_EOL;\n }\n echo '<!-- header code -->' . PHP_EOL;\n echo '</head>\n\n\t\t<body class=\"' . $this->getbodyClass() . '\" ' . $page_color . '>';\n\n echo '<div class=\"main-wrapper\" >';\n if ($this->hasHeader) {\n echo '<header class=\"header\" >';\n if ($this->hasNavbar) {\n require_once 'Navbar.php';\n }\n echo '</header>';\n }\n\n\n//--main content---\n if ($this->hasBreadcrumb) {\n $routes = explode(\"/\", $_SERVER['REQUEST_URI']);\n echo '\n<div class=\"breadcrumb-bar d-print-none\" ' . $footer_color . '>\n\t\t\t\t<div class=\"container-fluid\">\n\t\t\t\t\t<div class=\"row align-items-center\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<nav aria-label=\"breadcrumb\" class=\"page-breadcrumb\">\n\t\t\t\t\t\t\t\t<ol class=\"breadcrumb\">\n\t\t\t\t\t\t\t\t\t<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/\"><i class=\"bx bx-home-alt\"></i></a></li>';\n\n for ($i = 1; $i < count($routes) - 1; $i++) {\n if ($i != count($routes) - 1) {\n echo '<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/' . $routes[$i] . '/\">' . $routes[$i] . '</a></li>';\n } else {\n echo '<li class=\"breadcrumb-item active\">' . $routes[$i] . '</li>';\n }\n }\n echo '\n\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t\t<h2 class=\"breadcrumb-title\">' . $this->getPageTitle() . '</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n }\n echo '<div class=\"content\">';\n echo '<div class=\"container-fluid\">';\n if ($this->isHasContent()) {\n $this->addPageContent($this->getPageContent());\n }\n\n echo '</div></div>';\n\n echo '<!-- above footer code -->' . PHP_EOL;\n\n /*--footer---*/\n if ($this->hasFooter) {\n require_once 'footer.php';\n }\n echo '</div>';\n $this->makeScripts();\n $this->makeFooterScripts();\n if ($this->ishasError()) {\n $this->showPageError();\n }\n\n echo '<!-- footer code -->' . PHP_EOL;\n if (!empty($this->getFooterCode())) {\n echo $this->getFooterCode() . PHP_EOL;\n }\n echo '<!-- footer code -->' . PHP_EOL;\n echo '</body>\n</html>';\n }", "public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }", "public function initDisplay(){\n\t\tif (!$this->getPage()){\n\t\t\tif (\\Settings::DISPLAY_BREADCRUMB) Front::displayBreadCrumb($this->breadCrumb, $this->version);\n\t\t\t$this->mainDisplay();\n\t\t}\n\t}", "public function main()\n {\n // Produce browse-tree:\n $tree = $this->pagetree->getBrowsableTree();\n // Outputting page tree:\n $this->content .= $tree;\n\n $docHeaderButtons = $this->getButtons();\n\n $markers = array(\n 'IMG_RESET' => '',\n 'WORKSPACEINFO' => '',\n 'CONTENT' => $this->content,\n );\n\n // Build the <body> for the module\n $this->content = $this->doc->startPage(\n $this->getLanguageService()->sl(\n 'LLL:EXT:commerce/Resources/Private/Language/locallang_be.xml:mod_orders.navigation_title'\n )\n );\n\n $subparts = array();\n // Build the <body> for the module\n $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers, $subparts);\n $this->content .= $this->doc->endPage();\n $this->content = $this->doc->insertStylesAndJS($this->content);\n }", "abstract protected function showContent(): self;", "public function show($page)\n {\n header('Content-Type: image/png');\n echo $this->image[$page]->encode('png');\n\n }", "function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }", "public function show()\n {\n //\n }", "function index(){\n\t\t$data['page_name'] = 'An example of bitrix24 cloud application on REST api';\n\t\t$user_name = $this->model->get_current_user_name();\n\t\tif($user_name){\n\t\t\t$data['user_name'] = $user_name;\n\t\t}\n\t\t$this->html = $this->model->load_view('example', $data);\n\t\t$this->output();\n\t}", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-customer-edit-page.php';\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 show(Kibb $kibb)\n {\n //\n }", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "public function showContents() {\n\t\techo $this -> getContents();\n\t\texit ;\n\t}", "public function Index() {\n $this->Render();\n }" ]
[ "0.74522656", "0.7130924", "0.71187615", "0.7036122", "0.6946333", "0.6922578", "0.68875295", "0.68491083", "0.6819816", "0.679951", "0.67669797", "0.6760535", "0.6694673", "0.6636045", "0.6636045", "0.6636045", "0.66299397", "0.6627444", "0.6623019", "0.6623019", "0.6621124", "0.6621124", "0.66184443", "0.66174376", "0.66174376", "0.66174376", "0.66174376", "0.6613192", "0.65930843", "0.658962", "0.65870565", "0.65793777", "0.65789074", "0.6570126", "0.65694785", "0.65644246", "0.65635335", "0.65567505", "0.6556564", "0.65518486", "0.65518486", "0.6547284", "0.65236187", "0.6491879", "0.64886606", "0.6487469", "0.6485905", "0.6479119", "0.6455735", "0.6451904", "0.6442568", "0.64167213", "0.6387007", "0.63835865", "0.63804585", "0.6374686", "0.6374686", "0.636016", "0.6336807", "0.6332853", "0.6330157", "0.63097984", "0.6307869", "0.6292942", "0.6290814", "0.6290478", "0.62894154", "0.628715", "0.62746364", "0.62742126", "0.62709016", "0.6266077", "0.62532735", "0.6250041", "0.623214", "0.6217669", "0.621675", "0.6216015", "0.62110656", "0.620958", "0.6206726", "0.6204446", "0.6201339", "0.6194736", "0.6191278", "0.61879337", "0.61869776", "0.6184938", "0.6180366", "0.6179642", "0.6178281", "0.6158034", "0.61477786", "0.6137391", "0.61339456", "0.61322653", "0.6131314", "0.61309534", "0.61259437", "0.611857" ]
0.7221221
1
Display the Contact page.
public function contact() { return view('pages.contact'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showContact() {\n $output = $this->outputBoilerplate('contact.html');\n return $output;\n }", "public function actionContact()\n {\n $this->render('contact');\n }", "public function contactAction()\n {\n $this->view->render('Contact Us');\n }", "public function showContactPage()\n {\n return view('pages.contact');\n }", "public function showContact()\n {\n return view('front.pages.contact');\n }", "public function contact()\n\t{\n\t\t$data ['footer'] = $this->page_model->getfooter();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('home/about/head_about');\n\t\t$this->load->view('home/about/contact', $data);\n\t\t$this->load->view('templates/footer', $data);\n\t}", "public function contact() {\n $this->getView('navigation', array('pagename' => 'Contact'));\n $random = substr(md5(rand()), 0, 7);\n $this->getView('contact',array('cap' => $random));\n }", "public function contact()\n {\n // which contain router class an applied renderView method\n return $this->render('contact');\n }", "public function contact()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('contact');\n\n return $this->loadPublicView('user.contact', $breadCrumb['data']);\n }", "public function contact()\n\t{\n\t\treturn View::make('contact.contact');\n\t}", "public function contact()\n {\n return view('pages.contact');\n }", "public function index()\n\t{\n\n\t\t$this->view('guest/contact-us');\n\t}", "public function index()\n\t{\n $this->data[ 'menubar' ] = build_menu_bar( $this->choices, 'contact' );\n $this->data[ 'pagebody' ] = 'contact';\n $this->render();\n\t}", "public function display() {\n\t\techo '<iframe src=\"http://norulesweb.com/contact/\" width=\"800\" height=\"400\"></iframe>';\n\t}", "public function contact()\n {\n return view('templates.them8.contact');\n }", "public function actionContact()\n {\n $model = new ContactForm();\n if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {\n Yii::$app->session->setFlash('contactFormSubmitted');\n\n return $this->refresh();\n }\n\n return $this->render('contact', compact('model'));\n }", "public function action_index()\n\t{\n\t\t$this->template->content = View::factory('contact/index');\n\t}", "public function index(){\n Auth::checkAdminLogin();\n\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Contact', 'Contact');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = 'Contact Index';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Contact Us';\n\t\t// Set Page Sub Section\n\t\t$this->_view->pageSubSection = 'Contact Us';\n\n\t\t###### PAGINATION ######\n //sanitise or set keywords to false\n if(isset($_GET['keywords']) && !empty($_GET['keywords'])){\n $_GET['keywords'] = FormInput::checkKeywords($_GET['keywords']);\n }else{\n $_GET['keywords'] = false;\n }\n\n $totalItems = $this->_model->countAllData($_GET['keywords']);\n $pages = new Pagination(20,'keywords='.$_GET['keywords'].'&page', $totalItems[0]['total']);\n $this->_view->getAllData = $this->_model->getAllData($pages->get_limit(), $_GET['keywords']);\n $this->_view->countData = $this->_model->countAllData();\n\n\t\t// Create the pagination nav menu\n\t\t$this->_view->page_links = $pages->page_links();\n\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('contact-us/index', 'layout', 'backoffice');\n\t}", "public function contact()\n {\n return View::make('All.contact');\n }", "public function index()\n\t{\n\t\t$this->template->build('addressbook/contact_listing');\t\n\t}", "public function contactUs()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Contact Us')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/contact_us');\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact) {\n //\n }", "private function displayForm()\n {\n // Preparation des paramètres du mail.\n $data['headerTitle'] = 'Contact';\n $data['headerDescription'] = 'Page de contact';\n $data['title'] = 'Contact';\n\n // Affichage du formulaire.\n $this->load->view('templates/header', $data);\n $this->load->view('templates/alert', $data);\n $this->load->view('contact/index', $data);\n $this->load->view('templates/footer', $data);\n }", "public function contact()\n {\n return view('home.contact');\n }", "public function contact()\n {\n return view('about.contact');\n }", "public function getContact() \n\t{\n\t\treturn View::make('contact');\n\t}", "public function home() {\r\n $perpage = 10;\r\n $page = $this->api->getParam('page', '1');\r\n $pagination = new Pagination($page, $perpage);\r\n $result = $this->model->apply($pagination);\r\n $this->api->loadView('contact', array(\r\n 'rows' => $result,\r\n 'pagination' => $pagination,\r\n 'link' => $this->api->getApplicationUrl() . 'contact/home'\r\n ));\r\n }", "public function contact() {\r\n $this->load->view('font_end/includes/header', $this->data);\r\n $this->load->view('font_end/contact');\r\n $this->load->view('font_end/includes/footer');\r\n }", "public function getContact(){\n\t\treturn view('pages.contact'); #or pages/contact\n\t}", "public function contact()\n {\n return view('contact');\n }", "public function contact()\n {\n return view('contact');\n }", "public function contact()\n\t{\n\t\t$maincategorys = Maincategory::all(); \t\n\t\t\t\n\t\treturn view('pages.contact')->with('maincategorys', $maincategorys);\n\t\t\n\t}", "public function contact()\n {\n $contact_active = true;\n\n $cities = $this->city_services->all();\n\n return view('client.contact', compact('contact_active', 'cities'));\n }", "public function index()\n\t{\n\t\t return \\View::make('contacto/contact');\n\t}", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array(\n\t\t\t'model' => $model));\n\t}", "function print_contact(){\n $contact = new ContactView();\n $contact->print_contact();\n }", "public function actionContact()\n\t{\n\t\t$contact=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$contact->attributes=$_POST['ContactForm'];\n\t\t\tif($contact->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$contact->email}\\r\\nReply-To: {$contact->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$contact->subject,$contact->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('contact'=>$contact));\n\t}", "public function actionContact() {\n //echo Helper::yiiparam('adminEmail');\n $this->layout = 'pagination_layout';\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->first_name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-type: text/plain; charset=UTF-8\";\n\n mail(Helper::yiiparam('adminEmail'), $subject, $model->message, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function index()\r\r\n\t{\r\r\n\t\t$this->load->view('contact_view');\r\r\n\t}", "public function getContact()\n\t{\n\t\treturn view('contact');\n\t}", "public function actionContact() {\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n\n $success = Emails::sendToAdmin_ContactForm($model->name, $model->email, $model->subject, $model->body);\n\n Emails::sendToPerson_ContactFormConfirmation($model->name, $model->email);\n\n Yii::app()->user->setFlash('contact', Yii::t('texts', 'FLASH_THANK_YOU_FOR_CONTACTING_US'));\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function index()\n {\n return view('easy-forms::contact');\n }", "public function getContact()\n {\n return \\View::make(\"ishu.contact\");\n }", "public function contact()\n {\n $contact = Markdown::convertToHtml(SiteSetting::get('contact'));\n return view('home.contact', compact('contact'));\n }", "public function index() {\n\t\t$data['social_media'] = $this->social_media_model->get_six();\n\t\t$this->render('public/contact/index',$data);\n\t}", "public function show()\n {\n return view('ContactUs');\n }", "public function contact_us()\n {\n return view('pages.frontsite.contact_us');\n }", "public function contact(){\n return view('frontend.contact');\n \t\n }", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function indexAction() {\n $contact = new Application_Model_Contact();\n\n // Check whether contact form submitted and is valid\n if($this->_request->isPost() && $contact->getForm()->isValid($this->_request->getParams())) {\n // Retrieve parameters from request and pass back to form to filter only form values\n $contact->getForm()->populate($this->_request->getParams());\n $contact->populate();\n\n // Save and send contact message\n $isSent = $contact->save()->send();\n\n if($isSent) {\n $this->_flashMessenger->addMessage('Thank you for contacting us. Your message has been sent.');\n $contact->getForm()->reset();\n\n } else {\n $this->_flashMessenger->addMessage('An error occurred and your message could not be sent. Please try again.');\n }\n\n $this->_helper->redirector('index');\n }\n \n // Pass variables to view\n $this->view->contact = $contact;\n }", "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'administrateur\n\t\tProfil_fields_forum::form(PROFIL_FIELDS_CONTACT, 'contact', Fsb::$session->id());\n\t}", "public function getEfficientcontact()\n {\n return view('contactpage');\n }", "public function contact()\n {\n // Check login authentication\n $loginUser = \"\";\n if (Auth::check()) {\n $loginUser = Auth::user();\n }\n\n return view('contact.contact', ['loginUser' => $loginUser]);\n }", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tMailWrapper::sendMailTemplate(\"contactus\", $model, $model->subject, \"[email protected]\");\n\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function contact()\n {\n if ($this->issetPostSperglobal('name') && $this->issetPostSperglobal('email') && $this->issetPostSperglobal('message')) {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if (empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $ReCaptcha = new ReCaptcha($this->getPostSuperglobal('recaptcha_response'));\n $method = __FUNCTION__;\n $this->session->read('Mail')->$method($this->getPostSuperglobal('name'), $this->getPostSuperglobal('email'), $this->getPostSuperglobal('message'));\n $this->session->writeFlash('success', \"Votre message a été envoyé avec succès.\");\n $this->redirect('contact');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $this->render('contact', ['head'=>['title'=>'Contact', 'meta_description'=>''], 'page'=>'contact', '_post'=>isset($_post) ? $_post : '']);\n }", "public function show()\n {\n $contact = new Contact([\n 'name' => 'Benedikt Poller',\n 'email' => '[email protected]'\n ]);\n $contact->save();\n\n\n SendEmailJob::dispatch((object) [\n 'subject' => 'foo'\n ])\n ->delay(now()->addSeconds(10));\n\n return view('welcome');\n }", "public function index()\n {\n return view('contact::index');\n }", "public function actionContact()\n\t{\n\t\t$this->layout ='column2';\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function index()\n {\n //\n return view('home.contact');\n }", "public function contact() {\n $this->code_image();\n if (DB::table('generalsettings')->find(1)->is_contact == 0) {\n return redirect()->back();\n }\n $ps = DB::table('pagesettings')->where('id', '=', 1)->first();\n return view('front.contact', compact('ps'));\n }", "public function actionContact()\n\t{\n\t\t$model['form'] = new ContactForm();\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model['form']->attributes = $_POST['ContactForm'];\n\t\t\tif ($model['form']->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model['form']->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model['form']->subject) . '?=';\n\t\t\t\t$headers = \"From: $name <{$model['form']->email}>\\r\\n\" .\n\t\t\t\t\t\"Reply-To: {$model['form']->email}\\r\\n\" .\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t'Content-Type: text/plain; charset=UTF-8';\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $subject, $model['form']->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', Yii::t('app', 'Thank you for contacting us. We will respond to you as soon as possible.'));\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function getContact()\n {\n return view('frontend.info.contact');\n }", "public function contact_us()\n {\n $navbar = NavBar::first();\n return view('pages.home.contact-us' , compact('navbar'));\n }", "function horizon_contact_section() {\n\t\tget_template_part('inc/partials/homepage', 'contact');\n\t}", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\t\n\t\t$this->performAjaxValidation($model, 'contact-form');\n\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us! We will get back to you as soon as possible!!');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function getContact() {\n\t\tif(Auth::check()) {\n\t\t\tLog::info(Auth::user()->username . \" (\" . Auth::user()->id . \") accessed :: Contact\");\n\t\t}else{\n\t\t\tLog::info(getClientIP() . \" accessed :: Contact\");\n\t\t}\n\n\t\treturn view ('contact');\n\t}", "public function action_index(){\n\n\t\t$view = View::forge('contact/form');\n\n\t\tif (Input::method() == 'POST'){\n\t\t\tif (Input::post('name') and Input::post('email') and Input::post('message')){\n\t\t\t\ttry{\n\t\t\t\t\tEmail::forge()\n\t\t\t\t\t ->to('[email protected]')\n\t\t\t\t\t ->from(Input::post('email'), Input::post('name'))\n\t\t\t\t\t ->subject('TuneGenius Contact Form')\n\t\t\t\t\t ->body(Input::post('message'))\n\t\t\t\t\t ->send();\n\n\t\t\t\t\tResponse::redirect('contact/sent');\n\t\t\t\t}\n\t\t\t\tcatch (EmailSendingFailedException $e){\n\t\t\t\t\t$view->error = 'Your email did not send, please try again.';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//if not all fields are filled out puts up error and empties fields\n\t\t\telse{\n\t\t\t\t$view->error = 'Please fill in all fields';\n\t\t\t}\n\t\t}\n\t\t$this->template->title = 'Contact us';\n\t\t$this->template->content = $view;\n\t}", "public function index()\n {\n $data['page'] = $this->getPage();\n return view('contacts::index')->with($data);\n }", "public function ftvchContactsAction()\n {\n $ftvcontacts=new Ep_Ftv_FtvContacts();\n $details= $ftvcontacts->getFtvContacts('chaine');\n if($details != 'NO')\n $this->_view->ftvcontactsdetails=$details;\n $this->render('ftv_ftvcontacts');\n }", "public function index()\n {\n return view('front.contactus');\n }", "public function indexAction() {\n\n //DON'T RENDER IF SUNJECT IS NOT THERE\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n //GET SITEPAGE SUBJECT\n $this->view->sitepage = $sitepage = Engine_Api::_()->core()->getSubject('sitepage_page');\n\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'contact');\n if (empty($isManageAdmin)) {\n return $this->setNoRender();\n }\n\n\t\t$this->view->can_edit = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'edit');\n \n if(empty($sitepage->phone) && empty($sitepage->email) && empty($sitepage->website) && !$this->view->can_edit) {\n return $this->setNoRender();\n }\n\n\t\t//GET SETTINGS\n\t\t$pre_field = array(\"0\" => \"1\", \"1\" => \"2\", \"2\" => \"3\");\n\t\t$contacts = $this->_getParam('contacts', $pre_field);\n\t\t$this->view->emailme = $this->_getParam('emailme', 0);\n\n\t\tif(empty($contacts)) {\n\t\t\t$this->setNoRender();\n\t\t}\n\t\telse {\n\t\t\t//INITIALIZATION\n\t\t\t$this->view->show_phone = $this->view->show_email = $this->view->show_website = 0;\n\t\t\tif(in_array(1, $contacts)) {\n\t\t\t\t$this->view->show_phone = 1;\n\t\t\t}\n\t\t\tif(in_array(2, $contacts)) {\n\t\t\t\t$this->view->show_email = 1;\n\t\t\t}\n\t\t\tif(in_array(3, $contacts)) {\n\t\t\t\t$this->view->show_website = 1;\n\t\t\t}\n\t\t}\n\n\t\t$user = Engine_Api::_()->user()->getUser($sitepage->owner_id);\n\t\t$view_options = (array) Engine_Api::_()->authorization()->getAdapter('levels')->getAllowed('sitepage_page', $user, 'contact_detail');\n\t\t$availableLabels = array('phone' => 'Phone', 'website' => 'Website', 'email' => 'Email');\n\t\t$this->view->options_create = array_intersect_key($availableLabels, array_flip($view_options));\n }", "public function index()\n {\n $this->global['pageTitle'] = 'Manage Contacts';\n }", "public function index(){ return $this->returnData($this->contactPage,\"contact us page description\");\n }", "public function index()\n\t{\n\t\treturn View::make(\"contactos.index\");\n\t}", "public function contact_us()\n {\n //\n return view('contactus');\n }", "public function index()\n {\n $contacts = ContactData::get();\n $map = GlobalSettings::googleMapsUrl();\n\n return view('contact.index', compact('contacts', 'map'));\n }", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function getContact()\n {\n return view('contact');\n }", "public function index()\n\t{\n\t\tif (!$this->commons->hasPermission('contacts')) {\n\t\t\tNot_foundController::show('403');\n\t\t\texit();\n\t\t}\n\n\t\t/*Get User name and role*/\n\t\t$data = $this->commons->getUser();\n\t\t/**\n\t\t * Get all User data from DB using User model \n\t\t **/\n\t\tif ($id = $this->commons->checkUser()) {\n\t\t\t$data['admin'] = false;\n\t\t\t$data['result'] = $this->contactModel->getContacts($id);\n\t\t} else {\n\t\t\t$data['admin'] = true;\n\t\t\t$data['result'] = $this->contactModel->getContacts();\n\t\t}\n\n\t\t/*Load Language File*/\n\t\trequire DIR_BUILDER . 'language/' . $data['info']['language'] . '/common.php';\n\t\t$data['lang']['common'] = $lang;\n\t\trequire DIR_BUILDER . 'language/' . $data['info']['language'] . '/contact.php';\n\t\t$data['lang']['contact'] = $contact;\n\n\t\t/* Set confirmation message if page submitted before */\n\t\tif (isset($this->session->data['message'])) {\n\t\t\t$data['message'] = $this->session->data['message'];\n\t\t\tunset($this->session->data['message']);\n\t\t}\n\t\t/* Set page title */\n\t\t$data['page_title'] = $data['lang']['common']['text_contacts'];\n\n\t\t/*Render User list view*/\n\t\t$this->view->render('contact/contact_list.tpl', $data);\n\t}", "public function showAction(Tx_Addresses_Domain_Model_Contact $contact) {\n\t\t// Transform show settings to shorter variable\n\t\t$this->showSettings = $this->settings['controllers']['Contact']['actions']['show'];\n\t\t\n\t\tif($this->showSettings['stylesheet'] != '') {\n\n\t\t\t// \"EXT:\" shortcut replaced with the extension path\n\t\t\t$this->showSettings['stylesheet'] = str_replace('EXT:', t3lib_extMgm::siteRelPath('addresses'), $this->showSettings['stylesheet']);\n\n\t\t\t// Stylesheet\n\t\t\t $GLOBALS['TSFE']->getPageRenderer()->addCssFile($this->showSettings['stylesheet']);\n\t\t}\n\t\t\n\t\t$this->view->assign('address', $contact);\n\t}", "public function index()\n {\n return view('contact.index');\n }", "public function index()\n {\n $contact = Contact::all();\n defaultLog(Contact::class);\n return view('backEnd.admin.contact.index', compact('contact'));\n }", "public function contactForm()\n {\n return view('web.contact');\n }", "public function index()\n {\n $title = \\MessageContact::TITLE_INDEX;\n $listConfig = $this->processDataConfig();\n return view('test.contact', compact('title', 'listConfig'));\n }", "public function index()\n {\n $contactList = Contact::all()->load('company');\n\n return view('CustomerCenter.Contact.index', compact('contactList'));\n }" ]
[ "0.82756346", "0.8201037", "0.80965346", "0.7907421", "0.78798205", "0.7777642", "0.7776654", "0.77148014", "0.7684614", "0.7559938", "0.7490311", "0.7483726", "0.7478719", "0.7403061", "0.7310458", "0.7300077", "0.72814083", "0.7280245", "0.7272465", "0.7262205", "0.7246069", "0.72397316", "0.72397316", "0.72397316", "0.72397316", "0.72397316", "0.72397316", "0.72397316", "0.72397316", "0.72397316", "0.72397316", "0.72336805", "0.72324", "0.7227654", "0.72219366", "0.7170764", "0.7165459", "0.7160651", "0.71373576", "0.71270555", "0.71270555", "0.7117843", "0.7111337", "0.70944214", "0.70904994", "0.7083297", "0.7081912", "0.7078915", "0.7071849", "0.7052648", "0.7041861", "0.7017587", "0.70137113", "0.70077336", "0.69943416", "0.6992216", "0.69782406", "0.6972213", "0.6969534", "0.6962217", "0.6926743", "0.6916444", "0.6912791", "0.69082594", "0.6872137", "0.6860314", "0.6850308", "0.68483406", "0.68328035", "0.6814589", "0.6799683", "0.6790857", "0.6787297", "0.6787297", "0.67782027", "0.67755646", "0.6766743", "0.67663515", "0.67570513", "0.6755727", "0.67550963", "0.6754369", "0.6754308", "0.67517895", "0.67492807", "0.6745145", "0.6742661", "0.6742093", "0.6741645", "0.6735836", "0.6735836", "0.6735836", "0.67247576", "0.67166746", "0.67001265", "0.6699592", "0.6698499", "0.6680314", "0.6673675", "0.6672623" ]
0.7914246
3
Display the Contact page.
public function processcontact() { $input = Request::all(); return $input; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showContact() {\n $output = $this->outputBoilerplate('contact.html');\n return $output;\n }", "public function actionContact()\n {\n $this->render('contact');\n }", "public function contactAction()\n {\n $this->view->render('Contact Us');\n }", "public function contact()\n\t{\n\t\treturn view('pages.contact');\n\t}", "public function showContactPage()\n {\n return view('pages.contact');\n }", "public function showContact()\n {\n return view('front.pages.contact');\n }", "public function contact()\n\t{\n\t\t$data ['footer'] = $this->page_model->getfooter();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('home/about/head_about');\n\t\t$this->load->view('home/about/contact', $data);\n\t\t$this->load->view('templates/footer', $data);\n\t}", "public function contact() {\n $this->getView('navigation', array('pagename' => 'Contact'));\n $random = substr(md5(rand()), 0, 7);\n $this->getView('contact',array('cap' => $random));\n }", "public function contact()\n {\n // which contain router class an applied renderView method\n return $this->render('contact');\n }", "public function contact()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('contact');\n\n return $this->loadPublicView('user.contact', $breadCrumb['data']);\n }", "public function contact()\n\t{\n\t\treturn View::make('contact.contact');\n\t}", "public function contact()\n {\n return view('pages.contact');\n }", "public function index()\n\t{\n\n\t\t$this->view('guest/contact-us');\n\t}", "public function index()\n\t{\n $this->data[ 'menubar' ] = build_menu_bar( $this->choices, 'contact' );\n $this->data[ 'pagebody' ] = 'contact';\n $this->render();\n\t}", "public function display() {\n\t\techo '<iframe src=\"http://norulesweb.com/contact/\" width=\"800\" height=\"400\"></iframe>';\n\t}", "public function contact()\n {\n return view('templates.them8.contact');\n }", "public function actionContact()\n {\n $model = new ContactForm();\n if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {\n Yii::$app->session->setFlash('contactFormSubmitted');\n\n return $this->refresh();\n }\n\n return $this->render('contact', compact('model'));\n }", "public function action_index()\n\t{\n\t\t$this->template->content = View::factory('contact/index');\n\t}", "public function index(){\n Auth::checkAdminLogin();\n\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Contact', 'Contact');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = 'Contact Index';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Contact Us';\n\t\t// Set Page Sub Section\n\t\t$this->_view->pageSubSection = 'Contact Us';\n\n\t\t###### PAGINATION ######\n //sanitise or set keywords to false\n if(isset($_GET['keywords']) && !empty($_GET['keywords'])){\n $_GET['keywords'] = FormInput::checkKeywords($_GET['keywords']);\n }else{\n $_GET['keywords'] = false;\n }\n\n $totalItems = $this->_model->countAllData($_GET['keywords']);\n $pages = new Pagination(20,'keywords='.$_GET['keywords'].'&page', $totalItems[0]['total']);\n $this->_view->getAllData = $this->_model->getAllData($pages->get_limit(), $_GET['keywords']);\n $this->_view->countData = $this->_model->countAllData();\n\n\t\t// Create the pagination nav menu\n\t\t$this->_view->page_links = $pages->page_links();\n\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('contact-us/index', 'layout', 'backoffice');\n\t}", "public function contact()\n {\n return View::make('All.contact');\n }", "public function index()\n\t{\n\t\t$this->template->build('addressbook/contact_listing');\t\n\t}", "public function contactUs()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Contact Us')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/contact_us');\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact)\n {\n //\n }", "public function show(Contact $contact) {\n //\n }", "private function displayForm()\n {\n // Preparation des paramètres du mail.\n $data['headerTitle'] = 'Contact';\n $data['headerDescription'] = 'Page de contact';\n $data['title'] = 'Contact';\n\n // Affichage du formulaire.\n $this->load->view('templates/header', $data);\n $this->load->view('templates/alert', $data);\n $this->load->view('contact/index', $data);\n $this->load->view('templates/footer', $data);\n }", "public function contact()\n {\n return view('home.contact');\n }", "public function contact()\n {\n return view('about.contact');\n }", "public function getContact() \n\t{\n\t\treturn View::make('contact');\n\t}", "public function home() {\r\n $perpage = 10;\r\n $page = $this->api->getParam('page', '1');\r\n $pagination = new Pagination($page, $perpage);\r\n $result = $this->model->apply($pagination);\r\n $this->api->loadView('contact', array(\r\n 'rows' => $result,\r\n 'pagination' => $pagination,\r\n 'link' => $this->api->getApplicationUrl() . 'contact/home'\r\n ));\r\n }", "public function contact() {\r\n $this->load->view('font_end/includes/header', $this->data);\r\n $this->load->view('font_end/contact');\r\n $this->load->view('font_end/includes/footer');\r\n }", "public function getContact(){\n\t\treturn view('pages.contact'); #or pages/contact\n\t}", "public function contact()\n {\n return view('contact');\n }", "public function contact()\n {\n return view('contact');\n }", "public function contact()\n\t{\n\t\t$maincategorys = Maincategory::all(); \t\n\t\t\t\n\t\treturn view('pages.contact')->with('maincategorys', $maincategorys);\n\t\t\n\t}", "public function contact()\n {\n $contact_active = true;\n\n $cities = $this->city_services->all();\n\n return view('client.contact', compact('contact_active', 'cities'));\n }", "public function index()\n\t{\n\t\t return \\View::make('contacto/contact');\n\t}", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array(\n\t\t\t'model' => $model));\n\t}", "function print_contact(){\n $contact = new ContactView();\n $contact->print_contact();\n }", "public function actionContact()\n\t{\n\t\t$contact=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$contact->attributes=$_POST['ContactForm'];\n\t\t\tif($contact->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$contact->email}\\r\\nReply-To: {$contact->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$contact->subject,$contact->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('contact'=>$contact));\n\t}", "public function actionContact() {\n //echo Helper::yiiparam('adminEmail');\n $this->layout = 'pagination_layout';\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->first_name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-type: text/plain; charset=UTF-8\";\n\n mail(Helper::yiiparam('adminEmail'), $subject, $model->message, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function index()\r\r\n\t{\r\r\n\t\t$this->load->view('contact_view');\r\r\n\t}", "public function getContact()\n\t{\n\t\treturn view('contact');\n\t}", "public function actionContact() {\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n\n $success = Emails::sendToAdmin_ContactForm($model->name, $model->email, $model->subject, $model->body);\n\n Emails::sendToPerson_ContactFormConfirmation($model->name, $model->email);\n\n Yii::app()->user->setFlash('contact', Yii::t('texts', 'FLASH_THANK_YOU_FOR_CONTACTING_US'));\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function index()\n {\n return view('easy-forms::contact');\n }", "public function getContact()\n {\n return \\View::make(\"ishu.contact\");\n }", "public function contact()\n {\n $contact = Markdown::convertToHtml(SiteSetting::get('contact'));\n return view('home.contact', compact('contact'));\n }", "public function index() {\n\t\t$data['social_media'] = $this->social_media_model->get_six();\n\t\t$this->render('public/contact/index',$data);\n\t}", "public function show()\n {\n return view('ContactUs');\n }", "public function contact_us()\n {\n return view('pages.frontsite.contact_us');\n }", "public function contact(){\n return view('frontend.contact');\n \t\n }", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function indexAction() {\n $contact = new Application_Model_Contact();\n\n // Check whether contact form submitted and is valid\n if($this->_request->isPost() && $contact->getForm()->isValid($this->_request->getParams())) {\n // Retrieve parameters from request and pass back to form to filter only form values\n $contact->getForm()->populate($this->_request->getParams());\n $contact->populate();\n\n // Save and send contact message\n $isSent = $contact->save()->send();\n\n if($isSent) {\n $this->_flashMessenger->addMessage('Thank you for contacting us. Your message has been sent.');\n $contact->getForm()->reset();\n\n } else {\n $this->_flashMessenger->addMessage('An error occurred and your message could not be sent. Please try again.');\n }\n\n $this->_helper->redirector('index');\n }\n \n // Pass variables to view\n $this->view->contact = $contact;\n }", "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'administrateur\n\t\tProfil_fields_forum::form(PROFIL_FIELDS_CONTACT, 'contact', Fsb::$session->id());\n\t}", "public function getEfficientcontact()\n {\n return view('contactpage');\n }", "public function contact()\n {\n // Check login authentication\n $loginUser = \"\";\n if (Auth::check()) {\n $loginUser = Auth::user();\n }\n\n return view('contact.contact', ['loginUser' => $loginUser]);\n }", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tMailWrapper::sendMailTemplate(\"contactus\", $model, $model->subject, \"[email protected]\");\n\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function contact()\n {\n if ($this->issetPostSperglobal('name') && $this->issetPostSperglobal('email') && $this->issetPostSperglobal('message')) {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if (empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $ReCaptcha = new ReCaptcha($this->getPostSuperglobal('recaptcha_response'));\n $method = __FUNCTION__;\n $this->session->read('Mail')->$method($this->getPostSuperglobal('name'), $this->getPostSuperglobal('email'), $this->getPostSuperglobal('message'));\n $this->session->writeFlash('success', \"Votre message a été envoyé avec succès.\");\n $this->redirect('contact');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $this->render('contact', ['head'=>['title'=>'Contact', 'meta_description'=>''], 'page'=>'contact', '_post'=>isset($_post) ? $_post : '']);\n }", "public function show()\n {\n $contact = new Contact([\n 'name' => 'Benedikt Poller',\n 'email' => '[email protected]'\n ]);\n $contact->save();\n\n\n SendEmailJob::dispatch((object) [\n 'subject' => 'foo'\n ])\n ->delay(now()->addSeconds(10));\n\n return view('welcome');\n }", "public function index()\n {\n return view('contact::index');\n }", "public function actionContact()\n\t{\n\t\t$this->layout ='column2';\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function index()\n {\n //\n return view('home.contact');\n }", "public function contact() {\n $this->code_image();\n if (DB::table('generalsettings')->find(1)->is_contact == 0) {\n return redirect()->back();\n }\n $ps = DB::table('pagesettings')->where('id', '=', 1)->first();\n return view('front.contact', compact('ps'));\n }", "public function actionContact()\n\t{\n\t\t$model['form'] = new ContactForm();\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model['form']->attributes = $_POST['ContactForm'];\n\t\t\tif ($model['form']->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model['form']->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model['form']->subject) . '?=';\n\t\t\t\t$headers = \"From: $name <{$model['form']->email}>\\r\\n\" .\n\t\t\t\t\t\"Reply-To: {$model['form']->email}\\r\\n\" .\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t'Content-Type: text/plain; charset=UTF-8';\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $subject, $model['form']->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', Yii::t('app', 'Thank you for contacting us. We will respond to you as soon as possible.'));\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function getContact()\n {\n return view('frontend.info.contact');\n }", "public function contact_us()\n {\n $navbar = NavBar::first();\n return view('pages.home.contact-us' , compact('navbar'));\n }", "function horizon_contact_section() {\n\t\tget_template_part('inc/partials/homepage', 'contact');\n\t}", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\t\n\t\t$this->performAjaxValidation($model, 'contact-form');\n\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us! We will get back to you as soon as possible!!');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function getContact() {\n\t\tif(Auth::check()) {\n\t\t\tLog::info(Auth::user()->username . \" (\" . Auth::user()->id . \") accessed :: Contact\");\n\t\t}else{\n\t\t\tLog::info(getClientIP() . \" accessed :: Contact\");\n\t\t}\n\n\t\treturn view ('contact');\n\t}", "public function index()\n {\n $data['page'] = $this->getPage();\n return view('contacts::index')->with($data);\n }", "public function ftvchContactsAction()\n {\n $ftvcontacts=new Ep_Ftv_FtvContacts();\n $details= $ftvcontacts->getFtvContacts('chaine');\n if($details != 'NO')\n $this->_view->ftvcontactsdetails=$details;\n $this->render('ftv_ftvcontacts');\n }", "public function action_index(){\n\n\t\t$view = View::forge('contact/form');\n\n\t\tif (Input::method() == 'POST'){\n\t\t\tif (Input::post('name') and Input::post('email') and Input::post('message')){\n\t\t\t\ttry{\n\t\t\t\t\tEmail::forge()\n\t\t\t\t\t ->to('[email protected]')\n\t\t\t\t\t ->from(Input::post('email'), Input::post('name'))\n\t\t\t\t\t ->subject('TuneGenius Contact Form')\n\t\t\t\t\t ->body(Input::post('message'))\n\t\t\t\t\t ->send();\n\n\t\t\t\t\tResponse::redirect('contact/sent');\n\t\t\t\t}\n\t\t\t\tcatch (EmailSendingFailedException $e){\n\t\t\t\t\t$view->error = 'Your email did not send, please try again.';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//if not all fields are filled out puts up error and empties fields\n\t\t\telse{\n\t\t\t\t$view->error = 'Please fill in all fields';\n\t\t\t}\n\t\t}\n\t\t$this->template->title = 'Contact us';\n\t\t$this->template->content = $view;\n\t}", "public function index()\n {\n return view('front.contactus');\n }", "public function indexAction() {\n\n //DON'T RENDER IF SUNJECT IS NOT THERE\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n //GET SITEPAGE SUBJECT\n $this->view->sitepage = $sitepage = Engine_Api::_()->core()->getSubject('sitepage_page');\n\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'contact');\n if (empty($isManageAdmin)) {\n return $this->setNoRender();\n }\n\n\t\t$this->view->can_edit = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'edit');\n \n if(empty($sitepage->phone) && empty($sitepage->email) && empty($sitepage->website) && !$this->view->can_edit) {\n return $this->setNoRender();\n }\n\n\t\t//GET SETTINGS\n\t\t$pre_field = array(\"0\" => \"1\", \"1\" => \"2\", \"2\" => \"3\");\n\t\t$contacts = $this->_getParam('contacts', $pre_field);\n\t\t$this->view->emailme = $this->_getParam('emailme', 0);\n\n\t\tif(empty($contacts)) {\n\t\t\t$this->setNoRender();\n\t\t}\n\t\telse {\n\t\t\t//INITIALIZATION\n\t\t\t$this->view->show_phone = $this->view->show_email = $this->view->show_website = 0;\n\t\t\tif(in_array(1, $contacts)) {\n\t\t\t\t$this->view->show_phone = 1;\n\t\t\t}\n\t\t\tif(in_array(2, $contacts)) {\n\t\t\t\t$this->view->show_email = 1;\n\t\t\t}\n\t\t\tif(in_array(3, $contacts)) {\n\t\t\t\t$this->view->show_website = 1;\n\t\t\t}\n\t\t}\n\n\t\t$user = Engine_Api::_()->user()->getUser($sitepage->owner_id);\n\t\t$view_options = (array) Engine_Api::_()->authorization()->getAdapter('levels')->getAllowed('sitepage_page', $user, 'contact_detail');\n\t\t$availableLabels = array('phone' => 'Phone', 'website' => 'Website', 'email' => 'Email');\n\t\t$this->view->options_create = array_intersect_key($availableLabels, array_flip($view_options));\n }", "public function index()\n {\n $this->global['pageTitle'] = 'Manage Contacts';\n }", "public function index(){ return $this->returnData($this->contactPage,\"contact us page description\");\n }", "public function index()\n\t{\n\t\treturn View::make(\"contactos.index\");\n\t}", "public function index()\n {\n $contacts = ContactData::get();\n $map = GlobalSettings::googleMapsUrl();\n\n return view('contact.index', compact('contacts', 'map'));\n }", "public function contact_us()\n {\n //\n return view('contactus');\n }", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function getContact()\n {\n return view('contact');\n }", "public function index()\n\t{\n\t\tif (!$this->commons->hasPermission('contacts')) {\n\t\t\tNot_foundController::show('403');\n\t\t\texit();\n\t\t}\n\n\t\t/*Get User name and role*/\n\t\t$data = $this->commons->getUser();\n\t\t/**\n\t\t * Get all User data from DB using User model \n\t\t **/\n\t\tif ($id = $this->commons->checkUser()) {\n\t\t\t$data['admin'] = false;\n\t\t\t$data['result'] = $this->contactModel->getContacts($id);\n\t\t} else {\n\t\t\t$data['admin'] = true;\n\t\t\t$data['result'] = $this->contactModel->getContacts();\n\t\t}\n\n\t\t/*Load Language File*/\n\t\trequire DIR_BUILDER . 'language/' . $data['info']['language'] . '/common.php';\n\t\t$data['lang']['common'] = $lang;\n\t\trequire DIR_BUILDER . 'language/' . $data['info']['language'] . '/contact.php';\n\t\t$data['lang']['contact'] = $contact;\n\n\t\t/* Set confirmation message if page submitted before */\n\t\tif (isset($this->session->data['message'])) {\n\t\t\t$data['message'] = $this->session->data['message'];\n\t\t\tunset($this->session->data['message']);\n\t\t}\n\t\t/* Set page title */\n\t\t$data['page_title'] = $data['lang']['common']['text_contacts'];\n\n\t\t/*Render User list view*/\n\t\t$this->view->render('contact/contact_list.tpl', $data);\n\t}", "public function index()\n {\n return view('contact.index');\n }", "public function index()\n {\n $contact = Contact::all();\n defaultLog(Contact::class);\n return view('backEnd.admin.contact.index', compact('contact'));\n }", "public function showAction(Tx_Addresses_Domain_Model_Contact $contact) {\n\t\t// Transform show settings to shorter variable\n\t\t$this->showSettings = $this->settings['controllers']['Contact']['actions']['show'];\n\t\t\n\t\tif($this->showSettings['stylesheet'] != '') {\n\n\t\t\t// \"EXT:\" shortcut replaced with the extension path\n\t\t\t$this->showSettings['stylesheet'] = str_replace('EXT:', t3lib_extMgm::siteRelPath('addresses'), $this->showSettings['stylesheet']);\n\n\t\t\t// Stylesheet\n\t\t\t $GLOBALS['TSFE']->getPageRenderer()->addCssFile($this->showSettings['stylesheet']);\n\t\t}\n\t\t\n\t\t$this->view->assign('address', $contact);\n\t}", "public function contactForm()\n {\n return view('web.contact');\n }", "public function index()\n {\n $contactList = Contact::all()->load('company');\n\n return view('CustomerCenter.Contact.index', compact('contactList'));\n }", "public function index()\n {\n $title = \\MessageContact::TITLE_INDEX;\n $listConfig = $this->processDataConfig();\n return view('test.contact', compact('title', 'listConfig'));\n }" ]
[ "0.82743555", "0.8200653", "0.8096386", "0.7912391", "0.7906141", "0.78784376", "0.7776742", "0.7776443", "0.7714078", "0.7683283", "0.7558275", "0.7488467", "0.7484447", "0.7479309", "0.74043304", "0.7308526", "0.7298254", "0.7281708", "0.72815204", "0.72708964", "0.7262591", "0.72446764", "0.723912", "0.723912", "0.723912", "0.723912", "0.723912", "0.723912", "0.723912", "0.723912", "0.723912", "0.723912", "0.7233057", "0.72312224", "0.7225982", "0.7220516", "0.716943", "0.71660054", "0.7159472", "0.7136402", "0.7125392", "0.7125392", "0.71169674", "0.7110678", "0.7093852", "0.70880765", "0.708319", "0.7079464", "0.7076623", "0.70711565", "0.7051051", "0.7039691", "0.7016275", "0.7012093", "0.7005892", "0.69951135", "0.6991489", "0.69763535", "0.6970406", "0.69674456", "0.6961172", "0.69239366", "0.6914957", "0.69115317", "0.6905945", "0.68696475", "0.6857833", "0.6851039", "0.6848021", "0.6830192", "0.68137515", "0.6798173", "0.6788566", "0.67846775", "0.67846775", "0.6776725", "0.6774777", "0.6765336", "0.67637205", "0.6755894", "0.67556477", "0.6754819", "0.6754294", "0.67535883", "0.6752409", "0.67504287", "0.6744975", "0.67430824", "0.6741371", "0.6740222", "0.67332345", "0.67332345", "0.67332345", "0.6723192", "0.6717119", "0.66989136", "0.6698545", "0.66984963", "0.6678054", "0.66733843", "0.6673293" ]
0.0
-1
Display the Admin page.
public function admin() { if (Auth::user()) { $user = Auth::user(); if ($user['user_type'] === 0) { return view('pages.admin'); } else { return redirect('home'); } } else { return view('auth.login'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show_admin_page() {\n\t\t$this->view->render();\n\t}", "public function admin_page()\n {\n echo $this->return_admin_page();\n }", "public function admin()\n {\n $this->template_admin->displayad('admin');\n }", "function admin()\n{\n global $app;\n\n $app->render('admin.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 1),\n 'isadmin' => is_admin()]);\n}", "public function displayAdminPanel() {}", "public function admin_page() {\n echo $this->generateView('main', []);\n }", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "public function adminPanel() {\n $posts = $this->postManager->getPosts();\n $comments = $this->commentManager->getFlaggedComments();\n $view = new View(\"Administration\");\n $view->generate(array('posts' => $posts, 'comments' => $comments));\n }", "public function actionAdmin()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->layout = 'admin';\n\n\t\t$this->render('admin');\n\t}", "function printAdminPage() {\n require ('adminPage.php');\n adminPage($this);\n }", "public function admin()\n {\n return $this->render('admin.twig');\n }", "public function admin_page()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n echo $this->return_admin_page();\n }", "public function showAdmin() {\n\n\t\tif(!isset($_SESSION)) \n\t\t{ \n\t\t\tsession_start(); \n\t\t} \n\t\tif(isset($_SESSION['nickname']))\n\t\t{\n\n\t\t\t$user_manager = new UserManager();\n\t\t\t$session_user = $user_manager->get($_SESSION['nickname']);\n\t\t\t$session_user_role = $session_user->role();\n\t\t\t// You're an admin\n\t\t\tif ($session_user_role === 'admin') {\n\n\t\t\t\t$comments = array();\n\n\t\t\t\t$comment_manager = new CommentManager();\n\t\t\t\t$post_manager = new PostManager();\n\n\t\t\t\t$posts = $post_manager->getList();\n\t\t\t\t$users = $user_manager->getList();\n\n\t\t\t\t$myView = new View('admin');\n\t\t\t\t$myView->render(array(\n\n\t\t\t\t\t'posts' \t\t\t=> $posts, \n\t\t\t\t\t'post_manager' \t\t=> $post_manager, \n\t\t\t\t\t'comment_manager' \t=> $comment_manager,\n\t\t\t\t\t'users'\t\t\t\t=> $users,\n\t\t\t\t\t'comments'\t\t\t=> $comments,\n\t\t\t\t));\n\t\t\t}else { // You're not an admin\n\t\t\t\t\t\techo \"PAS ADMINISTRATEUR\";\n\t\t\t\theader('Location: '.HOST.'home.html');\n\t\t\t}\n\n\t\t}else { // You're not connected\n\t\t\theader('Location: '.HOST.'home.html');\n\t\t}\n\t}", "public function admin()\n {\n $this->view->books = $this->help->getBookList();\n $this->view->title = $this->lang->help->common;\n $this->display();\n }", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "public function index()\n\t{\n\t\tView::render('admin');\n\t}", "public function showAdminAction()\n {\n return $this->twig->render('admin/admin.html.twig');\n }", "public static function adminPage(){\n\t\tif(!self::isAdmin()){\n\t\t\theader(\"Location: index.php\");\n\t\t\texit;\n\t\t}\n\t}", "public function render_admin_page () {\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) wp_die(\"Nope.\");\n\n\t\tif (!class_exists('Thx_Sanitize')) require_once (dirname(__FILE__) . '/class_thx_sanitize.php');\n\t\tif (!class_exists('Thx_Template')) require_once (dirname(__FILE__) . '/class_thx_template.php');\n\n\t\tload_template(Thx_Template::plugin()->path('create_edit'));\n\t}", "public function admin(){\n $data = array('page_title' => \"Admin home\");\n $this->view->load_admin('home/admin/admin_view', $data);\n }", "public function render_admin_page() {\n $option_name = $this->name; \n include_once( dirname( __FILE__ ) . '/views/admin-page.php' );\n }", "public function showAdmin() {\n\t\t// we've already done authorization to even show this link,\n\t\t// but let's double check our authorization before redirecting here too\n\t\treturn View::make('admin.index');\n\t}", "public function actionAdministration()\n\t{\n\t $this->render('index');\n\t}", "public function display_plugin_admin_page() {\n\t\t\tinclude_once( 'views/settings-page.php' );\n\t\t}", "public function renderAdminPage()\n {\n if (!current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n\n // Our Vite app register itself to this element\n // and let it take care of the rest\n echo '<div id=\"windsor\"></div>';\n }", "public function admin() {\n\n\t\t\tif ( ! is_admin() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trequire_once $this->includes_path() . 'admin/class-cyprus-admin.php';\n\t\t}", "public function admin()\n {\n if ($this->loggedIn()) {\n $data['flights'] = $this->modalPage->getFlights();\n $data['name'] = $_SESSION['user_name'];\n $data['title'] = 'dashboard ' . $_SESSION['user_name'];\n $this->view(\"dashboard/\" . $_SESSION['user_role'], $data);\n\n } else {\n redirect('users/login');\n }\n\n }", "public function showAdminHeader() {\n\n\t\techo $this->getAdminHeader();\n\t}", "public function actionAdmin() {\n\t\ttry {\n\t\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.structure.controllers');\n\t\t\t$this->setCurrentNode($this->currentContent->node);\n\t\t\t$content = new FormContent();\n\t\t\t$content->targetContentId = $this->currentContent->contentId;\n\t\t\t$content->selected = false;\n\n\t\t\t$contentCriteriaBuilder = new CriteriaBuilder('content');\n\t\t\t$contentCriteriaBuilder->filterBy('contentId', $this->currentContent->contentId);\n\n\t\t\t$this->render('admin', array(\n\t\t\t\t'breadcrumb' => $this->buildBreadcrumb($this->currentContent->contentId),\n\t\t\t\t'mainMenu' => $this->buildMainMenu(2, 4),\n\t\t\t\t'content'=>$content,\n\t\t\t\t'sourceContent'=>$this->currentContent,\n\t\t\t\t'node' => $this->currentNode,\n\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false))\n\t\t\t));\n\t\t} catch(\\Exception $e) {\n\t\t\t\\Yii::log('Error in '.__METHOD__.'():'.$e->getMessage(), \\CLogger::LEVEL_ERROR, 'sweelix.yii1.admin.structure.controllers');\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function display_plugin_admin_page() {\n include_once( plugin_dir_path(__FILE__) . 'partials/admin.php' );\n }", "public function admin_index() {\n\n\t\t\t/*get all data from table \"modules\"*/\n\t\t\t$modules=$this->Module->find(\"all\");\n\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Gestion\");\n\t\t\t$this->set(\"legend\", \"Modules manager\");\n\t\t\t$this->set(\"modules\", $modules);\n\t\t\t}", "static function adminMenuPage()\n {\n // Include the view for this menu page.\n include PROJECTEN_PLUGIN_ADMIN_VIEWS_DIR . '/admin_main.php';\n }", "public function admin() {\r\n $Conductor = new Conductor($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allCon = $Conductor->getAllUsers();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"Conductor/admin\", array(\"allCon\" => $allCon));\r\n \r\n }", "public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "public function actionAdmin()\n\t{ \n\t\t$this->render('review_admin');\n\t}", "function bit_admin_page() {\n\t//Creates admin page\n}", "public function render_admin() {\n\t\t$route_id = !empty( $_GET[ 'route' ] ) ? sanitize_text_field( $_GET[ 'route' ] ) : false;\n\t\t?>\n\t\t\t<main class=\"wrap\">\n\t\t\t\t<h1><?= $this->title; ?></h1>\n\t\t\t\t<hr>\n\t\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tif ( $route_id ) {\n\t\t\t\t\t\t\tinclude 'views/route.php';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinclude 'views/dashboard.php';\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</form>\n\t\t\t</main>\n\t\t<?php\n\t}", "public function admin() {\r\n $ruta = new Ruta($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allrut = $ruta->getAll();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"Ruta/admin\", array(\"allrut\" => $allrut));\r\n \r\n }", "public function admin_menu(): void {\n\t\tif ( is_plugin_active_for_network( plugin_basename( WP_SENTRY_PLUGIN_FILE ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_management_page(\n\t\t\t'WP Sentry test',\n\t\t\t'WP Sentry test',\n\t\t\t'activate_plugins',\n\t\t\tself::ADMIN_PAGE_SLUG,\n\t\t\t[ $this, 'render_admin_page' ]\n\t\t);\n\t}", "public function admin()\n {\n return view('admin');\n }", "public function config_page() {\n\t\trequire HS_DOCS_API_DIR_PATH . 'admin/views/admin-page.php';\n\t}", "public function adminAction()\n {\n $contact = new ContactManager();\n $coordonnees = $contact->getContact();\n return $this->twig->render('admin/admin.html.twig', array(\n \"coordonnees\" => $coordonnees));\n }", "public function load_admin_page()\n {\n include 'admin-page.html';\n }", "public function page() {\n\t\t$this->page = $this->plugin->factory->adminPage;\n\t\t$this->page->show();\n\t}", "public function displayAdmin() {\r\n\tif (is_file('modules/' . $this->name . '/admin/index.php')) {\r\n\t ob_start();\r\n\t require('modules/' . $this->name . '/admin/index.php');\r\n\t return ob_get_clean();\r\n\t} else {\r\n\t return FALSE;\r\n\t}\r\n }", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-settings-page.php';\n }", "function admin_page() {\n\t\t$this->maybe_authorize();\n?>\n\t\t<div class=\"wrap ghupdate-admin\">\n\n\t\t\t<div class=\"head-wrap\">\n\t\t\t\t<?php screen_icon( 'plugins' ); ?>\n\t\t\t\t<h2><?php _e( 'Setup GitHub Updates' , 'github_plugin_updater' ); ?></h2>\n\t\t\t</div>\n\n\t\t\t<div class=\"postbox-container primary\">\n\t\t\t\t<form method=\"post\" id=\"ghupdate\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\tsettings_errors();\n\t\tsettings_fields( 'ghupdate' ); // includes nonce\n\t\tdo_settings_sections( 'github-updater' );\n?>\n\t\t\t\t</form>\n\t\t\t</div>\n\n\t\t</div>\n\t\t<?php\n\t}", "public function settingsPage()\n {\n include 'views/admin.php';\n }", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Error.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Error::error($error);\n return;\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "public function index()\n {\n $menu = $this->getMenuItems();\n $user = $this->getService('session')->user;\n\n return $this->render('Admin/index.twig', compact('menu', 'user'));\n }", "public function adminindex() {\n $current_page = 'Admin';\n $content = \"<div class='alert alert-success'>The content of Admin Section</div>\";\n \n \n $menu = $this->buildmenu();//building a dynamic menu\n return view('pages.admin')->with('current_page', $current_page)\n ->with('page_content', $content)\n ->with('pages', $menu);\n }", "public static function admin()\n {\n HRHarvardTheme::get_template_part( 'admin', 'nav-widget' );\n }", "public function index()\n\t{\n\t\t$this->load->view(\"admin_view\");\n\t}", "public function action_index()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\t// Make sure the administrator has a valid session...\n\t\tvalidateSession();\n\n\t\t// Load the language and templates....\n\t\tTxt::load('Admin');\n\t\ttheme()->getTemplates()->load('Admin');\n\t\tloadCSSFile('admin.css');\n\t\tloadJavascriptFile('admin.js', array(), 'admin_script');\n\n\t\t// The Admin functions require Jquery UI ....\n\t\t$modSettings['jquery_include_ui'] = true;\n\n\t\t// No indexing evil stuff.\n\t\t$context['robot_no_index'] = true;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\n\t\t// Actually create the menu!\n\t\t$admin_include_data = $this->loadMenu();\n\t\t$this->buildLinktree($admin_include_data);\n\n\t\tcallMenu($admin_include_data);\n\t}", "public function showAdminAction()\n {\n header (\"location: admin.php?route=adminAccueil\");\n }", "public function admin()\n {\n return view('admin.main',[\n \"components\" => $this->getAdminThemeComponets(),\n \"modules\" => $this->getAdminThemeComponetsModules(),\n \"user\" => $this->getUserData()\n ]); \n }", "function mmf_admin() {\n\t\tinclude('mmf_admin_page.php');\n\t}", "public function administrator(){\n\t\t$this->verify();\n\t\t$data['title']=\"Administrator\";\n\t\t$data['admin_list']=$this->admin_model->fetch_admin();\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('administrator/administrator', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}", "public function index()\n\t{\n\t\treturn view('admin/admin/admin')\n\t\t\t->with('title', 'Manage');\n\t}", "public function index()\n\t{\n\t\t$this->template\n\t\t\t->title('')\n\t\t\t->build('admin/index');\n\t}", "public function administration() {\n\t\t$success = ( isset( $_SESSION['success'] ) ? $_SESSION['success'] : null );\n\t\t$error = ( isset( $_SESSION['error'] ) ? $_SESSION['error'] : null );\n\t\t$login = ( isset( $_SESSION['login'] ) ? $_SESSION['login'] : null );\n\t\t$myView = new View( 'administration' );\n\t\t$myView->renderView( array( 'success' => $success, 'error' => $error, 'login' => $login ) );\n\t}", "public function index() {\n return $this->view->render(\n 'admin/main.html.twig', [\n 'options' => $this->manager->all()\n ]\n );\n }", "public function displayAdminPage() {\n\t\t if(!isset($_SESSION['userID'])) {\n\t\t \t//redirect\n\t\t \theader('Location:index.php?page=home');\n\t\t }\t\n\t\t if(!isset($_POST['logout'])) {\n\t\t\t$html = '<h2 class=\"redhead\">' . $_SESSION['firstName'] .' Page <br/> Welcome to your Account!</h2>';\t\n\n\t\t\treturn $html;\t\t \t\t\t\t\t\n\t\t} else {\n\t\t\t\t$this -> model -> processLogout();\t\t\t\t\t\n\t\t\t\theader('Location:index.php?page=login');\n\t\t}\n\t}", "public function render_graphiql_admin_page()\n {\n }", "public function adminAction()\n {\n //$this->cryptCollabs();\n return $this->render('PPEGSBBundle:Default:admin.html.twig');\n }", "public function index()\n {\n return 'Wellcome! This is master admin panel.';\n }", "public function admin()\n\n {\n\n return view('admin');\n }", "public function index()\n {\n $number_of_items = $this->calculate->getTotalOfItemsAdmin();\n if (null != $this->request->ifParameter(\"id\")) {\n $items_current_page = $this->request->getParameter(\"id\");\n } else {\n $items_current_page = 1;\n }\n $items = $this->item->getItemsForAdmin($items_current_page);\n $page_previous_items = $items_current_page - 1;\n $page_next_items = $items_current_page + 1;\n $number_of_items_pages = $this->calculate->getNumberOfPagesOfExtAdmin();\n $this->generateadminView(array(\n 'items' => $items,\n 'number_of_items' => $number_of_items,\n 'items_current_page' => $items_current_page,\n 'page_previous_items' => $page_previous_items,\n 'page_next_items' => $page_next_items,\n 'number_of_items_pages' => $number_of_items_pages\n ));\n }", "public function view_admin() {\n\t\t$this->layout = 'admin';\n\t\t$params = array('order' => 'Group.id DESC');\n\t\t$this->set('groups', $this->Group->find('all', $params));\n\t}", "public function render()\n {\n $sondages = $this->model->getSondages();\n $questions = $this->model->getQuestions();\n $reponses = $this->model->getReponses();\n\n require ROOT . \"/App/view/admin/admin.php\";\n }", "public function action_index()\n\t{\n\t\tif ( ! Auth::instance()->logged_in('admin'))\n\t\t\tthrow new HTTP_Exception_403();\n\t\t\n\t\t// show admin page\n\t\t$companies = ORM::factory('company')->find_all();\n\t\t$this->template->content = View::factory('admin/admin')->bind('companies', $companies);\n\t\t\n\t}", "public function register_admin_page()\n {\n }", "public function indexAdminAction(){\n $this->denyAccessUnlessGranted('ROLE_ADMIN', 'Vous n\\'avez pas accès à cette page' );\n return $this->render('LSIMarketBundle:admin:index.html.twig');\n }", "public function index()\n {\n return view('advancedban::admin.index');\n }", "public function showAdminHomepageAction()\n {\n $homepageManager = new HomepageManager();\n $homepage = $homepageManager->getAllHomepage();\n return $this->twig->render('admin/adminhomepage.html.twig', array(\n 'homepage' => $homepage\n ));\n }", "public function ViewAdmin()\n {\n $admins = Admin::all();\n return view('backend.pages.admin.view-admin')->with('admins', $admins);\n }", "public function indexAction()\n {\n $this->tag->setTitle(__('Admin panel'));\n $this->siteDesc = __('Admin panel');\n }", "public function indexAdmin()\n {\n $nodos = $this->mdlnodo->consultarnodos();\n require APP . 'view/_templates/headeradminodos.php';\n require APP . 'view/proyecto/admin/index.php';\n\t\t require APP . 'view/_footer/footeradminnodos.php';\n }", "public function index() {\n\t\t$this->load->view('admin/admin1.php');\n\t}", "public function showAdmins() { \n\t\n return View('admin.admins');\n\t\t\t\n }", "public function index()\n\t{\n\t\t$this->load->view('admin/index');\n\t}", "public function actionAdmin(): string\n {\n return $this->render('admin', [\n 'search' => $searchModel = new LabelSearch,\n 'data' => $searchModel->search(request()->queryParams),\n ]);\n }", "public function index(){\n\t\t$this->Layout('Management');\n\t\t\n\t}", "public function adminIndexAction()\r\n {\r\n $pages=$this->getDoctrine()->getRepository(\"AppBundle:Page\")->findAll();\r\n $view=array('pages' => $pages,\r\n );\r\n return $this->render('page/adminIndex.html.twig', $view);\r\n }", "public function indexAction()\r\n {\r\n echo 'User admin index';\r\n }", "function load_sailthru_admin_display() {\n\n\t\t$active_tab = empty( $this->views[ current_filter() ] ) ? '' : $this->views[ current_filter() ];\n\t\t// display html\n\t\tinclude SAILTHRU_PLUGIN_PATH . 'views/admin.php';\n\n\t}", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "public static function display()\n {\n $page = self::getCurrentPage();\n\n template::serveTemplate('header');\n\n if (session::has('user') === FALSE) {\n user::setLoginUrl('~url::adminurl~');\n if (session::has('viewPage') === FALSE) {\n session::set('viewPage', $page);\n }\n user::process();\n return;\n }\n\n if (session::has('viewPage') === TRUE) {\n $page = session::get('viewPage');\n session::remove('viewPage');\n }\n\n /**\n * Set the default page title to nothing.\n * This is used for including extra information (eg the post subject).\n */\n template::setKeyword('header', 'pagetitle', '');\n\n $menuItems = array(\n '/' => array(\n 'name' => 'Home',\n 'selected' => TRUE,\n ),\n '/adminpost' => array(\n 'name' => 'Posts',\n ),\n '/admincomments' => array(\n 'name' => 'Comments',\n ),\n '/adminstats' => array(\n 'name' => 'Stats',\n ),\n );\n\n if (empty($page) === FALSE) {\n $bits = explode('/', $page);\n\n // Get rid of the '/admin' bit.\n array_shift($bits);\n\n if (empty($bits[0]) === FALSE) {\n $system = array_shift($bits);\n\n /**\n * Uhoh! Someone's trying to find something that\n * doesn't exist.\n */\n if (loadSystem($system, 'admin') === TRUE) {\n $url = '/'.$system;\n if (isset($menuItems[$url]) === TRUE) {\n $menuItems[$url]['selected'] = TRUE;\n unset($menuItems['/']['selected']);\n }\n\n $bits = implode('/', $bits);\n if (isValidSystem($system) === TRUE) {\n call_user_func_array(array($system, 'process'), array($bits));\n }\n } else {\n $url = '';\n if (isset($_SERVER['PHP_SELF']) === TRUE) {\n $url = $_SERVER['PHP_SELF'];\n }\n $msg = \"Unable to find system '\".$system.\"' for url '\".$url.\"'. page is '\".$page.\"'. server info:\".var_export($_SERVER, TRUE);\n messagelog::LogMessage($msg);\n template::serveTemplate('404');\n }\n }\n } else {\n // No page or default system?\n // Fall back to 'index'.\n template::serveTemplate('header');\n template::serveTemplate('index');\n }\n\n $menu = '';\n foreach ($menuItems as $url => $info) {\n $class = '';\n if (isset($info['selected']) === TRUE && $info['selected'] === TRUE) {\n $class = 'here';\n }\n\n $menu .= '<li class=\"'.$class.'\">';\n $menu .= '<a href=\"~url::adminurl~'.$url.'\">'.$info['name'].'</a>';\n $menu .= '</li>';\n $menu .= \"\\n\";\n }\n\n template::setKeyword('header', 'menu', $menu);\n\n template::serveTemplate('footer');\n template::display();\n\n }", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-customer-edit-page.php';\n }", "public function index()\n\t{\n\t\t$type \t= 'amdin';\n\t\treturn View::make('admin',array(\n\t\t\t'type'\t=> $type\n\t\t\t));\n\t}", "public function show_admin () {\n\t \techo <<<EOT\n\t\t\t<div id=\"admin\">\n\t\t\t\t<div id=\"admin_menu\">\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th class=\"th3\">Menu verwalten</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"td2 td3\"><span id=\"show_menu\" class=\"action_span\">Alle Anzeigen</span></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"td1 td3\"><span id=\"show_theme\" class=\"action_span\">Thema ändern</span></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t\t<br />\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th class=\"th3\">Boxen verwalten</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"td2 td3\"><span id=\"show_all_box\" class=\"action_span\">Alle</span></td>\n\t\t\t\t\t\t</tr>\nEOT;\n\n\t\t$this->db->set(\"what\" , \"ID, Name\");\n\t\t$this->db->set(\"from\" , \"Menu\");\n\t\t$this->db->set(\"where\", 0);\n\t\t$this->db->set(\"order\", \"Anordnung ASC\");\n\t\t$this->db->set(\"show\" , 0);\n\n\t\t$res = $this->db->do_query ();\t\n\t\t\n\t\t$i = 0;\n\t\t\n\t\twhile ($rs = $res->fetch_object()) {\t\t\n\t\t\techo '<tr>\n\t\t\t\t\t<td class=\"td' . if_int($i) . ' td3\"><span id=\"show_all_box:id_' . $rs->ID . '\" class=\"action_span\">' . $rs->Name . '</span></td>\n\t\t\t\t </tr>';\n\t\t\t$i++;\n\t\t}\n\n\n\t\techo '\t</table>\n\t\t\t</div>\n\t\t\t<div id=\"admin_main\">';\n\n\t\t// ...\n\n\t\techo '\t\t</div>\n\t\t\t\t</div>';\n\t}", "function admin()\r\n\t{\r\n\t\t$this->permiso_model->need_admin_permition_level();\t\r\n\t\t\r\n\t\t$data = array();\r\n\t\t$data['main_content'] = 'admin_index';\r\n\r\n\t\t$this->load->model('tutor_model');\r\n\t\t$data['num_tutor'] = $this->tutor_model->count_all();\r\n\t\t\r\n\t\t$this->load->model('alumno_model');\r\n\t\t$data['num_alumno'] = $this->alumno_model->count_all();\r\n\t\t\r\n\t\t$this->load->model('tarea_model');\r\n\t\t$data['num_tarea'] = $this->tarea_model->count_all();\r\n\r\n\t\t$this->load->model('grupo_model');\r\n\t\t$data['num_grupo'] = $this->grupo_model->count_all();\r\n\r\n\t\t$this->load->view('includes/template',$data);\r\n\t}", "function xanthia_admin_view()\n{\n\t/** Security check - important to do this as early as possible to avoid\n\t * potential security holes or just too much wasted processing. For the\n\t * main function we want to check that the user has at least edit privilege\n\t * for some item within this component, or else they won't be able to do\n\t * anything and so we refuse access altogether. The lowest level of access\n\t * for administration depends on the particular module, but it is generally\n\t * either 'edit' or 'delete'\n\t */\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n\t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n \t}\n\n\t// Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n \t}\n\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n $pnRender->assign('showhelp', pnModGetVar('Xanthia','help'));\n\n\t// Themes\n\t// Get a list of all themes in the themes dir\n\t$allthemes = pnModAPIFunc('Xanthia','user','getAllThemes');\n\t// Get a list of all themes in database\n\t$allskins = pnModAPIFunc('Xanthia','user','getAllSkins');\n\n\t$skins = array();\n if ($allskins) {\n\t foreach($allskins as $allskin) {\n\t $skins[] = $allskin['name'];\n\t }\n\t}\n\n // Generate an Authorization ID\n $authid = pnSecGenAuthKey();\n\t$pnRender->assign('authid', $authid);\n\n if ($allthemes){\n //Start Foreach\n foreach($allthemes as $themes) {\n // Add applicable actions\n $actions = array();\n\n \t\tswitch ($themes) {\n //If theme is active in Xanthia then show the edit theme link\n\t\t case in_array($themes, $skins):\n $state = 1;\n break;\n //If theme is not active in Xanthia then show the add theme link \n\t\t\t default:\n $state = 0;\n break;\n\t\t\t}\n \n\t $theme[] = array('state' => $state,\n\t\t\t\t\t\t 'themename' => $themes);\n //End Foreach\n }\n }\n\t$pnRender->assign('theme', $theme);\n // Return the output that has been generated to the template\n return $pnRender->fetch('xanthiaadminviewmain.htm');\n}", "public function showAdminPage($html='',$show_header=TRUE,$show_footer=TRUE) {\n\n\t\techo $this->getAdminPage($html,$show_header,$show_footer);\n\t}", "public function indexAction ()\n {\n $this->_pageTitle = ['Admin Console'];\n }", "function admin_configuration()\n{\n global $app;\n\n $app->render('admin_configuration.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 2),\n 'mailers' => mkMailers(),\n 'ttss' => mkTitleTimeSortOptions(),\n 'isadmin' => is_admin()]);\n}", "public function mainpage()\n {\n return view('admin.adminmainpage');\n }" ]
[ "0.87016875", "0.8415168", "0.8414595", "0.8382173", "0.832509", "0.81299543", "0.81210804", "0.80993235", "0.8095125", "0.8088618", "0.80883926", "0.8007696", "0.79530615", "0.7947302", "0.79456294", "0.79456294", "0.7939676", "0.7892834", "0.786972", "0.77883667", "0.7750014", "0.7743052", "0.7739349", "0.77175933", "0.7699496", "0.7668753", "0.76545584", "0.76337063", "0.7624964", "0.7604593", "0.7591143", "0.75760865", "0.75625604", "0.7551057", "0.7518656", "0.7492125", "0.7470436", "0.74588877", "0.7441914", "0.74335504", "0.742344", "0.7417461", "0.74165833", "0.7411179", "0.74020016", "0.7389742", "0.73887134", "0.73788285", "0.73762804", "0.73713356", "0.7371193", "0.73645127", "0.73461807", "0.7339202", "0.733819", "0.7334468", "0.7333298", "0.7296014", "0.72911584", "0.72827935", "0.7280763", "0.72695917", "0.7260172", "0.72543824", "0.7245668", "0.7235273", "0.7235243", "0.7219873", "0.72194743", "0.71959394", "0.71934295", "0.71900105", "0.7176031", "0.71697164", "0.7168888", "0.716886", "0.7164216", "0.7162443", "0.71590775", "0.7152508", "0.71498305", "0.7147923", "0.71467006", "0.7146532", "0.71396965", "0.71349937", "0.712604", "0.71204907", "0.71204907", "0.71204907", "0.71190375", "0.7116055", "0.71097875", "0.7096531", "0.70956266", "0.7093834", "0.7093002", "0.7086685", "0.7075536", "0.70680046" ]
0.70969963
93
Save order into registry to use it in the overloaded controller.
public function execute(\Magento\Framework\Event\Observer $observer) { /* @var $order Order */ $order = $this->coreRegistry->registry('directpost_order'); if (!$order || !$order->getId()) { return $this; } $payment = $order->getPayment(); if (!$payment || $payment->getMethod() != $this->payment->getCode()) { return $this; } $result = $observer->getData('result')->getData(); if (!empty($result['error'])) { return $this; } // if success, then set order to session and add new fields $this->session->addCheckoutOrderIncrementId($order->getIncrementId()); $this->session->setLastOrderIncrementId($order->getIncrementId()); $requestToAuthorizenet = $payment->getMethodInstance() ->generateRequestFromOrder($order); $requestToAuthorizenet->setControllerActionName( $observer->getData('action') ->getRequest() ->getControllerName() ); $requestToAuthorizenet->setIsSecure( (string)$this->storeManager->getStore() ->isCurrentlySecure() ); $result[$this->payment->getCode()] = ['fields' => $requestToAuthorizenet->getData()]; $observer->getData('result')->setData($result); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setOrder($order);", "private function registerOrder(OrderInterface $order): void\n {\n $this->registry->unregister('current_order');\n $this->registry->register('current_order', $order);\n }", "function storeOrdering() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$model = $this->getDefaultModel();\n\n\t\t$json = KRequest::getVar('updates');\n\t\t$updates = json_decode($json, true);\n\n\t\t$ordering = array();\n\t\tforeach ($updates as $recordId=>$position) {\n\t\t\t$ordering[(int)$recordId] = (int)$position;\n\t\t}\n\n\t\t$success = $model->storeOrdering($ordering);\n\n\t\tif ($success) {\n\t\t\t$this->purgeCache();\n\t\t}\n\t\telse {\n\t\t\tKLog::log('Storing record ordering failed. Error messages were '.var_export($model->getErrors(), true), 'error');\n\t\t}\n\n\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\n\t\techo ConfigboxJsonResponse::makeOne()\n\t\t\t->setSuccess($success)\n\t\t\t->toJson();\n\n\t}", "public function storeOrder($request);", "public function save_items_order() {\n\t\n\t\t\tparse_str( $_REQUEST[ 'order' ], $order );\n\t\n\t\t\techo update_post_meta( intval( $_REQUEST[ 'gallery_id' ] ), 'items_order', $order );\n\t\n\t\t\texit;\n\t\t}", "function save_order(){\n\tif( ! current_user_can( 'order_posts' ) ){\n\t\twp_send_json_error( 'Oooops, you haven\\'t got the permission to do that' );\n\n\t\treturn;\n\t}\n\t$ordered_ids = $_POST[ 'id_array' ];\n\t$position = 1;\n\tforeach( $ordered_ids as $id ){\n\t\tupdate_post_meta( (int) $id, 'post_order', $position );\n\t\t$position ++;\n\t}\n}", "public function order();", "public function setOrder($order);", "function saveorder()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid \t= JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\t$order \t= JRequest::getVar( 'order', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\t\tJArrayHelper::toInteger($order);\n\n\t\t$model = $this->getModel('weblink');\n\t\t$model->saveorder($cid, $order);\n\n\t\t$msg = JText::_( 'New ordering saved' );\n\t\t$this->setRedirect( 'index.php?option=com_weblinks', $msg );\n\t}", "public function ___orderSaved(PadOrder $order) {\n }", "function saveOrder() {\n\t\t$mainframe = JFactory::getApplication();\n\t\t// Check for request forgeries\n\t\tdefined('_JEXEC') or die('Invalid Token');\n\t\t$db = JFactory::getDBO();\n\t\t$cid = clm_core::$load->request_array_int('cid');\n\t\t$option = clm_core::$load->request_string('option', '');\n\t\t$section = clm_core::$load->request_string('section', '');\n\t\t\t\t\t\t\t\t\n\t\t$total = count($cid);\n\t\t$order = clm_core::$load->request_array_int('order');\n\t\t$row = JTable::getInstance('saisons', 'TableCLM');\n\t\t$groupings = array();\n\t\t// update ordering values\n\t\tfor ($i = 0;$i < $total;$i++) {\n\t\t\t$row->load((int)$cid[$i]);\n\t\t\t// track categories\n\t\t\t//$groupings[] = $row->id;\n\t\t\t$groupings[] = 0;\n\n\t\t\tif ($row->ordering != $order[$i]) {\n\t\t\t\t$row->ordering = $order[$i];\n\t\t\t\tif (!$row->store()) {\n\t\t\t\t\t$this->setMessage($db->getErrorMsg(), 'error');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// execute updateOrder for each parent group\n\t\t$groupings = array_unique($groupings);\n\t\tforeach ($groupings as $group) {\n\t\t\t$row->reorder('id = ' . (int)$group);\n\t\t}\n\t\t$this->setMessage(JText::_('CLM_NEW_ORDERING_SAVED'));\n\t\t$this->setRedirect('index.php?option=' . $option . '&section=' . $section);\n\t}", "public function order($strOrder) {\n\t\t\t$this->arOrder[] = $strOrder; \n\t\t}", "private function SetOrderData()\n\t\t{\n\t\t\t// doesn't factor in cookies stored by Interspire Shopping Cart, so we have to pass back the\n\t\t\t// order token manually from those payment providers. We do this by taking the\n\t\t\t// cart ID passed back from the provider which stores the order's unique token.\n\t\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t\t$this->orderToken = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t\t}\n\t\t\telse if(isset($_REQUEST['provider'])) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $_REQUEST['provider']);\n\n\t\t\t\tif(in_array(\"GetOrderToken\", get_class_methods($this->paymentProvider))) {\n\t\t\t\t\t$this->orderToken = $this->paymentProvider->GetOrderToken();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\theader(sprintf(\"Location:%s\", $GLOBALS['ShopPath']));\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the pending orders from the database\n\t\t\t$this->pendingData = LoadPendingOrdersByToken($this->orderToken, true);\n\t\t\tif(!$this->orderToken || $this->pendingData === false) {\n\t\t\t\t$this->BadOrder();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif($this->paymentProvider === null) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $this->pendingData['paymentmodule']);\n\t\t\t}\n\n\t\t\tif($this->paymentProvider) {\n\t\t\t\t$this->paymentProvider->SetOrderData($this->pendingData);\n\t\t\t}\n\t\t}", "public function testUpdateOrder()\n {\n }", "public function saved(Order $Order)\n {\n //code...\n }", "public function finalizeOrder();", "protected function get_parameter_order()\n {\n }", "private function saveOrder() {\n $currentDate = new Zend_Date();\n $customer = Customer::findByEmail($this->getRequest()->getParam('email'));\n $customer->name = $this->getRequest()->getParam('name');\n $customer->phone = $this->getRequest()->getParam('phone');\n\n $ord = new Order();\n $ord->Customer = $customer;\n $ord->date = $currentDate->get();\n //TODO Take product id from param and check if it is available (not in future, still on sales, etc)\n $product = Product::getCurrentProduct();\n $ord->Product = $product;\n $customer->save();\n $ord->save();\n $product->takeFromStock();\n $customer->sendOrderNotification($ord);\n }", "function setOrder($order){\n\t\t$this->order=$order;\n\t}", "protected function _initOrder()\n {\n $id = $this->getRequest()->getParam('id');\n $order = Mage::getModel('sales/order')->load($id);\n\n Mage::register('sales_order', $order);\n Mage::register('current_order', $order);\n return $order;\n }", "function saveValuesOrder() {\r\n $cid = JRequest::getVar('cid', '', '', 'array');\r\n $total = count($cid);\r\n $order = JRequest::getVar('order', '', '', 'array');\r\n $value = & JTable::getInstance('cpvalue', 'Table');\r\n\r\n // update ordering values\r\n for ($i = 0; $i < $total; $i++) {\r\n $value->load((int) $cid[$i]);\r\n if ($value->ordering != $order[$i]) {\r\n $value->ordering = $order[$i];\r\n if (!$value->store()) {\r\n JError::raiseError(500, JText::_('Error saving values order.'));\r\n }\r\n }\r\n }\r\n $value->reorder();\r\n }", "public function action_reorder(){\n\t\t$this->auto_render = false;\n\t\tif (HTTP_Request::POST == $this->request->method()) \n\t\t{\n\t\t\t$i = '0';\n\t\t\tforeach($this->request->post('item') as $tag_id){\n\t\t\t\t$task = ORM::factory('tag', $tag_id);\n\t\t\t\t$task->order = $i;\n\t\t\t\t$task->save();\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}", "public function afterRegistry()\n {\n // parent::afterRegistry();\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 2;\n }", "private function setupOrderItemIndex() {\n //works from the properties set in setBackorderVars\n if (!empty($this->backorderRecord['Order']['OrderItem'])) {\n foreach ($this->backorderRecord['Order']['OrderItem'] as $boItem) {\n $this->ofb['OrderItemIndex'][$boItem['item_id']] = $boItem;\n }\n } else {\n $this->ofb['OrderItemIndex'] = array();\n }\n }", "public function order() {\r\n\t\t$this->_orders = array();\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $arg) {\r\n\t\t\tif (is_array($arg)) {\r\n\t\t\t\t$this->order($arg);\r\n\t\t\t} else if (!empty($arg)) {\r\n\t\t\t\t$this->_orders[] = $arg;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function getOrder();", "public function actionUpdateRouteOrder()\n\t{\n\t\t$this->requirePostRequest();\n\t\t$this->requireAjaxRequest();\n\n\t\t$routeIds = craft()->request->getRequiredPost('routeIds');\n\t\tcraft()->routes->updateRouteOrder($routeIds);\n\n\t\t$this->returnJson(array('success' => true));\n\t}", "public function store()\n {\n $this->storeKeys();\n }", "protected static function booted()\n {\n static::addGlobalScope(new OrderByPosition());\n\n parent::booted();\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "public function saving(Order $Order)\n {\n //code...\n }", "function setOrder( $order )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n if ( get_class( $order ) == \"ezorder\" )\n {\n $this->OrderID = $order->id();\n } \n }", "public function setSortOrder($order)\n {\n if ($order == 4) {\n session(['membershipStatusSortOrder' => 'updated_at']);\n } elseif ($order == 3) {\n session(['membershipStatusSortOrder' => 'description']);\n } else {\n session(['membershipStatusSortOrder' => 'id']);\n }\n return redirect('maintenance/membershipstatus');\n }", "function getOrder()\n {\n return 3;\n }", "public function updateOrderAction() {\n //CHECK POST\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n $values = $_POST;\n try {\n foreach ($values['order'] as $key => $value) {\n $row = Engine_Api::_()->getItem('sitemember_compliment_category', (int) $value);\n if (!empty($row)) {\n $row->order = $key + 1;\n $row->save();\n }\n }\n $db->commit();\n $this->_redirect('admin/sitemember/compliment');\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "function getOrder()\n {\n return 10;\n }", "function set_order($value) {\n $this->set_mapped_property('order', $value);\n }", "function ccategories_order()\n\t{\n\t\tlusers_require(\"categories/order\");\n\n\t\t$post_data = linput_post();\n\t\t$order = $post_data[\"order\"];\n\n\t\t$order = split(\"\\|\", $order);\n\n\t\tfor ($i = 0; $i < count($order); $i++)\n\t\t{\n\t\t\tlcrud_update(lconf_get(\"lang\") . \"_categories\", array(\"id\" => $order[$i]), array(\"orderid\" => $i));\n\t\t}\n\n\t\tlcache_delete_all();\n\t}", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "protected function sortAndSavePackageStates() {}", "protected function sortAndSavePackageStates() {}", "protected function sortAndSavePackageStates() {}", "function SetUpSortOrder() {\r\n\t\tglobal $rekeningju;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$rekeningju->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$rekeningju->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$rekeningju->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id, $bCtrl); // id\n\t\t\t$this->UpdateSort($this->detail_jenis_spp, $bCtrl); // detail_jenis_spp\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->tgl_spp, $bCtrl); // tgl_spp\n\t\t\t$this->UpdateSort($this->keterangan, $bCtrl); // keterangan\n\t\t\t$this->UpdateSort($this->no_spm, $bCtrl); // no_spm\n\t\t\t$this->UpdateSort($this->tgl_spm, $bCtrl); // tgl_spm\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function generateOrder();", "function getOrder()\n {\n return 4;\n }", "function getOrder()\n {\n return 4;\n }", "function saveOrder() {\n\t\n\t\t// Check for request forgeries\n\t\tdefined('_JEXEC') or die( 'Invalid Token' );\n\t\n\t\t// Instanz der Tabelle\n\t\t$row = JTable::getInstance( 'turniere', 'TableCLM' );\n\t\t$row->load( $this->id ); // Daten zu dieser ID laden\n\n\t $clmAccess = clm_core::$access; \n\t\tif (($row->tl != clm_core::$access->getJid() AND $clmAccess->access('BE_tournament_edit_round') !== true) OR $clmAccess->access('BE_tournament_edit_round') === false) {\n\t\t\t$this->app->enqueueMessage( JText::_('TOURNAMENT_NO_ACCESS'),'warning' );\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$cid\t\t= clm_core::$load->request_array_int('cid');\n\t\n\t\t$total\t\t= count( $cid );\n\t\t$order\t\t= clm_core::$load->request_array_int('order');\n\t\n\t\t$row =JTable::getInstance( 'turnier_runden', 'TableCLM' );\n\t\t$groupings = array();\n\t\n\t\t// update ordering values\n\t\tfor( $i=0; $i < $total; $i++ ) {\n\t\t\t$row->load( (int) $cid[$i] );\n\t\t\t// track categories\n\t\t\t$groupings[] = $row->turnier;\n\t\n\t\t\tif ($row->ordering != $order[$i]) {\n\t\t\t\t$row->ordering = $order[$i];\n\t\t\t\tif (!$row->store()) {\n\t\t\t\t\t$this->app->enqueueMessage( $db->getErrorMsg(),'error' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// execute updateOrder for each parent group\n\t\t$groupings = array_unique( $groupings );\n\t\tforeach ($groupings as $group){\n\t\t\t$row->reorder('sid = '.(int) $group);\n\t\t}\n\t\t\t\t\t\t\t\t\t \n\t\t$this->app->enqueueMessage( JText::_('NEW_ORDERING_SAVED') );\n\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "public function forceSortAndSavePackageStates() {}", "public function onBackendOrderPostDispatch(Enlight_Event_EventArgs $args)\n {\n $request = $args->getRequest();\n $action = $request->getActionName();\n $this->log->debug('Order PostDispatch: ' . $action);\n $view = $args->getSubject()->View();\n\n switch ($action) {\n case 'save':\n return;\n case 'load':\n $view->extendsTemplate('backend/mxc_dropship_innocigs/order/view/detail/overview.js');\n $view->extendsTemplate('backend/mxc_dropship_innocigs/order/view/list/list.js');\n break;\n case 'getList':\n $orderList = $view->getAssign('data');\n foreach ($orderList as &$order) {\n $bullet = $this->getBullet($order);\n $order['mxcbc_dsi_ic_bullet_color'] = $bullet['background'];\n $order['mxcbc_dsi_ic_bullet_title'] = $bullet['message'] ?? '';\n }\n $view->clearAssign('data');\n $view->assign('data', $orderList);\n break;\n }\n }", "public function save()\n {\n $this->variableApi->set('ZikulaRoutesModule', 'routeEntriesPerPage', $this->getRouteEntriesPerPage());\n }", "function getOrder()\n {\n return 7;\n }", "function getOrder()\n {\n return 7;\n }", "public function addOrder($order){\n $this->collection[] = $order;\n }", "function persistOrder(User $user, Order $order, array $orderItems);", "function getOrder()\n{\n\n}", "public function testAddOrder()\n {\n }", "private function loadOrder()\n {\n $brqOrderId = $this->getOrderIncrementId();\n\n //Check if the order can receive further status updates\n $this->order->loadByIncrementId((string) $brqOrderId);\n\n if (!$this->order->getId()) {\n $this->logging->addDebug('Order could not be loaded by brq_invoicenumber or brq_ordernumber');\n // try to get order by transaction id on payment.\n $this->order = $this->getOrderByTransactionKey();\n }\n }", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public static function getOrder(): int;", "public static function InsertOrder()\n\t\t{\n\t\t\tfor($i = 0; $i < count($_SESSION['material']); $i++)\n\t\t\t{\n\t\t\techo $_SESSION['material'][$i] .\"<br>\". $_SESSION['supplier_id'].\"<br>\";\n\t\t\t}\n\t\t\t\n\t\t}", "private function saveOrder()\n {\n $this->paymentInterface->setMethod(self::PAYMENT_METHOD);\n $this->magentoOrderId = $this->quoteManagement->placeOrder($this->quoteId, $this->paymentInterface);\n /** @var \\Magento\\Sales\\Api\\Data\\OrderInterface magentoOrder */\n $this->magentoOrder = $this->orderRepositoryInterface->get($this->magentoOrderId);\n\n if ($this->magentoOrderId == '') {\n throw new \\Exception(self::PMO_ERR_MSG);\n }\n }", "protected function _initOrder()\n {\n $id = $this->getRequest()->getParam('order_id');\n try {\n $order = $this->orderRepository->get($id);\n } catch (NoSuchEntityException $e) {\n $this->messageManager->addErrorMessage(__('This order no longer exists'));\n $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true);\n return false;\n } catch (InputException $e) {\n $this->messageManager->addErrorMessage(__('This order no longer exists'));\n $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true);\n return false;\n }\n $this->_coreRegistry->register('sales_order', $order);\n $this->_coreRegistry->register('current_order', $order);\n return $order;\n }", "public function afterRegistry()\n {\n if ($this->tokenIdentifier) {\n $this->token = $this->loader->getTracker()->getToken($this->tokenIdentifier);\n if ($this->token->exists) {\n $this->patientId = $this->token->getPatientNumber();\n $this->organizationId = $this->token->getOrganizationId();\n }\n } else {\n $this->loadDefault();\n }\n\n parent::afterRegistry();\n\n if ($this->token && $this->token->hasRelation() && $relation = $this->token->getRelation()) {\n // If we have a token with a relation, remove the respondent and use relation in to field\n $this->to = array();\n $this->addTo($relation->getEmail(), $relation->getName());\n }\n }", "public function getOrder()\n {\n\n }", "public function setOrder($params)\n\t{\n\t\treturn $this->request('set-order', $params);\n\t}", "function saveOrderingAndIndentObject()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\n\t\t$this->checkPermission(\"write\");\n\n\t\t$this->object->saveOrderingAndIndentation($_POST[\"ord\"], $_POST[\"indent\"]);\n\t\tilUtil::sendSuccess($lng->txt(\"wiki_ordering_and_indent_saved\"), true);\n\t\t$ilCtrl->redirect($this, \"editImportantPages\");\n\t}", "function addOrder () {\n\t//\terror_log ( 'addOrder\\n', 3, '/var/tmp/php.log' );\n\t$request = Slim::getInstance ()->request ();\n\t$order = json_decode ( $request->getBody () );\n\t//\t$sql = \"INSERT INTO wine (name, grapes, country, region, year, description) VALUES (:name, :grapes, :country, :region, :year, :description)\";\n\ttry {\n\t\t$db = new DbOperation();\n\t\t$orderId = $db->addOrder ( $order );\n\t\t//\t\t$stmt = $db->prepare ( $sql );\n\t\t//\t\t$stmt->bindParam ( \"name\", $order->name );\n\t\t//\t\t$stmt->bindParam ( \"grapes\", $order->grapes );\n\t\t//\t\t$stmt->bindParam ( \"country\", $order->country );\n\t\t//\t\t$stmt->bindParam ( \"region\", $order->region );\n\t\t//\t\t$stmt->bindParam ( \"year\", $order->year );\n\t\t//\t\t$stmt->bindParam ( \"description\", $order->description );\n\t\t//\t\t$stmt->execute ();\n\t\t//\t\t$order->id = $db->lastInsertId ();\n\t\t//\t\t$db = null;\n\t\t// print_f($order);\n\t\t// $order.push(\"orderId\", $orderId);\n\t\t// print_f($order);\n\t\t$order->orderId = $orderId;\n\t\techo '{\"addedOrder\":' . json_encode ( $order ) . '}';\n\t\t// echo $orderId;\n\t} catch ( Exception $e ) {\n\t\t//\t\terror_log ( $e->getMessage (), 3, '/var/tmp/php.log' );\n\t\t//\t\techo '{\"error\":{\"text\":' . $e->getMessage () . $e.'}}';\n\t\techo '{\"errorText\":\"Add order fail with text as\", \"text\":}' . $e->getMessage () . $e . '}';\n\t}\n}", "function orders() {\n\t \treturn $this->hook(\"/{$this->subject_slug}/v1/orders.xml?api_key={$this->api_key}\",\"order\");\n\t}", "function saveorder($cid = array(), $order)\n\t{\n\t\t$row = & JTable::getInstance('frontpage', 'Table');\n\n\t\t// update ordering values\n\t\tfor ($i=0; $i < count($cid); $i++)\n\t\t{\n\t\t\t$row->load((int) $cid[$i]);\n\n\t\t\tif ($row->ordering != $order[$i])\n\t\t\t{\n\t\t\t\t$row->ordering = $order[$i];\n\t\t\t\tif (!$row->store()) {\n\t\t\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// execute updateOrder\n\t\t$row->reorder(' 1 ');\n\n\t\treturn true;\n\t}", "public function store(){\n\t\t//\n\t}", "public function getOrders()\n {\n return Controllers\\OrdersController::getInstance();\n }", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->identries); // identries\r\n\t\t\t$this->UpdateSort($this->titulo); // titulo\r\n\t\t\t$this->UpdateSort($this->id); // id\r\n\t\t\t$this->UpdateSort($this->islive); // islive\r\n\t\t\t$this->UpdateSort($this->tool_id); // tool_id\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "protected function registered()\n {\n //\n }", "public function afterPlaceOrder($order)\n {\n $this->aliExpressOrderRepository->create(['order' => $order]);\n }", "protected function registerActionChain()\n\t{\n\t\t$this->actions['adapter'] = 'adapterAction';\n\t\t$this->actions['class'] = 'classLoaderAction';\n\t\t$this->actions['security'] = 'securityAction';\n\t\t$this->actions['exec'] = 'executionAction';\n\t}", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id); // id\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->companyname); // companyname\n\t\t\t$this->UpdateSort($this->servicetime); // servicetime\n\t\t\t$this->UpdateSort($this->country); // country\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->skype); // skype\n\t\t\t$this->UpdateSort($this->website); // website\n\t\t\t$this->UpdateSort($this->linkedin); // linkedin\n\t\t\t$this->UpdateSort($this->facebook); // facebook\n\t\t\t$this->UpdateSort($this->twitter); // twitter\n\t\t\t$this->UpdateSort($this->active_code); // active_code\n\t\t\t$this->UpdateSort($this->identification); // identification\n\t\t\t$this->UpdateSort($this->link_expired); // link_expired\n\t\t\t$this->UpdateSort($this->isactive); // isactive\n\t\t\t$this->UpdateSort($this->google); // google\n\t\t\t$this->UpdateSort($this->instagram); // instagram\n\t\t\t$this->UpdateSort($this->account_type); // account_type\n\t\t\t$this->UpdateSort($this->logo); // logo\n\t\t\t$this->UpdateSort($this->profilepic); // profilepic\n\t\t\t$this->UpdateSort($this->mailref); // mailref\n\t\t\t$this->UpdateSort($this->deleted); // deleted\n\t\t\t$this->UpdateSort($this->deletefeedback); // deletefeedback\n\t\t\t$this->UpdateSort($this->account_id); // account_id\n\t\t\t$this->UpdateSort($this->start_date); // start_date\n\t\t\t$this->UpdateSort($this->end_date); // end_date\n\t\t\t$this->UpdateSort($this->year_moth); // year_moth\n\t\t\t$this->UpdateSort($this->registerdate); // registerdate\n\t\t\t$this->UpdateSort($this->login_type); // login_type\n\t\t\t$this->UpdateSort($this->accountstatus); // accountstatus\n\t\t\t$this->UpdateSort($this->ispay); // ispay\n\t\t\t$this->UpdateSort($this->profilelink); // profilelink\n\t\t\t$this->UpdateSort($this->source); // source\n\t\t\t$this->UpdateSort($this->agree); // agree\n\t\t\t$this->UpdateSort($this->balance); // balance\n\t\t\t$this->UpdateSort($this->job_title); // job_title\n\t\t\t$this->UpdateSort($this->projects); // projects\n\t\t\t$this->UpdateSort($this->opportunities); // opportunities\n\t\t\t$this->UpdateSort($this->isconsaltant); // isconsaltant\n\t\t\t$this->UpdateSort($this->isagent); // isagent\n\t\t\t$this->UpdateSort($this->isinvestor); // isinvestor\n\t\t\t$this->UpdateSort($this->isbusinessman); // isbusinessman\n\t\t\t$this->UpdateSort($this->isprovider); // isprovider\n\t\t\t$this->UpdateSort($this->isproductowner); // isproductowner\n\t\t\t$this->UpdateSort($this->states); // states\n\t\t\t$this->UpdateSort($this->cities); // cities\n\t\t\t$this->UpdateSort($this->offers); // offers\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function changeOrder() {\n $this->iteratorH = array_reverse($this->iteratorH);\n }", "function LoadSortOrder() {\n\t\tglobal $patient_detail;\n\t\t$sOrderBy = $patient_detail->getSessionOrderBy(); // Get order by from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($patient_detail->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $patient_detail->SqlOrderBy();\n\t\t\t\t$patient_detail->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}", "abstract public function getOrderAble();", "public function canStoreOrder();", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "function SetupSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->fecha_tamizaje, $bCtrl); // fecha_tamizaje\n\t\t\t$this->UpdateSort($this->id_centro, $bCtrl); // id_centro\n\t\t\t$this->UpdateSort($this->apellidopaterno, $bCtrl); // apellidopaterno\n\t\t\t$this->UpdateSort($this->apellidomaterno, $bCtrl); // apellidomaterno\n\t\t\t$this->UpdateSort($this->nombre, $bCtrl); // nombre\n\t\t\t$this->UpdateSort($this->ci, $bCtrl); // ci\n\t\t\t$this->UpdateSort($this->fecha_nacimiento, $bCtrl); // fecha_nacimiento\n\t\t\t$this->UpdateSort($this->dias, $bCtrl); // dias\n\t\t\t$this->UpdateSort($this->semanas, $bCtrl); // semanas\n\t\t\t$this->UpdateSort($this->meses, $bCtrl); // meses\n\t\t\t$this->UpdateSort($this->sexo, $bCtrl); // sexo\n\t\t\t$this->UpdateSort($this->discapacidad, $bCtrl); // discapacidad\n\t\t\t$this->UpdateSort($this->id_tipodiscapacidad, $bCtrl); // id_tipodiscapacidad\n\t\t\t$this->UpdateSort($this->resultado, $bCtrl); // resultado\n\t\t\t$this->UpdateSort($this->resultadotamizaje, $bCtrl); // resultadotamizaje\n\t\t\t$this->UpdateSort($this->tapon, $bCtrl); // tapon\n\t\t\t$this->UpdateSort($this->tipo, $bCtrl); // tipo\n\t\t\t$this->UpdateSort($this->repetirprueba, $bCtrl); // repetirprueba\n\t\t\t$this->UpdateSort($this->observaciones, $bCtrl); // observaciones\n\t\t\t$this->UpdateSort($this->id_apoderado, $bCtrl); // id_apoderado\n\t\t\t$this->UpdateSort($this->id_referencia, $bCtrl); // id_referencia\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function save_order()\n\t{\n\t\t// --------------------------------------\n\t\t// Get posted vars\n\t\t// --------------------------------------\n\n\t\t$entries = $this->EE->input->post('entries');\n\t\t$channel_id = $this->EE->input->post('channel_id');\n\t\t$field_id = $this->EE->input->post('field_id');\n\t\t$category = $this->EE->input->post('category');\n\t\t$field = 'field_id_'.$field_id;\n\n\t\t// --------------------------------------\n\t\t// And get settings for channel/field combo\n\t\t// --------------------------------------\n\n\t\t$settings = $this->_get_settings($channel_id, $field_id);\n\n\t\t// --------------------------------------\n\t\t// Loop through entries, set new order\n\t\t// --------------------------------------\n\n\t\tfor ($i = 0, $total = count($entries); $i < $total; $i++)\n\t\t{\n\t\t\t$entry_id = $entries[$i];\n\n\t\t\t// Ascend or descend depending on settings\n\t\t\t$new_order = (string) ($settings['sort_order'] == 'asc') ? ($i + 1) : ($total - $i);\n\n\t\t\t// Add leading zeroes\n\t\t\t$new_order = str_pad($new_order, 4, '0', STR_PAD_LEFT);\n\n\t\t\t// Update entry\n\t\t\t$this->EE->db->where('entry_id', $entry_id);\n\t\t\t$this->EE->db->update('channel_data', array($field => $new_order));\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// That's the entries updated\n\t\t// Now, do we need to clear the cache?\n\t\t// --------------------------------------\n\n\t\tif ($this->EE->input->post('clear_caching') == 'y')\n\t\t{\n\t\t\t$this->EE->functions->clear_caching('all', '', TRUE);\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Get ready to redirect back\n\t\t// --------------------------------------\n\n\t\t$url = $this->base_url.AMP.'method=display&amp;channel_id='.$channel_id.'&amp;field_id='.$field_id;\n\n\t\t// Redirect to selected category, if any\n\t\tif ($category)\n\t\t{\n\t\t\t$url .= AMP.'category='.$category;\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Set flashdata for feedback\n\t\t// --------------------------------------\n\n\t\t$this->EE->session->set_flashdata('reorder_msg', $this->EE->lang->line('new_order_saved'));\n\n\t\t// And go back\n\t\t$this->EE->functions->redirect($url);\n\t\texit;\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}" ]
[ "0.58471626", "0.5687899", "0.56644386", "0.5657901", "0.5625235", "0.55653405", "0.54432017", "0.54295605", "0.5426178", "0.5422385", "0.5418101", "0.5393322", "0.5326116", "0.53155273", "0.525608", "0.5255267", "0.5249114", "0.52279496", "0.5213448", "0.52065444", "0.5204654", "0.51866364", "0.51565146", "0.51523095", "0.51523095", "0.51523095", "0.51523095", "0.5150513", "0.5149366", "0.513485", "0.5110903", "0.5099513", "0.5096289", "0.5092086", "0.50858283", "0.50858283", "0.50858283", "0.50811857", "0.5074407", "0.50531256", "0.50477886", "0.5039958", "0.503567", "0.5031525", "0.50283873", "0.50126696", "0.50126696", "0.50126696", "0.50126696", "0.50126696", "0.50126696", "0.50071496", "0.50071496", "0.50069773", "0.5002408", "0.49964944", "0.49946547", "0.49921674", "0.49921674", "0.4985829", "0.4973434", "0.49642104", "0.49430177", "0.49423364", "0.49423364", "0.49353045", "0.4923539", "0.49234572", "0.49160203", "0.4909204", "0.4908205", "0.4908205", "0.4908205", "0.48908487", "0.48878", "0.4883109", "0.48786026", "0.48700956", "0.48686713", "0.4865807", "0.4864664", "0.4863207", "0.48617533", "0.48615566", "0.48605153", "0.48590437", "0.48584288", "0.4854849", "0.48536146", "0.4843428", "0.4842637", "0.48388278", "0.4831918", "0.48314446", "0.48274246", "0.48148245", "0.48138547", "0.48138547", "0.48138392", "0.4812864", "0.48111334" ]
0.0
-1
Consultar todos los grupos Ejemplo
public function consultarTodos() { $query = $this->gestor->getRepository('Grupo'); $profesores = $query->findAll(); $data_to_json = array(); foreach($profesores as $item){ $data_to_json[] = $item->getArray(); } if ( !is_null($profesores) ) { header("HTTP/1.1 200 OK"); return (($data_to_json)); } else { header("HTTP/1.1 404 Not found"); return '{"response":"error"}'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGrupos(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraGrupos\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM grupos \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM grupos LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "function consultaGrupos($idTutor)\n{\n $sql=\"SELECT DISTINCT gp.id_grupo as id ,\n gp.nombre_grupo as nombre ,\n gp.clave as clave,\n gp.id_escuela as \\\"idEscuela\\\",\n gp.id_empresa as \\\"idEmpresa\\\",\n gp.tipo_grupo as \\\"tipoGrupo\\\" \n FROM rel_curso_tutor r_c_t\n JOIN rel_curso_grupo r_c_g\n ON r_c_t.id_rel_curso_grupo = r_c_g.id_rel_curso_grupo\n JOIN grupo gp\n ON gp.id_grupo = r_c_g.id_grupo \n WHERE \tgp.status = 1\n AND r_c_t.id_tutor = \".$idTutor;\n \n $consultaGrupo= new Query(\"SG\");\n $consultaGrupo->sql=$sql;\n $resultado = $consultaGrupo->select(\"obj\");\n \n return $resultado;\n}", "function consultarGrupo()\n\t\t{\n\t\t\t\t $file = fopen(\"../Archivos/ArrayConsultarGrupo.php\", \"w\");\n\t\t\t\t fwrite($file,\"<?php class consult { function array_consultar(){\". PHP_EOL);\n\t\t\t\t fwrite($file,\"\\$form=array(\" . PHP_EOL);\n\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"SELECT * FROM grupo \";\n\t\t\t$resultado=$mysqli->query($query);\n\t\t\tif(mysqli_num_rows($resultado)){\n\t\t\t\twhile($fila = $resultado->fetch_array())\n\t\t\t{\n\t\t\t\t$filas[] = $fila;\n\t\t\t}\n\t\t\tforeach($filas as $fila)\n\t\t\t{ \n\t\t\t\t$nombre=$fila['NOMBRE_GRUPO'];\n\t\t\t\t$descripcion=$fila['DESCRIPCION'];\n\t\t\t\tfwrite($file,\"array(\\\"nombre\\\"=>'$nombre',\\\"descripcion\\\"=>'$descripcion'),\" . PHP_EOL);\n\t\t\t}\n\t\t\t}\n\t\t\t fwrite($file,\");return \\$form;}}?>\". PHP_EOL);\n\t\t\t\t fclose($file);\n\t\t\t\t $resultado->free();\n\t\t\t\t $mysqli->close();\n\t\t}", "function GetInfogrupos(){\n\t\t\t$sql =\"SELECT G.grupo, G.salon, G.horario, C.descripcion AS carrera \n\t\t\t\tFROM grupos G INNER JOIN carreras C ON G.carrera = C.codigo;\";\n\t\t\t$this->bd->selectSQL($sql);\n\t\t\tif(!empty($this->bd->rowresult)){\n\t\t\t\treturn $this->bd->rowresult;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "function leerTodosGrupos() {\n $link = crearConexion();\n $grupos = [];\n\n $query = \"SELECT nombre, imagen, descripcion FROM grupo\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n while ($linea = mysqli_fetch_array($result)) {\n $fila['nombre'] = $linea['nombre'];\n $fila['imagen'] = $linea['imagen'];\n $fila['descripcion'] = $linea['descripcion'];\n\n $grupos[] = $fila;\n }\n\n return $grupos;\n}", "public function obtenerGruposController()\n\t\t{\n\t\t\t$respuesta = Datos::vistaGruposModel(\"grupo\");\n\n\t\t\t#El constructor foreach proporciona un modo sencillo de iterar sobre arrays. foreach funciona sólo sobre arrays y objetos, y emitirá un error al intentar usarlo con una variable de un tipo diferente de datos o una variable no inicializada.\n\n\t\t\tforeach($respuesta as $row => $item)\n\t\t\t{\n\t\t\t\techo'<option value='.$item[\"id_grupo\"].'>'.$item[\"nombre_grupo\"].'</option>';\n\t\t\t}\n\n\t\t}", "function listarRegistrosGruposAtivos() {\n\t\treturn $this->listarRegistrosGrupos(array(\"gu_status_registro = 'A' \"));\n\t}", "function listarRegistrosGruposInativos() {\n\n\t\treturn $this->listarRegistrosGrupos(array(\"gu_status_registro = 'I' \"));\n\t}", "public function consultarCatalogGru() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('grupos');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Grupos</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t<tr class=\"titleTable\"><th>ID Grupo</th>\n\t\t\t \t\t<th>Nombre</th>\n\t\t\t \t\t<th>Salón</th>\n\t\t\t\t\t\t<th>Hora</th>\n\t\t\t\t\t\t<th>Periodo</th>\n\t\t\t\t\t\t<th>Carrera</th>\n\t\t\t\t\t\t<th>Tutor</th>\n\t\t\t\t\t\t<th>Editar</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.\n \t'<td>'.$row[1].'</td>'.\n \t'<td>'.$row[2].'</td>'.\n \t'<td>'.$row[3].'</td>'.\n \t'<td>'.$row[4].'</td>'.\n \t'<td>'.$row[5].'</td>';\n \t\n \tif(empty($row[6])) {\n \t\t$info .= '<td><span class=\"label error\">Sin Tutor</span></td>';\n \t\t}else{\n\t\t\t\t\t\t\t$info .= '<td><b>'.$row[6].' '.$row[7].' '.$row[8].'</b></td>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$info .= '<td id=\"'.$row[0].'\"><span id=\"edit-grup\" style=\"cursor: pointer;\" class=\"label warning\"><i class=\"fa fa-gear fa-lg\"></i></span></td></tr>';\n \t}\n \t$info .= '</tbody></table></div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "public function index()\n {\n //\n return Grupos::all();\n }", "function getDatosDeGrupoSolidario(){}", "function getDatosGrupo($entrada) {\n $nombre = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $link = crearConexion();\n $query = \"SELECT grupo.nombre, grupo.descripcion, grupo.imagen, grupo_categoria.categoria FROM grupo, grupo_categoria WHERE grupo.nombre=grupo_categoria.grupo AND grupo.nombre='$nombre'\";\n $result = mysqli_query($link, $query);\n $linea = mysqli_fetch_array($result);\n $datos['nombre'] = $linea['nombre'];\n $datos['imagen'] = $linea['imagen'];\n $datos['descripcion'] = $linea['descripcion'];\n $datos['categoria'] = $linea['categoria'];\n cerrarConexion($link);\n return $datos;\n}", "function grgd(){\n\t\t$grid = $this->jqdatagrid;\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('spregr');\n\t\t$response = $grid->getData('spregr', array(array()), array(), false, $mWHERE );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "function listeGroupes(){\n $groupes = array();\n $connexion = new Connexion();\n $query = 'SELECT * FROM GROUPE';\n $result = $connexion->query($query);\n foreach($result as $row){\n $groupes[] = array('id'=>$row['id'],'libelle'=>$row['libelle'],'nombre'=>$row['nombre']);\n }\n return $groupes;\n}", "function leerMisGrupos($entrada) {\n $grupos = [];\n $usuario = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n\n $con = crearConexion();\n\n $query = \"SELECT propietario, usuario, grupo, nombre, imagen, descripcion FROM usuario_grupo, grupo WHERE usuario = '$usuario' AND usuario_grupo.grupo = grupo.nombre\";\n\n $result = mysqli_query($con, $query);\n\n if (mysqli_num_rows($result) < 1) {\n return FALSE;\n } else {\n while ($row = mysqli_fetch_array($result)) {\n $fila = [];\n\n $fila['propietario'] = $row['propietario'];\n $fila['usuario'] = $row['usuario'];\n $fila['grupo'] = $row['grupo'];\n $fila['nombre'] = $row['nombre'];\n $fila['imagen'] = $row['imagen'];\n $fila['descripcion'] = $row['descripcion'];\n\n $grupos[] = $fila;\n }\n\n cerrarConexion($con);\n return $grupos;\n }\n}", "public function cboGrados(){\n\t\t$db = new connectionClass();\n\n\t\t$sql = $db->query(\"SELECT * FROM grado\");\n\t\t$numberRecord = $sql->num_rows;\n\n\t\tif ($numberRecord != 0) {\n\t\t\t$dataArray = array();\n\t\t\t$i = 0;\n\n $dataArray[$i] = array(\"id\" => '0' , \"descripcion\" => 'Grado');\n\n\t\t\twhile($data = $sql->fetch_assoc()){\n $i++;\n\t\t\t\t$dataArray[$i] = array(\"id\" => $data['idGrado'], \"descripcion\" => $data['Descripcion']);\n\t\t\t}\n\n\t\t\theader(\"Content-type: application/json\");\n\t\t\treturn json_encode($dataArray);\n\t\t}\n\t}", "public function vistaGruposModel($id_usuario){\n\t\tif(empty($id_usuario)){ //verificar si esta vacio el id de usuario (maestro), se obtienen todos los grupos\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM grupos\"); //preparacion de la consulta SQL\n\t\t}\n\t\telse{ //si no esta vacio, se filtra por el id mandado como parametro\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM grupos WHERE id_maestro = :id\"); //preparacion de la consulta SQL\n\t\t\t$stmt->bindParam(\":id\", $id_usuario);\n\t\t}\n\t\t$stmt->execute(); //ejecucion de la consulta\n\t\treturn $stmt->fetchAll(); //se retorna en un array asociativo el resultado de la consulta\n\t\t$stmt->close();\n\n\t}", "function listeGroupes ( ) {\n // Récupération de la liste des groupes.\n $param['cw'] = \"ORDER BY nomgroupe ASC\" ;\n $req = new clResultQuery ;\n $res = $req -> Execute ( \"Fichier\", \"getGroupes\", $param, \"ResultQuery\" ) ;\n // Formatage de cette liste pour l'insérer directement dans ModeliXe.\n for ( $i = 0 ; isset ( $res['idgroupe'][$i] ) ; $i++ ) { $tab[$res['nomgroupe'][$i]] = $res['nomgroupe'][$i] ; }\n // On renvoie la liste.\n return $tab ;\n }", "function fantacalcio_admin_groups_list() {\n $out = \"\";\n \n $out .= l(\"Aggiungi girone\", \"admin/fantacalcio/groups/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $groups = Group::all();\n $competitions = Competition::all();\n if ($groups) {\n $header = array(\n t(\"Girone\"), \n t(\"Attivo\"), \n t(\"Calendario\"), \n t(\"Classfica\"), \n t(\"Formazioni\"), \n t(\"Newsletter\"));\n foreach ($groups as $g_id => $group) {\n $rows[] = array(\n l($competitions[$group->competition_id]->name . \" - \" . $group->name, \"admin/fantacalcio/groups/\" . $g_id), \n fantacalcio_check_value($group->active), \n \n // \"<img src='\" .base_path() . drupal_get_path(\"module\", \"fantacalcio\") . \"/images/\" . get_image_check($group->active) . \"'>\",\n $group->matches_order, \n $group->standings_order, \n $group->lineups_order, \n $group->newsletters_order);\n }\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"empty\" => t(\"Nessun gruppo\"))));\n }\n \n return $out;\n}", "function leerGrupos($entrada) {\n $grupos = [];\n\n $usuario = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n\n $con = crearConexion();\n\n $query = \"SELECT completa.id, completa.nombre, completa.imagen, completa.fecha_hora, completa.descripcion \"\n . \"FROM (SELECT `nombre`, `imagen`, `descripcion` FROM `grupo`) AS completa WHERE NOT EXISTS \"\n . \"(SELECT `nombre`, `imagen`, `descripcion` FROM `grupo`, usuario_grupo WHERE `nombre`=usuario_grupo.grupo AND usuario_grupo.usuario='$usuario') \"\n . \"ORDER BY completa.fecha_hora ASC LIMIT 20\";\n\n $result = mysqli_query($con, $query);\n\n if (mysqli_num_rows($result) < 1) {\n return FALSE;\n } else {\n while ($row = mysqli_fetch_array($result)) {\n $fila = [];\n\n $fila['propietario'] = $row['propietario'];\n $fila['usuario'] = $row['usuario'];\n $fila['grupo'] = $row['grupo'];\n $fila['nombre'] = $row['nombre'];\n $fila['imagen'] = $row['imagen'];\n $fila['descripcion'] = $row['descripcion'];\n\n $grupos[] = $fila;\n }\n\n cerrarConexion($con);\n return $grupos;\n }\n}", "function buscar_grupos($tipo_musica, $edad){\n\n\t\t$sql = \"SELECT id_grupo FROM grupos WHERE tipo_musica='$tipo_musica' AND edad_min<='$edad' AND edad_max>='$edad'\";\n\n\t\t$resultado = consulta($sql);\n\n\t\treturn $resultado;\n\n\t}", "function selectAllPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"SELECT * FROM pessoa ORDER BY nome\";\r\n $resultado = $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados e armazena o retorno em $resultado\r\n $banco->close();\r\n while ($row = mysqli_fetch_array($resultado)) { // Formata o retorno do banco de dados e separa as informações por cada pessoa (row)\r\n $grupo[] = $row;\r\n }\r\n return $grupo; // grupo eh um array, onde cada indice contem as informacoes de uma pessoa\r\n}", "public function vistaGruposController()\n\t\t{\n\t\t\t$respuesta = Datos::vistaGruposModel(\"grupo\");\n\n\t\t\t#El constructor foreach proporciona un modo sencillo de iterar sobre arrays. foreach funciona sólo sobre arrays y objetos, y emitirá un error al intentar usarlo con una variable de un tipo diferente de datos o una variable no inicializada.\n\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\techo'<tr>\n\t\t\t\t\t<td>'.$item[\"id_grupo\"].'</td>\n\t\t\t\t\t<td>'.$item[\"nombre_grupo\"].'</td>\n\t\t\t\t\t<td><div class=\"btn-group\">\n <button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\">\n <span class=\"fa fa-cog\"></span>\n </button>\n <div class=\"dropdown-menu\">\n <a class=\"dropdown-item\" href=\"index.php?action=editar_grupo&id='.$item[\"id_grupo\"].'\">Actualizar</a>\n <a class=\"dropdown-item\" onclick=\"confirmarDelete('.$item[\"id_grupo\"].');\" href=\"index.php?action=grupos&idBorrar='.$item[\"id_grupo\"].'\" id=\"btn'.$item[\"id_grupo\"].'\">Eliminar</a>\n </div></td>\n\t\t\t\t</tr>';\n\t\t\t}\n\n\t\t}", "public function show(Grupos $grupos)\n {\n //\n }", "public function show(Grupos $grupos)\n {\n //\n }", "public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function getGruppi(){\n \n if($this->azienda>0){\n $cosa=(\" azienda = \".$this->azienda.\" OR owner=-1 \");\n\n $this->db->from(\"lm_categorie_prodotti\");\n \n $this->db->where($cosa);\n\n $query=$this->db->get();\n\n //$datas=$query->result();//\n $datas = $query->result_array();\n if(count($datas)>0){\n $gruppi=array();\n foreach($datas as $g){\n if($g[\"foto\"]==null){\n $g[\"foto\"]=\"/public/img/noimage.jpg\";\n }\n $gruppi[$g[\"gruppo\"]][]=$g;\n }\n }else{\n $cosa=(\"owner = \".$this->utente.\" OR owner = -1\");\n $this->db->from(\"lm_categorie_prodotti\");\n $this->db->where($cosa);\n\n $query=$this->db->get();\n $datas = $query->result_array();\n $gruppi=array();\n foreach($datas as $g){\n \n if($g[\"foto\"]==null){\n $g[\"foto\"]=\"/public/img/noimage.jpg\";\n }\n $gruppi[$g[\"gruppo\"]][]=$g;\n \n }\n }\n \n }else{\n redirect(\"/\");\n }\n \n return $gruppi;\n }", "public function devolveTodosGruposAreas() {\n\t\t$this->load->database();\n\t\t$queryResult = $this->db->select('Area.id as AreaID , Area.nome, Grupo.id as GrupoID, Grupo.tipo,')\n\t\t\t\t\t\t\t\t->from('Grupo_Area')\n\t\t\t\t\t\t\t\t->join('Area', 'Grupo_Area.area = Area.id')\n\t\t\t\t\t\t\t\t->join('Grupo', 'Grupo_Area.grupo = Grupo.id')\n\t\t\t\t\t\t\t\t->get();\n\t\t$result = $queryResult->result();\t\t\t\t\t\n\t\t\n\t\treturn $result;\n\t}", "function getAll() {\n $this->getConnection();\n $request = \"SELECT ID_GROUPE, DATE_CREATION, NOM, NIVEAU FROM GROUPE\";\n $result = $this->select($request);\n return $result;\n }", "public function queryAll($campos=\"*\",$criterio=\"\"){\n\t\t$sql = 'SELECT '.$campos.' FROM grupo_usuario_tabelas '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function all2($cod_programa) {\n \n $sql = \"SELECT * FROM inasistencia_grupo_motivos\";\n \n return DB::query($sql);\n }", "public function searchGrupo($grupo/*Request $request*/){\n\n \n $em = $this->getDoctrine()->getManager();\n $query2= $em->getRepository('SytemSGBundle:ServidorLdap')->findAll();\n if($query2/*file_exists($file3*/){\n // $row1=file($file3); \n foreach ($query2 as $key => $value) {\n $ipservidor=$value->getIpLdap();//trim($row1[0]);\n $complemento=$value->getComplemento();//trim($row1[1]);\n $login=$value->getUsername();//trim($row1[2]);\n $senha=$value->getPassword();//trim($row1[3]);\n } \n $ldapconn = @ldap_connect($ipservidor/*\"200.239.152.140\"*/);\n if($ldapconn){\n $bind = @ldap_bind($ldapconn, $login,$senha/*\"cn=arp,dc=ufop,dc=br\",\"th0123\"*/); \n if($bind){\n $filter2 = \"(gidNumber=\".$grupo.\")\";\n $gindnumber=$grupo;\n $justthese2 = array(\"cn\"); //the attributes to pull, which is much more efficient than pulling all attributes if you don't do this\n $sr2 = ldap_search($ldapconn,\"ou=Grupos,\".$complemento/*\"dc=ufop,dc=br\"*/, $filter2, $justthese2);\n $entry = ldap_get_entries($ldapconn, $sr2); \n if($entry['count']>0){\n \n $namegrupo=$entry[0]['cn'][0];\n \n return TRUE; \n }\n else{\n return FALSE; \n }\n }\n @ldap_close($ldapconn);\n }else{\n return FALSE; \n }\n }else{\n return FALSE; \n }\n \n }", "function graficos(){\n $professores = DB::table('professor')->get()->sortBy(\"nome\");\n //Pega os dados da disciplina no banco\n $disciplinas = DB::table('disciplina')->get()->sortBy(\"descricao\");\n\n //array professor disciplina\n $professor_disciplina = array();\n //String que vai receber os dados do grafico 1\n $string_grafico1 = \"\";\n\n //For rodando os dados de forma a pegar os dados dos professores do banco e contar quantas materias eles dão aula\n foreach($professores as $professor){\n $id = $professor->id;\n $nome = $professor->nome;\n //Comando para verificar atravez do id do professor, quantas materias eles dão aula\n $qtd_disciplina = Professor_Disciplina::Where('professor_id', $id)->count();\n\n //Comando para Adiciona os elementos no final do array\n array_push($professor_disciplina, $qtd_disciplina, $nome);\n\n //String recebe os dados formando json para o grafico\n $string_grafico1 .= \"{ 'professor' : '\" . $nome . \"', 'qtd' : \". $qtd_disciplina . \"}, \";\n \n }\n\n //array disciplina professor\n $disciplina_professor = array();\n //String que vai receber os dados do grafico 2\n $string_grafico2 = \"\";\n\n\n //For rodando os dados de forma a pegar os dados das disciplinas do banco e contar quantos professores ministram aquela disciplina\n foreach($disciplinas as $disciplina)\n {\n $id = $disciplina->id;\n $descricao = $disciplina->descricao;\n //Comando para verificar atravez do id da disciplina, quantos professores que ministram a disciplina\n $qtd_professor = Professor_Disciplina::Where('disciplina_id', $id)->count();\n //Comando para Adiciona os elementos no final do array\n array_push($disciplina_professor, $qtd_professor, $descricao);\n\n //String recebe os dados formando json para o grafico\n $string_grafico2 .=\"{ 'disciplina' : '\" . $descricao . \"', 'qtd' : \". $qtd_professor . \"}, \";\n }\n\n //retorna para view grafico, os dados de professores para grafico 1 e disciplinas para grafico 2\n return view('layouts.grafico', array('grafico2' => $string_grafico2), array('grafico' => $string_grafico1));\n }", "function getGroupList() {\n return getAll(\"SELECT * FROM `group` WHERE admin_id = ?\", [getLogin()['uid']]);\n}", "public function listarSocios() {\r\n $sql = \"select j.nombre,j.apellido,j.cedula,j.fechanac, j.porcentaje, m.nombre from juntadirectiva as j, municipio as m \"\r\n\t\t .\" where j.ciudadnac = m.id\";\t\t\r\n $respuesta = $this->object->ejecutar($sql);\r\n $this->construirListadoSocio($respuesta);\r\n }", "public function consultarGrillaSoporte() {\n $this->load->model(\"personas/modpersonas\", \"mpers\");\n $this->load->model(\"modform\", \"mform\");\n\n $response['codiError'] = 0;\n $response['mensaje'] = '';\n $response['data'][0]['tipo_docu'] = '';\n $response['data'][0]['nume_docu'] = '';\n $response['data'][0]['nombre'] = '';\n $response['data'][0]['jefe'] = '';\n $response['data'][0]['sexo'] = '';\n $response['data'][0]['edad'] = '';\n $response['data'][0]['opciones'] = '';\n\n $arrParam = array();\n for ($i = 1; $i < 20; $i++) {\n $valor = $this->uri->segment($i);\n if ($i == 3 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['formulario'] = urldecode($valor);\n }\n if ($i == 4 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['tipoDocu'] = urldecode($valor);\n }\n if ($i == 5 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['numeDocu'] = urldecode($valor);\n }\n if ($i == 6 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['nombre1'] = strtoupper(urldecode($valor));\n }\n if ($i == 7 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['nombre2'] = strtoupper(urldecode($valor));\n }\n if ($i == 8 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['apellido1'] = strtoupper(urldecode($valor));\n }\n if ($i == 9 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['apellido1'] = strtoupper(urldecode($valor));\n }\n }\n\n $arrPers = $this->mpers->consultarPersonas($arrParam);\n //pr($arrPers); exit;\n if(count($arrPers) > 0) {\n $arrTipoDocuPers = $this->mform->consultarRespuestaDominio(array('idDominio' => 26));\n $arrSexos = $this->mform->consultarRespuestaDominio(array('idDominio' => 27));\n $arrCF = $this->mform->consultarOpciones('P_JEFE_HOGAR');\n foreach ($arrPers as $kp => $vp) {\n $tipoDocu = $sexo = '';\n $jefe = 'No';\n foreach ($arrTipoDocuPers as $ktd => $vtd) {\n if($vtd['ID_VALOR'] == $vp['PA_TIPO_DOC']) {\n $tipoDocu = $vtd['ETIQUETA'];\n }\n }\n foreach ($arrSexos as $kse => $vse) {\n if($vse['ID_VALOR'] == $vp['P_SEXO']) {\n $sexo = $vse['ETIQUETA'];\n }\n }\n // if(!empty($vp['P_NRO_PER']) && $vp['P_NRO_PER'] == 1) {\n if(!empty($vp['H_ID_JEFE'])) {\n $jefe = 'Sí';\n }\n $response['data'][$kp]['tipo_docu'] = $tipoDocu;\n $response['data'][$kp]['nume_docu'] = $vp['PA1_NRO_DOC'];\n $response['data'][$kp]['nombre'] = $vp['nombre'];\n $response['data'][$kp]['jefe'] = $jefe;\n $response['data'][$kp]['sexo'] = $sexo;\n $response['data'][$kp]['edad'] = $vp['P_EDAD'];\n $response['data'][$kp]['opciones'] = '<button class=\"verHogar btn btn-sm btn-info\" type=\"button\" data-encuesta=\"' . $vp['COD_ENCUESTAS'] . '\" title=\"Ver hogar\">\n <span class=\"glyphicon glyphicon-home\" aria-hidden=\"true\"></span></button>&nbsp;\n <button class=\"verEntrevistas btn btn-sm btn-info\" type=\"button\" data-encuesta=\"' . $vp['COD_ENCUESTAS'] . '\" title=\"Ver resultado entrevistas\">\n <span class=\"glyphicon glyphicon-eye-open\" aria-hidden=\"true\"></span></button>';\n }\n }\n //pr($response); exit;\n $this->output->set_content_type('application/json', 'utf-8')->set_output(json_encode($response));\n }", "public function consultarGrillaSoporte() {\n $this->load->model(\"personas/modpersonas\", \"mpers\");\n $this->load->model(\"modform\", \"mform\");\n\n $response['codiError'] = 0;\n $response['mensaje'] = '';\n $response['data'][0]['tipo_docu'] = '';\n $response['data'][0]['nume_docu'] = '';\n $response['data'][0]['nombre'] = '';\n $response['data'][0]['jefe'] = '';\n $response['data'][0]['sexo'] = '';\n $response['data'][0]['edad'] = '';\n $response['data'][0]['opciones'] = '';\n\n $arrParam = array();\n for ($i = 1; $i < 20; $i++) {\n $valor = $this->uri->segment($i);\n if ($i == 3 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['formulario'] = urldecode($valor);\n }\n if ($i == 4 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['tipoDocu'] = urldecode($valor);\n }\n if ($i == 5 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['numeDocu'] = urldecode($valor);\n }\n if ($i == 6 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['nombre1'] = strtoupper(urldecode($valor));\n }\n if ($i == 7 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['nombre2'] = strtoupper(urldecode($valor));\n }\n if ($i == 8 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['apellido1'] = strtoupper(urldecode($valor));\n }\n if ($i == 9 && !empty($valor) && ($valor != '-' && $valor != '0')) {\n $arrParam['apellido1'] = strtoupper(urldecode($valor));\n }\n }\n\n $arrPers = $this->mpers->consultarPersonas($arrParam);\n //pr($arrPers); exit;\n if(count($arrPers) > 0) {\n $arrTipoDocuPers = $this->mform->consultarRespuestaDominio(array('idDominio' => 26));\n $arrSexos = $this->mform->consultarRespuestaDominio(array('idDominio' => 27));\n $arrCF = $this->mform->consultarOpciones('P_JEFE_HOGAR');\n foreach ($arrPers as $kp => $vp) {\n $tipoDocu = $sexo = '';\n $jefe = 'No';\n foreach ($arrTipoDocuPers as $ktd => $vtd) {\n if($vtd['ID_VALOR'] == $vp['PA_TIPO_DOC']) {\n $tipoDocu = $vtd['ETIQUETA'];\n }\n }\n foreach ($arrSexos as $kse => $vse) {\n if($vse['ID_VALOR'] == $vp['P_SEXO']) {\n $sexo = $vse['ETIQUETA'];\n }\n }\n // if(!empty($vp['P_NRO_PER']) && $vp['P_NRO_PER'] == 1) {\n if(!empty($vp['H_ID_JEFE'])) {\n $jefe = 'Sí';\n }\n $response['data'][$kp]['tipo_docu'] = $tipoDocu;\n $response['data'][$kp]['nume_docu'] = $vp['PA1_NRO_DOC'];\n $response['data'][$kp]['nombre'] = $vp['nombre'];\n $response['data'][$kp]['jefe'] = $jefe;\n $response['data'][$kp]['sexo'] = $sexo;\n $response['data'][$kp]['edad'] = $vp['P_EDAD'];\n $response['data'][$kp]['opciones'] = '<button class=\"verHogar btn btn-sm btn-info\" type=\"button\" data-encuesta=\"' . $vp['COD_ENCUESTAS'] . '\" title=\"Ver hogar\">\n <span class=\"glyphicon glyphicon-home\" aria-hidden=\"true\"></span></button>&nbsp;\n <button class=\"verEntrevistas btn btn-sm btn-info\" type=\"button\" data-encuesta=\"' . $vp['COD_ENCUESTAS'] . '\" title=\"Ver resultado entrevistas\">\n <span class=\"glyphicon glyphicon-eye-open\" aria-hidden=\"true\"></span></button>';\n }\n }\n //pr($response); exit;\n $this->output->set_content_type('application/json', 'utf-8')->set_output(json_encode($response));\n }", "function getAllGroups() {\n return getAll(\"SELECT * FROM `group`\");\n}", "public function graficados($dataSimulacro)\n {\n// print_r($dataSimulacro);\n \n// exit;\n // $consulta=$this->dbAdapter->query(\"select id , folio FROM usuarios where nombre = '\" . $dataUser['nombre'].\"' and correo = '\".$dataUser['correo']. \"'\" ,Adapter::QUERY_MODE_EXECUTE);\n $query =\"SELECT \n s.tiempo_estoy_listo,\n v.nombre\n FROM\n voluntario_simulacro_grupo s\n INNER JOIN\n voluntarioCreador v ON s.idvoluntario = v.id\n INNER JOIN\n (\n SELECT\n MIN(tiempo_estoy_listo) AS minimo,\n MAX(tiempo_estoy_listo) AS maximo\n FROM\n voluntario_simulacro_grupo\n WHERE\n idSimulacro = '\" . $dataSimulacro[0].\"'\n ) m ON s.tiempo_estoy_listo = m.minimo OR s.tiempo_estoy_listo = m.maximo AND s.idSimulacro = '\" . $dataSimulacro[0].\"'\";\n \n $consulta = $this->dbAdapter->query($query, Adapter::QUERY_MODE_EXECUTE);\n \n $res = $consulta->toArray();\n \n// print_r($res);exit;\n \n return $res;\n }", "function SHOWALL(){\n\n $stmt = $this->db->prepare(\"SELECT * FROM centro\");\n $stmt->execute();\n $centros_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $allcentros = array(); //array para almacenar los datos de todos los centros\n\n //Recorremos todos las filas de centros devueltas por la sentencia sql\n foreach ($centros_db as $centro){\n //Introducimos uno a uno los grupos recuperados de la BD\n array_push($allcentros,\n new CENTRO_Model(\n $centro['centro_id'],$centro['nombre_centro'],$centro['edificio_centro']\n )\n );\n }\n return $allcentros;\n }", "public function actiongroup (){\n @$arrayDomain = isset($_POST['delD'])? $_POST['delD'] : false;\n @$arrayGroup = isset($_POST['valor'])? $_POST['valor'] : false;\n @$arrayGroupType = isset($_POST['typeValor'])? $_POST['typeValor'] : false;\n\n \n foreach($arrayDomain as $IDdom){\n /// Cambio Dominio A no group\n DB::table('w59_dominio')\n ->where('id', $IDdom)\n ->update(['IDgroup' => '2']);\n\n // Cambio Paginas a sin grupo\n DB::table('w59_page')\n ->where('IDdominio','=', $IDdom)\n ->update(['IDgroudpage' => '0']);\n }\n \n $ArrayDOM= DB::table('w59_dominio')\n ->select('url')->whereIn('id',$arrayDomain)->get(); \n foreach($ArrayDOM as $po){\n if($arrayGroupType==2){\n $GetURL= DB::table('w59_dominio')\n ->select('url')->get(); \n \n }else{\n $GetURL= DB::table('w59_dominio')\n ->select('url')->where('IDgroup','=',$arrayGroup)->get(); \n \n }\n \n\n foreach($GetURL as $pa){\n $url =\"https://www.\".$pa->url.\"/wp-json/kb/v2/worked/14/\";\n $this->curl_load($url);\n \n } \n $url =\"https://www.\".$po->url.\"/wp-json/kb/v2/worked/14/\";\n $this->curl_load($url);\n }\n return back()->withInput();\n\n }", "function ListaCompetenciaDeUsuario(){\n \n include(\"../modelo/cnx.php\");\n $cnx = pg_connect($entrada) or die (\"Error de conexion. \". pg_last_error());\n session_start();\n $id_usuario=$_SESSION[\"id_usuario\"];\n $seleccionar=\"SELECT competencia.id_competencia, competencia.nombre_competencia, fecha_inicio_competencia, fecha_fin_competencia\n FROM equipo_usuario, equipo, competencia_equipo, competencia, usuario\n where competencia.id_competencia=competencia_equipo.id_competencia and\n competencia_equipo.id_equipo=equipo.id_equipo and \n equipo.id_equipo=equipo_usuario.id_equipo and\n equipo_usuario.id_usuario='$id_usuario'\n group by competencia.id_competencia, competencia.nombre_competencia, fecha_inicio_competencia, fecha_fin_competencia\n order by competencia.id_competencia desc\";\n \n $result = pg_query($seleccionar) or die('ERROR AL INSERTAR DATOS: ' . pg_last_error());\n $columnas = pg_numrows($result);\n $this->formu.='<table><tr><td>Identificador</td>';\n $this->formu.='<td>Nombre Competencia</td>';\n $this->formu.='<td>Fecha Inicio</td>';\n $this->formu.='<td>Fecha Final</td></tr>';\n for($i=0;$i<=$columnas-1; $i++){\n $line = pg_fetch_array($result, null, PGSQL_ASSOC);\n $this->formu.='<tr> \n <td>'.$line['id_competencia'].'</td> \n <td>'.$line['nombre_competencia'].'</td>\n <td>'.$line['fecha_inicio_competencia'].'</td>\n <td>'.$line['fecha_fin_competencia'].'</td>\n </tr>';\n }\n $this->formu.='</table>';\n\n return $this->formu; \n }", "function crearArrrayGrupo($name){\n\t\t\t\n\t\t\t$file = fopen(\"../Archivos/ArrayGrupo.php\", \"w\");\n\t\tfwrite($file,\"<?php class consult { function array_consultar(){\". PHP_EOL);\n\t\t\t\t \tfwrite($file,\"\\$form=array(\" . PHP_EOL);\n\t\t$mysqli=$this->conexionBD();\n\t\t$resultado=$mysqli->query(\"SELECT * FROM grupo where `NOMBRE_GRUPO` ='$name'\");\n\t\tif(mysqli_num_rows($resultado)){\n\t\twhile($fila = $resultado->fetch_array())\n\t\t\t{\n\t\t\t\t$filas[] = $fila;\n\t\t\t}\n\t\t\tforeach($filas as $fila)\n\t\t\t{ \n\t\t\t\t$nombre=$fila['NOMBRE_GRUPO'];\n\t\t\t\t$descripcion=$fila['DESCRIPCION'];\n\t\t\t\t fwrite($file,\"array(\\\"nombre\\\"=>'$nombre',\\\"descripcion\\\"=>'$descripcion'),\" . PHP_EOL);\n\t\t\t }\n\t\t}\n\t\t\t\t fwrite($file,\");return \\$form;}}?>\". PHP_EOL);\n\t\t\t\t fclose($file);\n\t\t\t\t $resultado->free();\n\t\t\t\t $mysqli->close();\n\n\t\t}", "function _Registros($Regs=0){\n\t\t// Creo grid\n\t\t$Grid = new nyiGridDB('NOTICIAS', $Regs, 'base_grid.htm');\n\t\t\n\t\t// Configuro\n\t\t$Grid->setParametros(isset($_GET['PVEZ']), 'titulo');\n\t\t$Grid->setPaginador('base_navegador.htm');\n\t\t$arrCriterios = array(\n\t\t\t'id'=>'Identificador',\n\t\t\t'titulo'=>'T&iacute;tulo', \n\t\t\t\"IF(p.visible, 'Si', 'No')\"=>\"Visible\"\n\t\t);\n\t\t$Grid->setFrmCriterio('base_criterios_buscador.htm', $arrCriterios);\n\t\n\t\t// Si viene con post\n\t\tif ($_SERVER[\"REQUEST_METHOD\"] == \"POST\"){\n\t\t\t$Grid->setCriterio($_POST['ORDEN_CAMPO'], $_POST['ORDEN_TXT'], $_POST['CBPAGINA']);\n\t\t\tunset($_GET['NROPAG']);\n\t\t}\n\t\telse if(isset($_GET['NROPAG'])){\n\t\t\t// Numero de Pagina\n\t\t\t$Grid->setPaginaAct($_GET['NROPAG']);\n\t\t}\n\t\n\t\t$Campos = \"p.id_noticia AS id, p.titulo, pf.nombre_imagen, pf.extension, IF(p.visible, 'Si', 'No') AS visible, p.copete\";\n\t\t$From = \"noticia p LEFT OUTER JOIN noticia_foto pf ON pf.id_noticia = p.id_noticia AND pf.orden = 1\";\n\t\t\n\t\t$Grid->getDatos($this->DB, $Campos, $From);\n\t\t\n\t\t// Devuelvo\n\t\treturn($Grid);\n\t}", "public function vistaGrupoModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, cuatrimestre FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public function mafiliados_grilla($datos = array()) {\n $data = array();\n $rp = $datos['rp'];\n $data['page'] = $datos['page']; //numero de pagina\n $data['rp'] = $datos['rp']; //registros por pagina\n $qtype = $datos['qtype']; //campo de busqueda\n $query = $datos['query']; //dato introducido por el usuario\n \n if ($qtype=='afi.cdeno'){\n $query=strtoupper($query);\n $busqueda = ($qtype != '' && $query != '') ? \"where $qtype like '$query%'\" : '';\n }else{\n $busqueda = ($qtype != '' && $query != '') ? \"where $qtype = '$query'\" : '';\n }\n $registros = ($datos['page']-1) * $rp;\n $consulta = \"SELECT COUNT(*) as count FROM afiliados afi \" . $busqueda;\n $consulta = $this->db->query($consulta);\n if ($consulta==true){\n foreach ($consulta->result_array() as $row) {\n $total = $row['count'];\n }\n $data['total'] = $total;\n $consulta = \"SELECT afi.cdni,afi.cdeno,afi.ccuil,afi.cnuom,afi.cnume,COUNT(fam.*)::smallint as cfamilia FROM afiliados afi LEFT JOIN familiares fam ON fam.cdnititu=afi.cdni \". $busqueda . \" GROUP BY afi.ciden ORDER BY afi.cdeno limit \". $rp. \" offset \". $registros;\n $query = $this->db->query($consulta);\n $this->load->helper('manejacadena_helper');\n foreach ($query->result_array() as $row) {\n $new_row['dni'] = trim($row['cdni']);\n $new_row['deno'] = reemplazacaracter(trim($row['cdeno']));\n $new_row['cuil'] = trim($row['ccuil']);\n $new_row['nuom'] = trim($row['cnuom']);\n $new_row['nume'] = trim($row['cnume']);\n $new_row['familia'] = trim($row['cfamilia']);\n $data['rows'][] = array(\n 'id' => $new_row['dni'],\n 'cell' => array($new_row['dni'], $new_row['deno'],$new_row['nuom'],$new_row['nume'],\n $new_row['cuil'],$new_row['familia'])\n );\n }\n }\n echo json_encode($data);\n }", "public function EstudiantesGrupoMaterias($IdGrupo,$codigoperiodo,$idSubgrupo){\n\t\tglobal $userid,$db;\n\t\t\n\t\t?>\n <?PHP\n $SQL_EstudiantesGrupoMaterias=\"SELECT\n d.codigomateria,\n e.codigocarrera,\n count(*) as totalalumnosgrupo,\n 'Todos' as nomsubgrupo \n FROM\n \tdetalleprematricula AS d\n INNER JOIN prematricula AS p ON p.idprematricula = d.idprematricula\n INNER JOIN estudiante AS e ON e.codigoestudiante = p.codigoestudiante\n INNER JOIN estudiantegeneral ON e.idestudiantegeneral = estudiantegeneral.idestudiantegeneral\n WHERE\n \t(\n \t\tp.codigoestadoprematricula LIKE '1%'\n \t\tOR p.codigoestadoprematricula LIKE '4%'\n \t)\n AND (\n \td.codigoestadodetalleprematricula LIKE '1%'\n \tOR d.codigoestadodetalleprematricula LIKE '3%'\n )\n AND d.idgrupo = \".$IdGrupo.\"\n AND p.codigoperiodo = \".$codigoperiodo.\"\";\n \n if(isset($idSubgrupo)&&($idSubgrupo!=\"\")){\n $SQL_EstudiantesGrupoMaterias=\"SELECT\n g.codigomateria,\n e.codigocarrera,\n Count(*) AS totalalumnosgrupo,\n Subgrupos.NombreSubgrupo AS nomsubgrupo,\n g.codigomateria\n FROM\n SubgruposEstudiantes AS subest\n INNER JOIN estudiantegeneral AS est ON subest.idestudiantegeneral = est.idestudiantegeneral\n INNER JOIN Subgrupos ON subest.SubgrupoId = Subgrupos.SubgrupoId\n INNER JOIN grupo AS g ON Subgrupos.idgrupo = g.idgrupo\n INNER JOIN materia AS e ON e.codigomateria = g.codigomateria\n WHERE\n subest.SubgrupoId = '\".$idSubgrupo.\"'\"; \n }\n\t\t\n\t\t\t\t//echo $SQL_EstudiantesGrupoMaterias.\"<br>\";\t\t\t\t\t\n\t\t\tif($EstudiantesGrupoMaterias=&$db->Execute($SQL_EstudiantesGrupoMaterias)===false){\n\t\t\t\t\techo 'Error en el SQL de grupo de estudiantes materias....<br><br>',$SQL_EstudiantesGrupoMaterias;\n\t\t\t\t\tdie;\n\t\t\t}\t\n\t\t\n\t\t/***************************************************************/\t\t\t\t\t\t\t\n\t\t\n\t\t\tif(!$EstudiantesGrupoMaterias->EOF){\n $i = 0;\n \t\t\twhile(!$EstudiantesGrupoMaterias->EOF){\n \t\t\t $name1 = 'FechaIngreso_'.$i;\n $name2 = 'FechaEgreso_'.$i; \n \t\t\t\t/**********************verificar si tiene alguna rotacion********************************/\n $SQL_EstudiantesRotacion=\"\n SELECT\n \tre.RotacionEstudianteId,\n \tre.FechaIngreso,\n \tre.FechaEgreso,\n \tre.TotalDias,\n \tre.EstadoRotacionId,\n \tsr.NombreServicio,\n \tui.NombreUbicacion,\n \tsc.NombreConvenio,\n \ter.NombreEstado\n FROM\n \tRotacionEstudiantes AS re\n INNER JOIN ServicioRotaciones AS sr ON re.ServicioRotacionId = sr.ServicioRotacionId\n INNER JOIN UbicacionInstituciones AS ui ON re.IdUbicacionInstitucion = ui.IdUbicacionInstitucion\n INNER JOIN siq_convenio AS sc ON re.idsiq_convenio = sc.idsiq_convenio\n INNER JOIN EstadoRotaciones AS er ON re.EstadoRotacionId = er.EstadoRotacionId\n WHERE\n \tre.idestudiantegeneral = '\".$EstudiantesGrupoMaterias->fields['idestudiantegeneral'].\"'\n AND re.codigomateria='\".$EstudiantesGrupoMaterias->fields['codigomateria'].\"'\n AND re.codigoperiodo='\".$codigoperiodo.\"'\n AND re.codigocarrera='\".$EstudiantesGrupoMaterias->fields['codigocarrera'].\"'\";\n \t\t\n\t\t\t //echo $SQL_EstudiantesRotacion.\"<br>\";\t\t\t\t\t\n if($EstudiantesRotacion=&$db->Execute($SQL_EstudiantesRotacion)===false){\n \t\t\t\t echo 'Error en el SQL de rotaciones de estudiantes....<br><br>',$SQL_EstudiantesRotacion;\n \t\t\t\t\tdie;\n }\n \n \n /*************************************************/\n \t\t\t\t?>\n <tr>\n \t<td style=\"text-align: center;\"><strong><?PHP echo $EstudiantesGrupoMaterias->fields['totalalumnosgrupo']?></strong><input type=\"hidden\" id=\"total_alumnos\" name=\"total_alumnos\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['totalalumnosgrupo']; ?>\" /></td>\n <td><strong><input type=\"hidden\" name=\"codcarrera_<?php echo $i?>\" id=\"codcarrera_<?php echo $i?>\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['codigocarrera']?>\" /><input type=\"hidden\" name=\"codmateria_<?php echo $i?>\" id=\"codmateria_<?php echo $i?>\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['codigomateria']?>\" /><input type=\"hidden\" name=\"idsubgrupo_<?php echo $i?>\" id=\"idsubgrupo_<?php echo $i?>\" value=\"<?php echo $idSubgrupo;?>\" /><input type=\"hidden\" name=\"idgrupo_<?php echo $i?>\" id=\"idgrupo_<?php echo $i?>\" value=\"<?php echo $IdGrupo;?>\" /><?php echo $EstudiantesGrupoMaterias->fields['nomsubgrupo'] ?></strong></td>\n <td>\n <?php if(isset($EstudiantesRotacion->fields[\"NombreConvenio\"])){\n echo $EstudiantesRotacion->fields[\"NombreConvenio\"];\n }else{ ?>\n <select id=\"convenio_<?php echo $i?>\" name=\"convenio_<?php echo $i?>\" onchange=\"UbicacionInstitucionesConvenio('convenio_<?php echo $i?>', 'idubicacion_<?php echo $i?>')\">\n <option value=\"null\">Seleccione:</option>\n <?php\n echo $SqlConvenios = \"select sc.idsiq_convenio, sc.NombreConvenio from grupo g join materia m on m.codigomateria = g.codigomateria join conveniocarrera cc on cc.codigocarrera = m.codigocarrera join siq_convenio sc ON sc.idsiq_convenio = cc.idconvenio where g.idgrupo = '\".$IdGrupo.\"'\";\n \n $valorconvenio = $db->execute($SqlConvenios);\n foreach($valorconvenio as $datosconvenio){\n ?>\n <option value=\"<?php echo $datosconvenio['idsiq_convenio']?>\"><?php echo $datosconvenio['NombreConvenio']?></option> \n <?php\n }\n ?> \n </select>\n <?php } ?>\n </td>\n <td>\n <?php if(isset($EstudiantesRotacion->fields[\"NombreUbicacion\"])){\n echo $EstudiantesRotacion->fields[\"NombreUbicacion\"];\n }else{ ?>\n <select id=\"idubicacion_<?php echo $i?>\" name=\"idubicacion_<?php echo $i?>\">\n <option value=\"null\">Seleccione:</option>\n <?php\n /*$sqlUbicacion= \"SELECT ui.IdUbicacionInstitucion, ui.NombreUbicacion FROM UbicacionInstituciones ui JOIN siq_convenio sc ON sc.idsiq_institucionconvenio = ui.idsiq_institucionconvenio WHERE sc.idsiq_convenio = '\".$idconvenio.\"'\";\n $valorUbicacion = $db->execute($sqlUbicacion);\n foreach($valorUbicacion as $datosUbicacion){\n ?>\n <option value=\"<?php echo $datosUbicacion['IdUbicacionInstitucion']?>\"><?php echo $datosUbicacion['NombreUbicacion']?></option>\n <?php\n }*/\n ?> \n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"NombreServicio\"])){\n echo $EstudiantesRotacion->fields[\"NombreServicio\"];\n }else{ ?><select id=\"servicio_<?php echo $i?>\" name=\"servicio_<?php echo $i?>\">\n <option value=\"null\">Seleccione:</option>\n <?php\n $sqlServicio = \"select ServicioRotacionId, NombreServicio from ServicioRotaciones where codigomateria = '\".$EstudiantesGrupoMaterias->fields['codigomateria'].\"'\";\n echo $sqlServicio;\n $valoresServicio=$db->Execute($sqlServicio);\n foreach($valoresServicio as $datosServicio)\n {\n ?>\n <option value=\"<?php echo $datosServicio['ServicioRotacionId']?>\"><?php echo $datosServicio['NombreServicio']?></option>\n <?php\n }\n ?> \n \n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaIngreso\"])){\n echo $EstudiantesRotacion->fields[\"FechaIngreso\"];\n }else{ ?><input type=\"text\" id=\"<?PHP echo $name1?>\" name=\"<?PHP echo $name1?>\" class=\"requerido\" size=\"12\" style=\"text-align:center;\" readonly=\"readonly\" value=\"<?PHP echo $value?>\" placeholder=\"<?PHP echo $Ejemplo?>\" <?PHP echo $readonly;?> onmouseover=\"$('#<?PHP echo $name1?>').datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: 'button',\n buttonImage: '../../../../css/themes/smoothness/images/calendar.gif',\n buttonImageOnly: true,\n dateFormat: 'yy-mm-dd'\n });\n \n $('#ui-datepicker-div').css('display','none');\" />\n \n \n \n <?php } ?></td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaEgreso\"])){\n echo $EstudiantesRotacion->fields[\"FechaEgreso\"];\n }else{ ?><input type=\"text\" id=\"<?PHP echo $name2?>\" name=\"<?PHP echo $name2?>\" class=\"requerido\" size=\"12\" style=\"text-align:center;\" readonly=\"readonly\" value=\"<?PHP echo $value?>\" placeholder=\"<?PHP echo $Ejemplo?>\" <?PHP echo $readonly;?> onmouseover=\"$('#<?PHP echo $name2?>').datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: 'button',\n buttonImage: '../../../../css/themes/smoothness/images/calendar.gif',\n buttonImageOnly: true,\n dateFormat: 'yy-mm-dd'\n });\n \n $('#ui-datepicker-div').css('display','none');\"/>\n <?php } ?> \n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"TotalDias\"])){\n echo $EstudiantesRotacion->fields[\"TotalDias\"];\n }else{ ?><input type=\"text\" id=\"TotDias_<?php echo $i?>\" name=\"TotDias_<?php echo $i?>\" value=\"\"/><!--<a onclick=\"window.open('./Rotaciones_html.php?actionID=VwFormularioDetalleRotacion','', 'width=600, height=600 scrollbars=no channelmode=no');\" title=\"Ver detalles\">__</a>--></td>\n <?php } ?>\n <td><?php if(isset($EstudiantesRotacion->fields[\"NombreEstado\"])){\n echo $EstudiantesRotacion->fields[\"NombreEstado\"];\n }else{ ?><select id=\"estadorotacion_<?php echo $i?>\" name=\"estadorotacion_<?php echo $i?>\" />\n <option value=\"null\">Seleccione:</option>\n <option value=\"1\" selected=\"\">Activo</option>\n <option value=\"2\">Inactivo</option>\n <option value=\"3\">Bloqueado</option>\n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaEgreso\"])){\n echo \"No aplica\";\n }else{ ?><input type=\"checkbox\" name=\"checkestudiante_<?php echo $i?>\" id=\"checkestudiante_<?php echo $i?>\" value=\"on\"/></td>\n <?php } ?> \n </tr> \n <?PHP\n $i++;\n\t\t\t\t\t\t\t\t/******************************************************/\n\t\t\t\t\t\t\t\t$EstudiantesGrupoMaterias->MoveNext();\n\t\t\t\t\t\t\t\t}////fin while principal\n \n\t\t\t\t\t\t\t?>\n <script type=\"text/javascript\" >\n var total_rows='<?php echo $i?>';\n $(\"#total_rows\").val('esto');\n \n for(i=0;i>=<?php echo $i; ?>;i++){\n $('#FechaIngreso_'+i).datepicker({\n changeMonth: true,\n changeYear: true,\n \n dateFormat: 'yy-mm-dd'\n });\n \n $(\"#FechaEgreso_\"+i).datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: \"button\",\n buttonImage: \"../../../../css/themes/smoothness/images/calendar.gif\",\n buttonImageOnly: true,\n dateFormat: \"yy-mm-dd\"\n });\n \n \n } \n \n $('#ui-datepicker-div').css('display','none');\n \n \n \n </script>\n \n \n \t\n \n\t\t\t<?PHP\n return $i;\n\t\t\t}\n\t\t\n\t}", "public function mostrar_ajax_grados()\n\t{\n\t\t$sentencia = \"select t2.id_grado, t2.nombre_grado, t2.cant_est from grados t2 \"; \n\t\t//var_dump($this->pdo); \\\"$tagger\\\"\n\t\n\t\t$resultado = $this->pdo->prepare($sentencia);\n\t\t$html=\"\";\n\t\t$resultado->execute();\n\n\t\t$num = $resultado->fetchAll();\n\n\t\t$valor = array();\n\t\t$valor = array(\n\t\t\"data\"=> $num\n\t\t); \n\t\theader('Content-type: application/json');\n\t\techo json_encode($valor);\n\t\t//return $datos;\n\t}", "public function obtenerViajesplus();", "function galerien_liste()\n\t{\n\t\t$sql = sprintf(\"SELECT * FROM %s\n\t\t\t\t\t\tORDER BY bgalg_order_id\",\n\t\t\t$this->db_praefix.\"ecard_galerien\"\n\t\t);\n\t\t$temp_return = $this->db->get_results($sql, ARRAY_A);\n\t\treturn $temp_return;\n\t}", "public function Listar(){\n\t\t\t$view_agendamento = new ViewAgendamentoPacienteFuncionarioClass();\n\n\t\t\t//Chama o método para selecionar os registros\n \n \n \n\t\t\treturn $view_agendamento::Select();\n\t\t}", "static public function ctrCrearGparalelos(){\n\n if(isset($_POST[\"idGrado\"])){\n if(is_array($_POST[\"idParalelo\"]) && isset($_POST[\"idParalelo\"])){\n $tabla=\"edu_tab_grado_paralelo\"; \n $idParalelo=$_POST[\"idParalelo\"];\n\n foreach ($idParalelo as $value) {\n $datos=array(\"idGrado\" => $_POST[\"idGrado\"]\n ,\"idParalelo\"=>$value,\n \"idPeriodo\"=>$_POST[\"nuevoPeriodo\"]);\n $respuesta=ModeloGparalelos::mdlMostrarRepetidosG($tabla,$datos);\n // var_dump($respuesta);\n }\n if(empty($respuesta)){\n\n foreach ($idParalelo as $value) {\n $datos=array(\"idGrado\" => $_POST[\"idGrado\"]\n ,\"idParalelo\"=>$value,\n \"cupos\"=>$_POST[\"nuevoCupos\"],\n \"observacion\"=>$_POST[\"nuevaObservacion\"],\n \"estado\"=>$_POST[\"nuevoEstado\"],\n \"idPeriodo\"=>$_POST[\"nuevoPeriodo\"]);\n $respuesta=ModeloGparalelos::mdlCrearGparalelos($tabla,$datos);\n }\n if($respuesta==\"ok\"){\n echo'<script>\n Swal.fire({\n icon: \"success\",\n title: \"¡Ha sido guardado correctamente!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm:false\n }).then(function(result){\n if (result.value) {\n window.location = \"'.SERVERURL.'gparalelos/\";\n }\n });\n \n </script>';\n }else {\n echo'<script>\n Swal.fire({\n icon: \"error\",\n title: \"¡La relación grado-paralelo NO ha sido guardado correctamente!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm:false\n }).then(function(result){\n if (result.value) {\n window.location = \"'.SERVERURL.'gparalelos/\";\n }\n });\n \n </script>';\n }\n }else{\n echo'<script>\n Swal.fire({\n icon: \"error\",\n title: \"¡Ya existe relación entre el grado y el paralelo!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm:false\n }).then(function(result){\n if (result.value) {\n window.location = \"'.SERVERURL.'gparalelos/\";\n }\n });\n \n </script>';\n }\n }\n else{\n echo'<script>\n Swal.fire({\n icon: \"error\",\n title: \"¡Debe seleccionar los campos!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm:false\n }).then(function(result){\n if (result.value) {\n window.location = \"'.SERVERURL.'gparalelos/\";\n }\n });\n \n </script>';\n }\n \n }\n\n }", "function GetPeliculasPorGenero($generoNombre){\n $genero = $this->db->prepare(\"SELECT * FROM genero WHERE nombre=?\");//todo de genero del nombre que quiero\n $genero->execute(array($generoNombre));//le asignamos ese nombre\n $arrGenero = $genero->fetchAll(PDO::FETCH_OBJ);//lo pedimos a la base de datos\n //print_r($id_generos[0]->id_genero);//lo imprimimos para ver que tal\n \n $sentencia = $this->db->prepare(\"SELECT * FROM peliculas WHERE id_genero=?\");//todo de pelicuas de un id_genero que quiero\n $sentencia->execute(array($arrGenero[0]->id_genero));//lo ejecuto y le paso el id que busco\n // print_r($sentencia->fetchAll(PDO::FETCH_OBJ));\n return $sentencia->fetchAll(PDO::FETCH_OBJ); \n }", "protected function getGroupList() {}", "protected function getGroupList() {}", "function get_entradas_boni_gral_list($offset, $per_page, $ubicacion)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct(e.pr_facturas_id), e.id as id1, e.fecha, sum(costo_total) as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatus from entradas as e left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id where e.estatus_general_id=1 and ctipo_entrada=9 group by e.id, e.fecha, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id order by e.fecha desc limit $per_page offset $offset\";\n\n\t\t//Buscar en la base de datos\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 obtenerGrupoAmodificar($nombreGrupo) {\n $nombre = trim(filter_var($nombreGrupo, FILTER_SANITIZE_STRING));\n $grupo = [];\n\n $con = crearConexion();\n\n $query = \"SELECT nombre, imagen, descripcion, categoria FROM grupo, grupo_categoria WHERE grupo.nombre = grupo_categoria.grupo AND grupo.nombre = '$nombre'\";\n\n $result = mysqli_query($con, $query);\n $row = mysqli_fetch_array($result);\n $grupo['imagen'] = $row['imagen'];\n $grupo['nombre'] = $row['nombre'];\n $grupo['descripcion'] = $row['descripcion'];\n $grupo['categoria'] = $row['categoria'];\n\n cerrarConexion($con);\n\n return $grupo;\n}", "function altaGrupo($nombre,$descripcion)\n\t\t{\t\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"INSERT INTO `grupo`(`NOMBRE_GRUPO`, `DESCRIPCION`) VALUES ('$nombre','$descripcion')\";\n\t\t\t$mysqli->query($query);\n\t\t\t$mysqli->close();\n\t\t\t\t\n\t\t}", "function getRegistrosPlus() {\n\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t$this->resultado = $this->getDetalleRegistrosPlus($this->extra[\"monitor_id\"], $this->extra[\"pagina\"]);\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\n\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t$sql = \"SELECT foo.nodo_id FROM (\".\n\t\t\t \"SELECT DISTINCT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\n\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\tpg_escape_string($this->objetivo_id).\",'\".\n\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"','\".\n\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')) AS foo, nodo n \".\n\t\t\t \"WHERE foo.nodo_id=n.nodo_id ORDER BY orden\";\n\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\n\t\t$monitor_ids = array();\n\t\twhile ($row = $res->fetchRow()) {\n\t\t\t$monitor_ids[] = $row[\"nodo_id\"];\n\t\t}\n\n\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\tif (count($monitor_ids) == 0) {\n\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\treturn;\n\t\t}\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'contenedor_tabla.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_CONTENEDORES', 'lista_contenedores');\n\n\t\t/* LISTA DE MONITORES */\n\t\t$orden = 1;\n\t\tforeach ($monitor_ids as $monitor_id) {\n\t\t\t$T->setVar('__contenido_id', 'regplus_'.$monitor_id);\n\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleRegistrosPlus($monitor_id, 1, $orden));\n\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t}\n\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "public function listorg(Request $request)\n {\n $userGroup = UserGroup::where('id_users', Auth::user()->id_users)->pluck('id_groups'); # Auth::user()->id\n $univGroup = Groups::where('id_univ', Auth::user()->id_univ)->pluck('id_groups'); # Auth::user()->id\n\n if ($request->has('search')) {\n $string = $request->input('search');\n $searchValues = preg_split('/\\s+/', $string, -1, PREG_SPLIT_NO_EMPTY);\n $data = Groups::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->where('nama', $value)\n ->orWhere('nama', 'like', \"%{$value}%\");\n }\n })->get();\n } elseif ($request->input('filter') === 'semua') {\n $data = Groups::all();\n } else {\n $data = Groups::whereIn('id_groups', $univGroup)->get();\n }\n\n\n return view('user.views.listorg', compact('data', 'userGroup'));\n }", "function getAll(){\n\t\t\t$pelicula = new Pelicula();\n\n\t\t\t//Creamos el array y le agregamos el item\n\t\t\t$peliculas = array();\n\t\t\t$peliculas[\"items\"] = array();\n\n\t\t\t//Se pide los datos de la base de datos\n\n\t\t\t$res = $pelicula->obtenerPeliculas();\n\n\t\t\t//se cuentan las filas y si las hay inicia el ciclo\n\n\t\t\tif($res->rowCount()){\n\n\t\t\t\twhile($row = $res->fetch(PDO::FETCH_ASSOC)){\n\n\t\t\t\t\t//se agregan los datos al array de item\n\t\t\t\t\t$item = array(\n\t\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t\t'nombre' => $row['nombre'],\n\t\t\t\t\t\t'imagen' => $row['imagen']\n\t\t\t\t\t);\n\t\t\t\t\t//se agregan los datos al array de item\n\t\t\t\t\tarray_push($peliculas['items'], $item);\n\t\t\t\t}\n\n\t\t\t\t//Se envia el array a la funcion para imprimir el JSON\n\n\t\t\t\t// echo json_encode($peliculas);\n\t\t\t\t$this->printJSON($peliculas);\n\n\t\t\t}else{\n\n\t\t\t\t//valida si hay datos disponibles\n\n\t\t\t\t//echo json_encode(array('mensaje' => 'No hay mensaje registrados'));\n\t\t\t\t$this->error('No hay elementos registrados');\n\t\t\t}\n\t\t}", "public function grados()\n {\n return $this->hasMany('DSIproject\\Grado');\n }", "public function grados()\n {\n return $this->hasMany('DSIproject\\Grado');\n }", "function grsd(){\n\t\t$this->load->library('jqdatagrid');\n\t\t$oper = $this->input->post('oper');\n\t\t$id = $this->input->post('id');\n\t\t$data = $_POST;\n\t\t$check = 0;\n\n\t\tunset($data['oper']);\n\t\tunset($data['id']);\n\t\tif($oper == 'add'){\n\t\t\tif(false == empty($data)){\n\t\t\t\t$check = 0; //$this->datasis->dameval(\"SELECT count(*) FROM medesp WHERE especialidad=\".$this->db->escape($data['especialidad']));\n\t\t\t\tif ( $check == 0 ){\n\t\t\t\t\t$this->db->insert('spregr', $data);\n\t\t\t\t\techo \"Registro Agregado\";\n\t\t\t\t\tlogusu('SPREGR',\"Registro INCLUIDO\");\n\t\t\t\t} else\n\t\t\t\t\techo \"Ya existe un registro con ese nombre\";\n\t\t\t} else\n\t\t\t\techo \"Fallo Agregado!!!\";\n\n\t\t} elseif($oper == 'edit') {\n\t\t\t$this->db->where(\"id\", $id);\n\t\t\t$this->db->update('spregr', $data);\n\t\t\tlogusu('SPREGR',\"Grupos de presupuesto \".$data['grupo'].\" MODIFICADO\");\n\t\t\techo \"$mcodp Modificado\";\n\n\t\t} elseif($oper == 'del') {\n\t\t\t$check = $this->datasis->dameval(\"SELECT count(*) FROM spre WHERE grupo=$id\");\n\t\t\tif ($check > 0){\n\t\t\t\techo \" El registro no puede ser eliminado; tiene presupuestos asignados \";\n\t\t\t} else {\n\t\t\t\t$this->db->query(\"DELETE FROM spregr WHERE id=$id \");\n\t\t\t\tlogusu('SPREGR',\"Registro $id ELIMINADO\");\n\t\t\t\techo \"Registro Eliminado\";\n\t\t\t}\n\t\t};\n\t}", "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}", "private function getGrupoSubgrupo() {\n\n $oGrupo = new stdClass();\n $oGrupo->codigo = 0;\n $oGrupo->estrutural = \"\";\n $oGrupo->descricao = \"\";\n $oGrupo->grupoPai = 0;\n $oGrupo->nivel = 1;\n $oGrupo->totalPeriodo = 0.0;\n $oGrupo->mediaPeriodo = 0.0;\n $oGrupo->itens = array();\n $oGrupo->meses = array();\n $this->processaMeses($oGrupo);\n\n $aGrupos[$oGrupo->codigo] = $oGrupo;\n $this->aGrupos = $aGrupos;\n\n if ($this->lAgruparGrupoSubgrupo) {\n\n $aGrupos = array();\n\n $oDaoGrupoSubGrupo = new cl_materialestoquegrupo();\n\n /**\n * Busca todos os grupos e subgrupos e seus respectivos grupos pais.\n */\n $sCampos = \" db121_sequencial, m65_sequencial, db121_estrutural, db121_descricao, db121_estruturavalorpai, db121_nivel \";\n $sWhere = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n $sOrdem = \" db121_estrutural \";\n $sql = $oDaoGrupoSubGrupo->sql_query(null, $sCampos, $sOrdem, $sWhere);\n $rsGrupoSubgrupo = $oDaoGrupoSubGrupo->sql_record($sql);\n\n for ($i = 0; $i < $oDaoGrupoSubGrupo->numrows; $i++) {\n\n $oGrupoAux = db_utils::fieldsMemory($rsGrupoSubgrupo, $i);\n $oGrupoMaterial = new MaterialGrupo($oGrupoAux->m65_sequencial);\n $oGrupo = new stdClass();\n $oGrupo->codigo = $oGrupoAux->m65_sequencial;\n $oGrupo->estrutural = $oGrupoAux->db121_estrutural;\n $oGrupo->descricao = $oGrupo->estrutural . \" - \" . $oGrupoAux->db121_descricao;\n $oGrupo->grupoPai = 0;\n if ($oGrupoMaterial->getEstruturaPai() != '') {\n $oGrupo->grupoPai = $oGrupoMaterial->getEstruturaPai()->getCodigo();\n }\n $oGrupo->nivel = $oGrupoAux->db121_nivel;\n $oGrupo->totalPeriodo = 0.0;\n $oGrupo->mediaPeriodo = 0.0;\n $oGrupo->itens = array();\n $oGrupo->meses = array();\n $this->processaMeses($oGrupo);\n\n $aGrupos[$oGrupo->codigo] = $oGrupo;\n }\n\n $this->aGrupos = $aGrupos;\n /**\n * Agrupamos os grupos conforme sua organizacao\n */\n foreach ($this->aGrupos as $oGrupo) {\n $this->criarGrupoPai($oGrupo);\n }\n uasort($this->aGrupos,\n function ($oGrupo, $oGrupoDepois) {\n return $oGrupo->estrutural > $oGrupoDepois->estrutural;\n }\n );\n }\n\n foreach ($this->aDepartamentos as $oDepartamento) {\n\n foreach ($this->aGrupos as $oGrupo) {\n $oDepartamento->itens[$oGrupo->codigo] = clone $oGrupo;\n }\n }\n return $this->aGrupos;\n }", "public function carregarGrupoEmpresa() {\n $this->load->model('cadastroferiasmodel');\n\n $retorno = $this->cadastroferiasmodel->carregarGrupoEmpresa();\n echo json_encode($retorno);\n }", "public function ConsultarPorColegiofotos($codigo,$grado,$curso){\n\t\t$orden=$this->conexion->prepare(\"\n\t\t\tSELECT \n\t\t\tcod_est,es.cod_col,grado,curso,lista,apellidos,nombres,tp.nom_doc,documento,col.nom_col,nofoto,consecutivo,lista,col.sede,jor.nom_jor\n\t\t\tFROM \n\t\t\testudiantes es \n\t\t\tinner JOIN tipo_doc tp on tp.tip_doc = es.tipdoc\n\t\t\tinner JOIN colegios col on col.cod_col = es.cod_col\n\t\t\tinner JOIN jornadas jor on col.jornada = jor.cod_jor\n\t\t\tWHERE \n\t\t\tes.cod_col = :codigo and es.grado = :grado and es.curso = :curso AND nofoto <> ''\n\t\t\tORDER BY\n\t\t\tgrado, curso, lista ASC\n\n\t\t\t\");\n\t\t$orden->bindParam(\":codigo\",$codigo);\n\t\t$orden->bindParam(\":grado\",$grado);\n\t\t$orden->bindParam(\":curso\",$curso);\n\t\t$orden->execute();\n\t\treturn($orden->fetchAll(PDO::FETCH_OBJ));\n\t}", "function mostrarFormulario(){\r\n $this->consultaFacultades();\r\n }", "public static function generar_ggs($id_ggs){\n global $baseDatos;\n \n $res = $baseDatos->query(\"SELECT * FROM `gs_grupo` WHERE id_ggs = $id_ggs\"); \n\n $filas = $res->fetch_all(MYSQLI_ASSOC);\n if (count($filas) != 0){\n $gastos_unicos = array();\n\n foreach ($filas as $clave => $valor) {\n\n $id_gasto_unico = gs_gasto_unico::generar($valor['id_gasto_unico']);\n \n \n $gastos_unicos[] = $id_gasto_unico;\n\n }\n $ggs = new gs_grupo($id_ggs,$gastos_unicos);\n return $ggs;\n }\n else{\n \n return false;\n }\n \n }", "function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}", "public static function Busqueda_Parametros_Grupo($campo)\n {\n // Consulta de la meta\n $consulta = \"SELECT * FROM parametros WHERE id_grupo= ?\";\n\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute(array($campo));\n // Capturar primera fila del resultado\n //$row = $comando->fetch(PDO::FETCH_ASSOC);\n //return $row;\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n // Aquí puedes clasificar el error dependiendo de la excepción\n // para presentarlo en la respuesta Json\n return -1;\n }\n }", "public function index()\n {\n try{\n $groups_list = SchoolGroup::with('grade')->select('id', 'name', 'description', 'grade_id')->get();\n\n $this->res['data'] = $groups_list;\n if(count($groups_list) > 0){\n foreach ($groups_list as $kc => $vc) $vc->loader = false;\n $this->res['message'] = 'Lista de Grupos obtenida correctamente.';\n $this->status_code = 200;\n } else {\n $this->res['message'] = 'No hay Grupos registrados hasta el momento.';\n $this->status_code = 201;\n }\n } catch(\\Exception $e){\n $this->res['msg'] = 'Error en el sistema.'.$e;\n $this->status_code = 500;\n }\n return response()->json($this->res, $this->status_code);\n }", "function getConversacionGrupal($entrada) {\n $grupo = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $conversacion = [];\n $link = crearConexion();\n $query = \"SELECT publicacion.titulo, publicacion.contenido, publicacion.fecha_hora, publicacion.censurada, usuario.username, usuario.foto FROM publicacion, usuario WHERE publicacion.grupo='\" . $grupo . \"' AND publicacion.autor=usuario.username ORDER BY publicacion.fecha_hora ASC\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n while ($linea = mysqli_fetch_array($result)) {\n $fila['titulo'] = $linea['titulo'];\n $fila['contenido'] = $linea['contenido'];\n $fila['fecha_hora'] = $linea['fecha_hora'];\n $fila['usuario'] = $linea['username'];\n $fila['foto'] = $linea['foto'];\n $fila['censurada'] = $linea['censurada'];\n\n $conversacion[] = $fila;\n }\n return $conversacion;\n}", "public function ConsultarAsistenciaDiarias()\n {\n try {\n $datos = $_REQUEST;\n $filtros = array_filter($datos);\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n if($filtros['permiso'] != 1) {\n $id = $dbm->BuscarIProfesorTitular($filtros['grupoid']);\n if(!$id) {\n return new View(\"No se han encontrado profesores en el grupo consultado\", Response::HTTP_PARTIAL_CONTENT);\n }\n\n $usuario = $dbm->getRepositorioById('Usuario', 'profesorid', $id[0][\"profesorid\"]);\n if(!$usuario) {\n return new View(\"Se requiere tener un permiso especial o ser el profesor titular para poder consultar\", Response::HTTP_PARTIAL_CONTENT);\n \n }\n if($usuario->getUsuarioid() != $filtros['usuarioid']) {\n return new View(\"Se requiere tener un permiso especial o ser el profesor titular para poder consultar\", Response::HTTP_PARTIAL_CONTENT);\n }\n } \n $respuesta = $this->asistenciasDiarias($filtros, $dbm);\n if($respuesta['error']) {\n return new View($respuesta['mensaje'], Response::HTTP_PARTIAL_CONTENT);\n }\n return new View($respuesta, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "function listQueryGajiHonorer() {\n $sql = \"select p.idpegawai,\" . static::schema() . \"f_namalengkap(gelardepan,namadepan,namatengah,namabelakang,gelarbelakang) as namalengkap,\n\t\t\t\t\tnamapendidikan,namaunit,th.nominal as tarif,g.isfinish,g.gajiditerima\n\t\t\t\t\tfrom \" . static::table('ga_gajipeg') . \" g \n\t\t\t\t\tleft join \" . static::table('ms_pegawai') . \" p on p.idpegawai=g.idpegawai\n\t\t\t\t\tleft join \" . static::table('lv_jenjangpendidikan') . \" j on j.idpendidikan=p.idpendidikan\n\t\t\t\t\tleft join \" . static::table('ms_unit') . \" u on u.idunit=p.idunit\n\t\t\t\t\tleft join \" . static::table('ga_tarifhonorer') . \" th on th.idpendidikan=p.idpendidikan\n\t\t\t\t\twhere p.idstatusaktif in (select idstatusaktif from \" . static::table('lv_statusaktif') . \" where isdigaji='Y')\n\t\t\t\t\tand idhubkerja in ('HP')\";\n return $sql;\n }", "function ListaEquiposDeCompetencia($id_competencia){\n include(\"cnx.php\");\n $cnx = pg_connect($entrada) or die (\"Error de conexion. \". pg_last_error());\n\n $seleccionar='SELECT id_competencia_equipo, equipo.id_equipo, id_competencia, nombre_equipo\n FROM competencia_equipo, equipo\n where equipo.id_equipo=competencia_equipo.id_equipo\n and competencia_equipo.id_competencia='.$id_competencia.'';\n \n $result = pg_query($seleccionar) or die('ERROR AL INSERTAR DATOS: ' . pg_last_error());\n $columnas = pg_numrows($result);\n $this->formu.='<table>';\n $this->formu.='<tr>\n <td>Identificador</td>\n <td>Nombre Equipo</td>\n </tr>';\n for($i=0;$i<$columnas; $i++){\n $line = pg_fetch_array($result, null, PGSQL_ASSOC);\n $this->formu.='<tr>\n <td>'.$line['id_equipo'].'</td>\n <td>'.$line['nombre_equipo'].'</td>\n <td><input type=\"CHECKBOX\" name=\"equiposCompetencia[]\" value='.$line['id_equipo'].'></td>\n </tr>';\n } \n $this->formu.='</table>';\n return $this->formu; \n }", "function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}", "public function getGrupos()\n {\n return $this->grupos;\n }", "public function index()\n {\n $grupos = Grupo::all();\n return view('academico.grupo.list')\n ->with('location', 'academico')\n ->with('grupos', $grupos);\n }", "public function mostrarEquipos(){\n return $resultado=$this->conexion->query(\"SELECT Nombre,Ciudad,Conferencia,Division FROM equipos\");\n }", "public function bancoGrupo($grupo)\n {\n $bancos = Banco::grupo($grupo)\n ->get()\n ->where('id_status',22);\n \n return $bancos;\n }", "public function queryAll($campos=\"*\",$criterio=\"\"){\n\t\t$sql = 'SELECT '.$campos.' FROM compra_coletiva '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function grados()\n {\n return $this->belongsToMany('DSIproject\\Grado', 'alumno_valor')\n ->withPivot(['valor_id', 'trimestre', 'nota'])\n ->withTimestamps();\n }", "public function BuscarComprasProveedor() \n{\n\tself::SetNames();\t\t\n\t$sql = \" SELECT compras.codcompra, compras.subtotalivasic, compras.subtotalivanoc, compras.ivac, compras.totalivac, compras.descuentoc, compras.totaldescuentoc, compras.totalc, compras.statuscompra, compras.fechavencecredito, compras.fechacompra, proveedores.ritproveedor, proveedores.nomproveedor, SUM(detallecompras.cantcompra) AS articulos FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN detallecompras ON detallecompras.codcompra = compras.codcompra WHERE proveedores.codproveedor = ? GROUP BY compras.codcompra\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_GET[\"codproveedor\"]) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN COMPRAS DE PRODUCTOS PARA EL PROVEEDOR SELECCIONADO</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function mostrar1(){\n\t\t\t$db=DB::conectar();\n\t\t\t$listarComentarios=[];\n\t\t\t$select=$db->query('SELECT * FROM comentarios WHERE activo=0');\n\n\t\t\tforeach ($select->fetchAll() as $comentario) {\n\t\t\t\t$myComentario = new Comentario();\n\t\t\t\t$myComentario->setIdproducto($comentario['idproducto']);\t\t\t\t\n\t\t\t\t$myComentario->setIp($comentario['ip']);\n\t\t\t\t$myComentario->setFecha($comentario['fecha']);\n\t\t\t\t$myComentario->setComentario($comentario['comentario']);\n\t\t\t\t$myComentario->setEstrellas($comentario['estrellas']);\n\t\t\t\t$myComentario->setActivo($comentario['activo']);\n\t\t\t\t$myComentario->setEmail($comentario['email']);\n\t\t\t\t$listarComentarios[]=$myComentario;\n\t\t\t\t# code...\n\t\t\t}\n\t\t\treturn $listarComentarios;\n\t\t}", "function getRegistros() {\n\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t$this->resultado = $this->getDetalleRegistros($this->extra[\"monitor_id\"], $this->extra[\"pagina\"]);\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\n\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t$sql = \"SELECT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\n\t\t\t pg_escape_string($current_usuario_id).\", \".\n\t\t\t pg_escape_string($this->objetivo_id).\", '\".\n\t\t\t pg_escape_string($this->timestamp->getInicioPeriodo()).\"','\".\n\t\t\t pg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t//print($sql);\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\t\t$monitor_ids = array();\n\t\twhile($row = $res->fetchRow()) {\n\t\t\t$monitor_ids[] = $row[\"nodo_id\"];\n\t\t}\n\n\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\tif (count($monitor_ids) == 0) {\n\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\treturn;\n\t\t}\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'contenedor_tabla.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_CONTENEDORES', 'lista_contenedores');\n\n\t\t/* LISTA DE MONITORES */\n\t\t$orden = 1;\n\t\tforeach ($monitor_ids as $monitor_id) {\n\t\t\t$T->setVar('__contenido_id', 'reg_'.$monitor_id);\n\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleRegistros($monitor_id, 1, $orden));\n\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t$orden++;\n\t\t}\n\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "public function obtenerCuentaGrupos($id) {\n\t\t\n $this->db->where('account_id', $id);\n $query = $this->db->get('investorgroups_accounts');\n if ($query->num_rows() > 0)\n return $query->result();\n else\n return $query->result();\n \n }", "function consultarNotas(){ \n $cadena_sql=$this->cadena_sql(\"notas\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "public function show(Grupo $grupo)\n {\n //\n }", "public function show(Grupo $grupo)\n {\n //\n }", "function selectAll() {\r\n $sql = \"SELECT u.Id, u.Identification, u.Name1, u.Name2, u.Surname1, u.Surname2, u.dateBirth, u.Password, u.Address, \r\n u.ContacAddress, u.ContacAddress1, u.Email, u.State, w.Description 'UserGroup',\r\n case when u.State = 1 then 'ACTIVO' else 'INACTIVO' end 'State' \r\n FROM user u, workgroup w\r\n where u.UserGroup = w.Id \";\r\n return ejecutarConsulta($sql);\r\n }", "public function membrosFamilia($id_destino_fk, $codigo_familia)\n {\n // familia.id_destino_fk = ? AND familia.codigo_familia = ? ORDER BY familia.email DESC\";\n\n $sql = \"SELECT \n familia.nome,\n familia.rg,\n familia.email,\n familia.telefone1,\n familia.telefone2,\n familia.valor_na_epoca,\n familia.valor_de_venda,\n familia.id_vendedor_fk,\n categoria.nome_categoria as categoriaPassagem,\n login.nome as vendedor,\n ponto_encontro.id_destino_fk,\n ponto_de_encontro.descricao,\n ponto_de_encontro.horario\n \n FROM familia\n INNER JOIN login ON login.id_login = familia.id_vendedor_fk\n INNER JOIN passagem ON passagem.id_passagem = familia.id_passagem_fk\n INNER JOIN categoria ON categoria.id_categoria = passagem.id_categoria_fk\n INNER JOIN ponto_encontro ON ponto_encontro.codigo_familia = familia.codigo_familia\n INNER JOIN ponto_de_encontro ON ponto_de_encontro.id_ponto_encontro = ponto_encontro.id_ponto_de_encontro_fk\n \n WHERE familia.viagem_finalizada = 'NAO' AND \n familia.id_destino_fk = ? AND familia.codigo_familia = ? ORDER BY familia.email DESC\";\n\n $stmt = Connect::getInstance()->prepare($sql);\n $stmt->bindValue(1, $id_destino_fk);\n $stmt->bindValue(2, $codigo_familia);\n $stmt->execute();\n\n if ($stmt->rowCount() > 0) {\n $resultado = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n return $resultado;\n } else {\n return [\"<h1>Foi não</h1>\"];\n }\n }", "public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }", "function setColeccion() {\n $this->query = \"SELECT * FROM PROFESOR\";\n $this->datos = BDConexionSistema::getInstancia()->query($this->query);\n\n for ($x = 0; $x < $this->datos->num_rows; $x++) {\n $this->addElemento($this->datos->fetch_object(\"Profesor\"));\n }\n }", "public function queryAll($campos=\"*\",$criterio=\"\"){\n\t\t$sql = 'SELECT '.$campos.' FROM aluno '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function getDatosGrupo_estudios()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'grupo_estudios'));\n $oDatosCampo->setEtiqueta(_(\"grupo del stgr\"));\n $oDatosCampo->setTipo('texto');\n $oDatosCampo->setArgument(3);\n return $oDatosCampo;\n }", "public function listarc()\n {\n $sql = \"SELECT * FROM miembros \n \";\n\n return ejecutarConsulta($sql);\n }", "function exiteGrupo($entrada) {\n $grupo = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n\n $con = crearConexion();\n $query = \"SELECT nombre FROM grupo WHERE nombre='$grupo'\";\n $result = mysqli_query($con, $query);\n\n cerrarConexion($con);\n\n return mysqli_num_rows($result) > 0;\n}", "function obtener_facultades (){\n \n //$nombre_usuario=toba::usuario()->get_nombre();\n //$sql=\"SELECT t_s.sigla FROM sede t_s, administrador t_a WHERE t_a.nombre_usuario=$nombre_usuario AND t_s.id_sede=t_a.id_sede\";\n //$sql=\"SELECT t_ua.sigla, t_ua.descripcion FROM unidad_academica t_ua, sede t_s JOIN administrador t_a ON (t_a.nombre_usuario=$nombre_usuario) JOIN (t_a.id_sede=t_s.id_sede) WHERE t_s.sigla=t_ua.id_sede\";\n $sql=\"SELECT sigla, descripcion FROM unidad_academica WHERE sigla <> 'RECT'\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }" ]
[ "0.7392772", "0.70131135", "0.695924", "0.6919157", "0.6915683", "0.6828551", "0.6653392", "0.6644595", "0.66228443", "0.65279686", "0.6493756", "0.6418643", "0.64181775", "0.63800967", "0.6368916", "0.6349762", "0.63327754", "0.62986475", "0.6286186", "0.6279828", "0.62768143", "0.6227423", "0.62136334", "0.61931413", "0.61931413", "0.61651164", "0.6164022", "0.6159295", "0.6107548", "0.60895085", "0.60862607", "0.60860634", "0.60816133", "0.603472", "0.60303336", "0.6020167", "0.6020167", "0.59919757", "0.5988411", "0.59804946", "0.5958172", "0.59580076", "0.5913091", "0.5910599", "0.5889264", "0.5872542", "0.58597326", "0.585896", "0.5841883", "0.5840387", "0.5837733", "0.5832663", "0.5827284", "0.5817674", "0.5817674", "0.5816093", "0.58150357", "0.580186", "0.5800804", "0.5794911", "0.5794564", "0.57889247", "0.57889247", "0.5782024", "0.57809573", "0.5775411", "0.5769441", "0.5766945", "0.5759359", "0.57535017", "0.5747623", "0.57467043", "0.57384306", "0.5731302", "0.5731097", "0.5729839", "0.5727686", "0.5725476", "0.5724357", "0.5717637", "0.5716803", "0.5713441", "0.5712219", "0.5704913", "0.56985223", "0.5693616", "0.5688955", "0.5686779", "0.56853056", "0.5685222", "0.5685222", "0.5681481", "0.5675909", "0.5672976", "0.56649673", "0.5664635", "0.5663336", "0.566247", "0.56595385", "0.5654191" ]
0.6012971
37
Consultar un grupo por id Ejemplo
public function consultarId($id) { $grupo = $this->gestor->find('Grupo',$id); if ( !is_null($grupo) ) { header("HTTP/1.1 200 OK"); return (array($grupo->getArray())); } else { header("HTTP/1.1 404 Not found"); return '{"response":"error"}'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function consultaGrupos($idTutor)\n{\n $sql=\"SELECT DISTINCT gp.id_grupo as id ,\n gp.nombre_grupo as nombre ,\n gp.clave as clave,\n gp.id_escuela as \\\"idEscuela\\\",\n gp.id_empresa as \\\"idEmpresa\\\",\n gp.tipo_grupo as \\\"tipoGrupo\\\" \n FROM rel_curso_tutor r_c_t\n JOIN rel_curso_grupo r_c_g\n ON r_c_t.id_rel_curso_grupo = r_c_g.id_rel_curso_grupo\n JOIN grupo gp\n ON gp.id_grupo = r_c_g.id_grupo \n WHERE \tgp.status = 1\n AND r_c_t.id_tutor = \".$idTutor;\n \n $consultaGrupo= new Query(\"SG\");\n $consultaGrupo->sql=$sql;\n $resultado = $consultaGrupo->select(\"obj\");\n \n return $resultado;\n}", "function obtener_grupo($id_grupo)\r\n{\r\n\t$query = \"SELECT grupo FROM grupo WHERE id_grupo = $id_grupo\";\r\n\t$result = mysql_query($query);\r\n\t$row = mysql_fetch_array($result);\r\n\treturn $row[0];\r\n}", "public static function getNotasGrado($id) {\n $sql = \"SELECT a.*,b.id as identificador, b.descripcion,b.*\nFROM notas a\ninner join unidad_curricular b on a.unidad_curricular_id=b.id\nWHERE pasaporte ilike '%$id%' order by b.id\";\n// echo $sql;exit();\n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n return $q;\n }", "public function obtenerCuentaGrupos($id) {\n\t\t\n $this->db->where('account_id', $id);\n $query = $this->db->get('investorgroups_accounts');\n if ($query->num_rows() > 0)\n return $query->result();\n else\n return $query->result();\n \n }", "public function vistaGruposModel($id_usuario){\n\t\tif(empty($id_usuario)){ //verificar si esta vacio el id de usuario (maestro), se obtienen todos los grupos\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM grupos\"); //preparacion de la consulta SQL\n\t\t}\n\t\telse{ //si no esta vacio, se filtra por el id mandado como parametro\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM grupos WHERE id_maestro = :id\"); //preparacion de la consulta SQL\n\t\t\t$stmt->bindParam(\":id\", $id_usuario);\n\t\t}\n\t\t$stmt->execute(); //ejecucion de la consulta\n\t\treturn $stmt->fetchAll(); //se retorna en un array asociativo el resultado de la consulta\n\t\t$stmt->close();\n\n\t}", "function GetInfogrupos(){\n\t\t\t$sql =\"SELECT G.grupo, G.salon, G.horario, C.descripcion AS carrera \n\t\t\t\tFROM grupos G INNER JOIN carreras C ON G.carrera = C.codigo;\";\n\t\t\t$this->bd->selectSQL($sql);\n\t\t\tif(!empty($this->bd->rowresult)){\n\t\t\t\treturn $this->bd->rowresult;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "function consultarGrupo()\n\t\t{\n\t\t\t\t $file = fopen(\"../Archivos/ArrayConsultarGrupo.php\", \"w\");\n\t\t\t\t fwrite($file,\"<?php class consult { function array_consultar(){\". PHP_EOL);\n\t\t\t\t fwrite($file,\"\\$form=array(\" . PHP_EOL);\n\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"SELECT * FROM grupo \";\n\t\t\t$resultado=$mysqli->query($query);\n\t\t\tif(mysqli_num_rows($resultado)){\n\t\t\t\twhile($fila = $resultado->fetch_array())\n\t\t\t{\n\t\t\t\t$filas[] = $fila;\n\t\t\t}\n\t\t\tforeach($filas as $fila)\n\t\t\t{ \n\t\t\t\t$nombre=$fila['NOMBRE_GRUPO'];\n\t\t\t\t$descripcion=$fila['DESCRIPCION'];\n\t\t\t\tfwrite($file,\"array(\\\"nombre\\\"=>'$nombre',\\\"descripcion\\\"=>'$descripcion'),\" . PHP_EOL);\n\t\t\t}\n\t\t\t}\n\t\t\t fwrite($file,\");return \\$form;}}?>\". PHP_EOL);\n\t\t\t\t fclose($file);\n\t\t\t\t $resultado->free();\n\t\t\t\t $mysqli->close();\n\t\t}", "public function getEstudiantesGrupo($id_estudiante){\n\n return EstudianteDao::getEstudiantesGrupo($id_estudiante);\n \n }", "function getDatosGrupo($entrada) {\n $nombre = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $link = crearConexion();\n $query = \"SELECT grupo.nombre, grupo.descripcion, grupo.imagen, grupo_categoria.categoria FROM grupo, grupo_categoria WHERE grupo.nombre=grupo_categoria.grupo AND grupo.nombre='$nombre'\";\n $result = mysqli_query($link, $query);\n $linea = mysqli_fetch_array($result);\n $datos['nombre'] = $linea['nombre'];\n $datos['imagen'] = $linea['imagen'];\n $datos['descripcion'] = $linea['descripcion'];\n $datos['categoria'] = $linea['categoria'];\n cerrarConexion($link);\n return $datos;\n}", "public static function Busqueda_Parametros_Grupo($campo)\n {\n // Consulta de la meta\n $consulta = \"SELECT * FROM parametros WHERE id_grupo= ?\";\n\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute(array($campo));\n // Capturar primera fila del resultado\n //$row = $comando->fetch(PDO::FETCH_ASSOC);\n //return $row;\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n // Aquí puedes clasificar el error dependiendo de la excepción\n // para presentarlo en la respuesta Json\n return -1;\n }\n }", "function buscar_grupos($tipo_musica, $edad){\n\n\t\t$sql = \"SELECT id_grupo FROM grupos WHERE tipo_musica='$tipo_musica' AND edad_min<='$edad' AND edad_max>='$edad'\";\n\n\t\t$resultado = consulta($sql);\n\n\t\treturn $resultado;\n\n\t}", "function get( $id )\n {\n $this->dbInit(); \n if ( $id != \"\" )\n {\n array_query( $user_group_array, \"SELECT * FROM Grp WHERE ID='$id'\" );\n if ( count( $user_group_array ) > 1 )\n {\n die( \"Feil: Flere user_grouper med samme ID funnet i database, dette skal ikke være mulig. \" );\n }\n else if ( count( $user_group_array ) == 1 )\n {\n $this->ID = $user_group_array[ 0 ][ \"ID\" ];\n $this->Name = $user_group_array[ 0 ][ \"Name\" ];\n $this->Description = $user_group_array[ 0 ][ \"Description\" ];\n $this->UserAdmin = $user_group_array[ 0 ][ \"UserAdmin\" ];\n $this->UserGroupAdmin = $user_group_array[ 0 ][ \"UserGroupAdmin\" ];\n $this->PersonTypeAdmin = $user_group_array[ 0 ][ \"PersonTypeAdmin\" ];\n $this->CompanyTypeAdmin = $user_group_array[ 0 ][ \"CompanyTypeAdmin\" ];\n $this->PhoneTypeAdmin = $user_group_array[ 0 ][ \"PhoneTypeAdmin\" ];\n $this->AddressTypeAdmin = $user_group_array[ 0 ][ \"AddressTypeAdmin\" ];\n }\n }\n }", "function obtenerGrupoAmodificar($nombreGrupo) {\n $nombre = trim(filter_var($nombreGrupo, FILTER_SANITIZE_STRING));\n $grupo = [];\n\n $con = crearConexion();\n\n $query = \"SELECT nombre, imagen, descripcion, categoria FROM grupo, grupo_categoria WHERE grupo.nombre = grupo_categoria.grupo AND grupo.nombre = '$nombre'\";\n\n $result = mysqli_query($con, $query);\n $row = mysqli_fetch_array($result);\n $grupo['imagen'] = $row['imagen'];\n $grupo['nombre'] = $row['nombre'];\n $grupo['descripcion'] = $row['descripcion'];\n $grupo['categoria'] = $row['categoria'];\n\n cerrarConexion($con);\n\n return $grupo;\n}", "public function getGrupos(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraGrupos\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM grupos \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM grupos LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function consultarCatalogGru() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('grupos');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Grupos</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t<tr class=\"titleTable\"><th>ID Grupo</th>\n\t\t\t \t\t<th>Nombre</th>\n\t\t\t \t\t<th>Salón</th>\n\t\t\t\t\t\t<th>Hora</th>\n\t\t\t\t\t\t<th>Periodo</th>\n\t\t\t\t\t\t<th>Carrera</th>\n\t\t\t\t\t\t<th>Tutor</th>\n\t\t\t\t\t\t<th>Editar</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.\n \t'<td>'.$row[1].'</td>'.\n \t'<td>'.$row[2].'</td>'.\n \t'<td>'.$row[3].'</td>'.\n \t'<td>'.$row[4].'</td>'.\n \t'<td>'.$row[5].'</td>';\n \t\n \tif(empty($row[6])) {\n \t\t$info .= '<td><span class=\"label error\">Sin Tutor</span></td>';\n \t\t}else{\n\t\t\t\t\t\t\t$info .= '<td><b>'.$row[6].' '.$row[7].' '.$row[8].'</b></td>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$info .= '<td id=\"'.$row[0].'\"><span id=\"edit-grup\" style=\"cursor: pointer;\" class=\"label warning\"><i class=\"fa fa-gear fa-lg\"></i></span></td></tr>';\n \t}\n \t$info .= '</tbody></table></div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "function getMeGustaId($id, $id_usuario) {\n $c = new Conexion();\n $resultado = $c->query(\"SELECT val_mg.megusta FROM valoracion_mg val_mg, usuario usu where val_mg.id_usuario=usu.id && val_mg.id_contenido=$id && val_mg.id_usuario=$id_usuario\");\n\n if ($objeto = $resultado->fetch(PDO::FETCH_OBJ)) {\n return $objeto;\n }\n else{\n return null;\n } \n}", "public function getAllPerguntasByGrupo($id)\n {\n //\n $this->db->select('perguntas.id as id, perguntas.pergunta as pergunta, grupo_perguntas.nome as grupo ')\n ->join('grupo_perguntas', 'perguntas.grupo_pergunta = grupo_perguntas.id', 'left');\n $q = $this->db->get_where('perguntas', array('perguntas.grupo_pergunta' => $id));\n // $this->db->where('status !=', 'CONCLUÍDO'); \n // $q = $this->db->get_where('planos', array('responsavel' => $id));\n \n \n if ($q->num_rows() > 0) {\n foreach (($q->result()) as $row) {\n $data[] = $row;\n }\n return $data;\n }\n return FALSE;\n }", "private function getGrupoSubgrupo() {\n\n $oGrupo = new stdClass();\n $oGrupo->codigo = 0;\n $oGrupo->estrutural = \"\";\n $oGrupo->descricao = \"\";\n $oGrupo->grupoPai = 0;\n $oGrupo->nivel = 1;\n $oGrupo->totalPeriodo = 0.0;\n $oGrupo->mediaPeriodo = 0.0;\n $oGrupo->itens = array();\n $oGrupo->meses = array();\n $this->processaMeses($oGrupo);\n\n $aGrupos[$oGrupo->codigo] = $oGrupo;\n $this->aGrupos = $aGrupos;\n\n if ($this->lAgruparGrupoSubgrupo) {\n\n $aGrupos = array();\n\n $oDaoGrupoSubGrupo = new cl_materialestoquegrupo();\n\n /**\n * Busca todos os grupos e subgrupos e seus respectivos grupos pais.\n */\n $sCampos = \" db121_sequencial, m65_sequencial, db121_estrutural, db121_descricao, db121_estruturavalorpai, db121_nivel \";\n $sWhere = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n $sOrdem = \" db121_estrutural \";\n $sql = $oDaoGrupoSubGrupo->sql_query(null, $sCampos, $sOrdem, $sWhere);\n $rsGrupoSubgrupo = $oDaoGrupoSubGrupo->sql_record($sql);\n\n for ($i = 0; $i < $oDaoGrupoSubGrupo->numrows; $i++) {\n\n $oGrupoAux = db_utils::fieldsMemory($rsGrupoSubgrupo, $i);\n $oGrupoMaterial = new MaterialGrupo($oGrupoAux->m65_sequencial);\n $oGrupo = new stdClass();\n $oGrupo->codigo = $oGrupoAux->m65_sequencial;\n $oGrupo->estrutural = $oGrupoAux->db121_estrutural;\n $oGrupo->descricao = $oGrupo->estrutural . \" - \" . $oGrupoAux->db121_descricao;\n $oGrupo->grupoPai = 0;\n if ($oGrupoMaterial->getEstruturaPai() != '') {\n $oGrupo->grupoPai = $oGrupoMaterial->getEstruturaPai()->getCodigo();\n }\n $oGrupo->nivel = $oGrupoAux->db121_nivel;\n $oGrupo->totalPeriodo = 0.0;\n $oGrupo->mediaPeriodo = 0.0;\n $oGrupo->itens = array();\n $oGrupo->meses = array();\n $this->processaMeses($oGrupo);\n\n $aGrupos[$oGrupo->codigo] = $oGrupo;\n }\n\n $this->aGrupos = $aGrupos;\n /**\n * Agrupamos os grupos conforme sua organizacao\n */\n foreach ($this->aGrupos as $oGrupo) {\n $this->criarGrupoPai($oGrupo);\n }\n uasort($this->aGrupos,\n function ($oGrupo, $oGrupoDepois) {\n return $oGrupo->estrutural > $oGrupoDepois->estrutural;\n }\n );\n }\n\n foreach ($this->aDepartamentos as $oDepartamento) {\n\n foreach ($this->aGrupos as $oGrupo) {\n $oDepartamento->itens[$oGrupo->codigo] = clone $oGrupo;\n }\n }\n return $this->aGrupos;\n }", "public function bancoGrupo($grupo)\n {\n $bancos = Banco::grupo($grupo)\n ->get()\n ->where('id_status',22);\n \n return $bancos;\n }", "public function mostrarGrupos($id_mod,$nivel)\n {\n $grupos =DB::table('grupos')->limit(7)->get();\n $nombreMod=DB::table('modalidads')->select('nombre')->where('id','=',$id_mod)->first();\n return view('modalidad.menuGrupo')->with('id_mod', $id_mod)->with('grupos',$grupos)->with('nivel',$nivel)->with('nombreMod',$nombreMod);\n }", "public static function obtener_ggs_idgsunico($id_gasto_unico){\n global $baseDatos;\n $res = $baseDatos->query(\"SELECT * FROM `gs_grupo` WHERE id_gasto_unico = $id_gasto_unico\"); \n $res_fil = $res->fetch_assoc();\n if (count($res_fil) != 0) {\n \n return $res_fil['id_ggs'];\n }\n else{\n return false;\n }\n }", "function getDatosDeGrupoSolidario(){}", "public function show(Grupo $grupo)\n {\n //\n }", "public function show(Grupo $grupo)\n {\n //\n }", "function obtenirNomGroupe ($connexion, $id) {\r\n\r\n $req = \"SELECT nom FROM Groupe WHERE id=?\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute (array ($id));\r\n return $stmt -> fetchColumn ();\r\n\r\n }", "public static function obtener($id_usuario){\n global $baseDatos;\n \n $res = $baseDatos->query(\"SELECT * FROM `us_gastos` WHERE id_usuario = $id_usuario\"); \n\n $res_fil = $res->fetch_assoc();\n if (count($res_fil) != 0) {\n \n $us_ggs = us_ggs::obtener($res_fil['id_us_ggs']);\n \n $us_gastos = new us_gastos($res_fil['id_us_gasto'],$res_fil['id_usuario'],$us_ggs);\n\n \n return $us_gastos;\n }\n else{\n \n return false;\n }\n }", "public function groepOphalen($id) {\n $stmt = $this->database->connection->prepare('SELECT * FROM groepen WHERE id= ?');\n $stmt->bind_param('i', $id);\n $stmt->execute();\n $result = $stmt->get_result();\n return $result;\n}", "public function grupo()\n {\n return $this->belongsTo(Grupo::class);\n }", "public function grupo()\n {\n return $this->belongsTo(Grupo::class);\n }", "function leerTodosGrupos() {\n $link = crearConexion();\n $grupos = [];\n\n $query = \"SELECT nombre, imagen, descripcion FROM grupo\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n while ($linea = mysqli_fetch_array($result)) {\n $fila['nombre'] = $linea['nombre'];\n $fila['imagen'] = $linea['imagen'];\n $fila['descripcion'] = $linea['descripcion'];\n\n $grupos[] = $fila;\n }\n\n return $grupos;\n}", "public function registroGrupoModel($data){\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO grupos(nombre,id_maestro) VALUES(:nombre, :id_maestro)\");\n\t\t//preparacion de parametros\n\t\t$stmt->bindParam(\":nombre\", $data['nombre']);\n\t\t$stmt->bindParam(\":id_maestro\", $data['id_maestro']);\n\t\tif($stmt->execute()) //ejecucion\n\t\t\treturn \"success\"; //respuesta\n\t\telse\n\t\t\treturn \"error\";\n\t\t$stmt->close();\n\t}", "function existeGrupo($base, $id, $id_asignatura)\n{\n $query = \"SELECT `id` FROM `grupos`\n WHERE `id`=\" . $id . \" AND `id_asignatura`=\" . $id_asignatura . \";\";\n $resultado = $base->query($query);\n if (empty($resultado->fetchAll())) {\n return false;\n }\n $resultado->closeCursor();\n return true;\n}", "public function get($id)\n\t{\n\t\t$id = (int)$id;\n\t\t$sql = \"SELECT * FROM `group` AS p WHERE p.id = :id LIMIT 1\";\n\t\t$stmt = $this->pdo->prepare($sql);\n\t\t$stmt->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\t\treturn $this->requestSingleObj($stmt);\n\t}", "function getComenariosByJugadorid($id){\n $sentencia = $this->db->prepare(\"SELECT c.* , u.nombre as nombreUsario FROM comentario as c join usuario as u on c.id_usuario= u.id WHERE c.id_jugador=? \");\n $sentencia->execute(array($id));\n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "public function obtenerGruposController()\n\t\t{\n\t\t\t$respuesta = Datos::vistaGruposModel(\"grupo\");\n\n\t\t\t#El constructor foreach proporciona un modo sencillo de iterar sobre arrays. foreach funciona sólo sobre arrays y objetos, y emitirá un error al intentar usarlo con una variable de un tipo diferente de datos o una variable no inicializada.\n\n\t\t\tforeach($respuesta as $row => $item)\n\t\t\t{\n\t\t\t\techo'<option value='.$item[\"id_grupo\"].'>'.$item[\"nombre_grupo\"].'</option>';\n\t\t\t}\n\n\t\t}", "function obtenirIdNomGroupesAHeberger ($connexion) {\r\n\r\n $req = \"SELECT id, nom FROM Groupe WHERE hebergement='O' ORDER BY id\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt;\r\n\r\n }", "public function obtener($id) {\r\n $this->rs = new DB();\r\n $sql = sprintf(\"SELECT a.id_grupo_curso, a.hora_inicio, a.hora_fin , \r\n c.curso_nombre, b.grupo_nombre\r\n FROM grupo_curso_laboratorio a\r\n LEFT JOIN grupo_curso b on a.id_grupo_curso = b.id_grupo_curso\r\n LEFT JOIN curso c on b.id_curso = c.id_curso\r\n where id_labo = %s\", $id);\r\n \r\n mysql_query(\"SET NAMES 'utf8'\"); /* SIRVE PARA MOSTRAR LA Ñ Y LAS TILDES */\r\n $this->rs->query($sql);\r\n\r\n $rsaux = $this->rs;\r\n\r\n $this->rs->close();\r\n\r\n return $rsaux;\r\n }", "public function grupo()\n {\n return $this->belongsTo('App\\Model\\PrimerSemestre\\PrimSemGrupo', 'prim_sem_grupo_id');\n }", "public function galpon($id){\n\n $galpon= new empresa();\n\n return $galpon->dataPrueba($id);\n\n }", "public function getGrupo() {\n return $this->iGrupo;\n }", "function get_group( $id ) {\r\n global $wpdb;\r\n return $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}wpc_client_groups WHERE group_id = %d\", $id ), \"ARRAY_A\");\r\n }", "public function grupo()\n\t{\n\t\treturn $this->hasOne('App\\Models\\Pss\\GrupoEtario' , 'id_grupo_etario' , 'grupo_actual');\t\n\t}", "public function buscarGradoId($grado,$turno,$seccion,$anio){\n $match = ['grado' => $grado, 'anios_id' => $anio,'seccion'=>$seccion,'turnos_id'=>$turno];\n $id=Grado::where($match)->select('id')->get();\n //dd($id);\n return $id;\n }", "public function getGrupos($idCampeonato, $idCategoria)\n {\n $stmt = $this->db->prepare(\"SELECT g.idGrupo,g.nombreGrupo,g.idCategoria,g.idCampeonato\n\t\t\tFROM campeonato cam,grupo g,categoria c\n\t\t\tWHERE cam.idCampeonato = g.idCampeonato AND\n\t\t\tc.idCategoria = g.idCategoria AND\n\t\t\tcam.idCampeonato = ? AND\n\t\t\tc.idCategoria = ? \");\n $stmt->execute(array(\n $idCampeonato,\n $idCategoria\n ));\n \n $toret_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n $groups = array();\n \n foreach ($toret_db as $group) {\n array_push($groups, new Group($group[\"idGrupo\"], $group[\"idCategoria\"], $group[\"idCampeonato\"], $group[\"nombreGrupo\"]));\n }\n \n return $groups;\n }", "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "public function load($id){\n\t\t$sql = 'SELECT * FROM grupo_usuario_tabelas WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "public function EstudiantesGrupoMaterias($IdGrupo,$codigoperiodo,$idSubgrupo){\n\t\tglobal $userid,$db;\n\t\t\n\t\t?>\n <?PHP\n $SQL_EstudiantesGrupoMaterias=\"SELECT\n d.codigomateria,\n e.codigocarrera,\n count(*) as totalalumnosgrupo,\n 'Todos' as nomsubgrupo \n FROM\n \tdetalleprematricula AS d\n INNER JOIN prematricula AS p ON p.idprematricula = d.idprematricula\n INNER JOIN estudiante AS e ON e.codigoestudiante = p.codigoestudiante\n INNER JOIN estudiantegeneral ON e.idestudiantegeneral = estudiantegeneral.idestudiantegeneral\n WHERE\n \t(\n \t\tp.codigoestadoprematricula LIKE '1%'\n \t\tOR p.codigoestadoprematricula LIKE '4%'\n \t)\n AND (\n \td.codigoestadodetalleprematricula LIKE '1%'\n \tOR d.codigoestadodetalleprematricula LIKE '3%'\n )\n AND d.idgrupo = \".$IdGrupo.\"\n AND p.codigoperiodo = \".$codigoperiodo.\"\";\n \n if(isset($idSubgrupo)&&($idSubgrupo!=\"\")){\n $SQL_EstudiantesGrupoMaterias=\"SELECT\n g.codigomateria,\n e.codigocarrera,\n Count(*) AS totalalumnosgrupo,\n Subgrupos.NombreSubgrupo AS nomsubgrupo,\n g.codigomateria\n FROM\n SubgruposEstudiantes AS subest\n INNER JOIN estudiantegeneral AS est ON subest.idestudiantegeneral = est.idestudiantegeneral\n INNER JOIN Subgrupos ON subest.SubgrupoId = Subgrupos.SubgrupoId\n INNER JOIN grupo AS g ON Subgrupos.idgrupo = g.idgrupo\n INNER JOIN materia AS e ON e.codigomateria = g.codigomateria\n WHERE\n subest.SubgrupoId = '\".$idSubgrupo.\"'\"; \n }\n\t\t\n\t\t\t\t//echo $SQL_EstudiantesGrupoMaterias.\"<br>\";\t\t\t\t\t\n\t\t\tif($EstudiantesGrupoMaterias=&$db->Execute($SQL_EstudiantesGrupoMaterias)===false){\n\t\t\t\t\techo 'Error en el SQL de grupo de estudiantes materias....<br><br>',$SQL_EstudiantesGrupoMaterias;\n\t\t\t\t\tdie;\n\t\t\t}\t\n\t\t\n\t\t/***************************************************************/\t\t\t\t\t\t\t\n\t\t\n\t\t\tif(!$EstudiantesGrupoMaterias->EOF){\n $i = 0;\n \t\t\twhile(!$EstudiantesGrupoMaterias->EOF){\n \t\t\t $name1 = 'FechaIngreso_'.$i;\n $name2 = 'FechaEgreso_'.$i; \n \t\t\t\t/**********************verificar si tiene alguna rotacion********************************/\n $SQL_EstudiantesRotacion=\"\n SELECT\n \tre.RotacionEstudianteId,\n \tre.FechaIngreso,\n \tre.FechaEgreso,\n \tre.TotalDias,\n \tre.EstadoRotacionId,\n \tsr.NombreServicio,\n \tui.NombreUbicacion,\n \tsc.NombreConvenio,\n \ter.NombreEstado\n FROM\n \tRotacionEstudiantes AS re\n INNER JOIN ServicioRotaciones AS sr ON re.ServicioRotacionId = sr.ServicioRotacionId\n INNER JOIN UbicacionInstituciones AS ui ON re.IdUbicacionInstitucion = ui.IdUbicacionInstitucion\n INNER JOIN siq_convenio AS sc ON re.idsiq_convenio = sc.idsiq_convenio\n INNER JOIN EstadoRotaciones AS er ON re.EstadoRotacionId = er.EstadoRotacionId\n WHERE\n \tre.idestudiantegeneral = '\".$EstudiantesGrupoMaterias->fields['idestudiantegeneral'].\"'\n AND re.codigomateria='\".$EstudiantesGrupoMaterias->fields['codigomateria'].\"'\n AND re.codigoperiodo='\".$codigoperiodo.\"'\n AND re.codigocarrera='\".$EstudiantesGrupoMaterias->fields['codigocarrera'].\"'\";\n \t\t\n\t\t\t //echo $SQL_EstudiantesRotacion.\"<br>\";\t\t\t\t\t\n if($EstudiantesRotacion=&$db->Execute($SQL_EstudiantesRotacion)===false){\n \t\t\t\t echo 'Error en el SQL de rotaciones de estudiantes....<br><br>',$SQL_EstudiantesRotacion;\n \t\t\t\t\tdie;\n }\n \n \n /*************************************************/\n \t\t\t\t?>\n <tr>\n \t<td style=\"text-align: center;\"><strong><?PHP echo $EstudiantesGrupoMaterias->fields['totalalumnosgrupo']?></strong><input type=\"hidden\" id=\"total_alumnos\" name=\"total_alumnos\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['totalalumnosgrupo']; ?>\" /></td>\n <td><strong><input type=\"hidden\" name=\"codcarrera_<?php echo $i?>\" id=\"codcarrera_<?php echo $i?>\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['codigocarrera']?>\" /><input type=\"hidden\" name=\"codmateria_<?php echo $i?>\" id=\"codmateria_<?php echo $i?>\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['codigomateria']?>\" /><input type=\"hidden\" name=\"idsubgrupo_<?php echo $i?>\" id=\"idsubgrupo_<?php echo $i?>\" value=\"<?php echo $idSubgrupo;?>\" /><input type=\"hidden\" name=\"idgrupo_<?php echo $i?>\" id=\"idgrupo_<?php echo $i?>\" value=\"<?php echo $IdGrupo;?>\" /><?php echo $EstudiantesGrupoMaterias->fields['nomsubgrupo'] ?></strong></td>\n <td>\n <?php if(isset($EstudiantesRotacion->fields[\"NombreConvenio\"])){\n echo $EstudiantesRotacion->fields[\"NombreConvenio\"];\n }else{ ?>\n <select id=\"convenio_<?php echo $i?>\" name=\"convenio_<?php echo $i?>\" onchange=\"UbicacionInstitucionesConvenio('convenio_<?php echo $i?>', 'idubicacion_<?php echo $i?>')\">\n <option value=\"null\">Seleccione:</option>\n <?php\n echo $SqlConvenios = \"select sc.idsiq_convenio, sc.NombreConvenio from grupo g join materia m on m.codigomateria = g.codigomateria join conveniocarrera cc on cc.codigocarrera = m.codigocarrera join siq_convenio sc ON sc.idsiq_convenio = cc.idconvenio where g.idgrupo = '\".$IdGrupo.\"'\";\n \n $valorconvenio = $db->execute($SqlConvenios);\n foreach($valorconvenio as $datosconvenio){\n ?>\n <option value=\"<?php echo $datosconvenio['idsiq_convenio']?>\"><?php echo $datosconvenio['NombreConvenio']?></option> \n <?php\n }\n ?> \n </select>\n <?php } ?>\n </td>\n <td>\n <?php if(isset($EstudiantesRotacion->fields[\"NombreUbicacion\"])){\n echo $EstudiantesRotacion->fields[\"NombreUbicacion\"];\n }else{ ?>\n <select id=\"idubicacion_<?php echo $i?>\" name=\"idubicacion_<?php echo $i?>\">\n <option value=\"null\">Seleccione:</option>\n <?php\n /*$sqlUbicacion= \"SELECT ui.IdUbicacionInstitucion, ui.NombreUbicacion FROM UbicacionInstituciones ui JOIN siq_convenio sc ON sc.idsiq_institucionconvenio = ui.idsiq_institucionconvenio WHERE sc.idsiq_convenio = '\".$idconvenio.\"'\";\n $valorUbicacion = $db->execute($sqlUbicacion);\n foreach($valorUbicacion as $datosUbicacion){\n ?>\n <option value=\"<?php echo $datosUbicacion['IdUbicacionInstitucion']?>\"><?php echo $datosUbicacion['NombreUbicacion']?></option>\n <?php\n }*/\n ?> \n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"NombreServicio\"])){\n echo $EstudiantesRotacion->fields[\"NombreServicio\"];\n }else{ ?><select id=\"servicio_<?php echo $i?>\" name=\"servicio_<?php echo $i?>\">\n <option value=\"null\">Seleccione:</option>\n <?php\n $sqlServicio = \"select ServicioRotacionId, NombreServicio from ServicioRotaciones where codigomateria = '\".$EstudiantesGrupoMaterias->fields['codigomateria'].\"'\";\n echo $sqlServicio;\n $valoresServicio=$db->Execute($sqlServicio);\n foreach($valoresServicio as $datosServicio)\n {\n ?>\n <option value=\"<?php echo $datosServicio['ServicioRotacionId']?>\"><?php echo $datosServicio['NombreServicio']?></option>\n <?php\n }\n ?> \n \n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaIngreso\"])){\n echo $EstudiantesRotacion->fields[\"FechaIngreso\"];\n }else{ ?><input type=\"text\" id=\"<?PHP echo $name1?>\" name=\"<?PHP echo $name1?>\" class=\"requerido\" size=\"12\" style=\"text-align:center;\" readonly=\"readonly\" value=\"<?PHP echo $value?>\" placeholder=\"<?PHP echo $Ejemplo?>\" <?PHP echo $readonly;?> onmouseover=\"$('#<?PHP echo $name1?>').datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: 'button',\n buttonImage: '../../../../css/themes/smoothness/images/calendar.gif',\n buttonImageOnly: true,\n dateFormat: 'yy-mm-dd'\n });\n \n $('#ui-datepicker-div').css('display','none');\" />\n \n \n \n <?php } ?></td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaEgreso\"])){\n echo $EstudiantesRotacion->fields[\"FechaEgreso\"];\n }else{ ?><input type=\"text\" id=\"<?PHP echo $name2?>\" name=\"<?PHP echo $name2?>\" class=\"requerido\" size=\"12\" style=\"text-align:center;\" readonly=\"readonly\" value=\"<?PHP echo $value?>\" placeholder=\"<?PHP echo $Ejemplo?>\" <?PHP echo $readonly;?> onmouseover=\"$('#<?PHP echo $name2?>').datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: 'button',\n buttonImage: '../../../../css/themes/smoothness/images/calendar.gif',\n buttonImageOnly: true,\n dateFormat: 'yy-mm-dd'\n });\n \n $('#ui-datepicker-div').css('display','none');\"/>\n <?php } ?> \n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"TotalDias\"])){\n echo $EstudiantesRotacion->fields[\"TotalDias\"];\n }else{ ?><input type=\"text\" id=\"TotDias_<?php echo $i?>\" name=\"TotDias_<?php echo $i?>\" value=\"\"/><!--<a onclick=\"window.open('./Rotaciones_html.php?actionID=VwFormularioDetalleRotacion','', 'width=600, height=600 scrollbars=no channelmode=no');\" title=\"Ver detalles\">__</a>--></td>\n <?php } ?>\n <td><?php if(isset($EstudiantesRotacion->fields[\"NombreEstado\"])){\n echo $EstudiantesRotacion->fields[\"NombreEstado\"];\n }else{ ?><select id=\"estadorotacion_<?php echo $i?>\" name=\"estadorotacion_<?php echo $i?>\" />\n <option value=\"null\">Seleccione:</option>\n <option value=\"1\" selected=\"\">Activo</option>\n <option value=\"2\">Inactivo</option>\n <option value=\"3\">Bloqueado</option>\n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaEgreso\"])){\n echo \"No aplica\";\n }else{ ?><input type=\"checkbox\" name=\"checkestudiante_<?php echo $i?>\" id=\"checkestudiante_<?php echo $i?>\" value=\"on\"/></td>\n <?php } ?> \n </tr> \n <?PHP\n $i++;\n\t\t\t\t\t\t\t\t/******************************************************/\n\t\t\t\t\t\t\t\t$EstudiantesGrupoMaterias->MoveNext();\n\t\t\t\t\t\t\t\t}////fin while principal\n \n\t\t\t\t\t\t\t?>\n <script type=\"text/javascript\" >\n var total_rows='<?php echo $i?>';\n $(\"#total_rows\").val('esto');\n \n for(i=0;i>=<?php echo $i; ?>;i++){\n $('#FechaIngreso_'+i).datepicker({\n changeMonth: true,\n changeYear: true,\n \n dateFormat: 'yy-mm-dd'\n });\n \n $(\"#FechaEgreso_\"+i).datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: \"button\",\n buttonImage: \"../../../../css/themes/smoothness/images/calendar.gif\",\n buttonImageOnly: true,\n dateFormat: \"yy-mm-dd\"\n });\n \n \n } \n \n $('#ui-datepicker-div').css('display','none');\n \n \n \n </script>\n \n \n \t\n \n\t\t\t<?PHP\n return $i;\n\t\t\t}\n\t\t\n\t}", "public function TraeGrupo($cn,$codGrupo) {\n $sql= \"select ID_GRUPO, ID_DEPENDENCIA, DESCRIPCION from db_general.dbo.GRUPO where ID_DEPENDENCIA=22 and ID_APLICACION=1 and ID_GRUPO='\".$codGrupo.\"'\"; \n $query = $cn->prepare($sql);\n $query->execute();\n $data_Grupo = $query->fetchAll();\n return $data_Grupo;\n }", "public function SeeOneUserGroups($id) {\n\n try{\n $select5 = $this->connexion->prepare(\"SELECT *, \n (SELECT SUM(donate_amount) \n FROM cp_donate E \n WHERE E.group_group_id = A.group_id) \n AS helped\n FROM cp_group A, cp_event B, cp_event_has_group C, cp_user_has_group D\n WHERE C.group_group_id = A.group_id\n AND D.group_group_id = A.group_id\n AND C.event_event_id = B.event_id\n AND D.user_user_id = :userID\");\n \n $select5->bindValue(':userID', $id, PDO::PARAM_INT);\n $select5->execute();\n $select5->setFetchMode(PDO::FETCH_ASSOC);\n $array = $select5->FetchAll();\n $select5->closeCursor(); \n\n\n return $array;\n } catch (Exception $e) {\n echo 'Message:' . $e->getMessage();\n }\n\n }", "public function findDetalleAgrupadoByCodigo()\r\n\t\t{\r\n\t\t\t$findModel = self::findDetalleRecaudacionModel();\r\n\t\t\treturn $findModel->select(['codigo'])->groupBy([\r\n\t\t\t\t\t\t\t\t\t'codigo',\r\n\t\t\t\t\t\t\t\t])\r\n\t\t\t\t\t\t\t ->orderBy([\r\n\t\t\t\t\t\t\t\t\t'lapso' => SORT_ASC,\r\n\t\t\t\t\t\t\t\t\t'codigo' => SORT_ASC,\r\n\t\t\t\t\t\t\t\t])\r\n\t\t\t\t\t\t\t ->asArray()\r\n\t\t\t\t \t\t ->all();\r\n\t\t}", "public function buscar_grupos($account_id) {\n $this->db->select('i_g.name');\n\t\t$this->db->from('investorgroups_accounts i_g_a');\n\t\t$this->db->join('investorgroups i_g', 'i_g.id = i_g_a.group_id');\n\t\t$this->db->where('account_id', $account_id);\n\t\t$query = $this->db->get();\n\t\t\n return $query->result();\n }", "public static function baja($id_ggs){\n //obtener empleados por local\n global $baseDatos;\n \n $res = $baseDatos->query(\"DELETE FROM `gs_grupo` WHERE id_ggs = $id_ggs\"); \n\n return $res;\n }", "public function MesasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM mesas INNER JOIN salas ON salas.codsala = mesas.codsala where mesas.codmesa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getGroup($id = null)\n {\n $res = $this->db->select(\"SELECT * FROM `{$this->domainGroup}` WHERE itemName()='{$id}'\", array('ConsistentRead' => 'true'));\n $this->logErrors($res);\n if(isset($res->body->SelectResult->Item))\n return self::normalizeGroup($res->body->SelectResult->Item);\n else\n return false;\n }", "public static function buscarPorId($id){\n\t\t$conn = new Conexao();\n\n\t\t$sql = \"SELECT id, nome FROM NUCLEO WHERE id = ? and status = 0\";\n\t\t\n\t\t$resultado = $conn->consultarTabela($sql, [$id]);\n\n\t\treturn $resultado;\n\t}", "function leerGrupos($entrada) {\n $grupos = [];\n\n $usuario = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n\n $con = crearConexion();\n\n $query = \"SELECT completa.id, completa.nombre, completa.imagen, completa.fecha_hora, completa.descripcion \"\n . \"FROM (SELECT `nombre`, `imagen`, `descripcion` FROM `grupo`) AS completa WHERE NOT EXISTS \"\n . \"(SELECT `nombre`, `imagen`, `descripcion` FROM `grupo`, usuario_grupo WHERE `nombre`=usuario_grupo.grupo AND usuario_grupo.usuario='$usuario') \"\n . \"ORDER BY completa.fecha_hora ASC LIMIT 20\";\n\n $result = mysqli_query($con, $query);\n\n if (mysqli_num_rows($result) < 1) {\n return FALSE;\n } else {\n while ($row = mysqli_fetch_array($result)) {\n $fila = [];\n\n $fila['propietario'] = $row['propietario'];\n $fila['usuario'] = $row['usuario'];\n $fila['grupo'] = $row['grupo'];\n $fila['nombre'] = $row['nombre'];\n $fila['imagen'] = $row['imagen'];\n $fila['descripcion'] = $row['descripcion'];\n\n $grupos[] = $fila;\n }\n\n cerrarConexion($con);\n return $grupos;\n }\n}", "public static function selecionaIdCarrinho($id){\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $query = \"SELECT * FROM carrinhos WHERE id LIKE :id\";\n $stmt = $conn->prepare($query);\n $stmt->bindValue(':id',$id);\n $stmt->execute();\n \n return $stmt->fetchObject();\n }", "function servicioID($id){\n\t\t\n\t\t$query = $this->db->from('servicio')->where('id',$id)->get();\n\t\tif($query-> num_rows() > 0)\n\t\t\t{\n\t\t\treturn $query;\n\t\t\t// SI SE MANDA A RETORNAR SOLO $QUERY , SE PUEDE UTILIZAR LOS ELEMENTOS DEL QUERY \n\t\t\t// COMO usuarioID($data['sesion']->result()[0]->id_usuario POR EJEMPLO. \n\t\t\t}\n\t\n\t}", "private function editar_get()\n {\n $item = $this->ObtenModelPostId();\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'] = \"Editar 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.\"/editar.php\", $data);\n\t}", "public static function generar_ggs($id_ggs){\n global $baseDatos;\n \n $res = $baseDatos->query(\"SELECT * FROM `gs_grupo` WHERE id_ggs = $id_ggs\"); \n\n $filas = $res->fetch_all(MYSQLI_ASSOC);\n if (count($filas) != 0){\n $gastos_unicos = array();\n\n foreach ($filas as $clave => $valor) {\n\n $id_gasto_unico = gs_gasto_unico::generar($valor['id_gasto_unico']);\n \n \n $gastos_unicos[] = $id_gasto_unico;\n\n }\n $ggs = new gs_grupo($id_ggs,$gastos_unicos);\n return $ggs;\n }\n else{\n \n return false;\n }\n \n }", "public static function listOne($id){\n \n $conexion = new Conexion();\n $sql = $conexion->prepare('SELECT nome, imagem, id_aservo FROM ' . self::TABLA . ' WHERE id = :id');\n $sql->bindParam(':id', $id);\n $sql->execute();\n $reg = $sql->fetch(); //Devuelve una única linea (array con cada campo) de la TABLA(id seleccionado).\n return $reg;\n \n }", "function leerMisGrupos($entrada) {\n $grupos = [];\n $usuario = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n\n $con = crearConexion();\n\n $query = \"SELECT propietario, usuario, grupo, nombre, imagen, descripcion FROM usuario_grupo, grupo WHERE usuario = '$usuario' AND usuario_grupo.grupo = grupo.nombre\";\n\n $result = mysqli_query($con, $query);\n\n if (mysqli_num_rows($result) < 1) {\n return FALSE;\n } else {\n while ($row = mysqli_fetch_array($result)) {\n $fila = [];\n\n $fila['propietario'] = $row['propietario'];\n $fila['usuario'] = $row['usuario'];\n $fila['grupo'] = $row['grupo'];\n $fila['nombre'] = $row['nombre'];\n $fila['imagen'] = $row['imagen'];\n $fila['descripcion'] = $row['descripcion'];\n\n $grupos[] = $fila;\n }\n\n cerrarConexion($con);\n return $grupos;\n }\n}", "public static function getById( $id ) {\r\n \r\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); \r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n $sql = \"SELECT *, id AS id FROM \" . DB_PREFIX . \"groups WHERE id = :id\";\r\n \r\n $st = $conn->prepare( $sql );\r\n $st->bindValue( \":id\", $id, PDO::PARAM_INT );\r\n $st->execute();\r\n \r\n $row = $st->fetch();\r\n \r\n $conn = null;\r\n \r\n if ( $row ) return new Group( $row );\r\n \r\n }", "public function vistaGrupoModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, cuatrimestre FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "function consultar_comprobante_cabecera($id) {\n $sql = \"SELECT\n\t\t prosic_comprobante.id_comprobante\n\t\t , prosic_comprobante.codigo_comprobante\n\t\t , prosic_comprobante.emision_comprobante\n\t\t , prosic_comprobante.afecto_comprobante\n\t\t , prosic_comprobante.inafecto_comprobante\n\t\t , prosic_comprobante.total_comprobante\n\t\t , prosic_comprobante.igv_comprobante\n\t\t , prosic_comprobante.isc_comprobante \n\t\t , prosic_comprobante.tipo_cambio_comprobante\n\t\t , prosic_comprobante.id_anexo\n\t\t , prosic_comprobante.id_tipo_comprobante\n\t\t , prosic_comprobante.nro_comprobante\n , prosic_comprobante.serie_comprobante\n\t\t , prosic_subdiario.id_subdiario\n\t\t , prosic_subdiario.codigo_subdiario\n\t\t , prosic_subdiario.nombre_subdiario\n\t\t , prosic_moneda.id_moneda\n\t\t , prosic_moneda.nombre_moneda\n\t\t , prosic_moneda.codigo_moneda\n\t\t , prosic_anio.nombre_anio\n\t\t , prosic_mes.nombre_mes\n , prosic_anio.id_anio\n\t\t , prosic_mes.id_mes\n\t\t , prosic_anexo.codigo_anexo\n\t\t , prosic_anexo.descripcion_anexo\n\t\t , prosic_tipo_comprobante.codigo_tipo_comprobante\n\t\t , prosic_tipo_comprobante.nombre_tipo_comprobante\n\t\t , prosic_comprobante.id_plan_contable\n\t\t , prosic_plan_contable.cuenta_plan_contable\n\t\t , prosic_comprobante.cuenta_costo \n\t\t , prosic_comprobante.cargo_abono\t\t \n\t\t , prosic_comprobante.cuenta_banco\n\t\t , prosic_comprobante.c_a_cuenta_banco \n\t\t , prosic_comprobante.detalle_comprobante\n\t\t\t, prosic_banco.id_banco\n\t\t\t, prosic_comprobante.id_medio_pago\n\t\tFROM prosic_comprobante\n\t INNER JOIN prosic_mes\t\t ON (prosic_comprobante.id_mes = prosic_mes.id_mes)\n\t INNER JOIN prosic_anio\t\t ON (prosic_comprobante.id_anio = prosic_anio.id_anio)\n\t INNER JOIN prosic_subdiario\t ON (prosic_comprobante.id_subdiario = prosic_subdiario.id_subdiario)\n\t INNER JOIN prosic_moneda\t ON (prosic_comprobante.id_moneda = prosic_moneda.id_moneda)\n\t INNER JOIN prosic_anexo\t\t ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n\t INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n\t LEFT JOIN prosic_plan_contable ON (prosic_comprobante.id_plan_contable = prosic_plan_contable.id_plan_contable)\n\t\tLEFT JOIN prosic_banco ON (prosic_comprobante.cuenta_banco = prosic_banco.id_plan_contable)\n\t\t WHERE prosic_comprobante.id_comprobante=\" . $id . \"\";\n\n\t\t$result = $this->Consulta_Mysql($sql);\n $row = @mysql_fetch_assoc($result);\n\n $this->valor_afecto = $row['afecto_comprobante'];\n $this->valor_inafecto = $row['inafecto_comprobante'];\n $this->valor_isc = $row['isc_comprobante'];\n $this->valor_igv = $row['igv_comprobante'];\n $this->valor_total = $row['total_comprobante'];\n $this->subdiario = $row['id_subdiario'];\n $this->tipo_cambio = $row['tipo_cambio_comprobante'];\n $this->moneda = $row['id_moneda'];\n $this->codigo_moneda = $row['codigo_moneda'];\n\n if ($row['id_subdiario'] == 3 || $row['id_subdiario'] == 10) {\n $this->cuenta_costo = $row['cuenta_costo'];\n $row_costo = $this->buscar_cuenta_por_id($row['cuenta_costo']);\n $this->nombre_cuenta_costo = $row_costo[0];\n } elseif ($row['id_subdiario'] == 2) {\n $this->cuenta_costo = 0;\n $this->nombre_cuenta_costo = \"\";\n }\n $this->id_comprobante = $row['id_comprobante'];\n $this->id_anexo = $row['id_anexo'];\n $this->codigo_anexo = $row['codigo_anexo'];\n $this->id_tipo_comprobante = $row['id_tipo_comprobante'];\n $this->codigo_tipo_comprobante = $row['codigo_tipo_comprobante'];\n $this->nro_comprobante = $row['nro_comprobante'];\n $this->emision_comprobante = $row['emision_comprobante'];\n $this->detalle_comprobante = $row['detalle_comprobante'];\n $this->serie_comprobante = $row['serie_comprobante'];\n\n $l_afecto = 0; \n $l_inafecto = 0;\n $l_isc = 0;\n $l_igv = 0;\n\n if(is_null($row['afecto_comprobante']))$l_afecto = 1;\n if(is_null($row['inafecto_comprobante']))$l_inafecto = 1;\n if(is_null($row['isc_comprobante']))$l_isc = 1;\n if(is_null($row['igv_comprobante']))$l_igv = 1;\n\n if($row['afecto_comprobante']==0.00)$l_afecto = 1;\n if($row['inafecto_comprobante']==0.00)$l_inafecto = 1;\n if($row['isc_comprobante']==0.00)$l_isc = 1;\n if($row['igv_comprobante']==\"0.00\")$l_igv = 1;\n\n if ($row['id_subdiario'] == 2) {//Subdiario de Ventas\n if ($l_isc == 0) {\n //cargar isc\n $result = $this->buscar_cuenta_por_codigo(\"40105\");\n $row_cuenta = @mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $codigo_cuenta = \"40105\";\n $tipo = \"A\";\n $monto = $row['isc_comprobante'];\n $this->arreglo_isc = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_igv == 0) {\n //cargar igv\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(1);\n $result = $this->buscar_cuenta_por_codigo($codigo_cuenta);\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $tipo = \"A\";\n $monto = $row['igv_comprobante'];\n $this->arreglo_igv = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_inafecto == 0) {\n //cargar inafecto\n $id_cuenta = $row['id_plan_contable'];\n $codigo_cuenta = $row['cuenta_plan_contable'];\n $tipo = \"A\";\n $monto = $row['inafecto_comprobante'];\n $this->arreglo_inafecto = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_afecto == 0) {\n $this->arreglo_afecto = $this->cargar_sub_cuenta($row['id_plan_contable'], $row['cuenta_plan_contable'], \"A\", $row['afecto_comprobante']);\n }\n //cargando el Total\n\t\t\tif($row['id_moneda']==1){\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(2);\n\t\t\t}else{\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(3);\n\t\t\t}\n $result = $this->buscar_cuenta_por_codigo($codigo_cuenta);\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $tipo = \"C\";\n $monto = $row['total_comprobante'];\n $this->arreglo_total = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n } elseif ($row['id_subdiario'] == 3) {//Subdiario de Compras\n if ($l_isc == 0) {\n //cargar isc\n $result = $this->buscar_cuenta_por_codigo(\"40105\");\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $codigo_cuenta = \"40105\";\n $tipo = \"C\";\n $monto = $row['isc_comprobante'];\n $this->arreglo_isc = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_igv == 0) {\n //cargar igv\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(1);\n $result = $this->buscar_cuenta_por_codigo($codigo_cuenta);\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $tipo = \"C\";\n $monto = $row['igv_comprobante'];\n $this->arreglo_igv = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_inafecto == 0) {\n //cargar inafecto\n $id_cuenta = $row['id_plan_contable'];\n $codigo_cuenta = $row['cuenta_plan_contable'];\n $tipo = \"C\";\n $monto = $row['inafecto_comprobante'];\n $this->arreglo_inafecto = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_afecto == 0) {\n $this->arreglo_afecto = $this->cargar_sub_cuenta($row['id_plan_contable'], $row['cuenta_plan_contable'], \"C\", $row['afecto_comprobante']);\n }\n //cargando el Total\n\t\t\tif($row['id_moneda']==1){\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(4);\n\t\t\t}else{\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(5);\n\t\t\t}\n $result = $this->buscar_cuenta_por_codigo($codigo_cuenta);\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $tipo = \"A\";\n $monto = $row['total_comprobante'];\n $this->arreglo_total = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }## FIN DEL ELSE IF SUBDIARIO 3\n elseif ($row['id_subdiario'] == 8) {//Subdiario de BANCOS\n ##CARGADO LA CUENTA DE BANCOS\n $row_cuenta = $this->buscar_cuenta_por_id($row['cuenta_banco']);\n $id_cuenta = $row['cuenta_banco'];\n $codigo_cuenta = $row_cuenta[0];\n $tipo = $row['c_a_cuenta_banco'];\n $monto = $row['total_comprobante'];\n $this->arreglo_banco = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n\n ##CARGADO LA CUENTA DE INGRESO EGRESOS\n $id_cuenta = $row['id_plan_contable'];\n $codigo_cuenta = $row['cuenta_plan_contable'];\n $tipo = $row['cargo_abono'];\n $monto = $row['total_comprobante'];\n $this->arreglo_ingreso_egreso = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n\n return $row;\n }", "public function obtenerGestor($idGestor){ \n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerGestor($idGestor);\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", "function getById($id){\n\t\t\t$pelicula = new Pelicula();\n\t\t\t$peliculas = array();\n\t\t\t$peliculas[\"items\"] = array();\n\n\t\t\t$res = $pelicula->obtenerPelicula($id);\n\n\t\t\t//aqui se valida de que sea una sola fila de datos\n\n\t\t\tif($res->rowCount() == 1){\n\n\t\t\t\t//se agregan los datos al array de item\n\t\t\t\t$row = $res->fetch();\n\t\t\t\n\t\t\t\t$item = array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'nombre' => $row['nombre'],\n\t\t\t\t\t'imagen' => $row['imagen']\n\t\t\t\t);\n\t\t\t\t//se agregan los datos al array de item\n\t\t\t\tarray_push($peliculas['items'], $item);\n\n\t\t\t// echo json_encode($peliculas);\n\t\t\t\t$this->printJSON($peliculas);\n\n\t\t\t}else{\n\t\t\t\t//valida si hay datos disponibles\n\n\t\t\t\t//echo json_encode(array('mensaje' => 'No hay mensaje registrados'));\n\t\t\t\t$this->error('No hay elementos registrados');\n\t\t\t}\n\t\t}", "function selectByIdac_consumos($consumo_id){\n\t\t\t$this->connection = Connection::getinstance()->getConn();\n\t\t\t$PreparedStatement = \"SELECT consumo_id, socio_id, nro_medidor, fecha_lectura, fecha_emision, periodo_mes, periodo_anio, consumo_total_lectura, consumo_por_pagar, costo_consumo_por_pagar, estado, fecha_hora_pago, usuario_pago, monto_pagado, pagado_por, ci_pagado_por,\n (SELECT CONCAT(nombres,' ',apellidos) FROM asapasc.ac_socios WHERE socio_id = asapasc.ac_consumos.socio_id) AS socio \n FROM asapasc.ac_consumos WHERE consumo_id = \".Connection::inject($consumo_id).\" ;\";\n\t\t\t$ResultSet = mysql_query($PreparedStatement,$this->connection);\n\t\t\tlogs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);\n\n\t\t\t$elem = new ac_consumosTO();\n\t\t\twhile($row = mysql_fetch_array($ResultSet)){\n\t\t\t\t$elem = new ac_consumosTO();\n\t\t\t\t$elem->setConsumo_id($row['consumo_id']);\n\t\t\t\t$elem->setSocio_id($row['socio_id']);\n\t\t\t\t$elem->setNro_medidor($row['nro_medidor']);\n\t\t\t\t$elem->setFecha_lectura($row['fecha_lectura']);\n\t\t\t\t$elem->setFecha_emision($row['fecha_emision']);\n\t\t\t\t$elem->setPeriodo_mes($row['periodo_mes']);\n\t\t\t\t$elem->setPeriodo_anio($row['periodo_anio']);\n\t\t\t\t$elem->setConsumo_total_lectura($row['consumo_total_lectura']);\n\t\t\t\t$elem->setConsumo_por_pagar($row['consumo_por_pagar']);\n\t\t\t\t$elem->setCosto_consumo_por_pagar($row['costo_consumo_por_pagar']);\n\t\t\t\t$elem->setEstado($row['estado']);\n\t\t\t\t$elem->setFecha_hora_pago($row['fecha_hora_pago']);\n\t\t\t\t$elem->setUsuario_pago($row['usuario_pago']);\n\t\t\t\t$elem->setMonto_pagado($row['monto_pagado']);\n\t\t\t\t$elem->setPagado_por($row['pagado_por']);\n\t\t\t\t$elem->setCi_pagado_por($row['ci_pagado_por']);\n $elem->setSocio($row['socio']);\n\n\t\t\t}\n\t\t\tmysql_free_result($ResultSet);\n\t\t\treturn $elem;\n\t\t}", "public function getGrupo()\n {\n return $this->grupo;\n }", "function getGroupName($id=0) {\n return getOne(\"SELECT group_name FROM `group` WHERE id = ?\",[$id]);\n}", "public function listarPorId(){\n $query = \"select * from usuario where idusuario=?\";\n\n //preparando a consulta para a execução\n $stmt=$this->conn->prepare($query);\n\n //vamos fazer um blind(ligação) do id pesquisado\n //com o paramêtro da consulta, neste caso é o \n //ponto de interrogação\n $stmt ->bindParam(1,$this->idusuario);\n\n //executar efetivamente a consulta \n $stmt ->execute();\n\n //Organizar os dados retornados da consulta para \n // a exibição em formato de json\n // Vamos usar uma variavel e um array para associar \n // os campos da tabela\n $linha = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //organizar no objeto usuario(aqrquivo usuario.php)\n //os dados retornados\n //da tabela usuario que está no banco de dados\n \n $this->email = $linha['email'];\n $this->senha = $linha['senha'];\n $this->nome = $linha['nome'];\n $this->cpf = $linha['cpf'];\n $this->telefone = $linha['telefone'];\n $this->foto = $linha['foto'];\n\n }", "function selectAllPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"SELECT * FROM pessoa ORDER BY nome\";\r\n $resultado = $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados e armazena o retorno em $resultado\r\n $banco->close();\r\n while ($row = mysqli_fetch_array($resultado)) { // Formata o retorno do banco de dados e separa as informações por cada pessoa (row)\r\n $grupo[] = $row;\r\n }\r\n return $grupo; // grupo eh um array, onde cada indice contem as informacoes de uma pessoa\r\n}", "function listeGroupes(){\n $groupes = array();\n $connexion = new Connexion();\n $query = 'SELECT * FROM GROUPE';\n $result = $connexion->query($query);\n foreach($result as $row){\n $groupes[] = array('id'=>$row['id'],'libelle'=>$row['libelle'],'nombre'=>$row['nombre']);\n }\n return $groupes;\n}", "function select($id){\r\n\t\t$sql = \"SELECT * FROM gestaoti.unidade_organizacional WHERE seq_unidade_organizacional = $id\";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$result = $this->database->result;\r\n\r\n\t\t$row = pg_fetch_object($result);\r\n\t\t$this->SEQ_UNIDADE_ORGANIZACIONAL = $row->seq_unidade_organizacional;\r\n\t\t$this->NOM_UNIDADE_ORGANIZACIONAL = $row->nom_unidade_organizacional;\r\n\t\t$this->SEQ_UNIDADE_ORGANIZACIONAL_PAI = $row->seq_unidade_organizacional_pai;\r\n\t\t$this->SGL_UNIDADE_ORGANIZACIONAL = $row->sgl_unidade_organizacional;\r\n\t}", "function bajaGrupo($name)\n\t\t\t{\n\t\t\t\t$mysqli=$this->conexionBD();\n\t\t\t\t$query=\"DELETE FROM `grupo` WHERE `NOMBRE_GRUPO`='$name'\";\n\t\t\t\t$mysqli->query($query);\n\t\t\t\t$mysqli->close();\n\t\t\t\t\t\n\t\t\t}", "public function getGruppi(){\n \n if($this->azienda>0){\n $cosa=(\" azienda = \".$this->azienda.\" OR owner=-1 \");\n\n $this->db->from(\"lm_categorie_prodotti\");\n \n $this->db->where($cosa);\n\n $query=$this->db->get();\n\n //$datas=$query->result();//\n $datas = $query->result_array();\n if(count($datas)>0){\n $gruppi=array();\n foreach($datas as $g){\n if($g[\"foto\"]==null){\n $g[\"foto\"]=\"/public/img/noimage.jpg\";\n }\n $gruppi[$g[\"gruppo\"]][]=$g;\n }\n }else{\n $cosa=(\"owner = \".$this->utente.\" OR owner = -1\");\n $this->db->from(\"lm_categorie_prodotti\");\n $this->db->where($cosa);\n\n $query=$this->db->get();\n $datas = $query->result_array();\n $gruppi=array();\n foreach($datas as $g){\n \n if($g[\"foto\"]==null){\n $g[\"foto\"]=\"/public/img/noimage.jpg\";\n }\n $gruppi[$g[\"gruppo\"]][]=$g;\n \n }\n }\n \n }else{\n redirect(\"/\");\n }\n \n return $gruppi;\n }", "public function grupo_permiso()\n {\n $parametros = Input::only('term');\n\n $data = Permiso::where(function($query) use ($parametros) {\n $query->where('grupo','LIKE',\"%\".$parametros['term'].\"%\");\n });\n\n $variable = $data->distinct()->select(DB::raw(\"grupo as nombre\"))->get();\n $data = [];\n foreach ($variable as $key => $value) {\n $data[] = $value->nombre;\n }\n\n return $this->respuestaVerTodo($data);\n }", "function consultar_repuesto($id_repuesto){\n\t\t$this->db->select('*');\n\t\t$this->db->From('repuestos');\n\t\t$this->db->where('id',$id_repuesto);\n\t\t$query = $this->db->get();\n\t\treturn $query->row();\n\t}", "public function grados()\n {\n return $this->hasMany('DSIproject\\Grado');\n }", "public function grados()\n {\n return $this->hasMany('DSIproject\\Grado');\n }", "function altaGrupo($nombre,$descripcion)\n\t\t{\t\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"INSERT INTO `grupo`(`NOMBRE_GRUPO`, `DESCRIPCION`) VALUES ('$nombre','$descripcion')\";\n\t\t\t$mysqli->query($query);\n\t\t\t$mysqli->close();\n\t\t\t\t\n\t\t}", "public function getDetail($id){\n //Get detail\n return Group::findOrFail($id);\n }", "function getArticuloByGenero( $genero_id ){\n \n if( $genero_id == NULL) return false; // no pasa id devuelve false;\n\n $sql = \"SELECT articulo.id, articulo.titulo, articulo.contenido, articulo.imagen_1, articulo.subtitulo, articulo.fecha, articulo.autor_id, autor.nombre autor, genero.nombre genero, articulo.activo \n from articulo\n inner join autor on autor_id=autor.id\n inner join genero on genero_id=genero.id WHERE articulo.genero_id = $genero_id ORDER BY `articulo`.`id` DESC\";\n \n return ejecutarConsulta($sql);\n\n }", "public function grupos()\n {\n return $this->belongsTo(GrupoInteres::class, 'FK_DAE_GruposInteres', 'PK_GIT_Id');\n }", "public function groups_get($id=0)\n {\n $sutil = new CILServiceUtil();\n $result = $sutil->getGroupInfo($id);\n $this->response($result);\n\n }", "function find_by_groupName($val)\n{\n global $db;\n $sql = \"SELECT nomb_gpo FROM grupos_usuarios WHERE nomb_gpo = '{$db->escape($val)}' LIMIT 1 \";\n $result = $db->query($sql);\n return($db->num_rows($result) === 0 ? TRUE : FALSE);\n}", "function getGroup(){\n require('db.php');\n $req = \"SELECT idGrp, libGrp FROM grp\";\n $res = mysqli_query($co, $req) or die('err_getGroup');\n\n if(mysqli_num_rows($res)!=0){\n $grp = mysqli_fetch_all($res);\n return($grp);\n }\n }", "public function show($id)\n\t{\n\t\t$group = Group::find($id);\n\t\treturn \"Id: {$group->id}\n\t\t\t\tNombre: {$group->nombre} \n\t\t\t\tEmail: {$group->email} \n\t\t\t\tTeléfono: {$group->telefono}\";\n\t}", "public function getIdDetalleRegistroGradoFolio( ){\n\t\t\treturn $this->idDetalleRegistroGradoFolio;\n\t\t}", "public function showAction($idGroup)\n {\n $em = $this->getDoctrine()->getRepository(groupe::class);\n $list = $em->findAllByGroup($idGroup);\n $emnom = $this->getDoctrine()->getRepository(groupe::class);\n $listnom = $emnom->findgroupnom($idGroup);\n $emnum = $this->getDoctrine()->getRepository(groupe::class);\n $listnum = $emnum->numberofkids($idGroup);\n return $this->render('@Plan/groupe/show.html.twig', array('grouplist' => $list,\"grpnom\"=>$listnom,\"num\"=>$listnum));\n }", "public function selectMatiere($id){\n $con=new Connexion();\n $conn2=$con->con; \n $query=\"SELECT * FROM matiere where IdM=$id\";\n $result = $conn2->prepare($query);\n $result->execute();\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }", "public function consultarAction()\n {\n $source = new Entity('CapacitacionBundle:Capacitador','grupo_capacitador');\n \n $grid = $this->get('grid');\n \n \n $grid->setId('grid_capacitador');\n $grid->setSource($source); \n \n // Crear\n $rowAction1 = new RowAction('Consultar', 'capacitador_show');\n $rowAction1->manipulateRender(\n function ($action, $row)\n {\n $action->setRouteParameters(array('id','pag'=> 1));\n return $action;\n }\n );\n $grid->addRowAction($rowAction1);\n\n //$grid->setDefaultOrder('fechaexpediente', 'desc');\n $grid->setLimits(array(5 => '5', 10 => '10', 15 => '15'));\n \n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Facilitadores\", $this->get(\"router\")->generate(\"pantalla_facilitadores\"));\n $breadcrumbs->addItem(\"Consultar facilitador\", $this->get(\"router\")->generate(\"hello_page\"));\n\n return $grid->getGridResponse('CapacitacionBundle:Capacitador:index.html.twig');\n }", "public function carregarGrupoEmpresa() {\n $this->load->model('cadastroferiasmodel');\n\n $retorno = $this->cadastroferiasmodel->carregarGrupoEmpresa();\n echo json_encode($retorno);\n }", "public function findUserGroup($idGroup) {\n\t\t$sql = \"select u.* from t_user u INNER JOIN t_group g ON g.idGroup = u.idGroup where g.idGroup=? LIMIT 1\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($idGroup));\n\n\t\tif ($row){\n\t\t\treturn $this->buildDomainObject($row);\n\t\t} else {\n\t\t\tthrow new \\Exception(\"Pas de groupe correspondant à l'id '\" . $id . \"'\");\n\t\t}\t\t\n\t}", "function get_commission_groupe($id)\n {\n return $this->db->get_where('commission_groupe',array('id'=>$id))->row_array();\n }", "public function obteterDatos($id_OrdenCompra){\n\t\t\techo '---'.$id_OrdenCompra.'---';\n\t\t\t$conexion = $this->conn;\n\t\t\t$sth = $conexion->prepare('SELECT id_OrdenCompra, nombre_OrdenCompra as nombre, fecha_registro ,prop.tipo_procedencia , rfc, telefono , email , direccion , tipop.tipo , nickname , password , url_image from '.$this->nombreTabla.' OrdenCompra , procendias_OrdenCompra prop, tipos tipop where estado = 1 and OrdenCompra.id_tipo_procedencia= prop.id_tipo_procedencia and OrdenCompra.id_tipo = tipop.id_tipo and id_OrdenCompra = :id_OrdenCompra', array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\t\n\t\t\t$sth->bindParam(':id_OrdenCompra', $id_OrdenCompra, PDO::PARAM_INT );\n\t\t\t$sth->execute();\n\t\t\t$row = $sth->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $row;\n\t\t}", "public function cboGrados(){\n\t\t$db = new connectionClass();\n\n\t\t$sql = $db->query(\"SELECT * FROM grado\");\n\t\t$numberRecord = $sql->num_rows;\n\n\t\tif ($numberRecord != 0) {\n\t\t\t$dataArray = array();\n\t\t\t$i = 0;\n\n $dataArray[$i] = array(\"id\" => '0' , \"descripcion\" => 'Grado');\n\n\t\t\twhile($data = $sql->fetch_assoc()){\n $i++;\n\t\t\t\t$dataArray[$i] = array(\"id\" => $data['idGrado'], \"descripcion\" => $data['Descripcion']);\n\t\t\t}\n\n\t\t\theader(\"Content-type: application/json\");\n\t\t\treturn json_encode($dataArray);\n\t\t}\n\t}", "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}", "function GetPeliculasPorGenero($generoNombre){\n $genero = $this->db->prepare(\"SELECT * FROM genero WHERE nombre=?\");//todo de genero del nombre que quiero\n $genero->execute(array($generoNombre));//le asignamos ese nombre\n $arrGenero = $genero->fetchAll(PDO::FETCH_OBJ);//lo pedimos a la base de datos\n //print_r($id_generos[0]->id_genero);//lo imprimimos para ver que tal\n \n $sentencia = $this->db->prepare(\"SELECT * FROM peliculas WHERE id_genero=?\");//todo de pelicuas de un id_genero que quiero\n $sentencia->execute(array($arrGenero[0]->id_genero));//lo ejecuto y le paso el id que busco\n // print_r($sentencia->fetchAll(PDO::FETCH_OBJ));\n return $sentencia->fetchAll(PDO::FETCH_OBJ); \n }", "public function getHijosOrg($idPadre)\r\n {\r\n\r\n $SQLwhere = ($idPadre) ? \"x.idpadre=$idPadre AND x.idestructuraop<>x.idpadre\" : \"x.idestructuraop=x.idpadre\";\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $q = Doctrine_Query::create($conn);\r\n\r\n $result = $q->select(\"x.idestructuraop,x.idestructuraop as id,CONCAT( x.abreviatura,CONCAT('-',no.abrevorgano)) as text,( (x.rgt - x.lft) = 1) as leaf,'folder' as cls,'externa' as tipo,\r\n\t\t\t\t\t\t\t\t\t\t (1 = 0 ) as checked,\r\n\t\t\t\t\t\t\t\t\t\tx.idpadre as idpadre,CONCAT('geticon?icon=',x.idnomeav) as icon,\r\n\t\t\t\t\t\t\t\t\t\t( x.idnomeav <> 2 ) as pintar,( x.idnomeav <> 2 ) as pintado\")->from('DatEstructuraop x ')\r\n ->innerJoin('x.NomOrgano no')\r\n ->where($SQLwhere)\r\n ->setHydrationMode(Doctrine :: HYDRATE_ARRAY)\r\n ->execute();\r\n\r\n return $result;\r\n }" ]
[ "0.7339253", "0.69246817", "0.67949504", "0.6725878", "0.6622047", "0.6611262", "0.6592734", "0.6572151", "0.65617085", "0.65306264", "0.6478382", "0.64430296", "0.6418087", "0.64079386", "0.6352677", "0.6329956", "0.6277916", "0.62654316", "0.62607336", "0.6244342", "0.6244305", "0.62250215", "0.620491", "0.620491", "0.6188659", "0.6180915", "0.6178198", "0.616134", "0.616134", "0.6155625", "0.61331576", "0.6124043", "0.612122", "0.6118069", "0.6094938", "0.60885525", "0.6078481", "0.6072012", "0.60661316", "0.6064647", "0.60574496", "0.60564935", "0.60355043", "0.60330725", "0.60083896", "0.6003194", "0.5980021", "0.5979157", "0.59767586", "0.59717786", "0.5951317", "0.5946829", "0.59354293", "0.5924869", "0.59231555", "0.5919583", "0.59164804", "0.59093344", "0.59047353", "0.58910733", "0.5886488", "0.5880693", "0.58753186", "0.5858757", "0.5855239", "0.5852695", "0.58464885", "0.584452", "0.5842208", "0.58172834", "0.580512", "0.5793972", "0.5793632", "0.5782587", "0.57810974", "0.5779913", "0.57793975", "0.5777399", "0.57750976", "0.57750976", "0.5774637", "0.5769607", "0.57654506", "0.5753528", "0.5748542", "0.5744766", "0.5744032", "0.57367647", "0.57287323", "0.5728035", "0.5721703", "0.5715736", "0.57086504", "0.5707019", "0.5705587", "0.5703282", "0.5701186", "0.5700558", "0.5697155", "0.56956685" ]
0.6833548
2
Gets the metadataToAdd A collection of keyvalue pairs that should be added to the file.
public function getMetadataToAdd() { if (array_key_exists("metadataToAdd", $this->_propDict)) { if (is_a($this->_propDict["metadataToAdd"], "\Beta\Microsoft\Graph\SecurityNamespace\Model\KeyValuePair") || is_null($this->_propDict["metadataToAdd"])) { return $this->_propDict["metadataToAdd"]; } else { $this->_propDict["metadataToAdd"] = new KeyValuePair($this->_propDict["metadataToAdd"]); return $this->_propDict["metadataToAdd"]; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddMetadata()\n {\n return $this->readOneof(3);\n }", "public function setMetadataToAdd($val)\n {\n $this->_propDict[\"metadataToAdd\"] = $val;\n return $this;\n }", "public function addMetadata()\n {\n $metadata = new clozetext_metadata();\n $metadata->set_distractor_rationale('It is a general feedback');\n return $metadata;\n }", "public function get_metadata() {\n\t\t$metadata = [];\n\n\t\tforeach ( $this->get_mapping() as $attribute => $meta_key ) {\n\t\t\t$metadata[ $attribute ] = $this->get_meta( $meta_key );\n\t\t}\n\n\t\treturn $metadata;\n\t}", "public function get_metadata() {\n return $this->metadata;\n }", "public function getMetaData() {\n\t\treturn $this->arrMetadata;\n\t}", "public function getFileMetadata()\n {\n return $this->get('FileMetadata');\n }", "public function add()\n {\n $data = array(\n \n 'user_id' => '',\n \n 'perm_id' => '',\n \n 'isactive' => '',\n \n 'userid' => '',\n \n 'created' => '',\n \n 'modified' => '',\n \n );\n //'created' => NOW(),\n //'modified' => NOW(),\n //'userid' => userid(),\n return $data;\n }", "public function getAllMetadata(): Collection;", "protected function getMetadata()\n {\n // object not working must use array\n $metadata['platform'] = \"Magento 1\";\n $metadata['version'] = Mage::getVersion();\n return $metadata;\n }", "public function getMetaData()\n {\n return $this->metadata;\n }", "public function getMetadata();", "public function getMetadata();", "public function getMetadata();", "public static function get_metadata(collection $collection) : collection {\n $collection->add_database_table(\n 'tool_dataprivacy_request',\n [\n 'comments' => 'privacy:metadata:request:comments',\n 'userid' => 'privacy:metadata:request:userid',\n 'requestedby' => 'privacy:metadata:request:requestedby',\n 'dpocomment' => 'privacy:metadata:request:dpocomment',\n 'timecreated' => 'privacy:metadata:request:timecreated'\n ],\n 'privacy:metadata:request'\n );\n\n $collection->add_user_preference(tool_helper::PREF_REQUEST_FILTERS,\n 'privacy:metadata:preference:tool_dataprivacy_request-filters');\n $collection->add_user_preference(tool_helper::PREF_REQUEST_PERPAGE,\n 'privacy:metadata:preference:tool_dataprivacy_request-perpage');\n\n return $collection;\n }", "function getAdditionalMetadataFieldNames() {\n\t\treturn $this->getMetadataFieldNames(false);\n\t}", "protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }", "public function getAdditionalAddAttributes(): ?array;", "public function getMetaData()\n {\n return [\n 'type' => $this->type,\n 'mimetype' => $this->mimetype,\n 'size' => $this->size,\n 'width' => $this->width,\n 'height' => $this->height\n ];\n }", "public function getMetadata() {}", "public function getMetadata() {}", "public function getAdd()\n {\n return array(\n 'Currency.name' => array('type' => 'text', 'label' => __(\"Name\")),\n 'Currency.code' => array('type' => 'text', 'label' => __(\"Code\")),\n 'Currency.rate' => array('type' => 'text', 'label' => __(\"Rate\"))\n );\n }", "public function getMetadata()\n {\n return $this->_metadata;\n }", "public function add_metadata($metadata)\n\t{\n\t\t$this->db->insert('metadata', $metadata);\n\t\treturn $this->db->insert_id();\n\t}", "public function getMetaData();", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public static function get_metadata(collection $collection) : collection {\n $collection->add_database_table(\n 'reengagement_inprogress',\n [\n 'reengagement' => 'privacy:metadata:reengagement',\n 'userid' => 'privacy:metadata:userid',\n 'completiontime' => 'privacy:metadata:completiontime',\n 'emailtime' => 'privacy:metadata:emailtime',\n 'emailsent' => 'privacy:metadata:emailsent'\n ],\n 'privacy:metadata:reengagement_inprogress'\n );\n\n return $collection;\n }", "protected function storeExtraInfo()\n\t{\n\t\t$input = $this->connection->getExtraInfo();\n\t\t\n\t\tif (!isset($input)) {\n\t\t\t$this->extrainfo[] = null;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!is_string($input)) {\n\t\t\ttrigger_error(\"Metadata in other forms that a string is not yet supported\", E_USER_NOTICE);\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t$info[] = (object)array('type'=>'_raw_', 'value'=>$input);\n\t\t\n\t\t$matches = null;\n\t\tif (preg_match_all('%<extraInfo>.*?</extraInfo>%is', $input, $matches, PREG_SET_ORDER)) {\n\t\t\tforeach ($matches[0] as $xml) {\n\t\t\t\t$sxml = new SimpleXMLElement($xml);\n\t\t\t\t$info[] = (object)array('type'=>(string)$sxml->type, 'value'=>(string)$sxml->value->string);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->extrainfo[] = $info;\n\t}", "function getMetadata() {\n\t\treturn $this->_Metadata;\n\t}", "public function getMetadata(): array;", "public function metadata()\r\n\t{\r\n return array(\"nit\" => array(),\r\n \"nombre\" => array(),\r\n \"telefono\" => array(),\r\n \"direccion\" => array(),\r\n \"correo\" => array());\r\n }", "public function getMetadata()\n {\n $this->getFtpMetadata();\n\n parent::getMetadata();\n\n /**\n * Discovery creates an array of Files and Directories based on Path\n */\n if ($this->exists === true) {\n $this->discovery($this->path);\n }\n\n $this->getSize();\n\n return;\n }", "function getMetaData()\n {\n $meta = parent::getMetaData();\n\n $meta[\"sum_bankcodes\"] = floatval($this->sum_bankcodes);\n $meta[\"sum_accounts\"] = floatval($this->sum_accounts);\n\n return $meta;\n }", "public static function get_metadata(collection $collection): collection {\n $collection->add_database_table('local_ousearch_documents', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2011', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2012', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2013', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2014', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2015', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2016', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2017', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2018', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2019', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2020', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n return $collection;\n }", "public function get_meta() : array\n {\n return $this->additional['meta'] ?? [];\n }", "public function metadata() : array;", "public static function get_metadata(collection $collection) : collection {\n $arr = ['userid' => 'privacy:metadata:attendanceregister_session:userid',\n 'login' => 'privacy:metadata:attendanceregister_session:login',\n 'logout' => 'privacy:metadata:attendanceregister_session:logout',\n 'duration' => 'privacy:metadata:attendanceregister_session:duration',\n 'onlinesess' => 'privacy:metadata:attendanceregister_session:onlinesess',\n 'comments' => 'privacy:metadata:attendanceregister_session:comments'];\n $collection->add_database_table('attendanceregister_session', $arr, 'privacy:metadata:attendanceregister_session');\n $arr = ['userid' => 'privacy:metadata:attendanceregister_aggregate:userid',\n 'duration' => 'privacy:metadata:attendanceregister_aggregate:duration',\n 'onlinesess' => 'privacy:metadata:attendanceregister_aggregate:onlinesess',\n 'total' => 'privacy:metadata:attendanceregister_aggregate:total',\n 'grandtotal' => 'privacy:metadata:attendanceregister_aggregate:grandtotal',\n 'lastsessionlogout' => 'privacy:metadata:attendanceregister_aggregate:lastsessionlogout'];\n $collection->add_database_table('attendanceregister_aggregate', $arr, 'privacy:metadata:attendanceregister_aggregate');\n $arr = ['userid' => 'privacy:metadata:attendanceregister_lock:userid',\n 'takenon' => 'privacy:metadata:attendanceregister_lock:takenon'];\n $collection->add_database_table('attendanceregister_lock', $arr, 'privacy:metadata:attendanceregister_lock');\n return $collection;\n }", "protected function _getAllCustomMetadataKeys() {}", "public function getMetaData(): array {\n\t\treturn $this->content['metadata'] ?? [];\n\t}", "public function metadata()\n\t{\n\t\treturn array(\"id\" => array(), \"dia\" => array(), \"hora\" => array(), \"empleado\" => array()); \n\t}", "function extractMetadata($filedata) {\r\n\t\treturn array(\r\n\t\t\t'filename' => $this->filename($filedata),\r\n\t\t\t'filesize' => $this->filesize($filedata),\r\n\t\t\t'ext' => $this->ext($filedata),\r\n\t\t\t'mimetype' => $this->mimetype($filedata),\r\n\t\t);\r\n\t}", "public function getMetaData(): iterable;", "public function addMetadata($key, $value)\n {\n $this->metadata[$key] = $value;\n\n return $this;\n }", "public function getMetadata()\n {\n return $this->Metadata;\n }", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "public function getMetaData(): array\n {\n if (!$this->GPXFile instanceof GpxFile || !$this->GPXFile->metadata) {\n return [];\n }\n\n return $this->GPXFile->metadata->toArray();\n }", "function createMetaData()\n\t{\n\t\tparent::createMetaData();\n\t\t$this->saveAuthorToMetadata();\n\t}", "public function getMetaData()\r\n {\r\n $this->caseClosedOrFail();\r\n\r\n return $this->metadata;\r\n }", "function get_addonpack_metadata() {\n require_once(SLPLUS_PLUGINDIR . '/include/storelocatorplus-updates_class.php');\n $this->Updates = new SLPlus_Updates(\n $this->plugin->version,\n $this->plugin->updater_url,\n SLPLUS_BASENAME\n );\n $result = $this->Updates->getRemote_list();\n update_option('slp_addonpack_meta',$result['body']);\n return;\n }", "public function getGenericMetadata()\n {\n return $this->generic_metadata;\n }", "public function addMetaData(array $meta)\n {\n $this->meta = array_merge($this->meta, $meta);\n return $this;\n }", "public function saveMetadata(){\n foreach ($this->_metadata as $metadatum) {\n $metadatum->save();\n }\n return $this;\n }", "protected function getAdditionFields(): array\n {\n return $this->additionFields;\n }", "public function setAddMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Clarifai\\Api\\AddMetadata::class);\n $this->writeOneof(3, $var);\n\n return $this;\n }", "function getFtpMetadata()\n {\n $ftp_metadata = ftp_rawlist($this->getConnection(), $this->path);\n\n $this->temp_files = array();\n\n foreach ($ftp_metadata as $key => $fileMetadata) {\n\n $metadata = new \\stdClass();\n $metadata->permissions = substr($fileMetadata, 0, 10);\n $fileMetadata = trim(substr($fileMetadata, 10, 9999));\n $metadata->owner = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->group = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->size = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->day = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->month = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->year = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->time = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->name = trim($fileMetadata);\n\n if ($metadata->name == '.'\n || $metadata->name == '..'\n ) {\n\n } else {\n $name = $metadata->name;\n $this->temp_files[$name] = $metadata;\n }\n }\n\n return;\n }", "function addUpdateMetadata(){\n\t \n\t\t $this->getMakeMetadata(); //get previously saved metadata\n\t\t \n\t\t $chValue = $this->checkParam(\"title\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableName = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"description\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableDesciption = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"doi\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableDOI = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"ark\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableARK = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"versionControl\");\n\t\t if($chValue != false){\n\t\t\t\t$this->versionControl = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"pubCreated\");\n\t\t if($chValue != false){\n\t\t\t\t$this->pubCreated = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"tags\"); \n\t\t if($chValue != false ){\n\t\t\t\tif(stristr($chValue, self::tagDelim)){\n\t\t\t\t\t $rawTags = explode(self::tagDelim, $chValue);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $rawTags = array($chValue);\n\t\t\t\t}\n\t\t\t\t$tags = array();\n\t\t\t\tforeach($rawTags as $tag){\n\t\t\t\t\t $tags[] = trim($tag);\n\t\t\t\t}\n\t\t\t\t$this->tableTags = $tags;\n\t\t }\n\t\t \n\t\t $this->saveMetadata(); //save the upated metadata\n\t }", "private function getMetaData ()\n\t\t{\n\t\t\t$data = file_get_contents (\"META.inf\");\n\t\t\t$o = json_decode ($data,true);\n\t\t\treturn $o;\t\n\t\t}", "public function getFilesAdded(): array\n {\n return $this->files_added;\n }", "public static function get_metadata(collection $items) : collection {\n\n $items->add_external_location_link(\n get_string('privacy:externlink', 'local_ganalytics'),\n [\n 'userrole' => 'privacy:metadata:userrole',\n 'coursename' => 'privacy:metadata:coursename',\n 'coursesize' => 'privacy:metadata:coursesize',\n 'coursecat' => 'privacy:metadata:coursecat',\n 'pagetype' => 'privacy:metadata:pagetype',\n 'module' => 'privacy:metadata:module',\n 'instance' => 'privacy:metadata:instance',\n ],\n 'privacy:metadata'\n );\n\n return $items;\n\n }", "private static function createMetadataForStreamFlv ( $filePath ,$assets , $streamInfo , $addPadding, $duration = null )\r\n\t{\r\n\t\t$metadata_content = self::getMetadataFromCache ( $filePath ,$streamInfo, $addPadding );\r\n\t\tif ( $metadata_content ) return $metadata_content;\r\n\t\t\r\n\t\tlist($sizeList, $timeList, $filePositionsList) = self::iterateAssets( $assets , $streamInfo , $addPadding, false );\r\n\r\n\t\t$amfSerializer = new FLV_Util_AMFSerialize();\r\n\r\n\t\t$metadata = array();\r\n\t\t$metadata_data = array();\r\n\t\tif ( $duration )\r\n\t\t{\r\n\t\t\t$metadata_data[\"duration\"] = (int)($duration/1000) ;\r\n\t\t}\r\n\r\n\t\t$metadata_data[\"bufferSizes\"] = $sizeList;\r\n\t\t$metadata_data[\"times\"] = $timeList;\r\n\t\t$metadata_data[\"filepositions\"] = $filePositionsList;\r\n\r\n\t\t$res = $amfSerializer->serialize( 'onMetaData') . $amfSerializer->serialize( $metadata_data );\r\n\t\t$data_len = strlen($res);\r\n\r\n\t\t// first create a metadata tag with it's real size - this will be the offset of all the rest of the tags\r\n\t\t// create a metadata tag\r\n\t\t\r\n\t\t$metadata_size = myFlvHandler::TAG_WRAPPER_SIZE + $data_len;\r\n\t\t$metatagEndOffset = myFlvHandler::getHeaderSize() + $metadata_size;\r\n\r\n\t\t// second - create the real metadata tag with the values of all the following tags with correct offsets\r\n\t\tfor ($i = 0 ; $i < count ( $sizeList ) ; ++$i )\r\n\t\t\t$sizeList[$i] += $metatagEndOffset;\r\n\t\t\t\r\n\t\tfor ($i = 0 ; $i < count ( $filePositionsList ) ; ++$i )\r\n\t\t\t$filePositionsList[$i] += $metatagEndOffset;\r\n\r\n\t\t$metadata_data[\"bufferSizes\"] = $sizeList;\r\n\t\t$metadata_data[\"filepositions\"] = $filePositionsList;\r\n\t\t\r\n\t\t$res = $amfSerializer->serialize( 'onMetaData') . $amfSerializer->serialize( $metadata_data );\r\n\r\n\t\t$metadata_content = myFlvHandler::createMetadataTag($res);\r\n\t\tself::setMetadataInCache ( $filePath , $streamInfo , $addPadding, $metadata_content );\r\n\t\treturn $metadata_content;\r\n\t}", "protected function &indexGetMetadata(Request $request)\n {\n $metadata = &$this->model->metadata([\n 'filtersOptions' => ['getTemplate' => false, 'getFields' => false, 'getLayout' => false],\n 'getFields' => false,\n 'getGrid' => false,\n 'getLayout' => false,\n 'getDetails' => false,\n ]);\n\n Arr::set($metadata, 'filters.ignoreStatic', $request->input('data.metadata.filters.ignoreStatic', false));\n\n $filters = $request->input('data.metadata.filters.custom');\n if (!empty($filters)) {\n Arr::set($metadata, 'filters.custom', $this->model->getPropertiesListFromSource($filters, Filter::class));\n }\n\n $orders = $request->input('data.metadata.orders');\n if (!empty($orders)) {\n Arr::set($metadata, 'orders', $this->model->getPropertiesListFromSource($orders, Order::class, 'field'));\n }\n\n if ($request->has('data.metadata.pagination.perPage')) {\n Arr::set($metadata, 'pagination.perPage', $request->input('data.metadata.pagination.perPage'));\n }\n\n if ($request->has('data.metadata.pagination.targetPage')) {\n Arr::set($metadata, 'pagination.targetPage', $request->input('data.metadata.pagination.targetPage'));\n }\n\n return $metadata;\n }", "static function importMetadata() {\n\t\t\n\t\tself::$file_to_file_map = array();\n\t\t\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/image.php' );\n\t\t\n\t\techo_now( 'Importing metadata...' );\n\t\t\n\t\tself::$files_upload_path = wp_upload_dir();\n\t\t$searched_fields = array();\n\t\t\n\t\t# Add content field meta values as postmeta\n\t\t\n\t\tif( isset( drupal()->content_node_field_instance ) )\n\t\t\t$field_instance_table = 'content_node_field_instance';\n\t\telse if( isset( drupal()->field_config_instance ) )\n\t\t\t$field_instance_table = 'field_config_instance';\n\t\t\n\t\t$nid_field = 'nid';\n\t\t$vid_field = 'vid';\n\t\t\n\t\t$meta_fields = drupal()->$field_instance_table->getRecords();\n\t\t\n\t\tforeach( $meta_fields as $meta_field ) {\n\t\t\t\n\t\t\t// There are two ways of storing metadata -- simply (in the content_type_[node content type] table)\n\t\t\t// and richly (in the content_[field name] table)\n\t\t\t\n\t\t\t$table_name = 'content_' . $meta_field['field_name'];\n\t\t\t\n\t\t\tif( in_array( $meta_field['field_name'], $searched_fields ) )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t# D7 compatibility\n\t\t\tif( ! array_key_exists( 'type_name', $meta_field ) )\n\t\t\t\t$meta_field['type_name'] = $meta_field['entity_type'];\n\t\t\t\n\t\t\t# D7 compatibility\n\t\t\tif( ! isset( drupal()->$table_name ) ) {\n\t\t\t\t$table_name = 'field_revision_' . $meta_field['field_name'];\n\t\t\t}\n\t\t\t\n\t\t\t# D7 compatibility\n\t\t\tself::$files_table_name = 'files';\n\t\t\tif( ! isset( drupal()->{self::$files_table_name} ) ) {\n\t\t\t\tself::$files_table_name = 'file_managed';\n\t\t\t\t$nid_field = 'entity_id';\n\t\t\t\t$vid_field = 'revision_id';\n\t\t\t\t\n\t\t\t\tself::$files_public_path = trailingslashit( \n\t\t\t\t\t\tunserialize(\n\t\t\t\t\t\tdrupal()->variable->value->getValue(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'name' => 'file_public_path'\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}\n\t\t\t\n//\t\t\techo_now( 'Searching: ' . $table_name );\n\t\t\t\n\t\t\tif( isset( drupal()->$table_name ) ) {\n\t\t\t\t\n\t\t\t\t// Found a content_field_name table -- add post meta from its columns\n//\t\t\t\techo 'Table - search content table: ' . $table_name . ' for fields' . \"<br>\\n\";\n\t\t\t\t\n\t\t\t\t$meta_records = drupal()->$table_name->getRecords();\n\t\t\t\t\n\t\t\t\tforeach( $meta_records as $meta_record ) {\n\t\t\t\t\t\n\t\t\t\t\t// Import all columns beginning with field_name\n\t\t\t\t\t\n\t\t\t\t\tif( ! array_key_exists( $meta_record[$nid_field], self::$node_to_post_map ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif( $meta_record[$vid_field] != self::$node_to_rev_map[ $meta_record[$nid_field] ] )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tforeach( $meta_record as $column => $value ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( empty( $value ) )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( 0 !== strpos( $column, $meta_field['field_name'] ) )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( strpos( $column, '_fid' ) ) {\n\n\t\t\t\t\t\t\t$value = self::importAttachedFile(\n\t\t\t\t\t\t\t\tself::$node_to_post_map[ $meta_record[$nid_field] ],\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'file_id' => (int)$value\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tadd_post_meta(\n\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t'_drupal_source',\n\t\t\t\t\t\t\t\t$column\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( array_key_exists( str_replace( '_fid', '_data', $column ), $meta_record ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$details = maybe_unserialize( $meta_record[ str_replace( '_fid', '_data', $column ) ] );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( isset( $details['title'] ) ) {\n\t\t\t\t\t\t\t\t\twp_update_post(\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'ID' => $value,\n\t\t\t\t\t\t\t\t\t\t\t'post_excerpt' => $details['title']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif( isset( $details['alt'] ) ) {\n\t\t\t\t\t\t\t\t\tupdate_post_meta(\n\t\t\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t\t\t'_wp_attachment_image_alt',\n\t\t\t\t\t\t\t\t\t\t$details['alt']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tadd_post_meta(\n\t\t\t\t\t\t\tself::$node_to_post_map[ $meta_record[$nid_field] ],\n\t\t\t\t\t\t\t'_drupal_' . $column,\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$searched_fields[] = $column;\n\t\t\t\t\t\t\n\t\t\t\t\t}\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} else {\n\n\t\t\t\t// Search the content_type_[content type] table for this value\n\t\t\t\t$table_name = 'content_type_' . $meta_field['type_name'];\n\t\t\t\tif( ! isset( drupal()->$table_name ) )\n\t\t\t\t\t$table_name = 'field_revision_' . $meta_field['type_name'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( isset( drupal()->$table_name ) ) {\n\t\t\t\t\t$meta_records = drupal()->$table_name->getRecords();\n\t\t\t\t\t\n\t\t\t\t\tforeach( $meta_records as $meta_record ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Import all columns beginning with field_name\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( ! array_key_exists( $meta_record['nid'], self::$node_to_post_map ) )\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\tif( $meta_record[$vid_field] != self::$node_to_rev_map[ $meta_record[$nid_field] ] )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t//\t\t\t\t\techo 'Adding metadata for: ' . self::$node_to_post_map[ $meta_record['nid'] ] . ' - ' . $meta_record[ $value_column ] . \"<br>\\n\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach( $meta_record as $column => $value ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( empty( $value ) )\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( 0 !== strpos( $column, $meta_field['field_name'] ) )\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( strpos( $column, '_fid' ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$value = self::importAttachedFile(\n\t\t\t\t\t\t\t\t\tself::$node_to_post_map[ $meta_record[$nid_field] ],\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'file_id' => (int)$value\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\t\n\t\t\t\t\t\t\t\tadd_post_meta(\n\t\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t\t'_drupal_source',\n\t\t\t\t\t\t\t\t\t$column\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\tif( array_key_exists( str_replace( '_fid', '_data', $column ), $meta_record ) ) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$details = maybe_unserialize( $meta_record[ str_replace( '_fid', '_data', $column ) ] );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif( isset( $details['title'] ) ) {\n\t\t\t\t\t\t\t\t\t\twp_update_post(\n\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t'ID' => $value,\n\t\t\t\t\t\t\t\t\t\t\t\t'post_excerpt' => $details['title']\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif( isset( $details['alt'] ) ) {\n\t\t\t\t\t\t\t\t\t\tupdate_post_meta(\n\t\t\t\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t\t\t\t'_wp_attachment_image_alt',\n\t\t\t\t\t\t\t\t\t\t\t$details['alt']\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdate_post_meta(\n\t\t\t\t\t\t\t\tself::$node_to_post_map[ $meta_record['nid'] ],\n\t\t\t\t\t\t\t\t'_drupal_' . $column,\n\t\t\t\t\t\t\t\t$value\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} // End if isset table\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$searched_fields[] = $meta_field['field_name'];\n\t\t\t\t\n\t\t}\n\t\t\n\t\t// Search for table named for the node type\n\t\t$types = drupal()->node->type->getUniqueValues();\n\t\t\n\t\tforeach( $types as $type ) {\n\t\t\t\n\t\t\tif( isset( drupal()->$type ) ) {\n\t\t\t\t\n\t\t\t\t$type_records = drupal()->$type->getRecords();\n\t\t\t\tforeach( $type_records as $type_record ) {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif( ! array_key_exists( $type_record['nid'], self::$node_to_post_map ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tforeach( $type_record as $column => $value ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( empty( $value ) )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tupdate_post_meta(\n\t\t\t\t\t\t\tself::$node_to_post_map[ $type_record['nid'] ],\n\t\t\t\t\t\t\t'_drupal_' . $column,\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Check for uploaded files\n\t\t\n\t\tif( isset( drupal()->upload ) ) {\n\t\t\t\n\t\t\t$uploads = drupal()->getRecords(\n\t\t\t\tdrupal()->query(\n\t\t\t\t\t'SELECT * FROM upload u\n\t\t\t\t\t\tWHERE (nid, vid) IN\n\t\t\t\t\t\t(SELECT nid, MAX(vid) FROM upload GROUP BY nid)'\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tforeach( $uploads as $upload ) {\n\t\t\t\t\n\t\t\t\t$node = drupal()->node->getRecord(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'nid' => $upload['nid']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif( apply_filters( 'import_node_skip_node', false, $node ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif( ! array_key_exists( $upload['nid'], self::$node_to_post_map ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Skip records with fid = 0\n\t\t\t\tif( 0 == $upload['fid'] )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t$value = self::importAttachedFile(\n\t\t\t\t\tself::$node_to_post_map[ $upload['nid'] ],\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'file_id' => (int)$upload['fid']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tadd_post_meta(\n\t\t\t\t\t$value,\n\t\t\t\t\t'_drupal_source',\n\t\t\t\t\t'upload'\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tadd_post_meta(\n\t\t\t\t\t$value,\n\t\t\t\t\t'_drupal_list_upload',\n\t\t\t\t\t(int)$upload['list']\n\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\tdo_action( 'imported_metadata' );\n\t\t\n\t}", "abstract public function getCorrespondingMetaData();", "public function metadata(): array\n {\n return [];\n }", "public function metadata(): array\n {\n return [];\n }", "public function getSyncMetadata() {}", "public static function get_metadata(collection $collection) : collection {\n $collection->add_external_location_link('lti_client', [\n 'user_id' => 'privacy:metadata:lti_client:user_id',\n 'user_fullname' => 'privacy:metadata:lti_client:user_fullname',\n 'course_id' => 'privacy:metadata:lti_client:course_id',\n 'course_shortname' => 'privacy:metadata:lti_client:course_shortname',\n 'course_fullname' => 'privacy:metadata:lti_client:course_fullname',\n 'user_idnumber' => 'privacy:metadata:lti_client:user_idnumber',\n 'user_username' => 'privacy:metadata:lti_client:user_username',\n 'user_family' => 'privacy:metadata:lti_client:user_family',\n 'user_given' => 'privacy:metadata:lti_client:user_given',\n 'user_email' => 'privacy:metadata:lti_client:user_email',\n 'roles' => 'privacy:metadata:lti_client:roles',\n 'moodle_version' => 'privacy:metadata:lti_client:moodle_version',\n 'course_idnumber' => 'privacy:metadata:lti_client:course_idnumber',\n 'course_startdate' => 'privacy:metadata:lti_client:course_startdate',\n 'instance_guid' => 'privacy:metadata:lti_client:instance_guid'\n ], 'privacy:metadata:lti_client');\n\n return $collection;\n }", "protected function metadataFields()\n {\n return [\n 'first_name',\n 'last_name',\n 'city',\n 'phone_number',\n 'state',\n 'postal_code',\n 'modified_by'\n ];\n }", "public static function get_metadata(collection $collection) : collection {\n // The tool_cohortroles plugin utilises the mdl_tool_cohortroles table.\n $collection->add_database_table(\n 'tool_cohortroles',\n [\n 'id' => 'privacy:metadata:tool_cohortroles:id',\n 'cohortid' => 'privacy:metadata:tool_cohortroles:cohortid',\n 'roleid' => 'privacy:metadata:tool_cohortroles:roleid',\n 'userid' => 'privacy:metadata:tool_cohortroles:userid',\n 'timecreated' => 'privacy:metadata:tool_cohortroles:timecreated',\n 'timemodified' => 'privacy:metadata:tool_cohortroles:timemodified',\n 'usermodified' => 'privacy:metadata:tool_cohortroles:usermodified'\n ],\n 'privacy:metadata:tool_cohortroles'\n );\n\n return $collection;\n }", "public function getTestAddAndGetData()\n {\n return [\n ['namespace_1', 'key_11'],\n ['namespace_2', 'key_21'],\n ];\n }", "public function add_cart_item_data($cart_item_meta){\n add_filter('wp_handle_upload', array($this, 'wp_handle_upload'));\n return $cart_item_meta;\n }", "public function getFieldsMetadata()\n {\n return $this->fieldsMetadata;\n }", "public function addMetadata(AbstractMetadata $metadata): void\n {\n $this->metadata[get_class($metadata)][] = $metadata;\n }", "public function metadata()\n {\n return $this->hasOne(EntryMeta::class);\n }", "function metadata()\r\n {\r\n Cache::variable($this->metadata, function() {\r\n return (array)DB::object('userMetadataById', $this->id);\r\n });\r\n }", "function getPackageMetaData() ;", "public function add() {\r\n $data = array(\r\n 'tanggal_awal' => '',\r\n 'tangga_akhir' => '',\r\n 'tahun_awal' => '',\r\n 'tahun_akhir' => '',\r\n );\r\n\r\n return $data;\r\n }", "private function getDetails()\n {\n $details = array();\n $num_fields_added = 0;\n $num_fields_deleted = 0;\n $num_fields_modified = 0;\n $total_fields_before = sizeof($this->furthest_metadata);\n $total_fields_after = sizeof($this->latest_metadata);\n\n foreach($this->metadata_changes as $field => $metadata)\n {\n $new_metadata = $this->latest_metadata[$field];\n $old_metadata = $this->furthest_metadata[$field];\n\n // Check for fields added.\n if (!$old_metadata)\n {\n $num_fields_added++;\n }\n // Check for deleted fields.\n else if (!$new_metadata)\n {\n $num_fields_deleted++;\n }\n // Check for fields modified.\n else\n {\n $differences = array_diff_assoc($new_metadata, $old_metadata);\n if (!empty($differences))\n {\n $num_fields_modified++;\n }\n }\n }\n \n return array(\n \"num_fields_added\" => $num_fields_added,\n \"num_fields_deleted\" => $num_fields_deleted,\n \"num_fields_modified\" => $num_fields_modified,\n \"total_fields_before\" => $total_fields_before,\n \"total_fields_after\" => $total_fields_after\n );\n }", "private function getMeta() {\n $metadata = array(\n 'title' => 'User', \n 'desc' => 'Request URL: ' . Config::get('app.api_url'), \n 'meta' => array( \n 'title' => 'User | Seeties', \n 'description' => 'Sample meta description' \n ),\n 'sidebar' => View::make('user.sidebar')\n );\n\n return $metadata;\n }", "public function extensionMeta()\n {\n return $this->getConfigFromFile();\n }", "function appendItemMetadataList(&$item) {\n $mda = array();\n\n // Static metadata\n $mda = $this->getHardCodedMetadataList(true);\n foreach($mda as $md) {\n $md->setValue($item->getHardCodedMetadataValue($md->getLabel()));\n $item->addMetadata($md);\n unset($md);\n }\n \n // Dynamic metadata\n $mdIter = $this->getRealMetadataIterator(true);\n $mdIter->rewind();\n while($mdIter->valid()) {\n $md = $mdIter->current();\n $this->addMetadataValueToItem($item, $md);\n $mdIter->next();\n }\n }", "function createFilesMetaData($file)\n\t{\n\t $filetype = '';\n\t $format = self::isKnownMimeType($file, $filetype);\n\t $transferServer = new BizTransferServer();\n\t $files = array();\n\t \n\t $attachment = new Attachment();\n\t $attachment->Rendition = 'native';\n\t $attachment->Type = $format; // mime file type, for this demo assumed to always be jpg\n\t $transferServer->copyToFileTransferServer($file, $attachment);\n\t $files[] = $attachment;\n\t \n\t return $files;\n\t}", "public function get_metadata() {\n\t\treturn array_merge(parent::get_metadata(), array(\n\t\t\t'friendly_name' => 'List View'\n\t\t));\n\t}", "public function getPackageMetaData() {}", "public function getMetadatas()\n {\n $matadata = new Cms_Model_Application_Page_Metadata();\n $results = $matadata->findAll(array('page_id' => $this->getPageId()));\n $this->_metadata = array();\n foreach ($results as $result) {\n array_push($this->_metadata, $result);\n }\n return $this->_metadata;\n }", "public function wp_get_attachment_metadata($metadata, $attachment_id)\n {\n // echo \"wp_get_attachment_metadata\";\n /* Determine if the media file has GS data at all. */\n $sm_cloud = get_post_meta($attachment_id, 'sm_cloud', true);\n // print_r($sm_cloud);\n if (is_array($sm_cloud) && !empty($sm_cloud['fileLink'])) {\n $metadata['gs_link'] = $sm_cloud['fileLink'];\n $metadata['gs_name'] = isset($sm_cloud['name']) ? $sm_cloud['name'] : false;\n $metadata['gs_bucket'] = isset($sm_cloud['bucket']) ? $sm_cloud['bucket'] : false;\n if (!empty($metadata['sizes']) && is_array($metadata['sizes'])) {\n foreach ($metadata['sizes'] as $k => $v) {\n if (!empty($sm_cloud['sizes'][$k]['name'])) {\n $metadata['sizes'][$k]['gs_name'] = $sm_cloud['sizes'][$k]['name'];\n $metadata['sizes'][$k]['gs_link'] = $sm_cloud['sizes'][$k]['fileLink'];\n }\n }\n }\n }\n return $metadata;\n }", "public function getAllCustomMetadata($encoding = 'UTF-8') {}", "public function addMetadata($key, $value)\n {\n $this->_metadata[$key] = $value;\n }", "public function getMetadataOptions()\n {\n return $this->metadata_options;\n }" ]
[ "0.65856576", "0.6050154", "0.5808412", "0.570184", "0.5596507", "0.5593734", "0.550526", "0.54395956", "0.5430593", "0.53976893", "0.53729856", "0.53718114", "0.53718114", "0.53718114", "0.5365972", "0.5363957", "0.5350035", "0.5349724", "0.53401923", "0.53392845", "0.53392845", "0.531599", "0.53030664", "0.529502", "0.52907765", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.5281602", "0.5276721", "0.5244652", "0.52436006", "0.52301586", "0.5226397", "0.5226366", "0.52135575", "0.52021545", "0.5185063", "0.51635003", "0.5156992", "0.5132276", "0.5121255", "0.5117671", "0.50998974", "0.50818324", "0.5078358", "0.5065046", "0.50627065", "0.5048684", "0.50464505", "0.5036647", "0.5036338", "0.5023535", "0.50224876", "0.50090563", "0.49894145", "0.49631858", "0.4961378", "0.4952287", "0.49465206", "0.49453387", "0.49312928", "0.49292365", "0.49271262", "0.492486", "0.49127784", "0.49127784", "0.49043056", "0.48908105", "0.4887333", "0.48714843", "0.48692638", "0.48606795", "0.4847082", "0.48427433", "0.48040193", "0.4798612", "0.47898278", "0.47863132", "0.47862732", "0.47801328", "0.47793147", "0.47757939", "0.47739312", "0.47674417", "0.47647163", "0.47325972", "0.47297153", "0.47294503", "0.47247967", "0.47244045" ]
0.70751345
0
Sets the metadataToAdd A collection of keyvalue pairs that should be added to the file.
public function setMetadataToAdd($val) { $this->_propDict["metadataToAdd"] = $val; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMetadata(AbstractMetadata $metadata): void\n {\n $this->metadata[get_class($metadata)][] = $metadata;\n }", "protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function setAddMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Clarifai\\Api\\AddMetadata::class);\n $this->writeOneof(3, $var);\n\n return $this;\n }", "function set_metadata($name, $value) {\n if ($name && $value)\n $this->metadata[$name] = $value;\n }", "public function addMetadata($key, $value)\n {\n $this->_metadata[$key] = $value;\n }", "public function addMetadata($key, $value)\n {\n $this->metadata[$key] = $value;\n }", "public function setMetadata(?array $metadata): void\n {\n $this->metadata['value'] = $metadata;\n }", "function addUpdateMetadata(){\n\t \n\t\t $this->getMakeMetadata(); //get previously saved metadata\n\t\t \n\t\t $chValue = $this->checkParam(\"title\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableName = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"description\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableDesciption = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"doi\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableDOI = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"ark\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableARK = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"versionControl\");\n\t\t if($chValue != false){\n\t\t\t\t$this->versionControl = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"pubCreated\");\n\t\t if($chValue != false){\n\t\t\t\t$this->pubCreated = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"tags\"); \n\t\t if($chValue != false ){\n\t\t\t\tif(stristr($chValue, self::tagDelim)){\n\t\t\t\t\t $rawTags = explode(self::tagDelim, $chValue);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $rawTags = array($chValue);\n\t\t\t\t}\n\t\t\t\t$tags = array();\n\t\t\t\tforeach($rawTags as $tag){\n\t\t\t\t\t $tags[] = trim($tag);\n\t\t\t\t}\n\t\t\t\t$this->tableTags = $tags;\n\t\t }\n\t\t \n\t\t $this->saveMetadata(); //save the upated metadata\n\t }", "public function setMetadata($metadata)\n\t{\n\t\t$this->vars['metadata'] = $metadata;\n\t}", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "public function setMetadata($metadata)\n {\n $this->metadata->set($metadata);\n }", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "public function setMetadata($metadata)\n {\n $this->metadata = $this->message['metadata'] = $metadata;\n }", "function setMetadata(array $inMetadata = array()) {\n\t\tif ( $inMetadata !== $this->_Metadata ) {\n\t\t\t$this->_Metadata = $inMetadata;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n }", "public function setFileMetadata(array $fileMetadata)\n {\n $this->_fileMetadata = $fileMetadata;\n }", "function createMetaData()\n\t{\n\t\tparent::createMetaData();\n\t\t$this->saveAuthorToMetadata();\n\t}", "public function addMetaData(array $meta)\n {\n $this->meta = array_merge($this->meta, $meta);\n return $this;\n }", "public function setMetadata($name, $value)\n {\n $this->metadata[$name] = $value;\n }", "public function setMetadata(array $metadata)\n {\n $this->_metadata = $metadata;\n }", "public function setMetadata(array $metadata)\n {\n $this->_metadata = $metadata;\n }", "public function addMeta(array $metas, string $outputPath): void;", "private function set_metafile_fields(){\n\n\t\t\t// add more fields for your requierements\n $custom_fields = array( \n\t\t\t\t'field_name1'\t=> __( 'field name 1', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name2'\t=> __( 'field name 2', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name3'\t=> __( 'field name 3', self::$plugin_obj->class_name ),\n\t\t\t );\n\n\n foreach( $custom_fields as $custom_attrname => $custom_value){\n self::$metafile_fields->$custom_attrname = $custom_value;\n } \n\n }", "public function setMetaData($metaData);", "public function setMetadata(array $metadata)\n {\n $this->metadata = $metadata;\n }", "private function addPropertyMetadata(PropertyMetadataInterface $metadata)\n {\n $property = $metadata->getPropertyName();\n\n $this->members[$property][] = $metadata;\n }", "public function addMetadata($key, $value)\n {\n $this->metadata[$key] = $value;\n\n return $this;\n }", "public function add_metadata($metadata)\n\t{\n\t\t$this->db->insert('metadata', $metadata);\n\t\treturn $this->db->insert_id();\n\t}", "function AddMetaData($s3object, $value) {\n\t\t\t$this->__meta[$s3object] = $value;\n\t\t}", "protected function addFileFieldArray(&$metadata)\n {\n if($metadata['type']==\"text\"){\n $metadata['data']['file'] = [];\n }\n }", "public function setCustomMetadata($name, $value, $encoding = 'UTF-8') {}", "public function setMetadata($metadata)\n {\n return $this->set('metadata', $metadata);\n }", "public function getMetadataToAdd()\n {\n if (array_key_exists(\"metadataToAdd\", $this->_propDict)) {\n if (is_a($this->_propDict[\"metadataToAdd\"], \"\\Beta\\Microsoft\\Graph\\SecurityNamespace\\Model\\KeyValuePair\") || is_null($this->_propDict[\"metadataToAdd\"])) {\n return $this->_propDict[\"metadataToAdd\"];\n } else {\n $this->_propDict[\"metadataToAdd\"] = new KeyValuePair($this->_propDict[\"metadataToAdd\"]);\n return $this->_propDict[\"metadataToAdd\"];\n }\n }\n return null;\n }", "public function addMetaData(metadataObj $obj) {\n\t\tarray_push($this->arrMetadata, $obj);\n\t}", "public function setMetadata(?array $value): void {\n $this->getBackingStore()->set('metadata', $value);\n }", "public function setMetadata(?array $value): void {\n $this->getBackingStore()->set('metadata', $value);\n }", "public function setMetadata($name, $value)\r\n {\r\n $this->data['props'][$name] = $value;\r\n }", "public function saveMetadata(){\n foreach ($this->_metadata as $metadatum) {\n $metadatum->save();\n }\n return $this;\n }", "protected function addAtributosMetadata(ReeverAttributeMetadata $attr){\n\t\t$this->_atributosMetadata[$attr->attrName] = $attr;\n\t}", "public function setMetadata($data)\n {\n foreach ($this->getMetadatas() as $metadatum) {\n // If there already are metadata with the given name update them\n if (array_key_exists($metadatum->getCode(), $data)) {\n $metadatum->setPayload($data[$metadatum->getCode()]);\n unset($data[$metadatum->getCode()]);\n } else {\n $metadatum->setPayload(null);\n }\n }\n // Otherwize create a new metadata and add it to the current metadata\n foreach ($data as $code => $payload) {\n array_push($this->_metadata, $this->_createMetadata($code, $payload));\n }\n return $this;\n }", "public function setMetaData(array $data): void\n {\n $data = array_change_key_case($data, CASE_LOWER);\n\n //@todo sanitize attributes\n\n $this->data = $data + $this->data;\n\n try {\n Application::getInstance()->getVxPDO()->updateRecord('folders', $this->id, $this->data);\n }\n catch (\\PDOException $e) {\n throw new MetaFolderException(sprintf(\"Data commit of folder '%s' failed. PDO reports %s\", $this->filesystemFolder->getPath(), $e->getMessage()));\n }\n }", "public function mergeMetadata(array $metadata);", "public function addMetadata()\n {\n $metadata = new clozetext_metadata();\n $metadata->set_distractor_rationale('It is a general feedback');\n return $metadata;\n }", "public function setMetadata($var)\n {\n GPBUtil::checkString($var, True);\n $this->Metadata = $var;\n\n return $this;\n }", "public function add_meta( $key, $value, $unique = false );", "public function _syncCustomMetadata($name) {}", "public abstract function set_pairwise_metadata(string $their_did, array $metadata = null, array $tags = null);", "public function getAddMetadata()\n {\n return $this->readOneof(3);\n }", "public function addMetas(array $metas)\n {\n $this->metas->addMany($metas);\n\n return $this;\n }", "public function setMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Grafeas\\V1\\Metadata::class);\n $this->metadata = $var;\n\n return $this;\n }", "public function setMetadata(array $metadata)\n {\n $this->metadata = $metadata;\n\n return $this;\n }", "public function setMetadata($aCid, $aMetadata) {\n $lMetadata = $aMetadata;\n $lCid = intval($aCid);\n \n foreach($lMetadata as $lMetaId => $lVal) {\n $lMetaId = intval($lMetaId);\n if($lMetaId < 1) continue;\n \n $lSql = 'SELECT count(*) FROM `al_cms_ref_meta` WHERE `content_id`='.esc($lCid).' AND `meta_id`='.esc($lMetaId).' AND `val`='.esc($lVal);\n $lCount = CCor_Qry::getInt($lSql);\n if($lCount < 1) {\n // insert new metadata reference\n $lSql = 'INSERT INTO `al_cms_ref_meta` (`content_id`, `meta_id`, `val`) VALUES ('.esc($lCid).', '.esc($lMetaId).', '.esc($lVal).')';\n CCor_Qry::exec($lSql);\n }\n }\n }", "protected function writeMetadata() {\n $_SESSION[self::METADATA_KEY] = $this->metadata;\n }", "protected function addMeta() {\n foreach ($this->meta_info as $key => $meta) {\n $this->header.=\"<meta name='\" . $key . \"' content='\" . $meta . \"' /> \\n\";\n }\n }", "public function add(SerializationClassMetadataInterface $metadata)\n {\n $this->items[$metadata->getClass()] = $metadata;\n }", "public function addMeta(Meta $meta) {\n $this->meta[$meta->getName()] = $meta;\n }", "protected function setup_metadata() {\n\t\tif ( $this->get_meta_type() ) {\n\t\t\t$this->fill( $this->get_metadata() );\n\t\t}\n\t}", "public function setSettings($add=true)\n {\n\n $this->_settings = contentExtensionFilemanagerSettings::getFieldSettings($this->_fid);\n if (!isset($this->_settings['allowed_types'])) {\n $std_mime_types = Symphony::Configuration()->get('mimetypes', 'filemanager');\n $this->_settings['allowed_types'] = $std_mime_types ? $std_mime_types : '*./*';\n }\n $max_upload_size = Symphony::Configuration()->get('max_upload_size', 'admin');\n $this->_settings['max_upload_size'] = $max_upload_size ? intval($max_upload_size) : 0;\n\n $exp_allowed_types = '(' . implode('|', explode(' ', $this->get('allowed_types'))) . ')';\n $exp_allowed_types = preg_replace('/\\/\\*/i', '/.*', $exp_allowed_types);\n\n $this->_settings['allowed_types'] = preg_replace('/\\//', '\\\\\\/',$exp_allowed_types);\n\n if ($add) $this->_Result = $this->_convertSettings($this->_settings);\n }", "public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}", "public function add(SplFileInfo $splFileInfo);", "public function add_meta( &$object, $meta );", "public function addMeta($key, $value)\n {\n $this->meta[$key] = $value;\n }", "public function setMetadata($name, $value = '')\n {\n $query = $this->db\n ->get_where(\"registry_object_metadata\",\n array('registry_object_id' => $this->id, 'attribute' => $name));\n if ($query->num_rows() == 1) {\n $this->db->where(array('registry_object_id' => $this->id, 'attribute' => $name));\n $this->db->update('registry_object_metadata', array('value' => $value));\n } else {\n $this->db->insert('registry_object_metadata',\n array('registry_object_id' => $this->id, 'attribute' => $name, 'value' => $value));\n }\n }", "public function addMeta(array $attributes)\n {\n $this->meta[] = $attributes;\n return $this;\n }", "public function testModifyMetadata()\n {\n }", "function addMetadataValueToItem(&$item, $md) {\n $value = $this->getMetadataValue($item, $md);\n $md->setValue($value);\n $item->addMetadata($md);\n }", "public function syncMetadata() {}", "protected function initMetadata($data, $metadata) {}", "public function setRecordMetadata(array $metadata)\n {\n // Determine the Item Type ID from the name.\n if (array_key_exists(self::ITEM_TYPE_NAME, $metadata)) {\n $itemType = $this->_db->getTable('ItemType')\n ->findBySql('name = ?',\n array($metadata[self::ITEM_TYPE_NAME]),\n true);\n if (!$itemType) {\n throw new Omeka_Record_Builder_Exception(\"Invalid type named {$metadata[self::ITEM_TYPE_NAME]} provided!\");\n }\n $metadata[self::ITEM_TYPE_ID] = $itemType->id;\n }\n return parent::setRecordMetadata($metadata);\n }", "public static function get_metadata(collection $collection): collection {\n $collection->add_database_table('local_ousearch_documents', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2011', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2012', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2013', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2014', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2015', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2016', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2017', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2018', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2019', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n $collection->add_database_table('local_ousearch_docs_2020', [\n 'plugin' => 'privacy:metadata:local_ousearch_documents:plugin',\n 'userid' => 'privacy:metadata:local_ousearch_documents:userid',\n 'stringref' => 'privacy:metadata:local_ousearch_documents:stringref',\n 'intref1' => 'privacy:metadata:local_ousearch_documents:intref1',\n 'intref2' => 'privacy:metadata:local_ousearch_documents:intref2',\n 'timemodified' => 'privacy:metadata:local_ousearch_documents:timemodified',\n 'timeexpires' => 'privacy:metadata:local_ousearch_documents:timeexpires',\n ], 'privacy:metadata:local_ousearch_documents');\n\n return $collection;\n }", "function add($p_filelist)\n {\n }", "function addFileSet(FileSet $fileset)\n\t{\n\t\t$this->filesets[] = $fileset;\n\t}", "function add_meta_objs($meta_objs) {\n array_merge($this->meta_objs, $meta_objs);\n }", "public function add_meta_content(Array $parameters = array()){\n $this->metatags[] = $parameters;\n }", "private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }", "public function setMetaData(array $meta)\n {\n $this->meta = $meta;\n return $this;\n }", "public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n\n return $this;\n }", "private static function createMetadataForStreamFlv ( $filePath ,$assets , $streamInfo , $addPadding, $duration = null )\r\n\t{\r\n\t\t$metadata_content = self::getMetadataFromCache ( $filePath ,$streamInfo, $addPadding );\r\n\t\tif ( $metadata_content ) return $metadata_content;\r\n\t\t\r\n\t\tlist($sizeList, $timeList, $filePositionsList) = self::iterateAssets( $assets , $streamInfo , $addPadding, false );\r\n\r\n\t\t$amfSerializer = new FLV_Util_AMFSerialize();\r\n\r\n\t\t$metadata = array();\r\n\t\t$metadata_data = array();\r\n\t\tif ( $duration )\r\n\t\t{\r\n\t\t\t$metadata_data[\"duration\"] = (int)($duration/1000) ;\r\n\t\t}\r\n\r\n\t\t$metadata_data[\"bufferSizes\"] = $sizeList;\r\n\t\t$metadata_data[\"times\"] = $timeList;\r\n\t\t$metadata_data[\"filepositions\"] = $filePositionsList;\r\n\r\n\t\t$res = $amfSerializer->serialize( 'onMetaData') . $amfSerializer->serialize( $metadata_data );\r\n\t\t$data_len = strlen($res);\r\n\r\n\t\t// first create a metadata tag with it's real size - this will be the offset of all the rest of the tags\r\n\t\t// create a metadata tag\r\n\t\t\r\n\t\t$metadata_size = myFlvHandler::TAG_WRAPPER_SIZE + $data_len;\r\n\t\t$metatagEndOffset = myFlvHandler::getHeaderSize() + $metadata_size;\r\n\r\n\t\t// second - create the real metadata tag with the values of all the following tags with correct offsets\r\n\t\tfor ($i = 0 ; $i < count ( $sizeList ) ; ++$i )\r\n\t\t\t$sizeList[$i] += $metatagEndOffset;\r\n\t\t\t\r\n\t\tfor ($i = 0 ; $i < count ( $filePositionsList ) ; ++$i )\r\n\t\t\t$filePositionsList[$i] += $metatagEndOffset;\r\n\r\n\t\t$metadata_data[\"bufferSizes\"] = $sizeList;\r\n\t\t$metadata_data[\"filepositions\"] = $filePositionsList;\r\n\t\t\r\n\t\t$res = $amfSerializer->serialize( 'onMetaData') . $amfSerializer->serialize( $metadata_data );\r\n\r\n\t\t$metadata_content = myFlvHandler::createMetadataTag($res);\r\n\t\tself::setMetadataInCache ( $filePath , $streamInfo , $addPadding, $metadata_content );\r\n\t\treturn $metadata_content;\r\n\t}", "public function add_meta( &$object, $meta ) {\n\t\t}", "function add_metadata_taxonomies() {\n\t/*\n\tEducational use: http://schema.org/educationalUse e.g. http://purl.org/dcx/lrmi-vocabs/edUse/instruction\nEducational audience: http://schema.org/EducationalAudience e.g. http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/student\nInteractivity type: http://schema.org/interactivityType e.g. http://purl.org/dcx/lrmi-vocabs/interactivityType/expositive (active, expositive, or mixed)\nProficiency level: http://schema.org/proficiencyLevel (Beginner, Expert)\n\t*/\n\tadd_educational_use();\n\tadd_educational_audience();\n\tadd_interactivity_type();\n\tadd_proficiency_level();\n}", "public function add($name, \\SetaPDF_Core_FileSpecification $fileSpecification) {}", "public function addContentMeta($name, $value): void\n {\n $this->_content_meta[$name] = $value;\n }", "public static function insertMetaData($feed, $metaHeader)\n {\n $raw_meta = $feed['meta'];\n\n if(!in_array($raw_meta['provider']['service'], $metaHeader['provider']['service'])) {\n $metaHeader['provider']['service'][] = $raw_meta['provider']['service'];\n }\n\n if(!in_array($raw_meta['provider']['version'], $metaHeader['provider']['version'])) {\n $metaHeader['provider']['version'][] = $raw_meta['provider']['version'];\n }\n\n if(!in_array($raw_meta['response']['format'], $metaHeader['response']['format'])) {\n $metaHeader['response']['format'][] = $raw_meta['response']['format'];\n }\n\n if(!in_array($raw_meta['response']['version'], $metaHeader['response']['version'])) {\n $metaHeader['response']['version'][] = $raw_meta['response']['version'];\n }\n\n return $metaHeader;\n }", "public function add($info, $meta)\r\n {\r\n\r\n }", "public function addMeta($key, $value)\n {\n return add_user_meta($this->getID(), $key, $value);\n }", "public function setMeta(array $data)\n {\n $this->meta = [];\n\n foreach ($data as $key => $item) {\n $this->addMeta($key, $item);\n }\n }", "function _addMetadataFields()\n {\n $config =& NDB_Config::singleton();\n $this->dateOptions = array(\n 'language' => 'en',\n 'format' => 'YMd',\n 'minYear' => $config->getSetting('startYear'),\n 'maxYear' => $config->getSetting('endYear'),\n 'addEmptyOption' => true,\n 'emptyOptionValue' => null\n );\n\n $this->form->addElement('date', 'Date_taken', 'Date of Administration', $this->dateOptions);\n\n $examiners = $this->_getExaminerNames();\n $this->form->addElement('select', 'Examiner', 'Radiologist', $examiners);\n\n \t$this->form->addGroupRule('Date_taken', 'Date of Administration is required', 'required');\n\n $this->form->registerRule('checkdate', 'callback', '_checkDate');\n $this->form->addRule('Date_taken', 'Date of Administration is invalid', 'checkdate');\n\n $this->form->addRule('Examiner', 'Examiner is required', 'required');\n }", "public function addMetaFields()\n\t{\n\t\tadd_action('slideshow_add_form_fields', [$this, 'addMetaFieldsToAddForm']);\n\t\tadd_action('slideshow_edit_form_fields', [$this, 'addMetaFieldsToEditForm']);\n\t}", "function __mergeMetadata($metadatas, &$destination) {\r\n\t\tforeach($metadatas as $metadata) {\r\n\t\t\t$destination[$metadata['name']] = $metadata['value'];\r\n\t\t}\r\n\t}", "public function addMeta(string $key, $value): void\n {\n $this->addMetaHook(function (RequestDetails $requestDetails) use ($key, $value) {\n return [\n 'key' => $key,\n 'value' => $value,\n ];\n });\n }", "function wck_add_meta(){\n\t\tparent::wck_add_meta();\n\t}", "public function append_metadata( $line ) {\n $this->_metadata[] = $line;\n return $this;\n }", "public function addMetaboxes() {}", "protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}", "public function set($filepath, $data);", "function afterSave($created) {\r\n\t\t// Getting custom fields\r\n\t\t$customFields = array_diff_key($this->data[$this->alias], $this->schema());\r\n\t\tif (empty($customFields)) return true;\r\n\r\n\t\tforeach($customFields as $customField => $customValue) {\r\n\t\t\t$metadata = $this->Metadata->find('first', array(\r\n\t\t\t\t'conditions' => array('Metadata.document_id' => $this->id, 'Metadata.name' => $customField),\r\n\t\t\t\t'fields' => array('Metadata.id'),\r\n\t\t\t\t'contain' => false\r\n\t\t\t));\r\n\t\t\t$this->Metadata->create($metadata);\r\n\t\t\t// Filling default values when creating\r\n\t\t\tif (empty($metadata)) {\r\n\t\t\t\t$this->Metadata->set(array('document_id' => $this->id, 'name' => $customField));\r\n\t\t\t}\r\n\t\t\t// Updating the value field\r\n\t\t\t$this->Metadata->set('value', $customValue);\r\n\t\t\t$this->Metadata->save();\r\n\t\t}\r\n\t}", "public function addMeta(string $name, array $attributes, bool $checkNameAttribute = true);", "protected function loadMetadata(): void\n {\n $config = new Storage;\n\n foreach ($this->metadataDirs as $dir) {\n $configs = glob($dir . '/*' . $config->getReader()->getFileExt());\n\n foreach ($configs as $file) {\n $config->load($file);\n\n if ($config['class']) {\n $this->metadata[$config['class']] = $config->getObj();\n } else {\n throw new RuntimeException(sprintf('ActiveRecord `class` definition missed in %s metadata file', $file));\n }\n }\n }\n }" ]
[ "0.61468655", "0.6092303", "0.599851", "0.5997684", "0.5920778", "0.58736515", "0.57742554", "0.57394105", "0.57075423", "0.5630088", "0.56269085", "0.5625178", "0.56005466", "0.5519524", "0.5495647", "0.54950476", "0.5457769", "0.5422183", "0.5393813", "0.53856033", "0.5384853", "0.53820294", "0.53820294", "0.53623736", "0.53497434", "0.53291225", "0.5305001", "0.5302711", "0.52968764", "0.52839965", "0.52630365", "0.5252682", "0.523991", "0.51739675", "0.5161009", "0.51365995", "0.5117184", "0.5117184", "0.5115088", "0.5079433", "0.50543666", "0.5054013", "0.5044408", "0.50170714", "0.49450365", "0.49110118", "0.49108675", "0.49106127", "0.4906166", "0.49055097", "0.49021006", "0.4891723", "0.48874018", "0.48823124", "0.48737213", "0.48690632", "0.4855375", "0.48490676", "0.48441327", "0.48238593", "0.48131606", "0.48125425", "0.48089623", "0.4790173", "0.47621176", "0.47550976", "0.4750822", "0.47291785", "0.47164303", "0.4707706", "0.46919963", "0.46882692", "0.46812433", "0.46618658", "0.46336773", "0.46175438", "0.46162838", "0.46137303", "0.45973372", "0.45828", "0.45812333", "0.45770112", "0.45721927", "0.45695585", "0.4562367", "0.45597428", "0.4543101", "0.45425305", "0.4529366", "0.45292452", "0.45289856", "0.45243055", "0.4521153", "0.45156252", "0.45078674", "0.45061985", "0.45053568", "0.44963297", "0.4495841", "0.44843352" ]
0.68084323
0
Gets the metadataToRemove A collection of strings that indicate which keys to remove from the file metadata.
public function getMetadataToRemove() { if (array_key_exists("metadataToRemove", $this->_propDict)) { return $this->_propDict["metadataToRemove"]; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delMetadata() {}", "public function delMetadata() {}", "public function delMetadata() {}", "public function getDeleteMetadata()\n {\n return $this->readOneof(4);\n }", "public function getRemoveTags() {\n\t\treturn $this->removeTags;\n\t}", "protected function _remove()\n {\n $_tagsArray = array();\n foreach ($this->_tagsArray as $key => $value) {\n if (!in_array($value['tag'], $this->getRemoveTags())) {\n $_tagsArray[$value['tag']] = $value;\n }\n }\n $this->_tagsArray = array();\n $this->_tagsArray = $_tagsArray;\n return $this->_tagsArray;\n }", "public function get_metadata() {\n\t\t$metadata = [];\n\n\t\tforeach ( $this->get_mapping() as $attribute => $meta_key ) {\n\t\t\t$metadata[ $attribute ] = $this->get_meta( $meta_key );\n\t\t}\n\n\t\treturn $metadata;\n\t}", "public function getRemoveTags()\n {\n return $this->_removeTags;\n }", "function getAdditionalMetadataFieldNames() {\n\t\treturn $this->getMetadataFieldNames(false);\n\t}", "public function setMetadataToRemove($val)\n {\n $this->_propDict[\"metadataToRemove\"] = $val;\n return $this;\n }", "public function getRemovedTypes()\n {\n return $this->removedTypes;\n }", "public function getListRemove()\n {\n return $this->_listRemove;\n }", "public function removeAllMeta() {\n // Get the amount of meta tags that is going to be removed\n $removed = sizeof($this->meta);\n\n // Remove all the meta tags\n $this->meta = array();\n\n // Return the amount of removed tags\n return $removed;\n }", "public function getCleanKeys()\n {\n return $this->cleanKeys;\n }", "public function extractAllMeta(): array\n {\n $uploadMetaData = $this->request->headers->get('Upload-Metadata');\n\n if (empty($uploadMetaData)) {\n return [];\n }\n\n $uploadMetaDataChunks = explode(',', $uploadMetaData);\n\n $result = [];\n foreach ($uploadMetaDataChunks as $chunk) {\n $pieces = explode(' ', trim($chunk));\n\n $key = $pieces[0];\n $value = $pieces[1] ?? '';\n\n $result[$key] = base64_decode($value);\n }\n\n return $result;\n }", "public function getAllMetadata(): Collection;", "public function getFileMetadata()\n {\n return $this->get('FileMetadata');\n }", "public function getRemovedObjects() {\n\t\treturn $this->removedObjects;\n\t}", "private function getFieldsFromMetadata($metadata)\n {\n $fields = $metadata[0]->fieldNames;\n\n // Remove the primary key field if it's not managed manually\n /*if (!$metadata->isIdentifierNatural()) {\n $fields = array_diff($fields, $metadata->identifier);\n }\n\n foreach ($metadata->associationMappings as $fieldName => $relation) {\n if ($relation['type'] !== ClassMetadataInfo::ONE_TO_MANY) {\n $fields[] = $fieldName;\n }\n }*/\n\n return $fields;\n }", "function getSetMetadataFieldNames($translated = true) {\n\t\t// Retrieve a list of all possible meta-data field names\n\t\t$metadataFieldNameCandidates = $this->getMetadataFieldNames($translated);\n\n\t\t// Only retain those fields that have data\n\t\t$metadataFieldNames = array();\n\t\tforeach($metadataFieldNameCandidates as $metadataFieldNameCandidate) {\n\t\t\tif($this->hasData($metadataFieldNameCandidate)) {\n\t\t\t\t$metadataFieldNames[] = $metadataFieldNameCandidate;\n\t\t\t}\n\t\t}\n\t\treturn $metadataFieldNames;\n\t}", "protected function deleted()\n {\n $result = [];\n\n foreach ($before as $key => $value) {\n $result[] = [\n 'key' => $key,\n 'value' => $value,\n 'type' => empty($value) ? 'equal' : 'delete',\n ];\n }\n\n return $result;\n }", "public function getMetaData() {\n\t\treturn $this->arrMetadata;\n\t}", "public function get_removed_cart_contents() {\n\t\treturn (array) $this->removed_cart_contents;\n\t}", "protected function _getAllCustomMetadataKeys() {}", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getMetaData(): array {\n\t\treturn $this->content['metadata'] ?? [];\n\t}", "private function getFieldsFromMetadata(ClassMetadataInfo $metadata)\n {\n $fields = (array) $metadata->fieldNames;\n\n // Remove the primary key field if it's not managed manually\n if (!$metadata->isIdentifierNatural()) {\n $fields = array_diff($fields, $metadata->identifier);\n }\n\n foreach ($metadata->associationMappings as $fieldName => $relation) {\n if ($relation['type'] !== ClassMetadataInfo::ONE_TO_MANY) {\n $fields[] = $fieldName;\n }\n }\n\n return $fields;\n }", "function get_attachment_meta_keys() {\n\t$attachment_meta_keys = [\n\t\t'_wp_attachment_metadata',\n\t\t'_wp_attachment_image_alt',\n\t\t'_wp_attachment_context',\n\t\t'_wp_attachment_backup_sizes',\n\t\t'_wp_attachment_is_custom_header',\n\t\t'_wp_attached_file',\n\t];\n\n\treturn apply_filters( 'hm_shared_attachment_meta_keys', $attachment_meta_keys );\n}", "function getMetadataFieldNames($translated = true) {\n\t\t// Create a list of all possible meta-data field names\n\t\t$metadataFieldNames = array();\n\t\t$extractionAdapters =& $this->getSupportedExtractionAdapters();\n\t\tforeach($extractionAdapters as $metadataSchemaName => $metadataAdapter) {\n\t\t\t// Add the field names from the current adapter\n\t\t\t$metadataFieldNames = array_merge($metadataFieldNames,\n\t\t\t\t\t$metadataAdapter->getDataObjectMetadataFieldNames($translated));\n\t\t}\n\t\t$metadataFieldNames = array_unique($metadataFieldNames);\n\t\treturn $metadataFieldNames;\n\t}", "public function getUnsetFields(): array\n {\n return ['discussion_id', 'images'];\n }", "public function delMetadata() {\n throw new Exception('Not implemented yet');\n }", "public function getMetaData(): array\n {\n if (!$this->GPXFile instanceof GpxFile || !$this->GPXFile->metadata) {\n return [];\n }\n\n return $this->GPXFile->metadata->toArray();\n }", "public function testKeyGetsRemoved()\n {\n $this->filter->value('test')->remove();\n\n $result = $this->filter->filter([\n 'test' => 'test',\n 'test2' => 'test',\n ]);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "public function unsetMetadata(): void\n {\n $this->metadata = [];\n }", "public static function getFieldsFromMetadata(ClassMetadata $metadata)\n {\n $fields = (array) $metadata->fieldNames;\n\n // Remove the primary key field if it's not managed manually\n if (!$metadata->isIdentifierNatural()) {\n $fields = array_diff($fields, $metadata->identifier);\n }\n\n foreach ($metadata->associationMappings as $fieldName => $relation) {\n if ($relation['type'] !== ClassMetadata::ONE_TO_MANY) {\n $fields[] = $fieldName;\n }\n }\n\n return $fields;\n }", "public function getRemovedObjects() {}", "public function getDeletedFiles(): Collection\n {\n return $this->files->filter(function (File $file) {\n return $file->getStatus() === File::FILE_DELETED;\n });\n }", "public function get_metadata() {\n return $this->metadata;\n }", "public function getIndexesToRemove() {\n return $this->indexToRemove;\n }", "function getLocaleMetadataFieldNames() {\n\t\treturn $this->getMetadataFieldNames(true);\n\t}", "function getFtpMetadata()\n {\n $ftp_metadata = ftp_rawlist($this->getConnection(), $this->path);\n\n $this->temp_files = array();\n\n foreach ($ftp_metadata as $key => $fileMetadata) {\n\n $metadata = new \\stdClass();\n $metadata->permissions = substr($fileMetadata, 0, 10);\n $fileMetadata = trim(substr($fileMetadata, 10, 9999));\n $metadata->owner = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->group = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->size = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->day = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->month = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->year = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->time = substr($fileMetadata, 0, strpos($fileMetadata, ' '));\n $fileMetadata = trim(substr($fileMetadata, strpos($fileMetadata, ' '), 9999));\n $metadata->name = trim($fileMetadata);\n\n if ($metadata->name == '.'\n || $metadata->name == '..'\n ) {\n\n } else {\n $name = $metadata->name;\n $this->temp_files[$name] = $metadata;\n }\n }\n\n return;\n }", "public function propertiesProvider(): array\n {\n $given = ['uid' => 'some-uid'];\n $expected = ['localId' => 'some-uid'];\n\n return [\n [\n $given + ['deletephoto' => true],\n $expected + ['deleteAttribute' => [UpdateUser::PHOTO_URL]],\n ],\n [\n $given + ['deletephotourl' => true],\n $expected + ['deleteAttribute' => [UpdateUser::PHOTO_URL]],\n ],\n [\n $given + ['removephoto' => true],\n $expected + ['deleteAttribute' => [UpdateUser::PHOTO_URL]],\n ],\n [\n $given + ['removephotourl' => true],\n $expected + ['deleteAttribute' => [UpdateUser::PHOTO_URL]],\n ],\n [\n $given + ['deleteAttribute' => 'photo'],\n $expected + ['deleteAttribute' => [UpdateUser::PHOTO_URL]],\n ],\n [\n $given + ['deleteAttribute' => 'photourl'],\n $expected + ['deleteAttribute' => [UpdateUser::PHOTO_URL]],\n ],\n [\n $given + ['deleteAttributes' => ['photo']],\n $expected + ['deleteAttribute' => [UpdateUser::PHOTO_URL]],\n ],\n [\n $given + ['deleteAttributes' => ['photourl']],\n $expected + ['deleteAttribute' => [UpdateUser::PHOTO_URL]],\n ],\n [\n $given + ['deleteDisplayName' => true],\n $expected + ['deleteAttribute' => [UpdateUser::DISPLAY_NAME]],\n ],\n [\n $given + ['removeDisplayName' => true],\n $expected + ['deleteAttribute' => [UpdateUser::DISPLAY_NAME]],\n ],\n [\n $given + ['deleteDisplayName' => true],\n $expected + ['deleteAttribute' => [UpdateUser::DISPLAY_NAME]],\n ],\n [\n $given + ['deleteAttribute' => 'email'],\n $expected + ['deleteAttribute' => [UpdateUser::EMAIL]],\n ],\n [\n $given + ['deleteEmail' => true],\n $expected + ['deleteAttribute' => [UpdateUser::EMAIL]],\n ],\n [\n $given + ['removeEmail' => true],\n $expected + ['deleteAttribute' => [UpdateUser::EMAIL]],\n ],\n [\n $given + ['deleteEmail' => true],\n $expected + ['deleteAttribute' => [UpdateUser::EMAIL]],\n ],\n [\n $given + ['deletephone' => true],\n $expected + ['deleteProvider' => ['phone']],\n ],\n [\n $given + ['deletephonenumber' => true],\n $expected + ['deleteProvider' => ['phone']],\n ],\n [\n $given + ['removephone' => true],\n $expected + ['deleteProvider' => ['phone']],\n ],\n [\n $given + ['removephonenumber' => true],\n $expected + ['deleteProvider' => ['phone']],\n ],\n [\n $given + ['phone' => null],\n $expected + ['deleteProvider' => ['phone']],\n ],\n [\n $given + ['phonenumber' => null],\n $expected + ['deleteProvider' => ['phone']],\n ],\n [\n $given + ['deleteprovider' => 'phone'],\n $expected + ['deleteProvider' => ['phone']],\n ],\n [\n $given + ['deleteproviders' => ['phone', 'password']],\n $expected + ['deleteProvider' => ['phone', 'password']],\n ],\n [\n $given + ['removeprovider' => 'phone'],\n $expected + ['deleteProvider' => ['phone']],\n ],\n [\n $given + ['removeproviders' => ['phone', 'password']],\n $expected + ['deleteProvider' => ['phone', 'password']],\n ],\n [\n $given + ['deleteAttribute' => 'displayname'],\n $expected + ['deleteAttribute' => [UpdateUser::DISPLAY_NAME]],\n ],\n [\n $given + ['deleteAttributes' => ['displayname']],\n $expected + ['deleteAttribute' => [UpdateUser::DISPLAY_NAME]],\n ],\n [\n $given + ['emailVerified' => true],\n $expected + ['emailVerified' => true],\n ],\n [\n $given + ['emailVerified' => false],\n $expected + ['emailVerified' => false],\n ],\n [\n $given + ['emailVerified' => null],\n $expected,\n ],\n [\n $given + ['customClaims' => $claims = ['admin' => true, 'groupId' => '1234']],\n $expected + ['customAttributes' => JSON::encode($claims)],\n ],\n [\n $given + ['customAttributes' => $claims = ['admin' => true, 'groupId' => '1234']],\n $expected + ['customAttributes' => JSON::encode($claims)],\n ],\n ];\n }", "public function getRemoveXfaInformation() {}", "public function removeMeta(array $parameters)\n {\n return call_user_func_array(\"delete_{$this->getContext()}_meta\", $parameters);\n }", "public function removed() {\n return array_diff($this->in, $this->out);\n }", "private static function multipleRemove($annotations)\n\t{\n\t\t$remove = [];\n\t\tforeach ($annotations as $key => $annotation) {\n\t\t\tif (is_string($annotation->value)) {\n\t\t\t\tif (substr($annotation->value, 0, 1) === '!') {\n\t\t\t\t\t$remove[$annotation->value] = true;\n\t\t\t\t\tunset($annotations[$key]);\n\t\t\t\t}\n\t\t\t\telseif (isset($remove[$annotation->value])) {\n\t\t\t\t\tunset($annotations[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $annotations;\n\t}", "public function removeExtra()\n {\n if ($this->extraFilename !== null) {\n $finder = new Finder();\n $fs = new Filesystem();\n $imagePath = FRONTEND_FILES_PATH . '/festival/artists/files/extra';\n\n foreach ($finder->directories()->in($imagePath) as $directory) {\n $file = $directory . '/' . $this->extraFilename;\n\n if (is_file($file)) {\n $fs->remove($file);\n }\n }\n\n $this->extraFilename = null;\n\n return true;\n }\n\n return false;\n }", "public function getMetaForignKeys(){\n $stmt = $this->query(self::META_FKEYS_SQL);\n if ($stmt === false){\n return array();\n }\n\n $keys = array();\n foreach ($stmt as $row){\n $keys[$row[0] . '.' . $row[1]] = $row[2] . '.' . $row[3];\n }\n\n return $keys;\n }", "function wck_remove_meta(){\r\n\t\tcheck_ajax_referer( \"wck-delete-entry\" );\r\n\t\tif( !empty( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\telse \r\n\t\t\t$meta = '';\r\n\t\tif( !empty( $_POST['id'] ) )\r\n\t\t\t$id = absint( $_POST['id'] );\r\n\t\telse \r\n\t\t\t$id = '';\r\n\t\tif( isset( $_POST['element_id'] ) )\r\n\t\t\t$element_id = absint( $_POST['element_id'] );\r\n\t\telse \r\n\t\t\t$element_id = '';\r\n\r\n\t\t// Security checks\r\n\t\tif( true !== ( $error = self::wck_verify_user_capabilities( $this->args['context'], $meta, $id ) ) ) {\r\n\t\t\theader( 'Content-type: application/json' );\r\n\t\t\tdie( json_encode( $error ) );\r\n\t\t}\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\t$results = get_post_meta($id, $meta, true);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\t$results = get_option( apply_filters( 'wck_option_meta' , $meta, $element_id ) );\r\n\t\t\r\n\t\t$old_results = $results;\r\n\t\tunset($results[$element_id]);\r\n\t\t/* reset the keys for the array */\r\n\t\t$results = array_values($results);\r\n\r\n\t\t/* make sure this does not output anything so it won't break the json response below\r\n\t\twill keep it do_action for compatibility reasons\r\n\t\t */\r\n\t\tob_start();\r\n\t\t\tdo_action( 'wck_before_remove_meta', $meta, $id, $element_id );\r\n\t\t$wck_before_remove_meta = ob_get_clean(); //don't output it\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\tupdate_post_meta($id, $meta, $results);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\tupdate_option( apply_filters( 'wck_option_meta' , $meta, $results, $element_id ), wp_unslash( $results ) );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/* TODO: optimize so that it updates from the deleted element forward */\r\n\t\t/* if unserialize_fields is true delete the coresponding post metas */\r\n\t\tif( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){\t\t\t\r\n\t\t\t\r\n\t\t\t$meta_suffix = 1;\t\t\t\r\n\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tupdate_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$meta_suffix++;\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( count( $results ) == 0 )\r\n\t\t\t\t$results = $old_results;\r\n\t\t\t\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\t\t\t\t\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tdelete_post_meta( $id, $meta.'_'.$name.'_'.$meta_suffix );\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$entry_list = $this->wck_refresh_list( $meta, $id );\r\n\t\t$add_form = $this->wck_add_form( $meta, $id );\r\n\r\n\t\theader( 'Content-type: application/json' );\r\n\t\tdie( json_encode( array( 'entry_list' => $entry_list, 'add_form' => $add_form ) ) );\r\n\t}", "public function getCaRemoveCopyToEmails()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_REMOVE_COPY_TO_EMAILS,\n ScopeInterface::SCOPE_STORE\n );\n }", "static public function remove_meta_fields( $fields ) {\n //unset( $fields['_project_images'] );\n //unset( $fields['_client_name'] );\n //unset( $fields['_project_url'] );\n unset( $fields['_project_date'] );\n\n return $fields;\n }", "public function getUnsetFields(): array\n {\n return ['testimony_id'];\n }", "protected function getAttributeRemoveStub()\n {\n return $this->files->get($this->getStubPath().\"/attribute.remove.stub\");\n }", "public function getMetadataOptions()\n {\n return $this->metadata_options;\n }", "function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = \\false)\n {\n }", "public function getContributorsRemoved()\n {\n return $this->_contributorsRemoved;\n }", "public function removeMeta($key): int\n {\n $keys = (array) $key;\n\n /** @var HasMetadataInterface $this */\n return Meta::metable(self::class, $this->id)\n ->whereIn('key', $keys)\n ->delete();\n }", "public function getFKsToRemove() {\n return $this->fkToRemove;\n }", "public function readMetadata($path) {\n\t\tini_set(\"auto_detect_line_endings\", true); // added as Mac line endings freak out Windows and Linux\n\t\t$file_list = array();\n\t\t$meta_files = file($path . '/metadata.csv');\n\t\tunset($meta_files[0]);\n\t\t\n\t\tforeach($meta_files as $meta_file) {\n\t\t\t$file_name = explode(',', $meta_file);\n\t\t\t$file_list[] = $file_name[1];\n\t\t}\n\t\t\n\t\treturn $file_list;\n\t}", "function rkv_remove_columns( $columns ) {\n\t// remove the Yoast SEO columns\n\tunset( $columns['wpseo-score'] );\n\tunset( $columns['wpseo-title'] );\n\tunset( $columns['wpseo-metadesc'] );\n\tunset( $columns['wpseo-focuskw'] );\n \n\treturn $columns;\n}", "public function remove(array $values, string|array $remove) : array\n\t{\n\t\treturn array_diff($values, App::array($remove));\n\t}", "public function getMetaData()\n {\n return $this->metadata;\n }", "protected function metadataFields()\n {\n return [\n 'first_name',\n 'last_name',\n 'city',\n 'phone_number',\n 'state',\n 'postal_code',\n 'modified_by'\n ];\n }", "public function getStatusesForRemoving()\n {\n return $this->statusesForRemoving;\n }", "public function getMetaFiles() {\n if ($this->files === null) {\n $this->loadSubmissionFiles();\n }\n return ['submissions' => $this->meta_files['submissions'], 'checkout' => ($this->graded_gradeable->getGradeable()->isVcs()) ? $this->meta_files['checkout'] : []];\n }", "public function testMultipleMultiDimensionalKeyGetsRemoved()\n {\n $this->filter->values([\n 'test.test.test',\n 'test.test2',\n 'test.test3.test'\n ])->remove();\n\n $result = $this->filter->filter([\n 'test' => [\n 'test' => [\n 'test' => 'test',\n ],\n 'test2' => 'test',\n 'test3' => [\n 'test' => 'test',\n ],\n ],\n 'test2' => 'test',\n ]);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "public function metaKeys(): array\n {\n /** @var HasMetadataInterface $this */\n return Meta::metable(static::class, $this->id)\n ->pluck('key')\n ->toArray();\n }", "public function getExclude() {\n \treturn array_keys($this->exclude);\n }", "public function getPcsRemove()\n {\n return $this->pcsRemove;\n }", "public function MetadataHeaders() {\n\t $headers = array();\n\t $prefix = $this->Prefix();\n\n\t // only build if we have metadata\n\t if (is_object($this->metadata)) {\n\t foreach($this->metadata as $key => $value)\n\t $headers[$prefix.$key] = $value;\n\t }\n\n\t return $headers;\n\t}", "public function getMetadata()\n {\n return $this->_metadata;\n }", "function extractMetadata($filedata) {\r\n\t\treturn array(\r\n\t\t\t'filename' => $this->filename($filedata),\r\n\t\t\t'filesize' => $this->filesize($filedata),\r\n\t\t\t'ext' => $this->ext($filedata),\r\n\t\t\t'mimetype' => $this->mimetype($filedata),\r\n\t\t);\r\n\t}", "public function testDeleteMetadata()\n {\n }", "public function getMetadata()\n {\n if (isset($this->raw->metadata)) {\n if (is_object($this->raw->metadata)) {\n return (array) $this->raw->metadata;\n }\n\n return $this->raw->metadata;\n }\n\n return null;\n }", "public function getMetaData()\r\n {\r\n $this->caseClosedOrFail();\r\n\r\n return $this->metadata;\r\n }", "public function getDeleteConcepts()\n {\n return $this->readOneof(2);\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function remove_post_tag_columns( $columns ) {\n if ( isset( $columns['description']) ) {\n unset( $columns['description'] );\n }\n\n return $columns;\n }" ]
[ "0.552871", "0.552871", "0.552871", "0.5365626", "0.53509885", "0.5302153", "0.52644527", "0.5199049", "0.51217324", "0.5118283", "0.51068085", "0.5094225", "0.5085879", "0.5039409", "0.4996771", "0.49885955", "0.49806613", "0.49720898", "0.49266577", "0.4891758", "0.48408672", "0.4835823", "0.4823749", "0.48070884", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.48034492", "0.47829467", "0.47730553", "0.47625363", "0.47279206", "0.47163153", "0.4701381", "0.46799284", "0.46702805", "0.46693835", "0.46574008", "0.46549627", "0.46520102", "0.4639971", "0.4639108", "0.4612041", "0.46083272", "0.458552", "0.45778444", "0.4574666", "0.4574061", "0.457123", "0.45678654", "0.4547705", "0.45474946", "0.45200783", "0.45180658", "0.45152768", "0.4513306", "0.450583", "0.4501375", "0.44998023", "0.4495651", "0.44956252", "0.44946012", "0.44903654", "0.44853267", "0.4461969", "0.44591594", "0.44579113", "0.44518524", "0.44484532", "0.44439492", "0.44355342", "0.4435292", "0.44294593", "0.44263008", "0.44262928", "0.44231656", "0.4419925", "0.44119963", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.4411727", "0.44090313" ]
0.72064364
0
Sets the metadataToRemove A collection of strings that indicate which keys to remove from the file metadata.
public function setMetadataToRemove($val) { $this->_propDict["metadataToRemove"] = $val; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delMetadata() {}", "public function delMetadata() {}", "public function delMetadata() {}", "public function unsetMetadata(): void\n {\n $this->metadata = [];\n }", "public function resetMetadata(array $metadata);", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function getMetadataToRemove()\n {\n if (array_key_exists(\"metadataToRemove\", $this->_propDict)) {\n return $this->_propDict[\"metadataToRemove\"];\n } else {\n return null;\n }\n }", "public function setFileMetadata(array $fileMetadata)\n {\n $this->_fileMetadata = $fileMetadata;\n }", "public function setMetadata($metadata)\n {\n $this->metadata->set($metadata);\n }", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n }", "public function setMetadata(array $metadata)\n {\n $this->_metadata = $metadata;\n }", "public function setMetadata(array $metadata)\n {\n $this->_metadata = $metadata;\n }", "public function setMetadata(array $metadata)\n {\n $this->metadata = $metadata;\n }", "public function setMetadata($metadata)\n\t{\n\t\t$this->vars['metadata'] = $metadata;\n\t}", "public function setRemoved($removed) {\n\t\t$this->removed = (boolean)$removed;\n\n\t\t$this->addOrUpdate();\n\t}", "public function setMetadata($metadata)\n {\n $this->metadata = $this->message['metadata'] = $metadata;\n }", "public function setMetaData($metaData);", "public function setMetadata(?array $metadata): void\n {\n $this->metadata['value'] = $metadata;\n }", "public function delMetadata() {\n throw new Exception('Not implemented yet');\n }", "function setMetadata(array $inMetadata = array()) {\n\t\tif ( $inMetadata !== $this->_Metadata ) {\n\t\t\t$this->_Metadata = $inMetadata;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setMetaData(array $data): void\n {\n $data = array_change_key_case($data, CASE_LOWER);\n\n //@todo sanitize attributes\n\n $this->data = $data + $this->data;\n\n try {\n Application::getInstance()->getVxPDO()->updateRecord('folders', $this->id, $this->data);\n }\n catch (\\PDOException $e) {\n throw new MetaFolderException(sprintf(\"Data commit of folder '%s' failed. PDO reports %s\", $this->filesystemFolder->getPath(), $e->getMessage()));\n }\n }", "public function resetMetadata(): void\n {\n $this->_metadata = null;\n }", "public function setDeleteMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Clarifai\\Api\\DeleteMetadata::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = \\false)\n {\n }", "public function setMetadata($metadata)\n {\n return $this->set('metadata', $metadata);\n }", "public function setMetadataOptions($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\StorageTransfer\\V1\\MetadataOptions::class);\n $this->metadata_options = $var;\n\n return $this;\n }", "public function setRemoveTags($tags) {\n\t\tforeach ($tags as $tag) {\n\t\t\t$this->setRemoveTag($tag);\n\t\t}\n\t}", "public function setRemoveTag($tag) {\n\t\t$this->removeTags[] = $this->trimTags($tag);\n\t}", "function set_metadata($name, $value) {\n if ($name && $value)\n $this->metadata[$name] = $value;\n }", "public function setMetadata($var)\n {\n $arr = GPBUtil::checkMapField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->metadata = $arr;\n\n return $this;\n }", "public abstract function set_pairwise_metadata(string $their_did, array $metadata = null, array $tags = null);", "public function testModifyMetadata()\n {\n }", "public function setMetadata(array $metadata)\n {\n $this->metadata = $metadata;\n\n return $this;\n }", "public function deleteMetadata($path)\n {\n $fileKey = sha1($path);\n $this->getMetadataCache()->set(self::METADATA . $fileKey, []);\n $this->getMetadataCache()->delete(self::VISIBILITY . $fileKey);\n $this->getContentCache()->delete($fileKey);\n }", "public function setMetadata($var)\n {\n GPBUtil::checkString($var, True);\n $this->Metadata = $var;\n\n return $this;\n }", "public function setMetadata(?array $value): void {\n $this->getBackingStore()->set('metadata', $value);\n }", "public function setMetadata(?array $value): void {\n $this->getBackingStore()->set('metadata', $value);\n }", "public function setMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Grafeas\\V1\\Metadata::class);\n $this->metadata = $var;\n\n return $this;\n }", "public function removeMeta(string $key)\n {\n if (isset($this->meta[$key])) {\n unset($this->meta[$key]);\n }\n }", "public function deleteMetadata($path)\n {\n require_once 'Zend/Cloud/OperationNotAvailableException.php';\n throw new Zend_Cloud_OperationNotAvailableException('Deleting metadata not implemented');\n }", "public function testDeleteMetadata()\n {\n }", "protected function addFileFieldArray(&$metadata)\n {\n if($metadata['type']==\"text\"){\n $metadata['data']['file'] = [];\n }\n }", "public function clearMetas(): void\n {\n $this->metas()->delete();\n }", "public function mergeMetadata(array $metadata);", "public function setMetadata($data)\n {\n foreach ($this->getMetadatas() as $metadatum) {\n // If there already are metadata with the given name update them\n if (array_key_exists($metadatum->getCode(), $data)) {\n $metadatum->setPayload($data[$metadatum->getCode()]);\n unset($data[$metadatum->getCode()]);\n } else {\n $metadatum->setPayload(null);\n }\n }\n // Otherwize create a new metadata and add it to the current metadata\n foreach ($data as $code => $payload) {\n array_push($this->_metadata, $this->_createMetadata($code, $payload));\n }\n return $this;\n }", "public function setRemoveFromTitle($text) {\n $this->removeText = $text;\n }", "function sunset_set_columns_list($columns)\n{\n unset($columns['title']);\n unset($columns['date']);\n unset($columns['author']);\n\n $columns['title'] = 'Full Name';\n $columns['message'] = 'Message';\n $columns['email'] = 'Email';\n $columns['date'] = 'Date';\n\n return $columns;\n}", "protected function addAudioThumbnail(&$metadata)\n {\n $metadata['data']['thumbnail'] = '';\n }", "public function setMetadata(?\\ArrayObject $metadata): self\n {\n $this->metadata = $metadata;\n\n return $this;\n }", "public function delete_meta( $key, $value = '', $delete_all = false );", "public function setMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Value::class);\n $this->metadata = $var;\n\n return $this;\n }", "public function setMetadata($aCid, $aMetadata) {\n $lMetadata = $aMetadata;\n $lCid = intval($aCid);\n \n foreach($lMetadata as $lMetaId => $lVal) {\n $lMetaId = intval($lMetaId);\n if($lMetaId < 1) continue;\n \n $lSql = 'SELECT count(*) FROM `al_cms_ref_meta` WHERE `content_id`='.esc($lCid).' AND `meta_id`='.esc($lMetaId).' AND `val`='.esc($lVal);\n $lCount = CCor_Qry::getInt($lSql);\n if($lCount < 1) {\n // insert new metadata reference\n $lSql = 'INSERT INTO `al_cms_ref_meta` (`content_id`, `meta_id`, `val`) VALUES ('.esc($lCid).', '.esc($lMetaId).', '.esc($lVal).')';\n CCor_Qry::exec($lSql);\n }\n }\n }", "public function setMetadata($name, $value)\n {\n $this->metadata[$name] = $value;\n }", "public function setListRemove( array $listRemove ): void\n {\n $this->_listRemove = $listRemove;\n }", "function setRemoved( $value )\n {\n $this->Removed = $value;\n }", "public function fakeImageResize($metadata)\n {\n $file = pathinfo(realpath($this->uploads->getBasePath().'/'.$metadata['file']));\n if (! in_array($file['extension'], ['jpg', 'jpeg', 'png', 'gif'], true)) {\n return $metadata;\n }\n\n foreach ($this->sizes as $name => $size) {\n // figure out what size WP would make this:\n $newsize = image_resize_dimensions($metadata['width'], $metadata['height'], $size['width'], $size['height'], $size['crop']);\n\n if ($newsize) {\n // build the fake meta entry for the size in question\n // TODO update for density\n $metadata['sizes'][$name] = [\n 'file' => sprintf('%s-%sx%s.%s', $file['filename'], $newsize[4], $newsize[5], $file['extension']),\n 'width' => $newsize[4],\n 'height' => $newsize[5],\n ];\n }\n }\n\n $metadata['sizes']['full'] = [\n 'file' => $file['basename'],\n 'width' => $metadata['width'],\n 'height' => $metadata['height'],\n ];\n\n return $metadata;\n }", "function acf_delete_metadata($post_id = 0, $name = '', $hidden = \\false)\n{\n}", "public function update_metadata($metadata_id, $metadata)\n\t{\n\t\t$this->db->where('id', $metadata_id);\n\t\t$this->db->update('metadata', $metadata);\n\t}", "protected function removeFiles() {}", "public function setAvatarUploadMeta($avatarUploadMeta = [])\n {\n if ($this->avatarUploadMeta !== $avatarUploadMeta) {\n $this->avatarUploadMeta = isset($avatarUploadMeta) ? $avatarUploadMeta : '';\n }\n }", "protected function initMetadata($data, $metadata) {}", "public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n\n return $this;\n }", "public function setCustomMetadata($name, $value, $encoding = 'UTF-8') {}", "public function remove($key, $value = '');", "protected function deleteMeta() {\n Meta::deleteAll([\n 'owner' => $this->tableName(),\n 'owner_id' => $this->{static::meta_id_field()}\n ]);\n }", "public function syncMetadata() {}", "public function markForDeletion(): void\n {\n $this->oldFileName = $this->fileName;\n $this->fileName = null;\n }", "public function setMeta(array $data)\n {\n $this->meta = [];\n\n foreach ($data as $key => $item) {\n $this->addMeta($key, $item);\n }\n }", "function wck_remove_meta(){\r\n\t\tcheck_ajax_referer( \"wck-delete-entry\" );\r\n\t\tif( !empty( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\telse \r\n\t\t\t$meta = '';\r\n\t\tif( !empty( $_POST['id'] ) )\r\n\t\t\t$id = absint( $_POST['id'] );\r\n\t\telse \r\n\t\t\t$id = '';\r\n\t\tif( isset( $_POST['element_id'] ) )\r\n\t\t\t$element_id = absint( $_POST['element_id'] );\r\n\t\telse \r\n\t\t\t$element_id = '';\r\n\r\n\t\t// Security checks\r\n\t\tif( true !== ( $error = self::wck_verify_user_capabilities( $this->args['context'], $meta, $id ) ) ) {\r\n\t\t\theader( 'Content-type: application/json' );\r\n\t\t\tdie( json_encode( $error ) );\r\n\t\t}\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\t$results = get_post_meta($id, $meta, true);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\t$results = get_option( apply_filters( 'wck_option_meta' , $meta, $element_id ) );\r\n\t\t\r\n\t\t$old_results = $results;\r\n\t\tunset($results[$element_id]);\r\n\t\t/* reset the keys for the array */\r\n\t\t$results = array_values($results);\r\n\r\n\t\t/* make sure this does not output anything so it won't break the json response below\r\n\t\twill keep it do_action for compatibility reasons\r\n\t\t */\r\n\t\tob_start();\r\n\t\t\tdo_action( 'wck_before_remove_meta', $meta, $id, $element_id );\r\n\t\t$wck_before_remove_meta = ob_get_clean(); //don't output it\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\tupdate_post_meta($id, $meta, $results);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\tupdate_option( apply_filters( 'wck_option_meta' , $meta, $results, $element_id ), wp_unslash( $results ) );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/* TODO: optimize so that it updates from the deleted element forward */\r\n\t\t/* if unserialize_fields is true delete the coresponding post metas */\r\n\t\tif( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){\t\t\t\r\n\t\t\t\r\n\t\t\t$meta_suffix = 1;\t\t\t\r\n\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tupdate_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$meta_suffix++;\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( count( $results ) == 0 )\r\n\t\t\t\t$results = $old_results;\r\n\t\t\t\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\t\t\t\t\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tdelete_post_meta( $id, $meta.'_'.$name.'_'.$meta_suffix );\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$entry_list = $this->wck_refresh_list( $meta, $id );\r\n\t\t$add_form = $this->wck_add_form( $meta, $id );\r\n\r\n\t\theader( 'Content-type: application/json' );\r\n\t\tdie( json_encode( array( 'entry_list' => $entry_list, 'add_form' => $add_form ) ) );\r\n\t}", "public function remove_meta( $key ) {\n\t\tunset( $this->data['meta'][ $key ] );\n\n\t\treturn $this;\n\t}", "public function testKeyGetsRemoved()\n {\n $this->filter->value('test')->remove();\n\n $result = $this->filter->filter([\n 'test' => 'test',\n 'test2' => 'test',\n ]);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "function auth_saml2_update_sp_metadata() {\n global $saml2auth;\n require_once(__DIR__ . '/setup.php');\n\n $file = $saml2auth->get_file_sp_metadata_file();\n @unlink($file);\n}", "public function setSignatures($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Hyperledger\\Fabric\\Protos\\Common\\MetadataSignature::class);\n $this->signatures = $arr;\n\n return $this;\n }", "private function clearMetaData (SymfonyStyle $io)\n {\n $io->section(\"Clear existing metadata\");\n\n $this->metadata->clear();\n\n $this->stepDone($io);\n }", "public function deletePostMeta() {\n delete_post_meta($this->id, $this->_post_meta_name);\n }", "public function testDeleteMetadata2UsingDELETE()\n {\n }", "public function testDeleteMetadata3UsingDELETE()\n {\n }", "function custom_remove() { \n remove_meta_box('add-sfwd-certificates', 'nav-menus', 'side');\n remove_meta_box('add-sfwd-assignment', 'nav-menus', 'side'); \n}", "function delete_metadata_by_mid($meta_type, $meta_id)\n {\n }", "public function removeMeta(array $parameters)\n {\n return call_user_func_array(\"delete_{$this->getContext()}_meta\", $parameters);\n }", "public function remove_meta_data(string $class, array $primary_index): void\n {\n //it is expected to be called - do nothing\n }", "public function removeExtra()\n {\n if ($this->extraFilename !== null) {\n $finder = new Finder();\n $fs = new Filesystem();\n $imagePath = FRONTEND_FILES_PATH . '/festival/artists/files/extra';\n\n foreach ($finder->directories()->in($imagePath) as $directory) {\n $file = $directory . '/' . $this->extraFilename;\n\n if (is_file($file)) {\n $fs->remove($file);\n }\n }\n\n $this->extraFilename = null;\n\n return true;\n }\n\n return false;\n }", "function modify_user_meta($profile_fields) {\n\n // Add new fields\n $profile_fields['facebook_id'] = 'Facebook Profile ID';\n $profile_fields['twitter_username'] = 'Twitter @usename';\n\n // Remove old fields\n unset($profile_fields['aim']);\n unset($profile_fields['yim']);\n //not working unset($profile_fields['url']);\n unset($profile_fields['jabber']);\n\n return $profile_fields;\n}", "public function removeFromEntity($entityId, $metadataKey, $userId)\n {\n $metadata = $this->getByEntity($entityId, $metadataKey, $userId, true);\n\n $this->metadataRepository->delete($metadata);\n $this->em->flush();\n }", "public function removeAllMeta() {\n // Get the amount of meta tags that is going to be removed\n $removed = sizeof($this->meta);\n\n // Remove all the meta tags\n $this->meta = array();\n\n // Return the amount of removed tags\n return $removed;\n }", "public static function remove($slug, $value, $field, $remove) {\n\n\t\t\t$removing = key($remove);\n\t\t\t\n\t\t\tif (is_array($value) && isset($value[0])) {\n\n\t\t\t\t$file = isset($value[0]['file']) ? $value[0]['file'] : '';\n\t\t\t\t$robots = isset($value[0]['robots']) ? $value[0]['robots'] : '';\n\n\t\t\t\tif (file_exists($file)) { unlink($file); }\n\t\t\t\tif (file_exists($robots)) { unlink($robots); }\n\n\t\t\t\tunset($value[0]);\n\n\t\t\t\t$result['value'] = $value;\n\t\t\t\t$result['error'] = '';\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t$result['value'] = $value;\n\t\t\t\t$result['error'] = '';\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}", "public function afterDelete(\n RecordValueContainerInterface $valueContainer,\n bool $shouldDeleteFiles\n ): void;", "public function unsetFileAndFolderNameFilters() {}", "function magazine_remove_entry_meta() {\n\tif ( ! is_single() ) {\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );\n\t}\n\n}", "public function setRemoveXfaInformation($removeXfaInformation) {}", "function DeleteUploadedFiles($pSet, $deleted_values)\n{\n\tforeach($deleted_values as $field => $value)\n\t{\n\t\tif(($pSet->getEditFormat($field) == EDIT_FORMAT_FILE || $pSet->getPageTypeByFieldEditFormat($field, EDIT_FORMAT_FILE) != \"\") \n\t\t\t&& $pSet->isDeleteAssociatedFile($field))\n\t\t{\n\t\t\tif(!strlen($value))\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t$filesArray = my_json_decode($value);\n\t\t\tif(!is_array($filesArray) || count($filesArray) == 0)\n\t\t\t{\n\t\t\t\t$filesArray = array(array(\"name\" => $pSet->getUploadFolder($field).$value));\n\t\t\t\tif($pSet->getCreateThumbnail($field))\n\t\t\t\t\t$filesArray[0][\"thumbnail\"] = $pSet->getUploadFolder($field).$pSet->getStrThumbnail($field).$value;\n\t\t\t}\n\t\t\n\t\t\tforeach($filesArray as $delFile)\n\t\t\t{\n\t\t\t\t$filename = $delFile[\"name\"];\n\t\t\t\t$isAbs = $pSet->isAbsolute($field) || isAbsolutePath($filename);\n\t\t\t\tif(!$isAbs)\n\t\t\t\t\t$filename = getabspath($filename);\n\t\t\t\trunner_delete_file($filename);\n\t\t\t\tif($delFile[\"thumbnail\"] != \"\")\n\t\t\t\t{\n\t\t\t\t\t$filename = $delFile[\"thumbnail\"];\n\t\t\t\t\tif(!$isAbs)\n\t\t\t\t\t\t$filename = getabspath($filename);\n\t\t\t\t\trunner_delete_file($filename);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "private function prepare_metadata_for_output( $metadata ) {\n\t\t$metadata = html_entity_decode( $metadata, ENT_QUOTES, get_bloginfo( 'charset' ) );\n\t\t$metadata = wp_strip_all_tags( $metadata );\n\t\treturn $metadata;\n\t}", "public function removeRegisteredFiles() {}", "private static function remove_meta_from_media( $media_ids ) {\n\t\tforeach ( (array) $media_ids as $media_id ) {\n\t\t\tif ( is_numeric( $media_id ) ) {\n\t\t\t\tdelete_post_meta( $media_id, '_frm_temporary' );\n\t\t\t}\n\t\t}\n\t}", "public function removeAttributes()\n\t{\n\t\tforeach ($this->argsArray(func_get_args()) as $a) {\n\t\t\t$this->removed_attrs[] = $a;\n\t\t}\n\t}", "function remove_attachment_title_attr( $attr ) {\n\tunset($attr['title']);\n\treturn $attr;\n}", "public function setMeta($key, $value = null)\n {\n collect(is_array($key) ? $key : [$key => $value])->each(function ($value, $key) {\n update_user_meta($this->ID, $key, $value);\n });\n }", "public function removeTechnical()\n {\n if ($this->technicalFilename !== null) {\n $finder = new Finder();\n $fs = new Filesystem();\n $imagePath = FRONTEND_FILES_PATH . '/festival/artists/files/technical';\n\n foreach ($finder->directories()->in($imagePath) as $directory) {\n $file = $directory . '/' . $this->technicalFilename;\n\n if (is_file($file)) {\n $fs->remove($file);\n }\n }\n\n $this->technicalFilename = null;\n\n return true;\n }\n\n return false;\n }" ]
[ "0.5994148", "0.5994148", "0.5994148", "0.59756386", "0.5717427", "0.5666408", "0.5666208", "0.5527541", "0.55252934", "0.54712313", "0.5413414", "0.53825814", "0.5363142", "0.5363142", "0.5272438", "0.52425", "0.518364", "0.5155652", "0.51165986", "0.50931853", "0.49874014", "0.4972734", "0.49500933", "0.49249387", "0.48584488", "0.48180088", "0.4814836", "0.4774326", "0.4740156", "0.47384608", "0.472466", "0.46987656", "0.46835238", "0.4664407", "0.46418858", "0.46180376", "0.46142617", "0.45460293", "0.45460293", "0.45405483", "0.4522975", "0.45216313", "0.45185265", "0.44689998", "0.44616807", "0.44093674", "0.43965316", "0.43829593", "0.43828782", "0.4381604", "0.4374316", "0.43603218", "0.43472135", "0.43369335", "0.43082553", "0.43062505", "0.42926008", "0.42920837", "0.42894122", "0.4259658", "0.42504707", "0.42473415", "0.4238434", "0.4235809", "0.42252126", "0.42232642", "0.4223156", "0.42185622", "0.42102355", "0.42016122", "0.41883168", "0.4186022", "0.4175316", "0.41693482", "0.41601345", "0.4153928", "0.41444442", "0.41432214", "0.41375014", "0.41350237", "0.41309863", "0.41304573", "0.4127214", "0.41270587", "0.41224128", "0.4118311", "0.4098394", "0.40889627", "0.40863252", "0.40800345", "0.4064873", "0.40622577", "0.4055136", "0.40503815", "0.4049911", "0.4042571", "0.40418005", "0.40389773", "0.40360847", "0.40319657" ]
0.61728036
0
get the path of migrate stub
public function getMigrateStubContent(): string { return file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . $this->getMigrationStub()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function migrations_path();", "protected function getStub()\n {\n return app_path('Stubs/migration.stub');\n }", "protected function getStub()\n {\n return app_path('Core/Stub/Migration.stub');\n }", "protected function getMigrationPath()\n {\n return EASYSWOOLE_ROOT . DIRECTORY_SEPARATOR . 'migrations';\n }", "public function getStub()\n {\n return File::get(__DIR__.'/../stubs/migrations/migration.stub');\n }", "public function getMigrationPath()\n {\n return $this->migrationPath;\n }", "protected function getMigrationsPath()\n\t{\n\t\treturn Framework::fw()->buildPath( '__database', 'migrations' );\n\t}", "protected function getMigrationPath()\n {\n return APP_PATH.'database'.DIRECTORY_SEPARATOR.'migrations';\n }", "protected function getMigrationPath()\n {\n $targetPath = $this->input->getOption('path');\n if (is_string($targetPath) && $targetPath) {\n return ! $this->usingRealPath()\n ? $this->laravel->basePath().'/'.$targetPath\n : $targetPath;\n }\n\n $layer = $this->input->getOption('layer');\n return !$this->usingRealPath() ? database_path(\"migrations/{$layer}\") : $layer;\n }", "protected function getMigrationPath()\n {\n return database_path(\"seeds/ItctrustSeeder.php\");\n }", "private function getMigrationPath(){\n global $argv;\n if(isset($argv[2])){\n $this->files[] = [\n 'filepath' => _base_path() . '/database/migrations/', \n 'name' => $argv[2] . '.php'\n ];\n return;\n }\n foreach($this->direcory as $directory){\n $this->getMigrationPathFromDir($directory);\n }\n }", "protected function getStub()\n {\n return config('crudgenerator.custom_template')\n ? config('crudgenerator.path') . '/acl-migration.stub'\n : __DIR__ . '/../stubs/acl-migration.stub';\n }", "protected function getMigrationsDestPath()\n {\n return realpath(database_path('migrations'));\n }", "public function migrationPaths()\n {\n return [\n dirname(__DIR__, 3) . '/database/migrations',\n ];\n }", "protected function getMigrationPath()\n {\n return $this->laravel->databasePath() . DIRECTORY_SEPARATOR . 'migrations';\n }", "protected function getMigrationPath()\n {\n return $this->laravel->databasePath() . DIRECTORY_SEPARATOR . 'migrations';\n }", "protected function getMigrationPath()\n {\n if (! is_null($targetPath = $this->input->getOption('path'))) {\n return ! $this->usingRealPath()\n ? $this->laravel->basePath().'/'.$targetPath\n : $targetPath;\n }\n\n return parent::getMigrationPath();\n }", "public function getMigrationPaths();", "protected function getMigrationsSrcPath()\n {\n return realpath(dirname(__DIR__) . '/src/migrations');\n }", "private function migrationPath()\n {\n $FileName = date('Y').'_'.date('m').'_'.date('d').'_'.date('his').'_'.$this->parser->plural().'.php';\n\n return config('maxolex.config.migration').'/'.$FileName;\n }", "protected function getMigrationPath()\n {\n $data_migration_path = $this->laravel->databasePath().DIRECTORY_SEPARATOR.'data_migrations';\n Installation::setupDataMigrationPath($data_migration_path);\n return $data_migration_path;\n }", "protected function getMigrationPath(console\\Context $context)\n\t\t{\n\t\t\t$kernel = $this->getKernel();\n\t\t\t$path = $context->getInput()->options()->get('path');\n\n\t\t\tif(null !== $path)\n\t\t\t{\n\t\t\t\treturn $kernel->make('path.base').'/'.$path;\n\t\t\t}\n\n\t\t\treturn $kernel->make('path.src').'/data/migrations';\n\t\t}", "public function getStubPath(): string\n {\n return __DIR__.'/../../../resources/stubs/dto.stub';\n }", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__ . '/stubs/view.stub';\n }\n\n return __DIR__ . '/stubs/table.stub';\n }", "protected function getStub() {\n $stub = null;\n\n if ($this->option('crud')) {\n return __DIR__ . '/stubs/schema.crud.stub';\n }else if ($this->option('progressive')) {\n return __DIR__ . '/stubs/schema.progressive.stub';\n }else if ($this->option('report')) {\n return __DIR__ . '/stubs/schema.report.stub';\n }else if ($this->option('chart')) {\n return __DIR__ . '/stubs/schema.chart.stub';\n }\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/Schema.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/../../../resources/stubs/views/view.stub';\n }", "protected function getStubPath()\n {\n // Stub path.\n $stub_path = dirname(dirname(dirname(dirname(__DIR__)))).'/resources/stubs/';\n // Return the stub path.\n return $stub_path;\n }", "protected function getStub(): string\n {\n return __DIR__.'/stubs/interaction.stub';\n }", "protected function getStub()\n {\n return base_path('stubs\\service.stub');\n }", "public function getStub()\n {\n return app()->basePath('vendor/samuel-nunes/lumen-form-request-validation/src/Console/Stubs/'.$this->stubName.'.stub');\n }", "protected function getStub(): string\n\t{\n\t\treturn __DIR__ . '/../../../stubs/action.interface.stub';\n\t}", "protected function getMigrationPaths()\n {\n $migrationPaths = ['base' => $this->migrationPath];\n foreach (Yii::$app->getModules() as $id => $config) {\n if (is_array($config) && isset($config['class'])) {\n $reflector = new \\ReflectionClass($config['class']);\n $path = dirname($reflector->getFileName()) . '/migrations';\n if (is_dir($path)) {\n $migrationPaths[$id] = $path;\n }\n }\n }\n\n\t\treturn $migrationPaths;\n }", "protected function getStub(): string\n {\n return __DIR__ . '/partial_stubs/model.stub';\n }", "protected function getStub()\n {\n return realpath(__DIR__.'/stubs/dashboard.stub');\n }", "public function getStubPath()\n {\n return __DIR__.'/stubs';\n }", "public function getStubPath()\n {\n return __DIR__.'/stubs';\n }", "protected function getStub()\n {\n return resource_path('stubs/view.stub');\n }", "public function getStubDir() {\n return __DIR__.'/../stubs';\n }", "protected function getStub()\n {\n return base_path() . '/resources/stubs/model.stub';\n }", "protected function getStub(): string\n {\n return base_path('stubs/vue-component.stub');\n }", "protected function getStubsPath()\n {\n return __DIR__ . '/../../stubs/';\n }", "public function getStub()\n {\n if ($this->option('pivot')) {\n return __DIR__.'/../../stubs/pivot.model.stub';\n }\n\n return __DIR__.'/../../stubs/model.stub';\n }", "protected function getPath($name)\n {\n return base_path() . '/database/migrations/' . date('Y_m_d_His') . '_' . $name . '.php';\n }", "protected function getStub()\n {\n if ($this->option('service')) {\n return __DIR__.'/stubs/controller.service.stub';\n } elseif($this->option('base')) {\n return __DIR__.'/stubs/controller.base.stub';\n } elseif($this->option('otp')) {\n return __DIR__.'/stubs/controller.service.otp.stub';\n }\n return __DIR__.'/stubs/controller.plain.stub';\n }", "protected function getMigrationPaths()\n {\n return array_merge(\n $this->getPaths(), $this->migrator->paths()\n );\n }", "private static function migrationPaths()\n {\n $migrationDirs = [];\n foreach (app('migrator')->paths() as $path) {\n $migrationDirs[] = str_replace([\n '\\\\',\n '/',\n ], [\n DIRECTORY_SEPARATOR,\n DIRECTORY_SEPARATOR,\n ], $path);\n }\n\n /*foreach ($migrationDirs as $dir) {\n $parts = explode(DIRECTORY_SEPARATOR, $dir);\n\n foreach($parts as $part) {\n\n }\n }*/\n\n return $migrationDirs;\n }", "public function getUpgradesPath()\n {\n return Mage::getBaseDir('code')\n . DS\n . $this->_getData('codePool')\n . DS\n . uc_words($this->getId(), DS)\n . DS\n . 'upgrades';\n }", "protected function getStub()\n {\n return realpath(__DIR__) .str_replace('/', DS, '/stubs/reminders.stub');\n }", "protected function getStub()\n {\n return $this->option('pivot')\n ? $this->resolveStubPath('/stubs/base_stubs/model.pivot.stub')\n : $this->resolveStubPath('/stubs/base_stubs/model.stub');\n }", "function getBlueprintPath() {\n $blueprints_path = $this->root . \"/includes/blueprints/\";\n $blueprint = $this->getBlueprint($this->getCurrentPage());\n return $blueprints_path . $blueprint . \".php\";\n }", "public function getStub()\n {\n return __DIR__.'/stubs/route.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/action.stub';\n }", "protected function getStub():string\n {\n return __DIR__ . '/stubs/controller.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/command.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/command.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/authServiceProvider.stub';\n }", "protected function getStub()\n {\n if (!$this->option('pivot')) {\n return __DIR__.'/stubs/model.stub';\n }\n }", "public function stubPath()\n {\n return 'stub_path';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/../stubs/abstract/iservice.stub';\n }", "public function getSchemaPath() {\n\t\tglobal $IP;\n\t\tif ( file_exists( \"$IP/maintenance/\" . $this->getType() . \"/tables.sql\" ) ) {\n\t\t\treturn \"$IP/maintenance/\" . $this->getType() . \"/tables.sql\";\n\t\t} else {\n\t\t\treturn \"$IP/maintenance/tables.sql\";\n\t\t}\n\t}", "protected function getStub()\n {\n return __DIR__ . '/../stubs/seed.stub';\n }", "protected function getStub()\n {\n return app_path('Console/Commands/stubs/form-request.stub');\n }", "protected function getStub()\n {\n $stub = __DIR__.'/../stubs/contracts/contract';\n\n if ($this->option('extends')) {\n $stub .= '.extends';\n }\n\n return $stub.'.stub';\n }", "protected function getPath($name)\n {\n return base_path('database/migrations/' . Carbon::now()->format('Y_m_d_his') . '_add_' . strtolower($this->argument('name')) . '_roles_and_permissions.php');\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/model.stub';\n }", "protected function getMigrationPaths()\n {\n // Here, we will check to see if a path option has been defined. If it has we will\n // use the path relative to the root of the installation folder so our database\n // migrations may be run for any customized path from within the application.\n if ($this->hasOption('path') && $this->option('path')) {\n return collect($this->option('path'))->map(function ($path) {\n return ! $this->usingRealPath()\n ? ROOT_PATH.'/'.$path\n : $path;\n })->all();\n }\n return array_merge(\n $this->migrator->paths(), [$this->getMigrationPath()]\n );\n }", "protected function getMigrationPath($path = null)\n {\n $name = $this->laravel->databasePath() . DIRECTORY_SEPARATOR . 'migrations';\n\n if (!empty($path)) {\n $name .= DIRECTORY_SEPARATOR . $path;\n }\n\n return $name;\n }", "protected function getStub()\n {\n return config('laravel-crud-generator.custom_template')\n ? config('laravel-crud-generator.path') . '/model.stub'\n : __DIR__ . '/../stubs/model.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/bond.stub';\n }", "public function getMigrationPath($name)\n {\n return base_path('database' . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $this->getMigrationFileName($name) . '.php');\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/' . '/' . 'model.stub';\n }", "protected function getStub()\n {\n return __DIR__. '/stubs/facade.base.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/composer.stub';\n }", "protected function getMigrationPath($module)\n {\n return moduly()->getModulePath($module) . config('moduly.modules.folders.migrations');\n }", "protected function getSourcePath()\n\t{\n\t\t$vendor = $this->laravel['path.base'].'/vendor';\n\n\t\treturn $vendor.'/'.$this->argument('package').'/src/migrations';\n\t}", "protected function getStub()\n {\n return $this->option('model')\n ? __DIR__ . '/stubs/service.stub'\n : __DIR__ . '/stubs/service_default.stub';\n }", "protected function getStub()\n\t{\n\t\treturn __DIR__.'/stubs/api.stub';\n\t}", "protected function getStub()\n { \n return __DIR__.'/stubs/plugin.stub';\n }", "protected function getStub()\n {\n if ($this->option('component')) {\n return __DIR__ . '/Stubs/FacadeComponent.stub';\n }\n return __DIR__ . '/Stubs/Facade.stub';\n }", "protected function getMigrationPaths()\n {\n // use the path relative to the root of the installation folder so our database\n // migrations may be run for any customized path from within the application.\n if ($this->input->hasOption('path') && $this->option('path')) {\n return ws_collect($this->option('path'))->map(function ($path) {\n return !$this->usingRealPath()\n ? $this->laravel->basePath() . '/' . $path\n : $path;\n })->all();\n }\n\n return array_merge(\n $this->migrator->paths(), [$this->getMigrationPath()]\n );\n }", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__.'/stubs/controller/controller.view.stub';\n }\n\n return __DIR__.'/stubs/controller/controller.api.stub';\n }", "public function getStub()\n {\n return __DIR__.'/stubs/menuSeeder.stub';\n }", "protected function getStub()\n {\n $stub = '/stubs/form.stub';\n\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/views/plain.stub';\n }", "protected function getStub()\n {\n if ($this->option('request')) {\n return __DIR__.'/stubs/mutator-request.stub';\n } elseif ($this->option('clean')) {\n return __DIR__.'/stubs/mutator-clean.stub';\n } else {\n return __DIR__.'/stubs/mutator.stub';\n }\n }", "public function getMenuTableSeederPath()\n {\n return base_path($this->config->base_path.\"/src/Seeder/MenuTablesSeeder.php\");\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/Model.stub';\n }", "protected function getStub()\n {\n if ($this->option('pivot')) {\n return parent::getStub();\n }\n\n return __DIR__ . '/stubs/model.stub';\n }", "protected function getStub(): string\n {\n return __DIR__.'/../../../stubs/Filter.stub';\n }", "protected function getMigrationPaths(): array\n {\n // Here, we will check to see if a path option has been defined. If it has we will\n // use the path relative to the root of the installation folder so our database\n // migrations may be run for any customized path from within the application.\n\n $path = CommandManager::getInstance()->getOpt('path', false);\n if ($path) {\n $collect = new Collection($path);\n return $collect->map(function ($path) {\n return ! $this->usingRealPath()\n ? EASYSWOOLE_ROOT . DIRECTORY_SEPARATOR . $path\n : $path;\n })->all();\n }\n\n return array_merge(\n $this->migrator->paths(),\n [$this->getMigrationPath()]\n );\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/kompo-'.($this->option('demo') ? 'demo-' : '').'form.stub';\n }", "protected function getStub()\n {\n if ($this->option('plain')) {\n return __DIR__.'/stubs/base-controller.plain.stub';\n }\n\n return __DIR__.'/stubs/base-controller.stub';\n }", "protected function getStub()\n {\n if ($stub = $this->option('stub')) {\n return $stub;\n }\n\n if ($this->option('model')) {\n return __DIR__.'/stubs/controller.stub';\n }\n\n return __DIR__.'/stubs/blank.stub';\n }", "protected function getPath(Migration $migration)\n {\n return $this->app->databasePath('migrations' . DIRECTORY_SEPARATOR . $migration->filename() . '.php');\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/service.stub';\n }", "public function getMigrations();", "protected function getStub()\n {\n return app_path('Core/Stub/HTML/Views/index.stub');\n }", "protected function getStub()\n {\n return 'vendor/thomzee/laramap/src/Commands/Stubs/mapper.stub';\n }", "private function getStub()\n {\n return app_path() . '\\Stubs\\repository_contract.stub';\n }" ]
[ "0.7994505", "0.774218", "0.7673568", "0.74581677", "0.72703516", "0.72662115", "0.7253075", "0.72514606", "0.7177827", "0.7112802", "0.71112055", "0.70902324", "0.70301336", "0.70280075", "0.7022886", "0.7022886", "0.7003331", "0.6958509", "0.69467145", "0.6780757", "0.67335534", "0.67065465", "0.65778095", "0.6534927", "0.65166813", "0.6492579", "0.64590424", "0.64460933", "0.6410496", "0.63958794", "0.6386105", "0.6376216", "0.63701504", "0.6367771", "0.6364442", "0.63597083", "0.63597083", "0.63298017", "0.6325325", "0.6307877", "0.6294275", "0.6275891", "0.6264964", "0.6263728", "0.6253913", "0.6240842", "0.62246567", "0.62234974", "0.6206757", "0.6203091", "0.6200846", "0.619611", "0.6189622", "0.61886847", "0.618527", "0.618527", "0.6182052", "0.6182025", "0.6181063", "0.6168134", "0.6158955", "0.6158858", "0.61553687", "0.61550117", "0.6146372", "0.6139481", "0.61388105", "0.6138542", "0.61372846", "0.6136046", "0.61283195", "0.6112342", "0.6107796", "0.609723", "0.6079354", "0.60792994", "0.60612625", "0.6057871", "0.6052835", "0.6047416", "0.60450494", "0.60398626", "0.60378486", "0.6033119", "0.60307854", "0.6026248", "0.60261697", "0.6011712", "0.6005867", "0.59987915", "0.5994053", "0.5983443", "0.5969095", "0.5962156", "0.59591705", "0.595519", "0.5953218", "0.59519786", "0.59423995", "0.59416646" ]
0.6693041
22
title no filter = return result titles only title with filter = return results filtered by title info no filter
function filterByCategory ($filter = null, $results = []) { $items = makeList($results); if ($filter == null) return $items; $new = []; foreach ($items as $key => $item) { $filter = strtolower($filter); $target = strtolower($item->category); if (stripos($target, $filter) > -1 ) { $new[] = $item; } } return $new; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Filter_title($title, $negate = false) {\r\n\t\t$title\t\t= trim($title);\r\n\t\t$queryParts\t= false;\r\n\r\n\t\tif( $title !== '' ) {\r\n\t\t\t$titleParts\t= explode(' ', $title);\r\n\r\n\t\t\t$where\t= TodoyuSql::buildLikeQueryPart($titleParts, array(self::TABLE . '.title'), $negate);\r\n\r\n\t\t\t$queryParts = array(\r\n\t\t\t\t'where'\t=> $where\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn $queryParts;\r\n\t}", "private function get_filterTitle()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS filter configuration\n //$conf_name = $this->conf_view['filter.'][$table . '.'][$field];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n\n\n /////////////////////////////////////////////////////\n //\n // RETURN no title_stdWrap\n\n if ( !is_array( $conf_array[ 'wrap.' ][ 'title_stdWrap.' ] ) )\n {\n if ( $this->pObj->b_drs_filter )\n {\n $prompt = 'There is no title_stdWrap. The object won\\'t get a title.';\n t3lib_div :: devLog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n $prompt = 'If you want a title, please configure ' .\n $this->conf_path . $this->curr_tableField . '.wrap.title_stdWrap.';\n t3lib_div :: devLog( '[HELP/FILTER] ' . $prompt, $this->pObj->extKey, 1 );\n }\n return null;\n }\n // RETURN no title_stdWrap\n /////////////////////////////////////////////////////\n //\n // Get the local or global autoconfig array\n // Get the local autoconfig array\n $lAutoconf = $this->conf_view[ 'autoconfig.' ];\n $lAutoconfPath = $this->conf_path;\n if ( !is_array( $lAutoconf ) )\n {\n if ( $this->pObj->b_drs_sql )\n {\n t3lib_div :: devlog( '[INFO/SQL] ' . $this->conf_path . ' hasn\\'t any autoconf array.<br />\n We take the global one.', $this->pObj->extKey, 0 );\n }\n // Get the global autoconfig array\n $lAutoconf = $this->conf[ 'autoconfig.' ];\n $lAutoconfPath = null;\n }\n // Get the local or global autoconfig array\n // Don't replace markers recursive\n if ( !$lAutoconf[ 'marker.' ][ 'typoScript.' ][ 'replacement' ] )\n {\n // DRS\n if ( $this->pObj->b_drs_filter )\n {\n $prompt = 'Replacement for markers in TypoScript is deactivated.';\n t3lib_div :: devLog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n $prompt = 'If you want a replacement, please configure ' .\n $lAutoconfPath . 'autoconfig.marker.typoScript.replacement.';\n t3lib_div :: devLog( '[HELP/FILTER] ' . $prompt, $this->pObj->extKey, 1 );\n }\n // DRS\n }\n // Don't replace markers recursive\n /////////////////////////////////////////////////////\n //\n // Wrap the title\n // Get the title\n $title_stdWrap = $conf_array[ 'wrap.' ][ 'title_stdWrap.' ];\n\n // Replace ###TABLE.FIELD### recursive\n $value_marker = $this->pObj->objZz->getTableFieldLL( $this->curr_tableField );\n if ( $lAutoconf[ 'marker.' ][ 'typoScript.' ][ 'replacement' ] )\n {\n $key_marker = '###TABLE.FIELD###';\n $markerArray[ $key_marker ] = $value_marker;\n $key_marker = '###' . strtoupper( $this->curr_tableField ) . '###';\n $markerArray[ $key_marker ] = $value_marker;\n // #44316, 130104, dwildt, 1-\n //$title_stdWrap = $this->pObj->objMarker->substitute_marker_recurs( $title_stdWrap, $markerArray );\n // #44316, 130104, dwildt, 4+\n $currElements = $this->pObj->elements;\n// $this->pObj->elements = ( array ) $this->pObj->elements + $markerArray;\n $this->pObj->elements = $markerArray;\n $title_stdWrap = $this->pObj->objMarker->substitute_tablefield_marker( $title_stdWrap );\n $this->pObj->elements = $currElements;\n // DRS\n if ( $this->pObj->b_drs_filter )\n {\n $prompt = $key_marker . ' will replaced with the localised value of ' .\n '\\'' . $this->curr_tableField . '\\': \\'' . $value_marker . '\\'.';\n t3lib_div :: devLog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n $prompt = 'If you want another replacement, please configure ' .\n $this->conf_view_path . $this->curr_tableField . '.wrap.title_stdWrap';\n t3lib_div :: devLog( '[HELP/FILTER] ' . $prompt, $this->pObj->extKey, 1 );\n }\n // DRS\n }\n // Replace ###TABLE.FIELD### recursive\n // stdWrap the title\n $title = $this->pObj->local_cObj->stdWrap( $value_marker, $title_stdWrap );\n\n // RETURN the title\n return $title;\n }", "public function titleDetailsFilteredOpds($books);", "function title_query() {\n $names = array();\n\n $result = db_select('fooaggregator_feed', 'f')\n ->fields('f', array('title'))\n ->condition('f.fid', $this->value, 'IN')\n ->execute();\n foreach ($result as $o) {\n $names[] = check_plain($o->title);\n }\n\n return $names;\n }", "public function filters_the_title($title){\n\t\n\t$title = $this->formatting->wptexturize($title);\n\t$title = $this->formatting->convert_chars($title);\n\t\n\treturn trim($title);\n }", "public function testFilterByTitle2()\n {\n $response = $this->runApp('GET', '/v1/products?q=tremblay&password=' . $this->apiPassword);\n\n $this->assertEquals(StatusCode::HTTP_OK, $response->getStatusCode());\n $sJson = '[{\"id\":\"12\",\"title\":\"tremblay.com\",\"brand\":\"dolorem\",\"price\":\"94953540.00\",\"stock\":\"4\"}]';\n $result = (array)json_decode($response->getBody())->result;\n\n $this->assertEquals(json_decode($sJson), $result);\n }", "public function filter_post_title_out( $title )\n\t{\n\t\treturn $this->filter( $title );\n\t}", "public function byTitle($title)\n {\n return $this->andWhere(['category.title' => $title]);\n }", "public function testFilterByTitle()\n {\n $response = $this->runApp('GET', '/v1/products?q=.net&password=' . $this->apiPassword);\n\n $this->assertEquals(StatusCode::HTTP_OK, $response->getStatusCode());\n $result = (array)json_decode($response->getBody())->result;\n $this->assertEquals(count($result), 7);\n }", "function title_query() {\n $titles = array();\n\n $result = db_query(\"SELECT f.title FROM {aggregator_feed} f WHERE f.fid IN (:fids)\", array(':fids' => $this->value));\n foreach ($result as $term) {\n $titles[] = check_plain($term->title);\n }\n return $titles;\n }", "public function filter__the_title_parts( $title ) {\n\t\tglobal $posts;\n\n\t\tif ( ! is_single() && ! is_page() || ! $this->is_supported_post_type( $posts[0]->post_type ) ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\t$cmpvalues = $this->get_enabled_singular_options( $posts[0]->post_type );\n\t\tif ( ! isset( $cmpvalues['mt_seo_title'] ) || ! $cmpvalues['mt_seo_title'] ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\t$mt_seo_title = (string) get_post_meta( $posts[0]->ID, 'mt_seo_title', true );\n\t\tif ( empty( $mt_seo_title ) ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\t$mt_seo_title = $this->do_title_placeholder_substitutions( $title['title'], $mt_seo_title );\n\t\t$mt_seo_title = wp_strip_all_tags( $mt_seo_title );\n\n\t\t$title['title'] = $mt_seo_title;\n\t\treturn $title;\n\t}", "public function titleQuery() {\n $titles = [];\n\n $results = $this->database->query('SELECT cr.vid, cr.nid, cr.title FROM {catalog_item_revision} cr WHERE cr.vid IN ( :vids[] )', [':vids[]' => $this->value])->fetchAllAssoc('vid', PDO::FETCH_ASSOC);\n $nids = [];\n foreach ($results as $result) {\n $nids[] = $result['nid'];\n }\n\n $catalog_items = $this->catalog_itemStorage->loadMultiple(array_unique($nids));\n\n foreach ($results as $result) {\n $catalog_items[$result['nid']]->set('title', $result['title']);\n $titles[] = $catalog_items[$result['nid']]->label();\n }\n\n return $titles;\n }", "function searchByTitle($title){\n $name = $title['search'];\n return db()->QUERY(\"SELECT * FROM posts WHERE title LIKE '%$name%' ORDER BY title\");\n }", "public function getByTitle()\n {\n }", "function filter_posts( $posts ) {\n\t\tif ( isset( $_GET['title'] ) && '' != $_GET['title'] ) {\n\t\t\t$title = sanitize_text_field( wp_unslash( $_GET['title'] ) );\n\t\t\tforeach ( $posts as $post ) {\n\t\t\t\tif ( $post->post_title ) {\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $posts;\n\t}", "public function filtering();", "public function filter_post_title_atom( $title )\n\t{\n\t\treturn $this->filter( $title );\n\t}", "public function getItems($title) {\n $stmt = $this->db->prepare(\"select * from product where title like concat('%', :title, '%') and is_active = 1;\");\n $stmt->bindValue(\"title\", $title, PDO::PARAM_STR);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function find_all_product_info_by_title($title){\n global $db;\n $sql = \"SELECT * FROM products \";\n $sql .= \" WHERE name ='{$title}'\";\n $sql .=\" LIMIT 1\";\n return find_by_sql($sql);\n }", "function FilterTitle($text) {\n\t\t\treturn ucfirst(trim($text));\n\t\t}", "private static function _getFilter() {}", "private function filter($filter) {\n\t\tforeach ($filter as $key => $value) {\n\n\t\t\tif (array_key_exists('userID', $filter)) {\n\t\t\t\t$this -> db -> where('userID', $filter['userID']);\n\t\t\t}\n\t\t\tif (array_key_exists('catID', $filter)) {\n\t\t\t\t$this -> db -> where('catID', $filter['catID']);\n\t\t\t}\n\n\t\t\tif (array_key_exists('search', $filter)) {\n\t\t\t\t$array = explode(' ', $value);\n\t\t\t\tforeach ($array as $key => $value)\n\t\t\t\t\t$this -> db -> like('title', $value);\n\n\t\t\t}\n\t\t}\n\t}", "abstract public function filters();", "public function titleQuery() {\n $titles = [];\n\n $groupContent = $this->groupContentStorage->loadMultiple($this->value);\n foreach ($groupContent as $content) {\n $titles[] = $content->label();\n }\n return $titles;\n }", "protected abstract function filter();", "public function get_row_by_title($goods_title){\n $ar_filter = array('title' => trim($goods_title));\n return $this->get_row_by($ar_filter);\n }", "function test_field_specific_search_on_post_title() {\n\n\t\t// Single word. Two matching entries should be found.\n\t\t$search_string = \"Jamie's\";\n\t\t$field_key = 'yi6yvm';\n\t\t$items = self::generate_and_run_field_specific_query( 'create-a-post', $field_key, $search_string );\n\t\t$msg = 'A search for ' . $search_string . ' in post title field ' . $field_key;\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'post-entry-1', 'post-entry-3' ) );\n\n\t\t// Single word. No entries should be found.\n\t\t$search_string = 'TextThatShouldNotBeFound';\n\t\t$items = self::generate_and_run_field_specific_query( 'create-a-post', $field_key, $search_string );\n\t\t$msg = 'A search for ' . $search_string . ' in post title field ' . $field_key;\n\t\tself::run_entries_not_found_tests( $msg, $items );\n\t}", "function ssSearchRegexFilter( $where ) {\n if( !empty( $this->ss_input_post_title ) ) {\n $where .= \" AND wp_posts.post_title != '\" . $this->ss_input_post_title_origin . \"' AND wp_posts.post_title REGEXP '.[[:<:]]\" . implode( '[[:>:]]|.[[:<:]]', $this->ss_input_post_title ) . \"[[:>:]]' \"; \n }\n\n return $where;\n }", "public function getFilteredDetails();", "function test_general_entries_search_on_post_title() {\n\t\t$search_string = \"Jamie's\";\n\t\t$items = self::generate_and_run_search_query( 'create-a-post', $search_string );\n\t\t$msg = 'A general search for ' . $search_string . ' in posts table';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'post-entry-1', 'post-entry-3' ) );\n\t}", "function edan_search_set_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n /**\n * if in the loop and the title is cached (or if object group is retrieved successfully)\n * modify the page title on display.\n */\n if(in_the_loop() && edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n return $title;\n }", "function sql_search_relative_titles($mastertitle,$field2check) {\n $db = GetGlobal('db');\t\n\t $lan = $lang?$lang:getlocal();\n\t $itmname = $lan?'itmname':'itmfname';\n\t $itmdescr = $lan?'itmdescr':'itmfdescr';\n\t\t$remarks = 'itmremark';\t\n\t\t$sqlout = null;\t\t\n\t\n\t $mt = explode(' ',trim($mastertitle));\n //print_r($mt);\n $sSQL = \"select \".$this->getmapf('code').\" from products where \"; //whole words...\n\t\t \t\t\n\t foreach ($mt as $i=>$lex) {\n\t\t\n\t\t if (($la = trim($lex)) && (strlen($la)>4)) {//words max than 4 chars\n\t\t\n\t\t $ulex = strtoupper($lex);\n\t\t $dlex = strtolower($lex);\n \n\t\t $sqlout[$lex] = \"$itmname like '%$lex%' \";// or $itmdescr like '%$lex%' or $remarks like '%$lex%'\";// or \"; //as is\n\t\t //$sSQL .= \"$itmname like '% $ulex %' or $itmdescr like '% $ulex %' or $remarks like '% $ulex %' or \"; //upper case\t\t\n\t\t //$sSQL .= \"$itmname like '% $dlex %' or $itmdescr like '% $dlex %' or $remarks like '% $dlex %'\"; //lower case\t\t\n\t\t \n\t\t }//if lex\n\t\t} \n\t\t\n //print_r($sqlout); \n\t\tif ($sqlout) {\n\t\t $sSQL .= implode(' or ',$sqlout);\t\t \n\t\t return ($sSQL);\n\t\t}\n\t\telse\n\t\t return null;\n\t}", "function genesis_do_search_title() {\n\n\t$title = sprintf( '<div class=\"archive-description\"><h1 class=\"archive-title\">%s %s</h1></div>', apply_filters( 'genesis_search_title_text', __( 'Search results for: ', 'genesis' ) ), get_search_query() );\n\n\techo apply_filters( 'genesis_search_title_output', $title ) . \"\\n\";\n\n}", "public function filter();", "function search($query) {\n $query = Sanitize::escape($query);\n \t$fields = null;\n \t$titleResults = $this->find(\n\t\t\t'all',\n\t\t\tarray(\n\t\t\t\t'conditions' => \"{$this->name}.title LIKE '%$query%' and {$this->name}.draft=0\",\n\t\t\t\t'fields' => $fields\n\t\t\t)\n\t\t);\n \t$contentResults = array();\n \tif (empty($titleResults)) {\n \t\t$titleResults = array();\n\t\t\t$contentResults = $this->find(\n\t\t\t\t'all',\n\t\t\t\tarray(\n\t\t\t\t\t'conditions' => \"MATCH ({$this->name}.content) AGAINST ('$query')\",\n\t\t\t\t\t'fields' => $fields\n\t\t\t\t)\n\t\t\t);\n \t} else {\n \t\t$alredyFoundIds = join(', ', Set::extract($titleResults, '{n}.' . $this->name . '.id'));\n \t\t$notInQueryPart = '';\n \t\tif (!empty($alredyFoundIds)) {\n \t\t\t$notInQueryPart = \" AND {$this->name}.id NOT IN ($alredyFoundIds) AND {$this->name}.draft=0\";\n \t\t}\n \t\t$contentResults = $this->find(\n\t\t\t\t'all',\n\t\t\t\tarray(\n\t\t\t\t\t'conditions' => \"MATCH ({$this->name}.content) AGAINST ('$query')$notInQueryPart\",\n\t\t\t\t\t'fields' => $fields\n\t\t\t\t)\n\t\t\t);\n \t}\n \t\n \tif (!is_array(($contentResults))) {\n \t\t$contentResults = array();\n \t}\n \n \t$results = array_merge($titleResults, $contentResults);\n \treturn $results;\n }", "public function searchAllCommByTitleMovie($title)\n {\n $req = $this->pdo->prepare('SELECT id_movie FROM movies WHERE title = ? ORDER BY `date` DESC');\n $req->execute([$title]);\n return $req->fetchAll();\n }", "public function filterByTitle($title = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($title)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $title)) {\n\t\t\t\t$title = str_replace('*', '%', $title);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(QuizPeer::TITLE, $title, $comparison);\n\t}", "public function searchRecipesTitle($query) {\n $query = '%'.$query.'%';\n $this->db->query('SELECT * FROM recipes WHERE ( title LIKE ? )');\n $this->db->bind(1, $query);\n return $this->db->resultSet();\n }", "function get_page_by_title_filtered( $title ){\n $page = get_page_by_title_safely($title);\n return do_shortcode($page->post_content);\n}", "function getTitle()\n\t{\n\t\t\n\t\t$query = new Bin_Query();\t\n\t\t$title=$_GET['word'];\n\t\tif($title!='')\n\t\t{\n\t\t\t$sql= \"SELECT title FROM products_table WHERE title like '\".$title.\"%'\"; \n\t\t\t$query->executeQuery($sql);\n\t\t\t$arr=$query->records;\n\t\t\treturn Display_DManageProducts::getTitle($query->records);\t\t\t\t\t\n\t\t}\t\n\n\t}", "function getTitle() ;", "function generate_filter_the_archive_title( $title ) {\n\t\tif ( is_category() ) {\n\t\t\t$title = single_cat_title( '', false );\n\t\t} elseif ( is_tag() ) {\n\t\t\t$title = single_tag_title( '', false );\n\t\t} elseif ( is_author() ) {\n\t\t\t/*\n\t\t\t * Queue the first post, that way we know\n\t\t\t * what author we're dealing with (if that is the case).\n\t\t\t */\n\t\t\tthe_post();\n\t\t\t$title = sprintf( '%1$s<span class=\"vcard\">%2$s</span>',\n\t\t\t\tget_avatar( get_the_author_meta( 'ID' ), 75 ),\n\t\t\t\tget_the_author()\n\t\t\t);\n\t\t\t/*\n\t\t\t * Since we called the_post() above, we need to\n\t\t\t * rewind the loop back to the beginning that way\n\t\t\t * we can run the loop properly, in full.\n\t\t\t */\n\t\t\trewind_posts();\n\t\t}\n\n\t\treturn $title;\n\n\t}", "public function allRecordsByTitle(){\n\t $news = collect(DB::table('news')->get());\n\t return $news->sortBy('title');\n }", "function searchByTitle($title, $groupId=null, $parentId=null) {\n if(is_array($title)) {\n $where = ' i.title IN (\"'.implode('\", \"', array_map('db_es', $title)).'\")';\n } else {\n $where = ' i.title = '.$this->da->quoteSmart($title);\n }\n if($groupId !== null) {\n $where .= ' AND i.group_id = '.$this->da->escapeInt($groupId);\n }\n if($parentId !== null) {\n $where .= ' AND i.parent_id = '.$this->da->escapeInt($parentId);\n }\n\n $order = ' ORDER BY version_date DESC';\n return $this->_searchWithCurrentVersion($where, '', $order);\n }", "protected function getTitleQuery()\n {\n return $this->titleQuery;\n }", "public function scopeTitle($query, $title) {\n return $query->where('events.title_de', 'LIKE', '%' . $title . '%');\n }", "public function multiLoadTitles() {\n\t\t$table = self::table;\n\t\t\n\t\t$query = <<<SQL\nSELECT `id`, `course`, `number`, `title` FROM `%s{$table}` ORDER BY `title` ASC\nSQL;\n\n\t\treturn $this->clean($this->getUsingQuery($query));\n\t}", "public function searchTitle($title) {\n try {\n // escape quotes\n $checkTitle = str_replace(\"'\", \"''\", $title);\n // search the database, using wildcards\n $sql = \"SELECT * FROM books WHERE title LIKE '%$checkTitle%' ORDER BY author\";\n $stmt = $this->conn->query($sql);\n \n // fetch results as numeric array\n $result = $stmt->setFetchMode(PDO::FETCH_NUM);\n // show results in a list of update forms\n echo \"<br /><div id='searchResult'><h3>Title: -$title-</h3><ul>\";\n while ($row = $stmt->fetch()) {\n // call result form function\n $this->echoResultForm($row);\n }\n echo \"</ul></div>\";\n }\n catch(PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function search($title=null)\n {\n\n // $products = QueryBuilder::for(Product::class)->allowedFilters(['title'])->get();\n\n $products = Product::where([\"title\"=>$title])->orWhere([\"description\"=>$title])->orWhere([\"type\"=>$title])->get();\n return view('show_products',['products'=>$products]);\n }", "function getBasicDetailsByTitle($sek_title)\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n *\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n WHERE \";\r\n if (is_numeric(strpos(APP_SQL_DBTYPE, \"pgsql\"))) { //pgsql is case sensitive\r\n $stmt .= \" sek_title ILIKE \" . $db->quote($sek_title);\r\n } else {\r\n $stmt .= \" sek_title=\" . $db->quote($sek_title);\r\n }\r\n try {\r\n $res = $db->fetchRow($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n $res['sek_title_db'] = Search_Key::makeSQLTableName($res['sek_title']);\r\n return $res;\r\n }", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function filterByTitle($title = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($title)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $title)) {\n $title = str_replace('*', '%', $title);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ContactPeer::TITLE, $title, $comparison);\n }", "public function searchByTitle($title)\n {\n $searchUrl = $this->apiUrl.$this->apiKey.\"/search/movie/title/\".$title.\"/fuzzy\";\n $searchResponse = file_get_contents($searchUrl);\n $searchObj = json_decode($searchResponse, true);\n\n return $searchObj[\"results\"];\n }", "public function searchByTitle($title) \n {\n try {\n $data = VideoContent::where('title','LIKE','%'.$title.'%')->where('status', '=', true)->orderBy('ID', 'DESC')->paginate(10);\n if (!empty($data)) {\n $response = APIResponse('200', 'Success', $data);\n } else {\n $response = APIResponse('201', 'No data found.');\n }\n } catch (\\Throwable $e) {\n $response = APIResponse('201', $e->getMessage());\n }\n \n return $response;\n }", "public static function getNewsByTitle(string $title)\n {\n return self::where('title', 'like', '%'. $title .'%' )->get();\n }", "function title(){\n //variable collect info from url to check category\n $cat = $_GET['cat'];\n //varible collection from url for item no\n $s_no = $_GET['s_no'];\n //variable collect info from url to check the magazine id\n $id = $_GET['id'];\n //fetching title for acadmic\n if($cat==1){\n $table = $id.'_academic';\n $sql = \"SELECT title FROM `$table` WHERE s_no='$s_no'\";\n $result_title_sql = mysql_query($sql);\n if($result_title_sql){\n //fetch assotiative array from result\n $row = mysql_fetch_assoc($result_title_sql);\n //extract assotiative array from result\n extract($row);\n echo '<h1>'. $title.'</h1>'; \n }\n }\n //fetching title for _placement\n if($cat==2){\n $table = $id.'_placement';\n $sql = \"SELECT title FROM `$table` WHERE s_no='$s_no'\";\n $result_title_sql = mysql_query($sql);\n if($result_title_sql){\n //fetch assotiative array from result\n $row = mysql_fetch_assoc($result_title_sql);\n //extract assotiative array from result\n extract($row);\n echo '<h1>'. $title.'</h1>'; \n }\n }\n //fetching title for _sports\n if($cat==3){\n $table = $id.'_sports';\n $sql = \"SELECT title FROM `$table` WHERE s_no='$s_no'\";\n $result_title_sql = mysql_query($sql);\n if($result_title_sql){\n //fetch assotiative array from result\n $row = mysql_fetch_assoc($result_title_sql);\n //extract assotiative array from result\n extract($row);\n echo '<h1>'. $title.'</h1>'; \n }\n }\n //fetching title for _guest_visit\n if($cat==4){\n $table = $id.'_guest_visit';\n $sql = \"SELECT title FROM `$table` WHERE s_no='$s_no'\";\n $result_title_sql = mysql_query($sql);\n if($result_title_sql){\n //fetch assotiative array from result\n $row = mysql_fetch_assoc($result_title_sql);\n //extract assotiative array from result\n extract($row);\n echo '<h1>'. $title.'</h1>'; \n }\n }\n //fetching title for _new_in_lpu\n if($cat==5){\n $table = $id.'_new_in_lpu';\n $sql = \"SELECT title FROM `$table` WHERE s_no='$s_no'\";\n $result_title_sql = mysql_query($sql);\n if($result_title_sql){\n //fetch assotiative array from result\n $row = mysql_fetch_assoc($result_title_sql);\n //extract assotiative array from result\n extract($row);\n echo '<h1>'. $title.'</h1>'; \n }\n }\n //fetching title for _competition\n if($cat==6){\n $table = $id.'_competition';\n $sql = \"SELECT title FROM `$table` WHERE s_no='$s_no'\";\n $result_title_sql = mysql_query($sql);\n if($result_title_sql){\n //fetch assotiative array from result\n $row = mysql_fetch_assoc($result_title_sql);\n //extract assotiative array from result\n extract($row);\n echo '<h1>'. $title.'</h1>'; \n }\n }\n //fetching title for _activity\n if($cat==7){\n $table = $id.'_activity';\n $sql = \"SELECT title FROM `$table` WHERE s_no='$s_no'\";\n $result_title_sql = mysql_query($sql);\n if($result_title_sql){\n //fetch assotiative array from result\n $row = mysql_fetch_assoc($result_title_sql);\n //extract assotiative array from result\n extract($row);\n echo '<h1>'. $title.'</h1>'; \n }\n }\n //fetching title for _lpu_in_news\n if($cat==8){\n $table = $id.'_lpu_in_news';\n $sql = \"SELECT title FROM `$table` WHERE s_no='$s_no'\";\n $result_title_sql = mysql_query($sql);\n if($result_title_sql){\n //fetch assotiative array from result\n $row = mysql_fetch_assoc($result_title_sql);\n //extract assotiative array from result\n extract($row);\n echo '<h1>'. $title.'</h1>'; \n }\n }\n}", "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare( 'title' , $this->title , true );\n\n\t\t$criteria->compare( 'status' , $this->status );\n\n\t\treturn new CActiveDataProvider( 'Howto' ,\n\t\t\tarray(\n\t\t\t\t'criteria'=>$criteria,\n\t\t\t\t'sort'=>array(\n\t\t\t\t\t'defaultOrder'=>'status, update_time DESC',\n\t\t\t\t\t),\n\t\t\t\t));\n\t}", "function searchResults($results, $titlesOnly) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n{parse striping=\"searchStripe\" classes=\"row1,row2\"}\n<div id='search_results'>\n\t<ol>\n\t\t<if test=\"hasResults:|:is_array($results) && count($results)\">\n\t\t\t<foreach loop=\"results:$results as $result\">\n\t\t\t\t<if test=\"subResult:|:$result['sub']\">\n\t\t\t\t\t<li class='{parse striping=\"searchStripe\"} sub clearfix clear'>\n\t\t\t\t\t\t{$result['html']}\n\t\t\t\t\t</li>\n\t\t\t\t<else />\n\t\t\t\t\t<li class='{parse striping=\"searchStripe\"} clearfix clear'>\n\t\t\t\t\t\t{$result['html']}\n\t\t\t\t\t</li>\n\t\t\t\t</if>\n\t\t\t</foreach>\n\t\t</if>\n\t</ol>\n</div>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "function filter_wp_title( $title ) {\n\tglobal $page, $paged;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t$site_description = get_bloginfo( 'description' );\n\n\t$filtered_title = $title . get_bloginfo( 'name' );\n\t$filtered_title .= ( ! empty( $site_description ) && ( is_front_page() ) ) ? ' | ' . $site_description: '';\n\t$filtered_title .= ( 2 <= $paged || 2 <= $page ) ? ' | ' . sprintf( __( 'Page %s' ), max( $paged, $page ) ) : '';\n\n\treturn $filtered_title;\n}", "public function search($title)\n {\n return Posts::where('title', 'LIKE', '%' . $title . '%')->get();\n }", "public static function search($title)\n {\n\n self::dbConnect();\n\n $query = \"select * from \" . self::$table . \" where title like :title\";\n\n $stmt = self::$dbc->prepare($query);\n\n\t\t$title = \"%\" . $title . \"%\";\n\n $stmt->bindValue(':title', $title, PDO::PARAM_STR);\n $stmt->execute();\n\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\n return $results;\n\n\n }", "public function showTagsExceptByTitle($title)\n {\n $tags = Tags::where('title', '<>', $title)->get();\n if ($tags) {\n $response = [\n 'status' => '200',\n 'message' => 'Ok',\n 'data' => TagsResource::collection($tags)\n ];\n return response()->json($response, 200);\n }\n $response = [\n 'status' => '404',\n 'message' => 'Not Found',\n 'data' => []\n ];\n return response()->json($response, 404);\n }", "public function listAll(array $items = null){\n\t\t \n\t\tforeach($this->filters as $filter => $title){\n\t\t\tif(in_array($filter, $items)){\n\t\t\t\t$data[$filter] = $this->getProductList($filter);\n\t\t\t}else{\n\t\t\t\t$data[$filter] = array();\n\t\t\t}\n\t\t}\t\n\t \n\t\treturn $data;\n\t}", "function filter_chapel_hour_page_title( $title, $id = NULL ) {\n if ( is_post_type_archive( 'chapel_hour' ) ) {\n $title = 'Chapel Hour Episodes';\n }\n\n return $title;\n}", "public function scopeTitle($query, $input)\n {\n return $query->with('movie')->where('title', 'LIKE', '%'.$input.'%');\n /*$result = $query->with('movie')->where('title', 'LIKE', '%' . $input . '%')\n ->join('movie_tag', 'torrents.movie_id', '=', 'movie_tag.movie_id')\n ->join('tags', 'movie_tag.tag_id', '=', 'tags.id')->get();*/\n }", "public function searchTitles()\n\t{\n\t\t$this->connectToDatabase();\n\t\t$query = \"CALL albumTitlesSelect(\".\n\t\t\t$this->page->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->listingsLength->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->keyword->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->contentProperties->id->escapeSQL($this->mysqli).\",\".\n\t\t\t\"@total_matches);SELECT CAST(@total_matches AS UNSIGNED) as `total_matches`\";\n\t\t$data = $this->fetchRecordsNonExhaustive($query);\n\t\tif (!$data) {\n\t\t\tthrow new ResourceNotFoundException(\"Error retrieving album titles.\");\n\t\t}\n\t\t/* get record count from sproc results */\n\t\t$this->getSprocPageCount();\n\t\treturn ($data);\n\t}", "public function getTitleList()\n {\n return $this->getAllExternal('res.partner.title');\n }", "function testPartialSearch(): void\n {\n // Serpico\n // https://imdb.com/find?s=all&q=serpico\n\n $data = engineSearch('Serpico', 'imdb');\n // $this->printData($data);\n\n foreach ($data as $item) {\n $t = strip_tags($item['title']);\n $this->assertEquals($item['title'], $t);\n }\n }", "public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }", "abstract protected function getTitle();", "public static function getTitles( )\n {\n // get array with data. Through DAO this will be a bit of quicker.\n $query = 'SELECT id, title FROM ' . static::tableName();\n $records = Yii::app()\n ->db\n ->createCommand( $query )\n ->queryAll();\n\n // prepare result array\n $data = array();\n foreach( $records as $record ) {\n $data[ $record[ 'id' ] ] = $record[ 'title' ];\n }\n\n return $data;\n }", "public function wpcd_app_meta_or_title_search( $query ) {\n\n\t\tglobal $typenow;\n\n\t\t$post_type = 'wpcd_app';\n\t\t$title = $query->get( '_meta_or_title' );\n\t\tif ( is_admin() && $typenow === $post_type && $query->is_search() && $title ) {\n\t\t\tadd_filter(\n\t\t\t\t'get_meta_sql',\n\t\t\t\tfunction( $sql ) use ( $title ) {\n\t\t\t\t\tglobal $wpdb;\n\n\t\t\t\t\t// Only run once.\n\t\t\t\t\tstatic $nr = 0;\n\t\t\t\t\tif ( 0 !== $nr++ ) {\n\t\t\t\t\t\treturn $sql;\n\t\t\t\t\t}\n\n\t\t\t\t\t$server_meta_search = \"{$wpdb->postmeta}.meta_key = 'parent_post_id' AND {$wpdb->postmeta}.meta_value IN ( SELECT P.ID FROM {$wpdb->posts} AS P LEFT JOIN {$wpdb->postmeta} AS PM on PM.post_id = P.ID WHERE P.post_type = 'wpcd_app_server' and P.post_status = 'private' and ( ( PM.meta_key = 'wpcd_server_provider' AND PM.meta_value LIKE '\" . esc_sql( '%' . $wpdb->esc_like( $title ) . '%' ) . \"' ) OR ( PM.meta_key = 'wpcd_server_ipv4' AND PM.meta_value LIKE '\" . esc_sql( '%' . $wpdb->esc_like( $title ) . '%' ) . \"' ) OR ( PM.meta_key = 'wpcd_server_region' AND PM.meta_value LIKE '\" . esc_sql( '%' . $wpdb->esc_like( $title ) . '%' ) . \"' ) OR ( PM.meta_key = 'wpcd_server_name' AND PM.meta_value LIKE '\" . esc_sql( '%' . $wpdb->esc_like( $title ) . '%' ) . \"' ) ) )\";\n\n\t\t\t\t\t// Modified WHERE.\n\t\t\t\t\t$sql['where'] = sprintf(\n\t\t\t\t\t\t' AND ( (%s) OR (%s) OR (%s) ) ',\n\t\t\t\t\t\t$wpdb->prepare( \"{$wpdb->posts}.post_title LIKE '%%%s%%'\", $title ),\n\t\t\t\t\t\tmb_substr( $sql['where'], 5, mb_strlen( $sql['where'] ) ),\n\t\t\t\t\t\t$server_meta_search\n\t\t\t\t\t);\n\n\t\t\t\t\treturn $sql;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}", "public function scopeTitle($query, $title)\n {\n return $query->where('title', 'LIKE', $title);\n }", "public function searchTitleActionGet()\n {\n $title = \"Search for a movie by title\";\n $searchTitle = $this->app->request->getGet(\"searchTitle\");\n\n $this->app->db->connect();\n\n if ($searchTitle) {\n $sql = \"SELECT * FROM movie WHERE title LIKE ?;\";\n $res = $this->app->db->executeFetchAll($sql, [$searchTitle]);\n }\n\n $this->app->page->add(\"movie/search-title\", [\n \"searchTitle\" => $searchTitle,\n ]);\n if (isset($res)) {\n $this->app->page->add(\"movie/show-all\", [\n \"res\" => $res,\n ]);\n }\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "function getTitle();", "function getTitle();", "public function getPostsByTitle($query) \n\t{\n $q = \"SELECT * FROM in_posts WHERE title LIKE '%\".$query.\"%' AND publish_flag=1 ORDER BY publish_time DESC\";\n $ps = $this->execute($q);\n $result = $this->getDataRowsAsObjects($ps, 'Post');\n return $result;\n }", "function uvasomrfd_do_search_title() {\n\t$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );\n\tif(!is_page('27718')){\n\t//if (!strpos($_SERVER[\"REQUEST_URI\"], 'faculty-mentoring-undergraduates')) {\n\tif (is_tax( 'primary')||is_tax( 'training-grant')) {$preterm='Department of ';}\n\tif (is_tax( 'research-discipline')) {$preterm='Research Discipline: ';}\n\tif (is_tax( 'training-grant')) {$preterm='Training Program: ';}\n\t//if (strpos($_SERVER[\"REQUEST_URI\"], '?undergraduates')){$preterm='Faculty Accepting Undergraduates';$term->name='';}\n$title = sprintf( '<div class=\"clearfix\"></div><div id=\"uvasom_page_title\">'.genesis_do_breadcrumbs().'<h1 class=\"archive-title\">%s %s</h1>', apply_filters( 'genesis_search_title_text', __( $preterm, 'genesis' ) ), $term->name).'</div>';\n\techo apply_filters( 'genesis_search_title_output', $title ) . \"\\n\";\n\t}\n}", "function dvdinsideSearch($title)\n{\n global $dvdinsideServer, $cache;\n global $CLIENTERROR;\n\n $post = 'action=new&suchen=Suchen&title='.urlencode($title);\n\n $resp = httpClient($dvdinsideServer.'/db/search.php', $cache, array('post' => $post));\n\n if (!$resp['success']) $CLIENTERROR .= $resp['error'].\"\\n\";\n\n if (preg_match_all('/<a href=\\\"details.php\\?id\\=(.+?)\\\">(.+?)<\\/a>.+?<a href=\\\"studio_list.php.+?\\\">(.+?)<\\/a>.+?<td align=\\\"center\\\">(.+?)<\\/td>/is', $resp['data'], $data, PREG_SET_ORDER)) \n {\n foreach ($data as $row) \n {\n if (ereg('<img', $row[2])) continue;\n $info['id'] = \"DI\".trim($row[1]);\n $info['title'] = trim($row[2]);\n $info['studio'] = trim($row[3]);\n $info['datum'] = trim($row[4]);\n $ary[] = $info;\n }\n }\n\n return $ary;\t\n}", "public function scopeOfTitle($query, $title)\n {\n if (!empty($title)) {\n return $query->where('title', 'like', '%' . $title . '%');\n }\n return $query;\n }", "public function getMetaTitle() {\n\t\t$title = $this->data()->getTitle();\n\t\t$filter = $this->FilterDescription();\n\t\tif($filter) {\n\t\t\t$title = \"{$title} - {$filter}\";\n\t\t}\n\n\t\t$this->extend('updateMetaTitle', $title);\n\t\treturn $title;\n\t}", "function filter($param)\r\n\t{\r\n\r\n\t\t$this->view = false;\r\n\t\t$this->layout_name = false;\r\n\r\n\t\t$_SQL = Singleton::getInstance(SQL_DRIVER);\r\n\r\n\t\t$sql = \"SELECT `\" . $param[1] . \"` FROM `\" . $param[0] . \"` WHERE `\" . $param[1] . \"` LIKE '\" . $_SQL->sql_real_escape_string($_GET['q']) . \"%' \r\n\t\t ORDER BY `\" . $param[1] . \"` LIMIT 0,100\";\r\n\t\t$res = $_SQL->sql_query($sql);\r\n\r\n\t\twhile ( $ob = $_SQL->sql_fetch_object($res) )\r\n\t\t{\r\n\t\t\techo $ob->$param[1] . \"\\n\";\r\n\t\t}\r\n\t}", "public function get_title();", "function cheffism_title_filter( $title, $sep ) {\n global $page, $paged;\n\n if ( is_feed() )\n return $title;\n\n // Add a page number if necessary:\n if ( $paged >= 2 || $page >= 2 )\n $title = $title . $sep . sprintf( __( 'Page %s', 'cheffism' ), max( $paged, $page ) );\n\n return $title;\n}", "abstract public function getTitle();", "abstract public function getTitle();" ]
[ "0.6702894", "0.6588943", "0.6527202", "0.6277977", "0.6269519", "0.62318736", "0.62175643", "0.62144697", "0.6189405", "0.6187447", "0.6167427", "0.6132559", "0.6083699", "0.60716325", "0.60401464", "0.6022804", "0.6021748", "0.5904042", "0.58863455", "0.5860978", "0.5855963", "0.585513", "0.58102477", "0.579732", "0.57739514", "0.57428557", "0.57408094", "0.5731436", "0.5727507", "0.57189894", "0.5715727", "0.5706372", "0.5698623", "0.5672644", "0.5662546", "0.5661639", "0.5660567", "0.5657674", "0.5653146", "0.56389594", "0.563427", "0.56210995", "0.5617294", "0.5613536", "0.5612724", "0.56025", "0.55976397", "0.558158", "0.55721474", "0.55693024", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.5558565", "0.55572313", "0.5552312", "0.55337244", "0.5530382", "0.5528197", "0.552117", "0.55147827", "0.5508368", "0.55051637", "0.55004525", "0.5496921", "0.5495", "0.5493002", "0.5491685", "0.54890954", "0.5481453", "0.5470211", "0.546436", "0.5463345", "0.54614425", "0.54556984", "0.5454711", "0.5444801", "0.54427636", "0.54427636", "0.5430952", "0.5425893", "0.5420214", "0.54127663", "0.5402217", "0.53877825", "0.538777", "0.5383916", "0.538032", "0.538032" ]
0.5546052
67
Converts the received value to the Euro format
public static function euro($value) { if (! is_numeric($value)) { throw new Exception('[fieldRendererHelper::euro] The inserted value is not numeric!'); } return '€ '.number_format($value, 2, ',', '.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function currency_format_en($value) {\n $value = number_format($value, 2, '.', ',');\n $value = str_replace('.00', '', $value);\n return $value;\n }", "function european_format($amount)\n {\n //return $fmt->formatCurrency($amount, \"EUR\");\n return $amount;\n }", "function convertMoneyToCents($value){\n $value = preg_replace(\"/\\,/i\",\"\",$value);\n\n //to remove anything that is not a number, a dot or dash and replace it with an empty string\n $value = preg_replace(\"/([^0-9\\.\\-])/i\", \"\", $value);\n\n if(!is_numeric($value)){\n return 0.00;\n }\n\n $value = (float) $value;\n return round($value, 2) * 100;\n}", "public function price_to_s(){\n return number_format($this->price, 2, '€', '');\n }", "static function currency_format($value) {\n $value = number_format($value, 2, ',', '.');\n $value = str_replace(',00', '', $value);\n return $value;\n }", "function __formatCurrency($value)\n {\n if ($this->__init['definitions']['currency_type'] === 'dolar') {\n if (preg_match('/(([0-9]+)\\.([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode('.', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else if ($this->__init['definitions']['currency_type'] === 'real') {\n if (preg_match('/(([0-9]+)\\,([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode(',', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else return $value;\n }", "public function getPaiementEnEuro() {\n return $this->paiementEnEuro;\n }", "function to_price($amount = 0.00, $symbol = \"$\", $currency_code = \"USD\"){\n $amount = floatval($amount);\n return sprintf(\"%s%.2f %s\", $symbol, $amount, $currency_code);\n}", "public static function convertFahrenheitToCelsius($value)\n {\n if (is_array($value)) {\n foreach ($value as $key=>$v) {\n $value[$key] = self::convertFahrenheitToCelsius($v);\n }\n } else {\n $value = ($value - 32) * 5 / 9;\n }\n\n return $value;\n }", "function getfaircoin_price($price){\r\n global $edd_options;\r\n\r\n if( $price == 0 ) { // <span style=\"font-family:arial\">ƒ</span>\r\n $price = '1 Fair = '.number_format($edd_options['faircoin_price'], 2, '.', ',').' EUR';\r\n }\r\n return $price;\r\n}", "public function priceToEur($price,$currency){\r\n \t\t$from = $currency;\r\n\t\t$to = Mage::app()->getStore()->getCurrentCurrencyCode();\r\n\t\t$allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies(); \r\n\t\t$currencyRates = Mage::getModel('directory/currency')->getCurrencyRates('EUR', array_values($allowedCurrencies));\r\n\t\t$rate = 1/$currencyRates['USD'];\r\n\t\t$newPrice = $price*$rate;\r\n\t\treturn $newPrice;\r\n }", "function putEuroSymbolandSupTagDecimals($number) {\n\t$number = strval($number); // Convert to string.\n\n\tif (strpos($number,'.')) { // If the number is a float (i.e. contains a point).\n\t\t// Replace the point by an € and put the <sup> tags.\n\t\treturn str_replace(\".\", \"€<sup>\", $number).'</sup>';\n\t}\n\n\t// Return the number without any modification (except that we transformed it into a string).\n\treturn $number.'€';\n}", "function conv_money($uang){\n\t\t$uang_explode = explode('.',$uang);\n\t\tif($uang_explode[0] < '1,000'){\n\t\t\t$uang_res = $uang_explode[0];\n\t\t}else{\n\t\t\t$uang_res = str_replace(',','',$uang_explode[0]);\n\t\t}\n\t\treturn $uang_res;\n\t}", "function price () {\n global $value;\n $pricefloat = ceil($value['price']);\n\n if ($pricefloat <= 999) {\n echo $pricefloat;\n } elseif ($pricefloat >= 1000) {\n $num_format = number_format($pricefloat, 0, '.', ' ');\n echo $num_format . \" &#8381;\";\n }\n }", "public function formatPriceWithoutCurrency($value) {\n return Mage::getModel('directory/currency')->format($value, array('display' => Zend_Currency::NO_SYMBOL), false);\n }", "public function formatPriceWithoutCurrency($value) {\n return Mage::getModel('directory/currency')->format($value, array('display' => Zend_Currency::NO_SYMBOL), false);\n }", "static function toCurrency($amount)\r\n {\r\n return \"$\" . number_format((double) $amount, 2);\r\n }", "function format_currency($value, $symbol=true)\r\n{\r\n\r\n\tif(!is_numeric($value))\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$CI = &get_instance();\r\n\t\r\n\tif($value < 0 )\r\n\t{\r\n\t\t$neg = '- ';\r\n\t} else {\r\n\t\t$neg = '';\r\n\t}\r\n\t\r\n\tif($symbol)\r\n\t{\r\n\t\t$formatted\t= number_format(abs($value), 2,'.', ',');\r\n\t\t\r\n\t\t\t$formatted\t= $neg.'$'.$formatted;\r\n\t}\r\n\telse\r\n\t{\r\n\t\r\n\t\t//traditional number formatting\r\n\t\t$formatted\t= number_format(abs($value), 2, '.', ',');\r\n\t}\r\n\t\r\n\treturn $formatted;\r\n}", "public function iva_articulos_formato(){\r\n\t\t\t$importe = $this->iva_articulos();\r\n\t\t\t$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);\r\n\t\t\treturn $formatter->formatCurrency($importe, 'EUR');\r\n\t\t}", "public function setValue($value) {\n // this is an improvise\n // detect the currency by symbol,\n $currencySign = mb_substr($value, 0, 1, 'utf-8');\n // seperated out amount from currecy symbol, although this is not \n // correct but since data is missing from csv\n $this->value = (float) mb_substr($value, 1, mb_strlen($value) - 1, 'utf-8');\n $this->detectCurrencyBySign($currencySign);\n }", "function format($val) {\r\n //setlocale(LC_MONETARY, 'en_US');\r\n return number_format(money_format('%i', $val), 2);\r\n }", "function konv_to_money($money)\n\t{\n\t\t$money_r = number_format($money, 2, '.', ',');\n\t\treturn $money_r; // output : $5,000.00\n\t}", "public function currency($value): string\n {\n $class = '';\n if ($value instanceof Money) {\n $value = MoneyUtil::format($value);\n } else {\n $value = $this->Number->currency($value);\n }\n if ($value < 0) {\n $class = 'negative-balance';\n }\n\n return $this->Html->tag('span', $value, ['class' => $class]);\n }", "public function formatedPrice()\n {\n // if I format total amount of cart, use cart->total_price\n $amount = $this->price ? $this->price : $this->total_price;\n $fmt_price = new NumberFormatter('en', NumberFormatter::CURRENCY);\n \n return $fmt_price->formatCurrency($amount, \"EUR\");\n }", "public function formatPrice($value)\n\t{\n\t\treturn Mage::getSingleton('adminhtml/session_quote')->getStore()->formatPrice($value);\n\t}", "public function getValue(bool $inEuro = false);", "function Valores_sd($valor){\t\n\n return '$ '.number_format($valor,0,',','.');\n\n}", "function toMoney($val,$symbol='$',$r=2){\n\n\n $n = $val;\n $c = is_float($n) ? 1 : number_format($n,$r);\n $d = '.';\n $t = ',';\n $sign = ($n < 0) ? '-' : '';\n $i = $n=number_format(abs($n),$r);\n $j = (($j = strlen($i)) > 3) ? $j % 3 : 0;\n\n return $symbol.$sign .($j ? substr($i,0, $j) + $t : '').preg_replace('/(\\d{3})(?=\\d)/',\"$1\" + $t,substr($i,$j)) ;\n\n}", "public function getPrice()\n {\n return '£' . number_format($this->price, 2);\n }", "public function currency($value)\n {\n return config(\"customer_portal.currency_symbol\") . number_format($value, 2, config(\"customer_portal.decimal_separator\"), config(\"customer_portal.thousands_separator\"));\n }", "function ConvertCurrency($input_value, $input_currency_code, $target_currency_code) {\n // Convert input to base, then to target currency\n $rate_in = GetConversionRate($input_currency_code);\n $rate_out = GetConversionRate($target_currency_code);\n\n $output = ($input_value/$rate_in) * $rate_out;\n return number_format($output, 2, '.', '');\n }", "function format_price($price)\n{\n $price = number_format(ceil($price), 0, \".\", \" \");\n return $price . \" \" . \"₽\";\n}", "public function FMoney($v) { return number_format($v,2,',','.'); }", "public function getPriceValue($value)\n {\n return number_format($value, 2, null, '');\n }", "public function formatCurrency($amount);", "public function toMoney();", "public static function convertAmountToEuro($amount = 0, $currency)\n {\n $amount = intval($amount);\n\n return $amount * self::getExchangeRate($currency);\n }", "public function toCurrency()\n {\n return $this->amount * config('foria.tokens.value');\n }", "protected function getCurrencyValue($value)\n\t{\n\t\tif(preg_match('/[-+]?([0-9]*\\.)?[0-9]+([eE][-+]?[0-9]+)?/',$value,$matches))\n\t\t\treturn floatval($matches[0]);\n\t\telse\n\t\t\treturn 0.0;\n\t}", "function store_parse_decimal($value)\n {\n $point = config_item('store_currency_dec_point');\n $cleaned_value = preg_replace('/[^0-9\\-'.preg_quote($point, '/').']+/', '', $value);\n\n return str_replace($point, '.', $cleaned_value);\n }", "function Currency2Decimal($number, $reverse=0) {\n\n\n if($reverse===1) {\n $number = preg_replace('/[^0-9,]/', '', $number);\n $number = preg_replace('/[, ]/', '.', $number);\n $number = number_format($number, 2, '.', '');\n return $number;\n\n } else return number_format($number, 2, ',', '.');\n\n\n}", "public function cesta_con_iva_formato(){\r\n\t\t\t$importe = $this->cesta_con_iva();\r\n\t\t\t$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);\t\t\t\r\n\t\t\treturn $formatter->formatCurrency($importe, 'EUR');\r\n\t\t}", "function currency_format($amount) {\n\t$amount_ok = number_format($amount,2,',','.');\n\treturn $amount_ok;\n}", "public static function cleanContractValue($input)\n {\n // Strip whitespace\n $output = str_replace(' ', '', $input);\n\n // French currency ends with a dollar sign\n if (substr($output, -1) == '$') {\n // Look for a trailing comman used for demical place\n if (substr($output, -4, 1) == ',') {\n // Fudge in a period for decimal, comma stripped later\n $output = substr_replace($output, '.', -4, 1);\n }\n }\n\n $output = str_replace(['$', ','], '', $output);\n\n $output = floatval($output);\n\n return $output;\n }", "protected function escapeCurrency($price)\n {\n return preg_replace(\"/[^0-9\\.,]/\", '', $price);\n }", "function paysto_rub_currency_symbol($currency_symbol, $currency)\n{\n if ($currency == \"RUB\") {\n $currency_symbol = 'р.';\n }\n\n if ($currency == \"USD\") {\n $currency_symbol = '$';\n }\n\n return $currency_symbol;\n}", "public function getToCurrency()\n {\n return $this->toCurrency;\n }", "public function testCurrencyCode(): void\n {\n $cur = StringHelper::getCurrencyCode();\n StringHelper::setCurrencyCode('€');\n $fmt1 = '#,##0.000\\ [$]';\n $rslt = NumberFormat::toFormattedString(12345.679, $fmt1);\n self::assertEquals($rslt, '12,345.679 €');\n $fmt2 = '$ #,##0.000';\n $rslt = NumberFormat::toFormattedString(12345.679, $fmt2);\n self::assertEquals($rslt, '$ 12,345.679');\n StringHelper::setCurrencyCode($cur);\n }", "public function toEth(): string\n {\n return static::gweiToEth($this->value);\n }", "function KcToEur($koruny) {\n $euroKurz = 26; /* Spise nizsi (ale legalni) cislo! */\n return ceil($koruny / $euroKurz);\n}", "function format_price($number)\n{\n return number_format($number, 0, '', '&thinsp;');\n}", "function formatPrice2($price)\n{\n\t$price = @number_format($price, 2, '.', ' '); // Igor\n\treturn $price;\n}", "function format_raw($number, $currency_code = '', $currency_value = '') {\n global $currencies, $currency;\n \n if (empty($currency_code) || ! $currencies->is_set($currency_code)) {\n $currency_code = $currency;\n }\n \n if (empty($currency_value) || ! is_numeric($currency_value)) {\n $currency_value = $currencies->currencies[$currency_code]['value'];\n }\n return number_format(tep_round($number * $currency_value, $currencies->currencies[$currency_code]['decimal_places']), $currencies->currencies[$currency_code]['decimal_places'], '.', '');\n }", "function couponxl_format_price_number( $price ){\n\n\tif( !is_numeric( $price ) ){\n\t\treturn $price;\n\t}\n\t$unit_position = couponxl_get_option( 'unit_position' );\n\t$unit = '₹';\n\n\tif( $unit_position == 'front' ){\n\t\treturn $unit.number_format( $price, 2 );\n\t}\n\telse{\n\t\treturn $unit.number_format( $price, 2 );\n\t}\n}", "private function convertToCurrencyCode($price, $currency){\n\t\t\t\t\t\n\t\t// exchange rates are supplied in EUR so first convert it to GBP\n\t\t$GBPrate = $this->currencyRates['GBP'];\n\t\t\n\t\t$GBPrate = (float)$GBPrate * 100;\n\t\t\n\t\tif(!is_numeric($GBPrate)){\n\t\t\t$this->error = \"ERROR - there was an error converting the data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// get the amount of euros for £1 sterling\n\t\tif($currency == \"EUR\"){\n\t\t\treturn round(((1 / $GBPrate) * $price) * 100, 2); \n\t\t}\n\t\t\n\t\t// convert the sterling to euro\n\t\t$Euros = 1 / $GBPrate;\n\t\t\n\t\t// multiply the $price var with the euro value\n\t\t$Euros = $Euros * $price;\n\t\t\n\t\t// find the exchange rate for the currency required\n\t\t$currencyRate = $this->currencyRates[$currency];\n\t\t\n\t\t// output the calculation \n\t\treturn round(($Euros * $currencyRate) * 100, 2); \n\t\t\n\t}", "function rupiah($harga)\n{\n $hasil_harga = \"Rp. \" . number_format($harga, 2, ',', '.');\n return $hasil_harga;\n}", "public function amount_to_JSON($value)\n\t{\n\t\tif ( ! is_int($value))\n\t\t{\n\t\t\tlog_message('error', 'Bad data received for $value at bitcoin->amount_to_JSON()');\n\t\t\treturn NULL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (double) round($value * 1E-8, 8);\n\t\t}\n\t}", "public function isCurrencyEuro()\n {\n $currency = Shopware()->Shop()->getCurrency()->getCurrency();\n\n if ($currency != 'EUR') {\n return false;\n }\n return true;\n }", "function presentPrice($price)\n{\n // $currencies = new ISOCurrencies();\n // $numberFormatter = new \\NumberFormatter('en_US', \\NumberFormatter::CURRENCY);\n // $moneyFormatter = new IntlMoneyFormatter($numberFormatter, $currencies);\n // return $moneyFormatter->format($money);\n $fmt = new NumberFormatter('vi-VN', NumberFormatter::CURRENCY);\n return $fmt->formatCurrency($price, \"VND\");\n\n #en-US USD\n #vi-VN VND\n}", "public function convert($amount, Currency $currency);", "public static function convertEtherAmount($amount) {\n return (float)$amount / pow(10, 18);\n }", "public static function convert($value, $from = '$', $to = 'U$S')\n\t{\n\t\t$currencyFrom = Currency::find($from);\n\t\t$currencyTo = Currency::find($to);\n\n\t\t$dollarValue = $value / $currencyFrom->value;\n\n\t\t$toValue = round($dollarValue * $currencyTo->value);\n\n\t\treturn $toValue;\n\t}", "public function setPriceNettoAttribute($value)\n\t{\n\t\t$this->attributes['price_netto'] = str_replace(',', '.', $value);\n\t}", "function currency( $c_f_x )\t\r\n {\r\n \t$c_f_x = round($c_f_x, 2);\t//THIS WILL ROUND THE ACCEPTED PARAMETER TO THE \r\n \t\t\t\t\t\t\t //PRECISION OF 2\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n \t$temp_c_f_variable = strstr(round($c_f_x,2), \".\");\t//THIS WILL ASSIGN THE \".\" AND WHAT EVER \r\n \t\t\t\t\t\t\t\t//ELSE COMES AFTER IT. REMEMBER DUE TO \r\n \t\t\t\t\t\t\t\t//ROUNDING THERE ARE ONLY THREE THINGS\r\n \t\t\t\t\t\t\t\t//THIS VARIABLE CAN CONTAIN, A PERIOD \r\n \t\t\t\t\t\t\t\t//WITH ONE NUMBER, A PERIOD WITH TWO NUMBERS,\r\n \t\t\t\t\t\t\t\t//OR NOTHING AT ALL\r\n \t\t\t\t\t\t\t\t//EXAMPLE : \".1\",\".12\",\"\"\r\n\t\t\t\t\t\t\t\t\t\r\n \tif (strlen($temp_c_f_variable) == 2)\t//THIS IF STATEMENT WILL CHECK TO SEE IF \r\n \t\t\t\t\t\t//LENGTH OF THE VARIABLE IS EQUAL TO 2. IF\r\n \t\t\t\t\t\t//IT IS, THEN WE KNOW THAT IT LOOKS LIKE \r\n \t\t\t\t\t\t//THIS \".1\" SO YOU WOULD ADD A ZERO TO GIVE IT \r\n \t\t\t\t\t\t// A NICE LOOKING FORMAT \r\n \t{\r\n \t\t$c_f_x = $c_f_x . \"0\";\r\n \t}\r\n\t\t\r\n \tif (strlen($temp_c_f_variable) == 0)\t//THIS IF STATEMENT WILL CHECK TO SEE IF \r\n \t\t\t\t\t\t//LENGTH OF THE VARIABLE IS EQUAL TO 2. IF\r\n \t\t\t\t\t\t//IT IS, THEN WE KNOW THAT IT LOOKS LIKE \r\n \t\t\t\t\t\t//THIS \"\" SO YOU WOULD ADD TWO ZERO'S TO GIVE IT \r\n \t\t\t\t\t\t// A NICE LOOKING FORMAT\r\n \t{\r\n \t\t$c_f_x = $c_f_x . \".00\";\r\n \t}\r\n\t\t\r\n\t\t$c_f_x = \"$\" . $c_f_x;\t//THIS WILL ADD THE \"$\" TO THE FRONT \r\n\r\n \treturn $c_f_x;\t//THIS WILL RETURN THE VARIABLE IN A NICE FORMAT\r\n \t\t\t\t\t//BUT REMEMBER THIS NEW VARIABLE WILL BE A STRING \r\n \t\t\t\t\t//THEREFORE CAN BE USED IN ANY FURTHER CALCULATIONS\r\n \t\t\r\n }", "public function convertPrice($price=0){\n return $this->priceCurrency->convert($price);\n }", "function moneyFormat($amount) {\n try {\n return number_format($amount, 2, '.', ',');\n } catch (Exception $e) {\n return $amount;\n }\n }", "public function getFormattedPrice(): string\n {\n\n return number_format($this->price, 0, '', ' ');\n\n }", "public function cesta_sin_iva_formato(){\r\n\t\t\t$importe = $this->cesta_sin_iva();\r\n\t\t\t$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);\r\n\t\t\treturn $formatter->formatCurrency($importe, 'EUR');\r\n\t\t}", "function money($price,$decimals = 2)\n {\n return number_format($price,$decimals);\n }", "function dinheiroParaBr($valor) {\n \t$valor = number_format($valor, 2, ',', '.');\n \treturn $valor;\n}", "public function getCurrency(): string;", "public function getCurrency(): string;", "function Cantidades_sd($valor){\t\n\n return number_format($valor,0,',','.');\n\n}", "public static function convertExponentialToString($value)\n {\n if (!is_float($value)) {\n return $value;\n }\n\n $result = explode('E', strtoupper($value));\n\n if (count($result) === 1) {\n return $result[0];\n }\n\n $dotSplitted = explode('.', $result[0]);\n\n return '0.' . str_repeat('0', abs($result[1]) - 1) . $dotSplitted[0];\n }", "function Formato1($val){\r\n return number_format($val,0,\",\",\".\");\r\n }", "function precioNumero($itemPrecio){ \n $precio = str_replace('$','',$itemPrecio); //Eliminar el símbolo \n $precio = str_replace(',','',$precio); //Eliminar la coma \n return $precio; //Devolver el valor de tipo Numero sin caracteres especiales\n }", "function format_raw($number, $currency_code = '', $currency_value = '')\n {\n global $currencies, $currency;\n\n if (empty($currency_code) || !$this->is_set($currency_code)) {\n $currency_code = $currency;\n }\n\n if (empty($currency_value) || !is_numeric($currency_value)) {\n $currency_value = $currencies->currencies[$currency_code]['value'];\n }\n\n return number_format(tep_round($number * $currency_value, $currencies->currencies[$currency_code]['decimal_places']), $currencies->currencies[$currency_code]['decimal_places'], '.', '');\n }", "function number_format( $price, $decimals = 2 ) {\n return number_format_i18n( floatval($price), $decimals );\n }", "function convertCurToIUSD($url, $amount, $api_key, $currencySymbol) {\n error_log(\"Entered into Convert CAmount\");\n error_log($url.'?api_key='.$api_key.'&currency='.$currencySymbol.'&amount='. $amount);\n $ch = curl_init($url.'?api_key='.$api_key.'&currency='.$currencySymbol.'&amount='. $amount);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json')\n );\n\n $result = curl_exec($ch);\n $data = json_decode( $result , true);\n error_log('Response =>'. var_export($data, TRUE));\n // Return the equivalent value acquired from Agate server.\n return (float) $data[\"result\"];\n\n }", "function moneyFormatIndia($num,$pointString=\"\") {\n\n $explrestunits = \"\" ;\n if(strlen($num)>3){\n $lastthree = substr($num, strlen($num)-3, strlen($num));\n $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits\n $restunits = (strlen($restunits)%2 == 1)?\"0\".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.\n $expunit = str_split($restunits, 2);\n for($i=0; $i<sizeof($expunit); $i++){\n // creates each of the 2's group and adds a comma to the end\n if($i==0)\n {\n $explrestunits .= (int)$expunit[$i].\",\"; // if is first value , convert into integer\n }else{\n $explrestunits .= $expunit[$i].\",\";\n }\n }\n $thecash = $explrestunits.$lastthree;\n } else {\n $thecash = $num;\n }\n\n\tif(strlen($pointString>0))\n\t\t$thecash = (string) $thecash . \".\" . $pointString;\n else\n\t\t$thecash = (string) $thecash . \".00\";\n\treturn $thecash; // writes the final format where $currency is the currency symbol.\n}", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "public function __toString()\n {\n $locale = setlocale(LC_ALL, 0);\n if ($locale && 'C' !== $locale) {\n return trim(money_format('%(#1n', (float) $this->bedrag));\n }\n\n // or fallback\n return '€ '.number_format((float) $this->bedrag, 2, ',', '.');\n }", "public static function gweiToEth(string $value): string\n {\n return rtrim(rtrim(bcmul($value, static::$ether, 18), '0'), '.');\n }", "function format_money($amount) {\r\n // prefixes the result with 'GBP', we remove that here.\r\n return substr(money_format(\"%.0i\", $amount), 3);\r\n}", "public function peso_cesta_formato(){\r\n\t\t\t$p = $this->peso_cesta();\r\n\t\t\treturn number_format($p,2,\",\",\".\");\r\n\t\t}", "function Valores_cd($valor){\t\n\n return '$ '.number_format($valor,4,',','.');\n\n}", "function tPrice( $fPrice ){\n return sprintf( '%01.2f', $fPrice );\n }", "function appliquerTVA($prixHT, $TVA) {\n $prixTTC = $prixHT + ($prixHT * $TVA / 100);\n echo \"Le prix TTC est de \";\n return $prixTTC . \"€\";\n}", "function moneyFormatIndia($num) {\n $explrestunits = \"\" ;\n if(strlen($num)>3) {\n $lastthree = substr($num, strlen($num)-3, strlen($num));\n $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits\n $restunits = (strlen($restunits)%2 == 1)?\"0\".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.\n $expunit = str_split($restunits, 2);\n for($i=0; $i<sizeof($expunit); $i++) {\n // creates each of the 2's group and adds a comma to the end\n if($i==0) {\n $explrestunits .= (int)$expunit[$i].\",\"; // if is first value , convert into integer\n } else {\n $explrestunits .= $expunit[$i].\",\";\n }\n }\n $thecash = $explrestunits.$lastthree;\n } else {\n $thecash = $num;\n }\n return $thecash; // writes the final format where $currency is the currency symbol.\n }", "protected function priceFormat($value)\n\t{\n\t\treturn '$' . $value;\n\t}", "public static function formatMoneyToDatabase(string $value) : string\n {\n $array = explode(' ', $value);\n\n if ($array[0] === 'R$') {\n return str_replace(['.', ','], ['', '.'], $array[1]);\n }\n\n return str_replace(['.', ','], ['', '.'], $array[0]);\n }", "function stringToDouble ($value)\n {\n if (!$value)\n $value = \"0.0\";\n\n return str_replace (',', '.', $value);\n }", "function value()\r\n {\r\n return number_format( $this->Value, 4, \".\", \"\" );\r\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function maybe_update_currency_to_euro() {\n global $wpdb;\n\n $current_version = $this->config->get( 'version' );\n\n // check, if the current version is greater than or equal 0.9.8\n if ( version_compare( $current_version, '0.9.8', '>=' ) ) {\n\n // map old values to new ones\n $meta_key_mapping = array(\n 'Teaser content' => 'laterpay_post_teaser',\n 'Pricing Post' => 'laterpay_post_pricing',\n 'Pricing Post Type' => 'laterpay_post_pricing_type',\n );\n\n $this->logger->info(\n __METHOD__,\n array(\n 'current_version' => $current_version,\n 'meta_key_mapping' => $meta_key_mapping,\n )\n );\n\n // update the currency to default currency 'EUR'\n update_option( 'laterpay_currency', $this->config->get( 'currency.default' ) );\n\n // remove currency table\n $sql = 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'laterpay_currency';\n $wpdb->query( $sql );\n }\n }", "public function getPriceNettoAttribute($value)\n\t{\n\t\treturn str_replace('.', ',', $value);\n\t}", "public static function formatCurrencyUsing($callback)\n {\n static::$formatCurrencyUsing = $callback;\n }", "function dec($value, $precision = 2)\n {\n if (strpos($value, ',') > 0) {\n $value = str_replace(\".\", \"\", $value);\n $value = str_replace(\",\", \".\", $value);\n } elseif (substr_count($value, \".\") > 1) {\n $new_num = \"\";\n $count = substr_count($value, \".\");\n $array = explode('.', $value);\n foreach ($array as $key => $number) {\n if ($key == $count) {\n $new_num .= \".\" . $number;\n } else {\n $new_num .= $number;\n }\n }\n $value = $new_num;\n }\n $value = bcmul($value, 100, $precision);\n $value = bcdiv($value, 100, $precision);\n return $value;\n }", "function MoneyToFloat($zMoney) {\n\n /*--- Local Variables ---*/\n\n $laundermoney = null;\n $dollars = null;\n $cents = null;\n\n /*--- Start of Processing ---*/\n\n $zMoney = str_replace(\"$\",\"\",$zMoney);\n\n if(strrchr($zMoney,\",\") )\n {\n $gMoney = str_replace(\",\",\"\",$zMoney); \n if( strrchr($gMoney,\".\") )\n {\n $dollars = strtok($gMoney,\".\");\n $cents= strtok(\".\");\n }\n else\n $dollars = $gMoney;\n }\n else if( strrchr($zMoney,\".\") )\n {\n $dollars = strtok($zMoney,\".\");\n $cents= strtok(\".\");\n }\n else\n {\n $dollars = $zMoney;\n $cents = 0;\n } \n\n $laundermoney = $dollars.\".\".$cents;\n\n (float)$laundermoney = $laundermoney;\n \n return($laundermoney);\n}" ]
[ "0.6946296", "0.6927172", "0.64700776", "0.6387634", "0.6357601", "0.6298162", "0.6116194", "0.61106825", "0.61036587", "0.60473263", "0.5987716", "0.5959169", "0.5951928", "0.59432983", "0.5928837", "0.5928837", "0.5868156", "0.58627117", "0.5862655", "0.5859593", "0.58593094", "0.58535737", "0.5852552", "0.58451945", "0.5791396", "0.5782672", "0.5778165", "0.5764811", "0.5749793", "0.57399505", "0.5725065", "0.57183003", "0.5686095", "0.56518704", "0.5648219", "0.5645918", "0.5640423", "0.56399924", "0.5639161", "0.56390387", "0.5629668", "0.5623705", "0.56128424", "0.5593434", "0.5592563", "0.5585037", "0.5566962", "0.5554801", "0.554955", "0.55318356", "0.55292207", "0.5527307", "0.5511052", "0.55063856", "0.55062485", "0.549448", "0.5493335", "0.5469062", "0.5449738", "0.54425114", "0.54375136", "0.54323006", "0.54165214", "0.5413783", "0.54076487", "0.53975004", "0.5391831", "0.53905445", "0.539001", "0.5384943", "0.5383605", "0.5383605", "0.538267", "0.53798985", "0.5374312", "0.5373162", "0.5364464", "0.53626305", "0.5355264", "0.5351462", "0.5334011", "0.53334713", "0.53303814", "0.53202915", "0.53193474", "0.531611", "0.53159523", "0.53142035", "0.5311353", "0.53043956", "0.5301825", "0.5300385", "0.5296198", "0.5293258", "0.5293258", "0.5286924", "0.5281665", "0.52663887", "0.5264221", "0.5258749" ]
0.7648277
0
Converts the received value to percentual format with two decimal places
public static function perc($value) { if (! is_numeric($value)) { throw new Exception('[fieldRendererHelper::perc] The inserted value is not numeric!'); } return number_format($value, 2, ',', '.').' %'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function porcentaje($valor){\t\n $porcentaje = $valor *100;\n return number_format($porcentaje,0,',','.').' %';\n\n}", "function nyscaa_report_format_pct($value, $digit = 1){\n\tif ($value == 0) {\n\t\treturn \"0%\";\n\t}else{\n\t\treturn number_format($value, $digit) . \"%\";\n\t}\n}", "public static function toPercentage($value)\n {\n $value = $value * 100;\n return $value;\n }", "public function getAmountAsPercentage();", "public static function convertPercent($percent)\n {\n // convert percent to display format\n return number_format($percent / 100, 2, '.', '');\n }", "function promedio($total,$cantidad){\n return number_format($cantidad*100/$total,0);\n}", "function percentage ($number, $percentageof, $make_string = true)\n{\n\t// Don't divide by zero \n\tif ($percentageof == 0)\n\t{\n\t\treturn ($make_string ? 'N/A' : false);\n\t}\n\t\n\t$value = ($number / $percentageof) * 100;\n\t\n\tif ($make_string)\n\t{\n\t\t$value = sprintf('%0.2f%%', $value);\n\t}\n\t\n\treturn $value;\n}", "public function percentChanged()\n {\n if ($this->value == 0) {\n $value = $this->previous;\n } elseif ($this->previous == 0) {\n $value = $this->value;\n } else {\n $value = ($this->previous - $this->value) / $this->previous;\n }\n\n return round(abs($value) * 100, 2) * ($this->value >= $this->previous ? 1 : -1);\n }", "public function getValorAttribute($valor){\n return number_format($valor / 100, 2, '.', '');\n }", "public function cast($value): string\n {\n return (string) number_format((float) $value / 100, 2);\n }", "function percentage_rate($value, $append_plus = false)\n {\n $percentage = (float)$value;\n\n if($percentage > 0) {\n return ($append_plus ? \"+\" : \"\").$percentage.\"%\";\n } else {\n return $percentage.\"%\";\n }\n }", "public function tipo_iva_cesta_formato(){\r\n\t\t\t$iva = $this->tipo_iva_cesta();\t\t\t\r\n\t\t\treturn number_format($iva,2,\",\",\".\").'%';\r\n\t\t}", "public function getPercentageSecondConversion()\n {\n $percent = 0;\n $nbSent = $this->getNbSecondReminderSent();\n if ($nbSent) {\n $nbConverted = $this->getNbSecondReminderConverted();\n $percent = $nbConverted / $nbSent * 100;\n }\n\n return $percent;\n }", "public function bindPercentOf($value, $percent)\n {\n return round($value * ($percent / 100), 4);\n }", "public function valor($valor) {\n\n @$formatado = number_format(($valor / 100), 2, ',', '.');\n return $formatado;\n }", "function ppom_get_amount_after_percentage($base_amount, $percent) {\n\t\n\t$base_amount = floatval($base_amount);\n\t$percent_amount = 0;\n\t$percent\t\t= substr( $percent, 0, -1 );\n\t$percent_amount\t= wc_format_decimal( (floatval($percent) / 100) * $base_amount, wc_get_price_decimals());\n\t\n\treturn $percent_amount;\n}", "public function getPercentageConversion()\n {\n $percent = 0;\n\n $numberSent = $this->getSumNbReminderSent();\n if ($numberSent > 0) {\n $nbConvertedCarts = $this->getSumNbConvertedCarts();\n $percent = $nbConvertedCarts / $numberSent * 100;\n }\n\n return $percent;\n }", "public function FMoney($v) { return number_format($v,2,',','.'); }", "protected static function fixPercentageValue(array $value) {\n if ($value['unit'] === '%') {\n return $value['metric'] / 100;\n } else {\n return $value['metric'];\n }\n }", "public function getPercent()\n {\n return $this->readOneof(2);\n }", "public function positivePercent(){\n\t\treturn round($this->positive*100/($this->positive+$this->negative+$this->indeterminate), 2);\n\t}", "function percentage_rate_class($value, $base = 50)\n {\n if(!is_numeric($value)) {\n $value = 0;\n }\n\n $percentage = (float)$value;\n\n if($percentage == 100) {\n return 'excelent';\n }\n\n if($percentage == 0) {\n return 'neutral';\n }\n\n if($percentage < $base) {\n return 'poor';\n }\n\n return 'ok';\n }", "public function getPercentageDiscountPrice()\n {\n return $this->percentage_discount_price . ' %';\n }", "public static function percentage(int $count, int $total, int $precision = 2): string\n {\n return number_format(round(($count / ($total <= 0 ? 1 : $total)) * 100, $precision), $precision);\n }", "public function getPercent()\n {\n return $this->helper->getPercent();\n }", "public function viewPrice()\n {\n return number_format($this->price/100, 2);\n }", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "public function getPercent() {\n return $this->percent;\n }", "function kira2($dulu,$kini)\n{\n return @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n //@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "protected function computePercentage($orderValue, $discountPercentage) { \n\n $percentInDecimal = $discountPercentage / 100;\n $percent = $percentInDecimal * $orderValue;\n return number_format((float)$percent, 2, '.', '');;\n }", "public function getIptPercent();", "protected function priceFormat($price)\n {\n return number_format((float)$price, 2, '.', '') * 100;\n }", "function formatPrice2($price)\n{\n\t$price = @number_format($price, 2, '.', ' '); // Igor\n\treturn $price;\n}", "function Cantidades_cd($valor){\t\n\n return number_format($valor,3,',','.');\n\n}", "public function getPercentage()\n {\n return $this->percentage;\n }", "public function calculatePercentage($decimal = 1)\n {\n //Percentage not found\n if (! $this->has('percentage')) {\n return;\n }\n //Calculate percentage and return value\n return (float) number_format($this->get('percentage') * 100, $decimal, '.', '');\n }", "public function getPercent()\n {\n return $this->percent;\n }", "private static function renderFloat($value)\n {\n return Yii::$app->formatter->asDecimal($value);\n }", "public static function round2f($val)\n {\n return sprintf('%.2f', (double)$val);\n }", "function fixPercent($var)\n\t{\n\t\t$var = str_replace(\"%20\",\" \",$var);\n\t\treturn $var;\n\t\t\n\t}", "public function percentSwitchedOut() : float\n\t{\n\t\treturn $this->percentSwitchedOut;\n\t}", "public function getFormattedPriceAttribute()\n {\n //attributes['price']\n return number_format(($this->attributes['price'] / 100), 2, '.', '');\n }", "public function getPerfection(): float\n {\n return round($this->getTotal() / 45, 3) * 100;\n }", "public static function percent($decimal, ORM $object = NULL)\n {\n return (double) $decimal * 100.0;\n }", "function Cantidades_sd($valor){\t\n\n return number_format($valor,0,',','.');\n\n}", "private function numberFormat($value) : float\n {\n return round($value, 2);\n }", "public static function getPercentClass($value)\n\t{\n\t\tswitch ($value)\n\t\t{\n\t\t\tcase 0:\n\t\t\tcase ($value < 50):\n\t\t\t\treturn 'important';\n\t\t\tcase ($value < 75):\n\t\t\t\treturn 'warning';\n\t\t\tcase ($value < 100):\n\t\t\t\treturn 'info';\n\t\t\tcase 100:\n\t\t\t\treturn 'default';\n\t\t\tcase ($value > 100):\n\t\t\t\treturn 'success';\n\t\t}\n\t}", "public function get_percent_donated() {\r\n\t\t$percent = $this->get_percent_donated_raw();\r\n\r\n\t\tif ( false === $percent ) {\r\n\t\t\treturn $percent;\r\n\t\t}\t\t\r\n\r\n\t\treturn apply_filters( 'charitable_percent_donated', $percent.'%', $percent, $this );\r\n\t}", "public static function percent($suiteResults) {\n $sum = $suiteResults['pass'] + $suiteResults['fail'];\n return round($suiteResults['pass'] * 100 / max($sum, 1), 2);\n }", "function approximate($val, $decimal_points = 2) {\n return number_format($val, $decimal_points);\n}", "function Formato1($val){\r\n return number_format($val,0,\",\",\".\");\r\n }", "function discount_percent($sell_price,$price)\n {\n $rs_off=$price-$sell_price;\n $percentage=floor($rs_off*100/$price);\n return $percentage;\n }", "function vcex_validate_px_pct( $input ) {\n\tif ( ! $input ) {\n\t\treturn;\n\t}\n\tif ( 'none' === $input || '0px' === $input ) {\n\t\treturn '0';\n\t}\n\tif ( strpos( $input, '%' ) ) {\n\t\treturn wp_strip_all_tags( $input );\n\t}\n\tif ( $input = floatval( $input ) ) {\n\t\treturn wp_strip_all_tags( $input ) . 'px';\n\t}\n}", "function dinheiroParaBr($valor) {\n \t$valor = number_format($valor, 2, ',', '.');\n \treturn $valor;\n}", "public function getAmountPercentageAttribute()\n {\n return $this->is_percentage ? $this->amount : 0;\n }", "function display()\n{\n global $ASP1, $ASP2, $SH, $MR, $SB;\n $SH2 = $SB + $SH;\n $ASP2 = (($SB * $MR) + ($SH * $ASP1)) / $SH2;\n echo sprintf ( \"%12d | %6d | %8.2f | Rs. %9.2f | %5.0f %% | %6d\\n\", $ASP2, $SB, $MR, $MR * $SB,\n (100 * ($ASP1 - $ASP2) / $ASP1), $SH2 );\n}", "function percentageToHex($percentage)\n{\n //percentage must be 1(100%) to 0\n $maximum=16777215;\n $temp1=$maximum*$percentage;\n $temp2=strval($temp1);\n base_convert($temp2,10,16);\n return $temp2;\n}", "public function getPercentage() {\n\t\t$percentage = \"\";\n\t\t\n\t\tif ($this->getIsRace() == true) {\n\t\t\t$placement = $this->_placement;\n\t\t\t$field = $this->_field;\n\t\t\t$percentage = round($placement / $field * 100).\"%\";\n\t\t}\n\t\t\n\t\treturn $percentage;\n\t\t\n\t}", "static function round2($wat){\n return floor($wat * 100) / 100;\n }", "public static function PulseStringInPercent($pulse, $hf_max = 0) {\r\n\t\tif ($hf_max == 0)\r\n\t\t\t$hf_max = HF_MAX;\r\n\t\t\r\n\t\treturn round(100*$pulse / $hf_max).'&nbsp;&#37;';\r\n\t}", "public function getPriceAttribute($value)\n {\n return $value/100;\n }", "public function barPercentage($val)\n {\n return $this->options(['barPercentage' => $val]);\n }", "function simpay_custom_form_157_tax_percent() {\n\n\t// Change to 25%\n\treturn 25;\n}", "function value()\r\n {\r\n return number_format( $this->Value, 4, \".\", \"\" );\r\n }", "public static function percent($total, $perc, $round = 2)\n {\n return round($total * $perc / 100, $round);\n }", "public static function percentage($total, $part, $round = 2)\n {\n if ($total <= 0.0000) {\n return 0;\n }\n return round($part * 100.00 / $total, $round);\n }", "public function getPercentage(int $round = 2): float\n {\n return round($this->coefficient * 100, $round);\n }", "public static function getPercentage($val1 = 0, $val2 = 0)\n {\n $percentage = 0;\n if($val1 > 0 && $val2 > 0)\n {\n $percentage = intval(($val1 / $val2) * 100);\n }\n\n return $percentage;\n }", "public function getPercentageThirdConversion()\n {\n $percent = 0;\n $nbSent = $this->getNbThirdReminderSent();\n if ($nbSent) {\n $nbConverted = $this->getNbThirdReminderConverted();\n $percent = $nbConverted / $nbSent * 100;\n }\n\n return $percent;\n }", "function formatAmountSimply($v,$t=1){\n return number_format($v,2,'.',',');\n}", "private static function formatParameterValue($value) {\n\t\t$dotPos = strrpos($value, '.');\n\t\t$commaPos = strrpos($value, ',');\n\n\t\t$sep = false;\n\t\tif ($dotPos && $dotPos > $commaPos) { $sep = $dotPos; }\n\t\tif ($commaPos && $commaPos > $dotPos) { $sep = $commaPos; }\n\n\t\tif (!$sep) {\n\t\t\treturn floatval(preg_replace(\"/[^0-9]/\", \"\", $value));\n\t\t}\n\n\t\treturn floatval(\n\t\t\tpreg_replace(\"/[^0-9]/\", \"\", substr($value, 0, $sep)) . '.' .\n\t\t\tpreg_replace(\"/[^0-9]/\", \"\", substr($value, $sep+1, strlen($value)))\n\t\t);\n\t}", "function getPayoutPercentage()\n {\n $payoutPercentageSqlString = \"SELECT payoutpercentage FROM parameters\";\n $payoutReply = safeQuery($payoutPercentageSqlString);\n $payoutRow = $payoutReply[0];\n $payoutPercentage = $payoutRow['payoutpercentage'];\n\n return $payoutPercentage;\n }", "public function getTotalPercentageConversion()\n {\n $percent = 0;\n\n $numberSent = $this->getTotalSumNbReminderSent();\n if ($numberSent > 0) {\n $nbConvertedCarts = $this->getTotalSumNbConvertedCarts();\n $percent = $nbConvertedCarts / $numberSent * 100;\n }\n\n return $percent;\n }", "public static function complete_percentage($model, $table_name, $user_id){\n $pos_info = DB::select(DB::raw('SHOW COLUMNS FROM '.$table_name));\n $base_columns = count($pos_info);\n $not_null = 0;\n foreach ($pos_info as $col){\n $not_null += app('App\\\\'.$model)::selectRaw('SUM(CASE WHEN '.$col->Field.' IS NOT NULL THEN 1 ELSE 0 END) AS not_null')->where('user_id', '=', $user_id)->first()->not_null;\n }\n $alter = $base_columns - 6;\n $value = $not_null / $alter *100;\n $value = round($value, 2);\n return $value;\n }", "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 }", "function getUtilisation(){\n\n $total = $this-> getTotalWeight() ;\n \n return round(($total / $this->capacity) * 100, 2);\n\n }", "public function __toString() : string\n {\n return round($this->calculate(), 3) . ' %';\n }", "function persenalokasi ($anggaran,$total) {\r\n $persen = ($anggaran / $total) * 100;\r\n return $persen;\r\n }", "public function getPercentageFirstConversion()\n {\n $percent = 0;\n $nbSent = $this->getNbFirstReminderSent();\n if ($nbSent) {\n $nbConverted = $this->getNbFirstReminderConverted();\n $percent = $nbConverted / $nbSent * 100;\n }\n\n return $percent;\n }", "function vatAmount($value = 0, $vat_percent = 20)\n{\n return ($vat_percent / 100) * $value;\n}", "static function currency_format_en($value) {\n $value = number_format($value, 2, '.', ',');\n $value = str_replace('.00', '', $value);\n return $value;\n }", "public function fix_percentage() {\n\t\t// Iterate each Antimicrobic\n\t\tfor ($i = 0; $i < $this->antimicrobics->size; $i++) {\n\t\t\t$value = $this->antimicrobics->get($i)->get_value();\n\n\t\t\t// Iterate each value and subtract his previous;\n\t\t\t$ticks = array_keys($value);\n\t\t\tend($ticks);\n\t\t\twhile ($tick = current($ticks)) {\n\t\t\t\t\n\t\t\t\t$prev_tick = prev($ticks);\n\t\t\t\tif ( (false !== $prev_tick) && ($value[$tick] !== 0) )\n\t\t\t\t\t$this->antimicrobics->get($i)->value[$tick] -= $value[$prev_tick];\n\t\t\t}\t\n\t\t}\n\t}", "function calculateChangePercent($close,$prevClose){\n $percentageChange=round(($close-$prevClose)*100/$close,2);\n return $percentageChange;\n}", "public function getTranslationPercent() {\n\n return !empty($this->result->headers['x-onelinktxpercent']) ?\n $this->result->headers['x-onelinktxpercent'] :\n 0;\n }", "public function getUsagePercent() : float\n\t{\n\t\treturn $this->usagePercent;\n\t}", "public function setPercent($var)\n {\n GPBUtil::checkDouble($var);\n $this->writeOneof(2, $var);\n\n return $this;\n }", "function setValue( $value )\r\n {\r\n $newValue = number_format( $value, 4, \".\", \"\" );\r\n $value = (double) $newValue;\r\n $this->Value = $value;\r\n }", "function valore_totale_mio_ordine_lordo($idu,$usr){\r\n$mio_o = valore_totale_mio_ordine($idu,$usr);\r\n//echo \"mio=\".$mio_o.\"<br>\";\r\n\r\n$vto = valore_totale_ordine_qarr($idu);\r\n\r\n//echo \"vto=\".$vto.\"<br>\"; \r\nif ($vto>0){ \r\n$perc = (float)($mio_o/$vto)*100;\r\n\r\n$tras = valore_trasporto($idu,$perc);\r\n//echo \"perc=\".$perc.\"<br>\";\r\n//echo \"tras=\".$tras.\"<br>\"; \r\n$gest =valore_gestione($idu,$perc);\r\n//echo \"perc=\".$perc.\"<br>\"; \r\n//echo $perc;\r\nreturn (float)round($mio_o + $tras + $gest,4);\r\n}else{\r\nreturn \"\"; \r\n\t\r\n}\r\n}", "function valore_reale_maggiorazione_percentuale_gas($id_ordine,$id_gas){\r\n \r\n $magg = valore_percentuale_maggiorazione_mio_gas($id_ordine,$id_gas);\r\n return (float)(valore_totale_mio_gas($id_ordine,$id_gas)/100)*$magg;\r\n \r\n}", "function rupiah($harga)\n{\n $hasil_harga = \"Rp. \" . number_format($harga, 2, ',', '.');\n return $hasil_harga;\n}", "private function handleValue($value, $percentage = false)\n {\n if ($percentage) {\n return $value / 100 * $this->number;\n }\n\n return $value;\n }", "function format($val) {\r\n //setlocale(LC_MONETARY, 'en_US');\r\n return number_format(money_format('%i', $val), 2);\r\n }", "function tPrice( $fPrice ){\n return sprintf( '%01.2f', $fPrice );\n }", "public function getConversionRateAsString()\n {\n return $this->getConversionRate().'%';\n }", "public function getPercentaje() {\n return $percentaje;\n }", "function price () {\n global $value;\n $pricefloat = ceil($value['price']);\n\n if ($pricefloat <= 999) {\n echo $pricefloat;\n } elseif ($pricefloat >= 1000) {\n $num_format = number_format($pricefloat, 0, '.', ' ');\n echo $num_format . \" &#8381;\";\n }\n }", "public static function formatToFixed($float) {}", "public function getPriceValue($value)\n {\n return number_format($value, 2, null, '');\n }", "public function percentDiff(int $original, int $current):string\n {\n if($original == 0 || $current == 0){\n return '0%';\n }\n $diff = $current - $original;\n $more_less = $diff > 0 ? \"Gain\" : \"Loss\";\n $diff = abs($diff);\n $percentChange = round(($diff/$original)*100, 2);\n return \"$percentChange% $more_less\";\n }", "function carton_format_decimal( $number, $dp = '' ) {\n\tif ( $dp == '' )\n\t\t$dp = intval( get_option( 'carton_price_num_decimals' ) );\n\n\t$number = number_format( (float) $number, (int) $dp, '.', '' );\n\n\tif ( strstr( $number, '.' ) )\n\t\t$number = rtrim( rtrim( $number, '0' ), '.' );\n\n\treturn $number;\n}" ]
[ "0.7841136", "0.7574803", "0.74138886", "0.6999488", "0.6989108", "0.6862608", "0.6820864", "0.67759186", "0.6580414", "0.6564128", "0.6563535", "0.65577674", "0.6482713", "0.64746594", "0.6425767", "0.639679", "0.6389052", "0.63714397", "0.6365815", "0.6270136", "0.6252908", "0.61825484", "0.6181538", "0.6171956", "0.61564595", "0.61458945", "0.6135957", "0.613465", "0.6125288", "0.6074117", "0.60464054", "0.60425955", "0.6042308", "0.60211915", "0.60211694", "0.6019518", "0.6000176", "0.59916306", "0.5987051", "0.5966618", "0.5963711", "0.59633446", "0.5955611", "0.59260327", "0.5920323", "0.59143555", "0.5911588", "0.58973885", "0.58775634", "0.5870401", "0.5870184", "0.58538586", "0.58509886", "0.58455867", "0.58339405", "0.5831123", "0.58257806", "0.58238155", "0.582346", "0.5822067", "0.57948047", "0.57913566", "0.5785326", "0.5761399", "0.57555294", "0.5753611", "0.57467914", "0.57438534", "0.57408255", "0.5733523", "0.57264143", "0.5722322", "0.57216775", "0.57181644", "0.56957793", "0.56948096", "0.5694565", "0.56896347", "0.56885475", "0.5669777", "0.5665588", "0.56630045", "0.5661361", "0.5658972", "0.56564444", "0.56421465", "0.5641866", "0.56378216", "0.5632319", "0.56297815", "0.56278676", "0.5627712", "0.5623758", "0.56216955", "0.56079096", "0.5598759", "0.55980766", "0.5596867", "0.55966306", "0.5587506" ]
0.7250449
3
Converts the received boolean value to an equivalent text string
public static function plainBoolean($value) { if ($value === true) { return 'Yes'; } elseif ($value === false) { return 'No'; } return '---'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function bool2str($v)\n {\n //convert boolean to text value.\n $v = $v === true ? 'true' : $v;\n $v = $v === false ? 'false' : $v;\n return $v;\n }", "function bool_to_string($value) {\n return $value ? 'true' : 'false';\n }", "private function boolToString ($value)\n\t{\n\t\tif (true === $value)\n\t\t{\n\t\t\treturn 'true';\n\t\t}\n\t\telseif (false === $value)\n\t\t{\n\t\t\treturn 'false';\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn $value;\n\t\t}\n\t}", "private function boolean(bool $value): string\n {\n return $value ? 'true' : 'false';\n }", "function bool2str($bool) {\n\tif($bool ===false)\n\t\treturn 'false';\n\telse\n\t\treturn 'true';\n}", "public static function boolToString($value)\n {\n $value = $value === true ? 'true' : $value;\n $value = $value === false ? 'false' : $value;\n return $value;\n }", "public function getBooleanString($tf);", "protected function bool2str($bool) {\n return ($bool) ? 'TRUE' : 'FALSE';\n }", "function stage_bool_to_string($bool)\n{\n if (! is_bool($bool)) {\n $bool = wc_string_to_bool($bool);\n }\n return true === $bool ? 'yes' : 'no';\n}", "public static function strbool($bool){\r\n return ($bool) ? \"true\" : \"false\";\r\n }", "public static function bool2text($valBool)\n\t{\n\t\t$salida = \"\";\n\n\t\tif($valBool) {\n\n\t\t\t$salida = \"Si\";\n\n\t\t} else {\n\n\t\t\t$salida = \"No\";\n\n\t\t}\n\n\t\treturn $salida;\n\t}", "function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}", "public static function booleanToString($obj)\n {\n return $obj ? 'true' : 'false';\n }", "public function boolToStr($boolean)\n {\n return ($boolean === true) ? 'true' : 'false';\n }", "protected function toBool($value)\n\t{\n\t\tif ($value === true) {\n\t\t\treturn 'yes';\n\t\t}\n\t\treturn 'no';\n\t}", "function bool2str($data)\n {\n TRUE === $data && $data = 'true';\n FALSE === $data && $data = 'false';\n return $data;\n }", "function message($boolValue) {\n\tif($boolValue) {\n\t\techo \"TRUE: \";\n\t} else {\n\t\techo \"FALSE: \";\n\t}\n\techo \"GOT value as \", (int)$boolValue, \"\\n\";\n}", "function bool_s($boolean) {\n\treturn ($boolean ? 'true' : 'false');\n}", "protected function escapeBoolean($value)\n {\n return ($value) ? $this->booleanTrue : $this->booleanFalse;\n }", "abstract public function escapeBoolean($bool);", "public static function strval($value)\n\t{\n\t\treturn is_bool($value)\n\t\t\t? ($value ? 'true' : 'false')\n\t\t\t: strval($value);\n\t}", "public static function bool2str(bool $boolean = true): string\n {\n if ($boolean === false) {\n return 'FALSE';\n } else {\n return 'TRUE';\n }\n }", "function b2s($b) {\n return ($b) ? 'TRUE' : 'FALSE';\n}", "private static function renderBoolean($value)\n {\n return Yii::$app->formatter->asBoolean($value == 1);\n }", "public function testToStringWithBooleanValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(true);\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "protected function _castBoolToString(&$item, $key)\n {\n if (is_bool($item)) {\n $item = ($item) ? 'true' : 'false';\n }\n }", "public function bool_to_bit( $value ) {\n\t\treturn ( ! empty( $value ) && 'false' !== $value ) ? '1' : '';\n\t}", "function booltostr(bool $bool, int $mode = BOOL_TO_STR_OPTION_LOWERCASE): string\n {\n return BOOL_TO_STR_OPTIONS_MAP[$mode][$bool];\n }", "public function toBoolean()\n {\n $key = $this->toLowerCase()->str;\n $map = array(\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false,\n );\n\n if (array_key_exists($key, $map)) {\n return $map[$key];\n } elseif (is_numeric($this->str)) {\n return ((int) $this->str > 0);\n } else {\n return (bool) $this->regexReplace('[[:space:]]', '')->str;\n }\n }", "public function testToStringWithBooleanValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(false);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "abstract public function unescapeBoolean($bool);", "private function prepareBoolParam($value)\n {\n if (is_bool( $value )) {\n return true === $value ? 'true' : 'false';\n }\n\n return $value;\n }", "private function dbFeedBack($bool){\n if($bool == FALSE){\n //display '0' as false\n return \"{0}\"; \n }\n else{\n //display 1 as true\n return \"{1}\";\n } \n }", "public function testToStringWithStringValueOn()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('on');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "protected function renderBoolean($value)\n {\n $result = 'No';\n if ($value) {\n $result = 'Yes';\n }\n\n return $result;\n }", "public function booleanString($var)\n {\n return is_bool($var)\n ? ($var ? 'True' : 'False')\n : $var;\n }", "public function testToStringWithStringValueOff()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('off');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public function testToStringWithStringValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('true');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "public function formatBool($value)\n {\n if ($value) {\n return 1;\n } else {\n return 0;\n }\n }", "function toBoolean(){\n\t\tif(in_array($this->lower(),array('','false','off','no','n','f'))){\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$this->toString();\n\t}", "private function strToBoolean($value) {\r\n\t\tif ($value && strtolower($value) === \"true\") {\r\n\t\t return true;\r\n\t\t} else {\r\n\t\t return false;\r\n\t\t}\r\n\t}", "function bool_str($value) {\r\n if ($value) {\r\n return 'yes'; \r\n } else {\r\n return 'no';\r\n }\r\n}", "function o_castBool($value) {\n\t\t\treturn Obj::singleton()->castBool($value);\n\t\t}", "function rt_nice_boolean($boolean_value = false, $yes = 'yes', $no = 'no')\n{\n return sprintf('<span class=\"ui-icon ui-icon-%s\">%s</span>', $boolean_value ? 'check' : 'close', $boolean_value ? $yes : $no);\n}", "public static function normalize($value)\n {\n if ($value === true) {\n $value = \"true\";\n } elseif ($value === false) {\n $value = \"false\";\n }\n\n return $value;\n }", "public function testToStringWithStringValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('false');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "private function sanitizeValue($value): string\n {\n if (is_bool($value)) {\n return $value ? 'true' : 'false';\n }\n\n return (string)$value;\n }", "function to_boolean($val);", "function get_bool_or_null($value)\r\n{\r\n $temp = null ;\r\n\r\n if(is_null($value)){\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:#3465a4 '>\" . PHP_EOL ;\r\n \r\n $temp .= 'null' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\"; \r\n\r\n }else if(is_bool($value)){\r\n $temp .= '<code style=\"font_size: 10px\">boolean </code>';\r\n \r\n $temp .= \"<code style='font_size: 9px ; color:#75507b '>\" . PHP_EOL ;\r\n \r\n $temp .= $value == true ? 'true' : 'false' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\";\r\n \r\n }\r\n\r\n return $temp ;\r\n}", "public function getBooleanFormatForQueryString(): string\n {\n return $this->booleanFormatForQueryString;\n }", "function rest_sanitize_boolean($value)\n {\n }", "function converter(&$value, $key){\n if($value === \"true\") {\n $value = TRUE;\n } elseif ($value === \"false\") {\n $value = FALSE;\n }\n if ($key === \"not\") {\n if ($value === \"1\") {\n $value = TRUE;\n }\n if ($value === \"0\") {\n $value = FALSE;\n }\n }\n }", "public function testToStringWithStringValueYes()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('yes');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "public function __toString()\n {\n $options = array();\n foreach ($this as $key => $value) {\n if ($value === true) {\n $options[] = $key;\n }\n }\n sort($options);\n\n return implode(\"\\n\", $options);\n }", "public function toString(&$value = false)\n {\n try{\n $value = (string)$value;\n }\n catch(\\Exception $e){\n $value = '';\n }\n }", "private function __converter(&$value, $key) {\n\t\tif (is_bool($value)) {\n\t\t\t$value = ($value ? '1' : '0');\n\t\t}\n\t}", "protected function prepareValue($value) {\n $result = $value;\n if (is_bool($result)) {\n if ($value) {\n $result = '1';\n } else {\n $result = '0';\n }\n } else if (strpos($result, \"\\n\") !== FALSE) {\n// $result = '\"' . $result . '\"';\n// $result = preg_replace(\"/\\t/\", \"\\\\t\", $result);\n// $result = preg_replace(\"/\\r?\\n/\", \"\\\\n\", $result);\n $result = str_replace(\"\\n\", PHP_EOL, $result);\n }\n return $result;\n }", "static function toBoolean ($v)\n {\n return is_string ($v) ? get (self::$BOOLEAN_VALUES, $v, false) : boolval ($v);\n }", "function get_checked($value)\n{\n\treturn ($value == TRUE) ? 'checked': ''; \n}", "protected function transform($value): string\n {\n if (is_bool($value)) {\n return $value ? 'true' : 'false';\n }\n\n if (is_null($value)) {\n return 'null';\n }\n\n if (preg_match('/\\s/', $value)) {\n return (substr($value, 0, 1) === '\"' && substr($value, -1) === '\"')\n ? $value\n : \"\\\"$value\\\"\";\n }\n\n return $value;\n }", "public function testToStringWithStringValueNo()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('no');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public function format($value)\r\n {\r\n // $translate = Bvb_Grid_Translator::getInstance();\r\n\treturn ($value==\"1\") ? \" checked='checked' \": \" \";\r\n\r\n }", "public function boolValue()\n {\n return $this->value;\n }", "public function testToStringWithStringValueN()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('n');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "function boolval($val){\n return $val === 'true' ? true : false;\n}", "private function _convert_boolean(mixed $value): bool {\n\t\treturn Types::toBool($value);\n\t}", "protected function get_type() {\n\t\treturn 'boolean';\n\t}", "protected function get_type() {\n\t\treturn 'boolean';\n\t}", "protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}", "function sanitize_bool( $value, $key, array $data ) {\n\tif ( is_bool( $value ) ) {\n\t\treturn $value;\n\t} elseif ( is_numeric( $value ) ) {\n\t\treturn (bool) $value;\n\t} elseif ( is_string( $value ) ) {\n\t\tif ( in_array( strtolower( $value ), array( 'true', 'on', 'yes' ), true ) ) {\n\t\t\treturn true;\n\t\t} elseif ( in_array( strtolower( $value ), array( 'false', 'off', 'no' ), true ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn (bool) $value;\n}", "public function getBoolField()\n {\n $value = $this->get(self::BOOL_FIELD);\n return $value === null ? (boolean)$value : $value;\n }", "private function formatBoolean($answer)\n {\n if (!$answer) {\n return 'No';\n }\n\n return 'Yes';\n }", "private function fixTrueFalse(&$value, $key) {\r\n if ($value == 'false') {\r\n \t$value = false;\r\n } elseif ($value == 'true') {\r\n $value = true;\r\n }\r\n }", "function output_logical($x,$format=10){\n\t//-NO or -N or -0 that format only when value=false, nothing for true\n\t//-YES or -yes or -Y or -1 would only show that format when value=true\n\t$x=read_logical($x);\n\tif(is_null($x))return NULL;\n\tswitch(true){\n\t\tcase $format==10:\n\t\t\treturn ($x?1:0);\n\t\tcase $format=='yn':\n\t\t\treturn ($x?'y':'n');\n\t\tcase $format=='YN':\n\t\t\treturn ($x?'Y':'N');\n\t\tcase $format=='yesno':\n\t\t\treturn ($x?'yes':'no');\n\t\tcase $format=='YESNO':\n\t\t\treturn ($x?'YES':'NO');\n\t\tcase $format=='tf':\n\t\t\treturn ($x?'t':'f');\n\t\tcase $format=='TF':\n\t\t\treturn ($x?'T':'F');\n\t\tcase $format=='truefalse':\n\t\t\treturn ($x?'true':'false');\n\t\tcase $format=='TRUEFALSE':\n\t\t\treturn ($x?'TRUE':'FALSE');\n\t\tcase preg_match('/^-(0|n|f)/i',$format):\n\t\t\treturn ($x?'':ltrim($format,'-')); \n\t\tcase preg_match('/^-(1|y|t)/i',$format):\n\t\t\treturn ($x?ltrim($format,'-'):''); \n\t\tdefault:\n\t\t\treturn ($x?$format:'');\n\t}\n}", "public function castToBool($value);", "public function toBool() : bool\n {\n return boolval($this->value);\n }", "static function renderRelaxBooleanField($name, $value = false, $label = null, $attributes = null)\n {\n echo '<li class=\"boolean\">';\n if ($label) echo '<label class=\"checkbox\" for=\"_wcmBox' . $name . '\">'.textH8($label).'</label>';\n self::renderHiddenField($name, ($value) ? '1' : '0', array('id' => $name));\n echo '<input type=\"checkbox\"';\n if ($value) echo ' checked=\"checked\"';\n echo ' onclick=\"$(\\''.$name.'\\').value=(this.checked)?\\'1\\':\\'0\\';\"';\n echo 'name=\"_wcmBox' . $name . '\" id=\"_wcmBox' . $name . '\"';\n self::renderAttributes($attributes);\n echo '/>';\n echo '</li>';\n }", "public function wt_parse_bool_field($value) {\n if ('0' === $value) {\n return false;\n }\n\n if ('1' === $value) {\n return true;\n }\n\n // Don't return explicit true or false for empty fields or values like 'notify'.\n return wc_clean($value);\n }", "function str_bool($string) {\n if (strtolower($string) === 'true') {\n return true;\n } elseif (strtolower($string) === 'false') {\n return false;\n }\n\n return $string;\n}", "static function toBoolean($data)\r\n {\r\n if(!is_string($data))\r\n return (bool) $data;\r\n switch(strtolower($data)) {\r\n case '1':\r\n case 'TRUE':\r\n case 'on':\r\n case 'yes':\r\n case 'y':\r\n return TRUE;\r\n default:\r\n return FALSE;\r\n }\r\n }", "public function toBooleanFilter($value)\n {\n return $value == '1' || $value == '0'\n ? filter_var($value, FILTER_VALIDATE_BOOLEAN)\n : $value;\n }", "public function toString()\n {\n return sprintf('is equal to %s', $this->exporter->export($this->value));\n }", "private function normalizeConstantValue($value)\n {\n $value = $value === true ? 'true' : $value;\n $value = $value === false ? 'false' : $value;\n return $value;\n }", "protected function _castValue ( $value ) {\n\t\t\tswitch ( $this->_settingType ) {\n\t\t\t\tcase self::TYPE_BOOLEAN: return $value == \"true\" ? true : false;\n\t\t\t\tcase self::TYPE_SWITCH: return $value ? \"on\" : \"off\";\n\t\t\t\tcase self::TYPE_INTEGER: return intval ( $value );\n\t\t\t\tcase self::TYPE_STRING: return \"$value\";\n\t\t\t\tdefault: return \"\";\n\t\t\t}\n\t\t}", "function fastshop_sanitize_checkbox( $checked ) {\n return (bool) $checked;\n}", "public function __toString()\n {\n return (string) $this->flags;\n }", "function _field_toggle($fval) \n {\n // most of this is to avoid E_NOTICEs\n $has_check = (!empty($fval) && \n ($fval != '0000-00-00') &&\n (\n $fval == $this->opts || \n (is_array($this->opts) && isset($this->opts[1]) && $fval == $this->opts[1]) ||\n (empty($this->opts) && $fval == 1)\n )\n );\n\n return sprintf(\"<input type=\\\"checkbox\\\" name=\\\"%s\\\" id=\\\"%s\\\" %s class=\\\"%s\\\" %s %s />&nbsp;<span class=\\\"%s\\\">%s</span>\",\n $this->fname,\n $this->fname,\n ($this->opts)? 'value=\"' . $this->opts . '\"' : '',\n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n ($has_check)? \"checked\" : \"\",\n $this->extra_attribs,\n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n (isset($this->attribs['after_text']))? $this->attribs['after_text'] : '(Check for yes)' \n );\n }", "function makeCheckbox( $value, $column )\n{\n\treturn $value ? _( 'Yes' ) : _( 'No' );\n}", "function bool($val,$str=false){\n if(is_string($val)) {\n $val=strtolower($val);\n $val=$val && $val!=\"false\" && $val !=\"no\" && $val !=\"n\" && $val !=\"f\" && $val !=\"off\";\n }else $val=(bool)$val;\n return $str?($val?\"true\":\"false\"):$val;\n}", "private function convert_to_boolean_attributes() {\n foreach ($this->attributes() as $attr => $val) {\n if (preg_match('/^can_/', $attr) || preg_match('/^is_/', $attr)) {\n $this->$attr = ($val == '1');\n }\n }\n }", "function __toString() {\n\t\tif($this->Enabled == false) $enabled = 'DISABLED';\n$dbind = 'data-bind=\"checked: '.$this->Value->propertyName.'() == \\''.$this->OnValue.'\\'\"';\n\t\treturn \"<input $dbind type='checkbox' name='$this->ElementName' id='$this->ElementId' $enabled/>\\r\\n$this->Validators\\r\\n\";\n\t}", "function d2d_value_encode($value) {\n if (is_null($value)) {\n $type = 'n';\n $string = '';\n }\n elseif (is_bool($value)) {\n $type = 'b';\n $string = $value ? '1' : '0';\n }\n else {\n $type = 's';\n $string = strval($value);\n }\n return $type . '$' . $string;\n}", "protected function _convertToString($mxdData) {\r\n\t\t\t$strData = '';\r\n\t\t\t\r\n\t\t\t// Check if data is of type boolean and convert to textual value accordingly\r\n\t\t\tif(is_bool($mxdData)) {\r\n\t\t\t\t$strData = $mxdData ? 'True' : 'False';\r\n\t\t\t \r\n\t\t\t} else {\r\n\t\t\t\t// Encode HTML special characters\r\n\t\t\t\t$strData = htmlspecialchars((string) $mxdData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $strData;\r\n\t\t}", "public function testMethodToStringWithStringValueN()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(true);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals(\n\t\t\tnew TechDivision_Lang_String('true'), \n\t\t\t$boolean->toString()\n\t\t);\n\t}", "public function convertirCheckBox($param='') {\n if($param == \"on\" || $param == 1) {\n $param = \"S\";\n } else {\n $param = \"N\";\n }\n return $param;\n }", "public function __tostring() {\n $str = '';\n foreach($this as $value) {\n if($value) {\n $str .= '1';\n }\n else {\n $str .= '0';\n }\n }\n \n return $str;\n }", "protected function value($value)\n {\n if ($value === 'null') {\n $value = null;\n } elseif ($value === 'true') {\n $value = true;\n } elseif ($value ==='false') {\n $value = false;\n } else {\n $value = str_replace('\\n', \"\\n\", $value);\n }\n return trim($value);\n }", "function post_bool($boolean_name) {\n\t$boolean = $_POST[$boolean_name];\n\tif ($boolean == \"true\")\n\t\treturn true;\n\n\treturn false;\n}", "private function convertStringBooleans($data) {\n foreach($data as $key=>$value) {\n if($value === 'true' || $value === 'TRUE')\n $data[$key] = true;\n\n if($value === 'false' || $value === 'FALSE')\n $data[$key] = false;\n\n if (is_array($value)) {\n $data[$key] = $this->convertStringBooleans($value);\n }\n }\n\n return $data;\n }", "function convert_string_to_boolean($string)\n{\n return filter_var($string, FILTER_VALIDATE_BOOLEAN);\n}" ]
[ "0.81111526", "0.79995435", "0.77612305", "0.77247447", "0.76650083", "0.7645198", "0.7585578", "0.7439775", "0.7423022", "0.7378552", "0.737413", "0.7364247", "0.7224689", "0.7218749", "0.71176916", "0.706416", "0.7044212", "0.7037769", "0.7020562", "0.7004702", "0.69880795", "0.6978014", "0.6933895", "0.6931632", "0.69114476", "0.6871055", "0.68604255", "0.6844684", "0.6837652", "0.6836421", "0.6790709", "0.67883146", "0.676317", "0.6762495", "0.67158204", "0.6707325", "0.66498023", "0.66313314", "0.66163087", "0.6614257", "0.65829444", "0.65565693", "0.6516832", "0.6495027", "0.64806604", "0.6465322", "0.64399356", "0.6390773", "0.63893205", "0.6371134", "0.6369698", "0.6322379", "0.6278749", "0.62334085", "0.62207913", "0.6212999", "0.6136034", "0.6129013", "0.61186737", "0.61171216", "0.6114782", "0.6104003", "0.6052273", "0.6048647", "0.6027269", "0.60087746", "0.5985192", "0.5985192", "0.59780484", "0.59522444", "0.59442663", "0.5937652", "0.59357", "0.59283733", "0.59275657", "0.5917808", "0.5907629", "0.590216", "0.59018916", "0.5873458", "0.5871392", "0.5863344", "0.58597654", "0.5838833", "0.58327234", "0.5825281", "0.58242935", "0.58217597", "0.58133084", "0.5812894", "0.58120847", "0.5801469", "0.5796422", "0.5787955", "0.57866186", "0.57797015", "0.5777805", "0.57723135", "0.57528925", "0.5751469" ]
0.7129679
14
Appends a text before or after(default) when rendering a given value
public static function append($value, $text, $pos = 'after') { if (! in_array($pos, array('after', 'before'))) { throw new Exception('[fieldRendererHelper::append] The value for arg $pos is not valid!'); } if ($pos == 'after') { return $value.' '.$text; } elseif ($pos == 'before') { return $text.' '.$value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function textLine($value)\n {\n return $value . $this->LE;\n }", "public function TextLine($value) {\n\t return $value . $this->LE;\n\t}", "public function textLine($value)\n {\n }", "static function after(){\n\t\t$text = \"\n\t\t\";\n\treturn $text;\n\t}", "function makeBold($val){\n\t\treturn \"<b>$val</b>\";\n\t}", "public function render($value = null);", "function prepend($text1, $text2) {\n return $text2 . $text1;\n }", "public function setHtmlAfter($string);", "protected function output() {\n\t\treturn \"<hr class=\\\"hr-text\\\" data-content=\\\"{$this->option( 'text', '' )}\\\"/>\";\n\t}", "public function Render($value = '')\n {\n echo $value;\n }", "public static function renderText();", "public function __toString() {\n\t\treturn self::$before . $this->render() . self::$after;\n\t}", "public function appendValue($value) {\n $this->current->value($value);\n }", "function appendText ($text) {\r\n $this->content .= $text;\r\n }", "function addText($text);", "function dt_text($title,$value,$default = '',$comment='',$use_htmlspecialchars = 1,$class_col1='col-md-2',$class_col2='col-md-10'){\n\t\tif(!isset($value))\n\t\t\t$value = $default;\n\t\techo '<div class=\"form-group\">\n <label class=\"'.$class_col1.' col-xs-12 control-label\">'.$title.'</label>\n <div class=\"'.$class_col2.' col-xs-12\">';\n\t\tif($use_htmlspecialchars)\n\t\t\techo htmlspecialchars($value);\n\t\telse \n\t\t\techo $value;\n\t\t\t\n\t\tif($comment)\n\t\t\techo '<p class=\"help-block\">'.$comment.'</p>';\n\t\techo '</div></div>';\n\t}", "function MY_VERY_OWN_OM_Text($attr, $content = null) {\n\n\t$result = '<div style=\"display: flex; padding: 0px;\"><div class=\"oldEnglish\"><b><font color=\"gray\">ORIGINAL TEXT</font></b></div><div class=\"newEnglish\"><b><font color=\"gray\">MODERN TEXT</font></b></div></div>';\t\n\treturn $result;\n}", "function myText(){\n\t\n\n\techo '<h1>before subForums</h1>';\n\t\n\n}", "function negrita($text){\r\n return \"<strong>$text</strong>\";\r\n }", "public function output($content = '') {\n $toPlaceholder = $this->getProperty('toPlaceholder','');\n if (!empty($toPlaceholder)) {\n $this->modx->setPlaceholder($toPlaceholder,$content);\n return '';\n }\n return $content;\n }", "public function appendLine($value = \"\")\r\n {\r\n $this->addElement($value.PHP_EOL);\r\n }", "function izq($text){\r\n return \"<div align=\\\"left\\\">$text</div>\";\r\n }", "function der($text){\r\n return \"<div align=\\\"right\\\">$text</div>\";\r\n }", "function t($text)\n\t{\n\t\tPie::event('pie/text', array(), 'before', $text);\n\t\treturn $text;\n\t}", "public function getDynamicDisplayValue($value)\n {\n if (!empty($value)) {\n return t(\"%sTest value - your random number is: %s%s\", \"<p>\", $value, \"</p>\");\n }\n\n return t(\"%sNo test value, no random number. How odd!%s\", \"<p>\", \"</p>\");\n }", "public function setAfter(string $content): HtmlElementInterface;", "public function helperText()\n {\n return \"\";\n }", "function erp_print_key_value( $label, $value, $sep = ' : ', $type = 'text' ) {\n if ( empty( $value ) ) {\n $value = '&mdash;';\n\n } else {\n switch ( $type ) {\n case 'email':\n case 'url':\n case 'phone':\n $value = erp_get_clickable( $type, $value );\n break;\n }\n }\n\n printf(\n '<label>%s</label> <span class=\"sep\">%s</span> <span class=\"value\">%s</span>',\n wp_kses_post( $label ),\n esc_html( $sep ),\n wp_kses_post( $value )\n );\n}", "public function getDynamicPlainTextValue($value)\n {\n if (!empty($value)) {\n return t(\"Test value - your random number is: %s\", $value);\n }\n\n return t(\"No test value, no random number. How odd!\");\n }", "public function setText($value)\n\t{\n\t\t$this->setViewState('Text',$value,'');\n\t}", "function show_text ($display, $value)\n{\n echo \" <TR VALIGN=TOP>\\n\";\n echo \" <TD ALIGN=RIGHT NOWRAP><B>$display:</B></TD><TD ALIGN=LEFT>$value</TD>\\n\";\n echo \" </tr>\\n\";\n}", "public function modifyValue($value, array $arguments) {\n return nl2br($value);\n }", "public function setHtmlBefore($string);", "public function myfoo( $text ) {\n\t\t$text .= ' bar!';\n\t\treturn $text;\n\t}", "function subraya($text){\r\n return \"<u>$text</u>\";\r\n }", "function cs_span($texte, $attr='') { return \"<span $attr>$texte</span>\"; }", "function htit($text,$importancia){\r\n return \"<h$importancia>$text</$importancia>\";\r\n }", "public function render()\n {\n $value = number_format($this->value, $this->decimals, $this->decimal_separator, $this->thousands_separator);\n\n return Str::of($value)\n ->prepend($this->before.' ')\n ->append(' '.$this->after)\n ->trim()\n ->toString();\n }", "private function textCustomField(): string\n {\n return Template::build($this->getTemplatePath('text.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'value' => $this->getValue($this->index),\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "function pantomime_custom_text_before_content(){\n\tif ( is_single() ) :\n\t\techo of_get_option( 'pantomime_before_content', '' );\n\tendif;\n}", "public function appendLineup($value)\n {\n return $this->append(self::_LINEUP, $value);\n }", "public function appendLineup($value)\n {\n return $this->append(self::_LINEUP, $value);\n }", "private function renderText($def)\n {\n $def = implode(' ', $def);\n\n $tpl = \"<sing-form-text $def></sing-form-text>\";\n\n return $tpl;\n }", "function render(){\n\t\treturn $this->id.bnf::$separator;\n\t}", "function AttribTextline( $id, $value, $name )\n\t{\n\t\t$success = '<input type=\"text\" value=\"'.$value.'\" name=\"'.$name.'\" />';\n\t\treturn $success;\n\t}", "public function asHTML() {\n return \"$this->before<$this->tag_name$this->attributes />$this->after\";\n }", "public function getText(): string\n {\n return $this->before.$this->text.$this->after;\n }", "function label($value)\n {\n return '\"'.$value.'\"';\n }", "function render_text() {\n\t\t?><input type=\"text\" id=\"<?php echo $this->slug ?>\" name=\"<?php echo $this->settings_page ?>[<?php echo $this->slug ?>]\" value=\"<?php echo $this->value ?>\" ><?php\n\t}", "function caldol_add_to_content_end($content){\n\t$content .= '<p>Leadership Counts!</p>';\n\treturn $content;\n}", "protected function echoLine(&$addto, $text = \"\")\r\n\t{\r\n\t\t$addto .= $text . \"\\r\\n\";\r\n\t}", "function render($values) {\n return '';\n }", "public function appendTo($value) {\n \n return $this->prepend($value);\n }", "function text()\n {\n ?>\n <input type=\"text\" <?php $this->name_tag(); ?> value=\"<?php echo esc_attr( $this->setting_value ); ?>\" class=\"inferno-setting\" <?php $this->id_tag(\"inferno-concrete-setting-\"); ?> />\n <?php \n if($this->setting['type'] == 'range') {\n $this->range();\n }\n }", "public function render(): string\n {\n $string = str_repeat('#', intval($this->attributes['header'])) . ' ';\n if ($this->hasChildren() === true) {\n\n foreach ($this->children() as $child) {\n $string .= $child->render();\n }\n }\n $string .= \"{$this->escape($this->insert)}\";\n\n return $string;\n\n\n\n /*return str_repeat('#', intval($this->attributes['header'])) .\n \" {$this->escape($this->insert)}\";*/\n }", "public function renderBeforeStep($obj)\n {\n\n return '';\n }", "protected function output($text) {\n $this->data .= $text;\n }", "public function appendSubheading($value, $html = null){\n\n\t\t\tif($html && is_object($html)) $value = '<span>' . $value . '</span> ' . $html->generate(false);\n\t\t\telseif($html) $value = '<span>' . $value . '</span> ' . $html;\n\n\t\t\t$this->Contents->prependChild(new XMLElement('h2', $value));\n\t\t}", "protected function output() {\n\t\treturn $this->before() . $this->option( 'content' ) . $this->after();\n\t}", "function custom_field_tag_with_label($name, $custom_value) {\n return $this->custom_field_label_tag($name, $custom_value).$this->custom_field_tag($name, $custom_value);\n }", "public function setBefore(string $content): HtmlElementInterface;", "public function displayValue() {\n\t\tif ($this->row->intoptions != \"\") {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$intoptions2 = array_flip($intoptions);\n\t\t\t$key = $intoptions2[$this->row->value];\n\t\t\treturn \"<highlight>{$options[$key]}<end>\";\n\t\t} else {\n\t\t\treturn \"<highlight>\" . htmlspecialchars($this->row->value) . \"<end>\";\n\t\t}\n\t}", "public function after_render($content = null) {\n\t\techo $content;\n\t}", "protected function render_text() {\n $settings = $this->get_settings_for_display();\n\n $this->add_render_attribute( [\n 'content-wrapper' => [\n 'class' => 'elementor-button-content-wrapper',\n ],\n 'icon-align' => [\n 'class' => [\n 'elementor-button-icon',\n 'elementor-align-icon-' . $settings['icon_align'],\n ],\n ],\n 'text' => [\n 'class' => 'elementor-button-text',\n ],\n ] );\n\n $this->add_inline_editing_attributes( 'text', 'none' );\n ?>\n <span <?php echo $this->get_render_attribute_string( 'content-wrapper' ); ?>>\n <?php if ( ! empty( $settings['icon'] ) ) : ?>\n <span <?php echo $this->get_render_attribute_string( 'icon-align' ); ?>>\n <i class=\"<?php echo esc_attr( $settings['icon'] ); ?>\" aria-hidden=\"true\"></i>\n </span>\n <?php endif; ?>\n <span <?php echo $this->get_render_attribute_string( 'text' ); ?>><?php echo $settings['text']; ?></span>\n </span>\n <?php\n }", "abstract function display($value);", "function text( $element )\n\t\t{\t\n\t\t\t$extraClass = \"\";\n\t\t\tif(isset($element['class_on_value']) && !empty($element['std'])) $extraClass = \" \".$element['class_on_value'];\n\t\t\t\n\t\t\t$text = '<input type=\"text\" class=\"'.$element['class'].$extraClass.'\" value=\"'.$element['std'].'\" id=\"'.$element['id'].'\" name=\"'.$element['id'].'\"/>';\n\t\t\t\n\t\t\tif(isset($element['simple'])) return $text;\n\t\t\treturn '<span class=\"ace_style_wrap\">'.$text.'</span>';\n\t\t}", "function uds_pricing_render_general_options_text($key, $value)\n{\n\tglobal $uds_pricing_general_options;\n\t$field = $uds_pricing_general_options[$key];\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='text' name='uds-pricing-$key' value='$value' class='uds-pricing-$key' />\n\t\t</div>\n\t\";\n\treturn $out;\n}", "protected function _showText($text) {}", "function le ($value) {\n return '<= '.$value;\n }", "public function generate($inside = '')\n {\n if(!empty($this->labelNote))\n {\n $labelNote = ' <span>' . $this->labelNote . '</span>';\n }\n \n return \"<label>\\n<strong>\" . $this->label . \":</strong>\\n\" . $inside . $labelNote . \"</label>\\n\";\n }", "function render($name, $value, $options=array())\n\t{\n\t\treturn parent::render($name, \"\", $options);\n\t}", "public function setTitle($value);", "function uds_pricing_render_product_options_text($key, $value)\n{\n\tglobal $uds_pricing_column_options;\n\t$field = $uds_pricing_column_options[$key];\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='text' name='{$key}[]' value='$value' class='text {$key}' />\n\t\t\t<span class='tooltip'>?</span>\n\t\t\t<div class='tooltip-content'>{$field['tooltip']}</div>\n\t\t\t<div class='clear'></div>\n\t\t</div>\n\t\";\n\t\n\treturn $out;\n}", "public function render(){\n\t\t$this->clearAttribute(\"value\");\n\t\t$inner = \"\\n\";\n\t\tforeach($this->options as $value => $option){\n\t\t\tif(in_array($value, $this->selected)){\n\t\t\t\t$option->addAttribute(\"selected\", \"selected\");\n\t\t\t}\n\t\t\t$inner .= \"\\t\" . $option->render() . \"\\n\";\n\t\t}\n\t\t$this->setInnerText($inner);\n\t\treturn parent::render();\n\t}", "function display($tag , $value) {\n echo $tag . $value ;\n }", "function italica($text){\r\n return \"<i>$text</i>\";\r\n }", "protected function renderElseChild() {}", "public function setDefaultText($value)\n\t{\n\t\t$this->setViewState('DefaultText',$value,'');\n\t}", "protected function escape( $value )\n\t{\n\t\treturn e( $value );\n\t}", "function play_filter( $id_field, $value = FALSE, $label = FALSE, $field_prefix = FALSE, $other_after = '', $other_before = '', $field_special = FALSE ) {\n\n\t\treturn '';\n\t}", "function print_text_field($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\tif(isset($value['disabled']) && $value['disabled']=='disabled')\n\t\t\t$input_value = $value['std'];\n\t\techo '<input class=\"option-input\" name=\"'.$value['id'].'\" id=\"'.$value['id'].'\" type=\"'.$value['type'].'\" value=\"'.$input_value.'\" '.((isset($value['disabled']) && $value['disabled']=='disabled')?'disabled=\"disabled\"':'').'/>';\n\t\t$this->close_option($value);\n\t}", "public function render($content)\n\t{\n\t\t$tag\t = $this->getTag();\n\t\t$placement = $this->getPlacement();\n\t\t$noAttribs = $this->getOption('noAttribs');\n\t\t$openOnly = $this->getOption('openOnly');\n\t\t$closeOnly = $this->getOption('closeOnly');\n\t\t$this->removeOption('noAttribs');\n\t\t$this->removeOption('openOnly');\n\t\t$this->removeOption('closeOnly');\n\n\t\t$attribs = null;\n\t\tif (!$noAttribs) {\n\t\t\t$attribs = $this->getOptions();\n\t\t}\n\n\t\t$element = $this->getElement();\n\t\t$errors = $element->getMessages();\n\t\tif ( ! empty($errors)) {\n\t\t\t$attribs['class'] .= ' error';\n\t\t}\n\t\telse {\n\t\t\t$attribs['class'] = str_replace(' error', '', $attribs['class']);\n\t\t}\n\n\t\tswitch ($placement) {\n\t\t\tcase self::APPEND:\n\t\t\t\tif ($closeOnly) {\n\t\t\t\t\treturn $content . $this->_getCloseTag($tag);\n\t\t\t\t}\n\t\t\t\tif ($openOnly) {\n\t\t\t\t\treturn $content . $this->_getOpenTag($tag, $attribs);\n\t\t\t\t}\n\t\t\t\treturn $content\n\t\t\t\t\t . $this->_getOpenTag($tag, $attribs)\n\t\t\t\t\t . $this->_getCloseTag($tag);\n\t\t\tcase self::PREPEND:\n\t\t\t\tif ($closeOnly) {\n\t\t\t\t\treturn $this->_getCloseTag($tag) . $content;\n\t\t\t\t}\n\t\t\t\tif ($openOnly) {\n\t\t\t\t\treturn $this->_getOpenTag($tag, $attribs) . $content;\n\t\t\t\t}\n\t\t\t\treturn $this->_getOpenTag($tag, $attribs)\n\t\t\t\t\t . $this->_getCloseTag($tag)\n\t\t\t\t\t . $content;\n\t\t\tdefault:\n\t\t\t\treturn (($openOnly || !$closeOnly) ? $this->_getOpenTag($tag, $attribs) : '')\n\t\t\t\t\t . $content\n\t\t\t\t\t . (($closeOnly || !$openOnly) ? $this->_getCloseTag($tag) : '');\n\t\t}\n\t}", "function render_text_question($label, $input, $additionaltext=\"\", $numeric=false, $extra=\"\", $current=\"\")\n {\n\t?>\n\t<div class=\"Question\" id = \"pixelwidth\">\n\t\t<label><?php echo $label; ?></label>\n\t\t<div>\n\t\t<?php\n\t\techo \"<input name=\\\"\" . $input . \"\\\" type=\\\"text\\\" \". ($numeric?\"numericinput\":\"\") . \"\\\" value=\\\"\" . $current . \"\\\"\" . $extra . \"/>\\n\";\n\t\t\t\n\t\techo $additionaltext;\n\t\t?>\n\t\t</div>\n\t</div>\n\t<div class=\"clearerleft\"> </div>\n\t<?php\n\t}", "public function append($content)\n {\n return !empty($content) ? ' ' . $this->renderContent($content) : '';\n }", "function addText($key, $text);", "function SiNo($valor)\n {\n if ($valor) {\n return '<span class=\"label label-sm label-info\"> SI </span>';\n }else{\n return '<span class=\"label label-sm label-danger\"> NO </span>';\n }\n }", "public function renderText($text = null){\n\t\tif ($text != null){ echo $text; }\n\t\t$this->text_only = true;\n\t}", "public function appendOneLine($text) {\n if (strpos($text, \" \") === 0 && ($this->hOffset == 0 || in_array($this->current[\"char\"], array(\"&\", \"$\")))) {\n $text = substr($text, 1);\n }\n\n $this->currentPage->beginText();\n $nbCarac = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->hOffset - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), true);\n\n // If a the text content can't be appended (either there is no whitespaces,\n // either the is not enough space in the line)\n if ($nbCarac === 0) {\n $isEnoughSpaceOnNextLine = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), true);\n if ($isEnoughSpaceOnNextLine) {\n $this->currentPage->endText();\n return $text;\n } else {\n $nbCarac = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->hOffset - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), false);\n }\n }\n\n $isLastLine = ($nbCarac == strlen($text));\n\n $textToAppend = substr($text, 0, $nbCarac);\n $text = substr($text, $nbCarac);\n\n // Append text (in a new page if needed)\n if ($this->PAGE_HEIGHT - (self::VMARGIN + $this->vOffset) < self::VMARGIN) {\n $this->currentPage->endText();\n $this->current[\"pages\"][] = $this->currentPage;\n $this->nextPage();\n $this->currentPage->beginText();\n }\n $this->currentPage->textOut(self::HMARGIN + $this->hOffset + $this->permanentLeftSpacing,\n $this->PAGE_HEIGHT - (self::VMARGIN + $this->vOffset), $textToAppend);\n if ($textToAppend)\n $this->current[\"char\"] = $textToAppend{strlen($textToAppend)-1};\n\n $this->hOffset += $this->currentPage->getTextWidth($textToAppend);\n\n $this->currentPage->endText();\n $this->current[\"charOffset\"] = $this->vOffset;\n\n return ($isLastLine ? null : $text);\n }", "public function prepend($content)\n {\n return !empty($content) ? $this->renderContent($content) . ' ' : '';\n }", "function show($value){\n return \"<td>\"\n . \"$value\"\n . \"</td>\";\n }", "function add_text_before_price_html( $price ) {\n\tif ( ! is_admin() ) {\n\t\t$price = '<span class=\"text_price\">' . __('Price','shtheme') . ':</span> ' . $price;\n\t}\n\treturn $price;\n}", "function decorate_status($status) {\n\t\t\tswitch (strtolower($status)){\n\t\t\t\t\t\t\tcase 'completed':\n\t\t\t\t\t\t\t\t$status = \"<span class='label label-success'>$status</span>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 'on hold':\n\t\t\t\t\t\t\t\t$status = \"<span class='label label-warning'>$status</span>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 'expired':\n\t\t\t\t\t\t\tcase 'overdue':\n\t\t\t\t\t\t\t\t$status = \"<span class='label label-danger'>$status</span>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 'pending':\n\t\t\t\t\t\t\t\t$status = \"<span class='label label-default'>$status</span>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\treturn $status;\n}", "function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}", "static function before(){\n\t\t$text = \"\n\t\t\\n== Background == \n\t\tThis databrowser queries data from this paper. <ref name='PMID:########'/>\n\t\t\n\t\t\\n== References ==\n\t\t<references/>\n\t\t\t\n\t\t\\n== Search ==\n\t\t\";\n\treturn $text;\n\t}", "function aff_oui_non($val){\r\n if ($val=='1') return \"0\\\"<span style=\\\"color:#00FF00\\\">oui</span>\"; else return \"1\\\"<span style=\\\"color:#FF0000\\\">non</span>\";\r\n }", "public function asHTML() {\n return \"$this->before<$this->tag_name$this->attributes>$this->content</$this->tag_name>$this->after\";\n }", "public function setHeaderText($value)\n {\n if (is_array($value)) {\n $this->fields['options']['header_text_left'] = $value[0];\n $this->fields['options']['header_text_center'] = $value[1];\n $this->fields['options']['header_text_right'] = $value[2];\n } else {\n $this->fields['options']['header_text_left'] = $value;\n }\n }", "function show($value){\n return \"<td>\"\n . \"$value\"\n . \"</td>\";\n }", "function show($value){\n return \"<td>\"\n . \"$value\"\n . \"</td>\";\n }", "protected function status($text)\n\t{\n\t\treturn str_replace(array(':current', ':last'), array($this->page, $this->last), $text);\n\t}" ]
[ "0.6160281", "0.6125725", "0.59087247", "0.5748544", "0.574418", "0.570059", "0.5636773", "0.5586149", "0.55660504", "0.55572474", "0.5483786", "0.5465556", "0.54250175", "0.5403216", "0.53918916", "0.5386625", "0.5382033", "0.5374111", "0.5372694", "0.5371033", "0.5345228", "0.53438514", "0.5341172", "0.53380054", "0.5335947", "0.5320997", "0.5320691", "0.5311329", "0.5309973", "0.5286728", "0.5269157", "0.526587", "0.5255043", "0.5243774", "0.52436244", "0.5243053", "0.5231155", "0.52115077", "0.5194002", "0.51805663", "0.517555", "0.517555", "0.51662976", "0.51564646", "0.51510215", "0.51352775", "0.51298547", "0.5117043", "0.5100917", "0.5089015", "0.5084327", "0.5078606", "0.5072513", "0.50712115", "0.5068808", "0.50682014", "0.5067713", "0.5065559", "0.5063512", "0.5058534", "0.50569034", "0.50543", "0.50542307", "0.5051174", "0.5039164", "0.5032551", "0.5029349", "0.5025837", "0.5023134", "0.50207675", "0.5016962", "0.50152457", "0.5002394", "0.49984658", "0.49978444", "0.4997593", "0.49958774", "0.49910802", "0.49884334", "0.4988032", "0.49845836", "0.49806526", "0.49802187", "0.4974891", "0.49745378", "0.49712515", "0.49599037", "0.4953787", "0.49491477", "0.4947036", "0.49469563", "0.49444753", "0.49430376", "0.49303785", "0.49283063", "0.49283004", "0.49256706", "0.49173304", "0.49173304", "0.49136606" ]
0.6245998
0
Create new daemon reference from dictionary.
public static function newFromDictionary(array $dict) { $ref = new DaemonReference; $ref->name = Arr::get($dict, 'name', 'Unknown'); $ref->pid = Arr::get($dict, 'pid'); $ref->start = Arr::get($dict, 'start'); return $ref; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($dictionary = null) {}", "public static function createDictionary() {}", "public function create( &$object );", "function vdn_make($name,$umd=NULL){\n if(is_null($umd)) $umd = $this->ddef;\n if(is_object($umd)) return $umd->key . $this->svdn . $name;\n else return $umd . $this->svdn . $name;\n }", "function createDictionary($items = [])\n {\n return new \\Phanda\\Dictionary\\Dictionary($items);\n }", "public function testLibraryCreateBookInstanceFromIdAndConfig(): void\r\n {\r\n $configParser = new ArrayParser();\r\n $serviceLibrary = new ServiceLibrary($configParser);\r\n $this->assertFalse($serviceLibrary->has('AdditionalService'));\r\n $serviceLibrary->set(\r\n id: 'AdditionalService',\r\n class: '\\\\Namespace\\\\To\\\\Existing\\\\Class',\r\n arguments: $configParser->buildArgumentCollection(['name' => 'Joe', 'age' => 42, true]),\r\n calls: $configParser->buildCallCollection([\r\n ['setAddress', ['POBox' => 80809, 'City' => 'München']]\r\n ]),\r\n shared: false\r\n );\r\n $this->assertTrue($serviceLibrary->has('AdditionalService'));\r\n }", "public static function factory(\\SetaPDF_Core_Document $document, \\SetaPDF_Core_Type_Dictionary $encryptionDictionary) {}", "public function create($kv_pairs) {\r\n\r\n # Create Resource\r\n\r\n $params = array_merge(array('ws.op' => 'create'), $kv_pairs);\r\n\r\n $data = $this->adapter->request('POST', $this->url, $params, array('return' => 'headers'));\r\n\r\n $this->_entries = array();\r\n\r\n\r\n\r\n # Return new Resource\r\n\r\n @$url = $data['Location'];\r\n\r\n $resource_data = $this->adapter->request('GET', $url);\r\n\r\n return new AWeberEntry($resource_data, $url, $this->adapter);\r\n\r\n }", "protected function createObjectFromRequest($dh) {\n $attr = array();\n $attr[\"id\"] = $dh->getParameter(\"treeid\");\n $attr[\"taxon_id\"] = $dh->getParameter(\"taxonid\");\n $attr[\"dbh\"] = $dh->getParameter(\"dbh\");\n $attr[\"lat\"] = $dh->getParameter(\"lat\");\n $attr[\"lng\"] = $dh->getParameter(\"lng\");\n $attr[\"layers\"] = $dh->getParameter(\"layers\");\n \n return new Tree($attr);\n }", "private function instantiateService($id, Container\\Container $container)\n {\n /** @var object $_service_data */\n $_service_data = $this->_service_list[$id];\n /** @var \\ReflectionClass $_reflector */\n $_reflector = new \\ReflectionClass($_service_data->class);\n return $_reflector->newInstanceArgs($this->getArgs($_service_data, $container));\n }", "private function create()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$q_string = \"insert into sandbox.dbo.daemon (object, dbtype) values (:object, :dbtype)\";\n\n\t\t\t$q = $this->_conn->prepare($q_string);\n\t\t\t$q->bindParam(':object', $this->_object);\n\t\t\t$q->bindParam(':dbtype', $this->_dbtype);\n\n\t\t\t$success = $q->execute();\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\techo 'ERROR: ', $e->getMessage(), $this->_nl;\n\t\t\texit();\n\t\t}\n\n\t\t// unable to insert new entry\n\t\tif ($success !== true)\n\t\t{\n\t\t\techo \"ERROR: unable to create new lock entry for $this->_dbtype $this->_object.\", $this->_nl, $this->_nl;\n\t\t\texit();\n\t\t}\n\t}", "public function createFromSettings(array $settings);", "function create(DataHolder $holder);", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public static function create(PdfDictionary $dictionary, $stream)\n {\n $v = new self();\n $v->value = $dictionary;\n $v->stream = (string) $stream;\n\n return $v;\n }", "private function createService(array $service)\n {\n if (isset($service['constructor'])) {\n $instance = $service['constructor']();\n return $instance;\n }\n\n if (!isset($service['class'])) {\n throw new ContainerException('Service hasn\\'t field class');\n }\n\n if (!class_exists($service['class'])) {\n throw new ContainerException(\"Class {$service['class']} doesn't exists\");\n }\n\n $class = $service['class'];\n if (isset($service['arguments'])) {\n $newService = new $class(...$service['arguments']);\n } else {\n $newService = new $class();\n }\n\n if (isset($service['calls'])) {\n foreach ($service['calls'] as $call) {\n if (!method_exists($newService, $call['method'])) {\n throw new ContainerException(\"Method {$call['method']} from {$service['class']} class not found\");\n }\n\n $arguments = $call['arguments'] ?? [];\n\n call_user_func_array([$newService, $call['method']], $arguments);\n }\n }\n\n return $newService;\n }", "public function create($entityDict)\r\n {\r\n return $this->conn->insert($this, __FUNCTION__, $entityDict);\r\n }", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public static function resolveDictionaryByAttribute(\\SetaPDF_Core_Type_Dictionary $dict, $name, $parentName = 'Parent') {}", "public function __construct(DIInterface $dic, string $class)\n {\n $this->dic = $dic;\n $this->instance = $this->dic->instance($class);\n }", "public function loadLinkedFromdnasequenceattachment() { \n // ForeignKey in: dnasequenceattachment\n $t = new dnasequenceattachment();\n }", "function put_announce_urls($dict,$anarray){\n\tglobal $dict;\n\t$liststring = '';\n\tunset($dict['value']['announce']);\n\tunset($dict['value']['announce-list']);\n\t$dict['value']['announce'] = bdec(benc_str($anarray[0]));\n\n\n\tif (is_array($anarray))\n\tforeach ($anarray as $announce) {\n\t\t$announces[] = array('type' => 'list', 'value' => array(bdec(benc_str($announce))), 'strlen' => strlen(\"l\".$announce.\"e\"), 'string' => \"l\".$announce.\"e\");\n\t\t$liststring .= \"l\".$announce.\"e\";\n\t}\n\t$dict['value']['announce-list']['type'] = 'list';\n\t$dict['value']['announce-list']['value'] = $announces;\n\n\n\t$dict['value']['announce-list']['string'] = \"l\".$liststring.\"e\";\n\t$dict['value']['announce-list']['strlen'] = strlen($dict['value']['announce-list']['string']);\n\n}", "public function createReference($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);", "public function __construct(){\n $acc = ServiceAccount::fromJsonFile('C:/xampp/htdocs/webshop2/secret/sapiadvertiser-35f0f-a96e6598d2d9.json');\n $firebase = (new Factory)->withServiceAccount($acc)->create();\n\n $this->database = $firebase->getDatabase();\n }", "public function test_build_a_singleton() {\n\t\t\t$instanceName = \"leafStub\";\n\t\t\t$value = \"aae\\\\\\\\std\\\\\\\\LeafStub\";\n\t\t\t$json = \"{\\\"$instanceName\\\": {\\\"class\\\": \\\"$value\\\",\\\"static\\\":true}}\";\n\t\t\t$obj = new DIFactory(json_decode($json, true));\n\t\t\n\t\t\t# When build is called\n\t\t\t$instance1 = $obj->build($instanceName);\n\t\t\t$instance1->val1 = 1;\n\t\t\t$instance2 = $obj->build($instanceName);\n\t\t\t$instance2->val1 = 2;\n\t\t\t\n\t\t\t# Then an instance with all dependencies\n\t\t\t# declared in the configuration object is created\n\t\t\t$this->assertEquals(2, $instance1->val1);\n\t\t}", "public function create()\n {\n return view('admin.dict.dicts.create');\n }", "public function newInstance($attributes = array(), $exists = false);", "public function newInstance($attributes = [], $exists = false);", "public function test_build_a_non_singleton() {\n\t\t\t$instanceName = \"leafStub\";\n\t\t\t$value = \"aae\\\\\\\\std\\\\\\\\LeafStub\";\n\t\t\t$json = \"{\\\"$instanceName\\\": {\\\"class\\\": \\\"$value\\\"}}\";\n\t\t\t$obj = new DIFactory(json_decode($json, true));\n\t\t\n\t\t\t# When build is called\n\t\t\t$instance1 = $obj->build($instanceName);\n\t\t\t$instance1->val1 = 1;\n\t\t\t$instance2 = $obj->build($instanceName);\n\t\t\t$instance2->val1 = 2;\n\t\t\t\n\t\t\t# Then an instance with all dependencies\n\t\t\t# declared in the configuration object is created\n\t\t\t$this->assertEquals(1, $instance1->val1);\n\t\t}", "public static function createByDefinition($object) {}", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function newFromHitBuilder($hit = array())\n\t{\n\t\t$key_name = $this->getKeyName();\n\n\t\t$attributes = $hit['_source'];\n\n\t\tif (isset($hit['_id'])) {\n\t\t\t$attributes[$key_name] = is_numeric($hit['_id']) ? intval($hit['_id']) : $hit['_id'];\n\t\t}\n\n\t\t// Add fields to attributes\n\t\tif (isset($hit['fields'])) {\n\t\t\tforeach ($hit['fields'] as $key => $value) {\n\t\t\t\t$attributes[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t$instance = $this::newFromBuilderRecursive($this, $attributes);\n\n\t\t// In addition to setting the attributes\n\t\t// from the index, we will set the score as well.\n\t\t$instance->documentScore = $hit['_score'];\n\n\t\t// Set our document sort values if it's\n\t\tif (isset($hit['sort'])) {\n\t\t\t$instance->sortValues = $hit['sort'];\n\t\t}\n\n\t\t// This is now a model created\n\t\t// from an Elasticsearch document.\n\t\t$instance->isDocument = true;\n\n\t\t// Set our document version if it's\n\t\tif (isset($hit['_version'])) {\n\t\t\t$instance->documentVersion = $hit['_version'];\n\t\t}\n\n\t\treturn $instance;\n\t}", "public function __construct(array $donnees) {\n $this->hydrate($donnees);\n\n }", "public function __construct(LookupService $lookupService) {\r\n\t $this->lookupService = $lookupService; \t\r\n\t}", "public function getNewInstance(string $name, array $dynamicConfiguration=[]): object|array;", "private function deepRefToObj()\n {\n $allFields = $this->toArray();\n foreach ($allFields as $key => $val) {\n if (Mongo\\AdHocDBRef::isRef($val)) {\n $val = Mongo\\AdHocDBRef::expand($val);\n $this->$key = $val;\n } elseif (is_array($val)) {\n list ($converted, $changed) = $this->_recR2O($val);\n if ($changed)\n $this->$key = $converted;\n }\n }\n }", "public static function build(&$instance, array $map = array())\n {\n require_once __DIR__. \"/apiClientLoader.php\";\n $class = get_class($instance);\n if ($class === FALSE) {\n throw new Exception('Instance Is Not Object.', -1);\n }\n if ($class) {\n $class = str_replace('.', '\\\\', $class);\n }\n\n if ($map == NULL) {\n $map = apiClientLoader::loadConfig($class);\n }\n\n require_once __DIR__. \"/apiClientProxy.php\";\n $instance = new apiClientProxy(self::$appid, self::$secret, self::$timeout, $class, $map);\n }", "protected function createDonorAddressEntry()\n {\n $this->donor_address = new DonorAddress;\n \n $this->donor_address->set('donor_id', $this->donor->get('id'));\n $this->donor_address->set('address', $this->data['address']);\n $this->donor_address->set('city', $this->data['city']);\n $this->donor_address->set('region', $this->data['region']);\n $this->donor_address->set('country', $this->data['country']);\n $this->donor_address->set('postal_code', $this->data['postal_code']);\n $this->donor_address->set('telephone', $this->data['telephone']);\n \n $this->donor_address->create();\n }", "public function create() {}", "public function __construct(array $donnees){\n $this->hydrate($donnees);\n }", "public function testBuildWillResolveAliasToServiceName(): void\n {\n $container = new Container();\n\n $alias = 'FooAliasName';\n $name = 'FooServiceName';\n\n // Define our service\n $container->setFactory(\n $name,\n static function () {\n return new \\stdClass();\n }\n );\n $container->setAlias($alias, $name);\n\n $this->assertInstanceOf(\\stdClass::class, $container->build($alias));\n }", "public function __construct(DictRepository $dictRepo)\n {\n $this->dictRepo = $dictRepo;\n }", "public function createAndStoreObject($object,$key)\n\t{\n\t\trequire_once($object.'.class.php');// This line includes the required class definition, only once!\n\t\t$this->objects[$key]=new $object($this);//This line creates an object of the concerned class type, and stores it in the objects array\n\t\t//For example: $this->objects['url']=new urlprocessor($this); will create an object of type urlprocessor. $this is the reference to the registry BECAUSE MOST OBJECTS REQUIRE ACCESS TO THE REGISTRY AND THIS INCLUDES OBJECTS WITHIN THE REGISTRY ITSELF!\n\t}", "public static function from_array($clsname, $d)\r\n {\r\n $newdict = array();\r\n\r\n foreach ($d as $key => $val)\r\n {\r\n if (PiplApi_Utils::piplapi_string_startswith($key, '@'))\r\n {\r\n $key = substr($key, 1);\r\n }\r\n\r\n if ($key == 'last_seen')\r\n {\r\n $val = PiplApi_Utils::piplapi_str_to_datetime($val);\r\n }\r\n\r\n if ($key == 'valid_since')\r\n {\r\n $val = PiplApi_Utils::piplapi_str_to_datetime($val);\r\n }\r\n\r\n if ($key == 'date_range')\r\n {\r\n // PiplApi_DateRange has its own from_array implementation\r\n $val = PiplApi_DateRange::from_array($val);\r\n }\r\n\r\n $newdict[$key] = $val;\r\n }\r\n\r\n return new $clsname($newdict);\r\n }", "public function createDiaryEntryForm(CreateDiaryEntry $createDiaryEntry);", "public static function fromDson(array | string | CBORObject $dson, string $enc = 'bin'): static\n {\n /** @var PrimitiveSerializer $serializer */\n $serializer = radix()->get(PrimitiveSerializer::class);\n return $serializer->fromDson($dson, static::class);\n }", "public function create(){}", "function create($obj)\n\t{\t\t// {{localaddress}}/v1/manifest/{{last_manifest_id}}/start\n\t\t$this->_path = \"/v1/manifest/{$oid}/start\";\n\t}", "public function newFromBuilder($attributes = [], $connection = null);", "protected function setMainDictionaryPath() {}", "public function Make($key);", "public function add_dict_cable( $name, $created, $uid ) {\n \t$name_escaped = $this->connection->escape_string( trim( $name ));\n \tif( $name_escaped == '' )\n \t\tthrow new NeoCaptarException (\n \t\t\t__METHOD__, \"illegal cable type name. A valid non-empty string is expected.\" );\n \t$uid_escaped = $this->connection->escape_string( trim( $uid ));\n \tif( $uid_escaped == '' )\n \t\tthrow new NeoCaptarException (\n \t\t\t__METHOD__, \"illegal UID. A valid non-empty string is expected.\" );\n\n \t// Note that the code below will intercept an attempt to create duplicate\n \t// cable name. If a conflict will be detected then the code will return null\n \t// to indicate a proble. Then it's up to the caller how to deal with this\n \t// situation. Usually, a solution is to commit the current transaction,\n \t// start another one and make a read attempt for the desired cable within\n \t// that (new) transaction.\n \t//\n \ttry {\n\t \t$this->connection->query (\n \t\t\t\"INSERT INTO {$this->connection->database}.dict_cable VALUES(NULL,'{$name_escaped}',{$created->to64()},'{$uid_escaped}')\"\n \t\t);\n \t} catch( NeoCaptarException $e ) {\n \t\tif( !is_null( $e->errno ) && ( $e->errno == NeoCaptarConnection::$ER_DUP_ENTRY )) return null;\n \t\tthrow $e;\n \t}\n\t return $this->find_dict_cable_by_( \"id IN (SELECT LAST_INSERT_ID())\" );\n }", "public function add_dict_cable( $name, $created, $uid ) {\n \t$name_escaped = $this->connection->escape_string( trim( $name ));\n \tif( $name_escaped == '' )\n \t\tthrow new NeoCaptarException (\n \t\t\t__METHOD__, \"illegal cable type name. A valid non-empty string is expected.\" );\n \t$uid_escaped = $this->connection->escape_string( trim( $uid ));\n \tif( $uid_escaped == '' )\n \t\tthrow new NeoCaptarException (\n \t\t\t__METHOD__, \"illegal UID. A valid non-empty string is expected.\" );\n\n \t// Note that the code below will intercept an attempt to create duplicate\n \t// cable name. If a conflict will be detected then the code will return null\n \t// to indicate a proble. Then it's up to the caller how to deal with this\n \t// situation. Usually, a solution is to commit the current transaction,\n \t// start another one and make a read attempt for the desired cable within\n \t// that (new) transaction.\n \t//\n \ttry {\n\t \t$this->connection->query (\n \t\t\t\"INSERT INTO {$this->connection->database}.dict_cable VALUES(NULL,'{$name_escaped}',{$created->to64()},'{$uid_escaped}')\"\n \t\t);\n \t} catch( NeoCaptarException $e ) {\n \t\tif( !is_null( $e->errno ) && ( $e->errno == NeoCaptarConnection::$ER_DUP_ENTRY )) return null;\n \t\tthrow $e;\n \t}\n\t return $this->find_dict_cable_by_( \"id IN (SELECT LAST_INSERT_ID())\" );\n }", "public function make($service)\n {\n if (! isset($this->services[$service])) {\n throw new \\BadMethodCallException(\"{$method} is not a supported Plaid service.\");\n }\n\n // If we already have an instance, then just return it\n if ( isset($this->instances[$service]) ) {\n return $this->instances[$service];\n }\n\n // Otherwise, create it, save it, & return it\n return $this->instances[$service] = new $this->services[$service]($this->request);\n }", "abstract protected function loadDiscoveryFromStorage(EditableDiscovery $discovery, array $initializers = array());", "public static function resolveAttribute(\\SetaPDF_Core_Type_Dictionary $dict, $name, $default = null, $ensure = true, $parentName = 'Parent') {}", "public static function create() {\n\t\t$entry = new GuestbookEntry();\n\t\t$entry->Date = SS_DateTime::now()->getValue();\n\t\t$entry->IpAddress = $_SERVER['REMOTE_ADDR'];\n\t\t$entry->Host = gethostbyaddr($entry->IpAddress);\n\t\treturn $entry;\n\t}", "public function __construct($referenceId = null)\n\t {\n\t \t $data = SkrillPsp_Json::getReversalJson();\n\t \t $this->json = $this->decode($data, true);\n\t \t \n\t \t $this->json['id'] = $this->setId();\n\t \t $this->referenceId = $referenceId;\n\t \t \n\t \t if(!empty($this->referenceId)) {\n\t \t \t$this->json['params']['identification']['referenceid'] = $this->referenceId;\n\t \t }\n\t }", "private function deepObjToRef()\n {\n $allFields = $this->toArray();\n foreach ($allFields as $key => $val) {\n if ($val instanceof \\Phalcore\\Models\\Mongo) {\n if (!isset($val->_id)) $val->save();\n $val = Mongo\\AdHocDBRef::create($val);\n $this->$key = $val;\n } elseif (is_array($val)) {\n list ($converted, $changed) = $this->_recO2R($val);\n if ($changed)\n $this->$key = $converted;\n }\n }\n }", "public function __construct(){\n $this->dictionnary = array();\n }", "public function create($alias = null);", "public static function registerPersistentService($id, Zikula_ServiceManager_Definition $definition, $shared=true)\n {\n $handlers = ModUtil::getVar(self::HANDLERS, 'definitions', array());\n $handlers[$id] = array('definition' => $definition, 'shared' => $shared);\n ModUtil::setVar(self::HANDLERS, 'definitions', $handlers);\n }", "public function testLibraryCreateBookInstanceFromIdOnly(): void\r\n {\r\n $serviceLibrary = new ServiceLibrary(new ArrayParser());\r\n $this->assertFalse($serviceLibrary->has('AdditionalService'));\r\n $serviceLibrary->set('AdditionalService');\r\n $this->assertTrue($serviceLibrary->has('AdditionalService'));\r\n }", "public function fromDriver($dhEvent)\n {\n $this->stored = true;\n $this->initialized = true;\n $this->title = $dhEvent->getTitle();\n $this->start = new Horde_Date($dhEvent->getDate()->getDate());\n $this->end = new Horde_Date($this->start);\n $this->end->mday++;\n $this->id = $dhEvent->getInternalName() . '-' . $this->start->dateString();\n }", "private function createDocument()\n {\n $input = file_get_contents('doc.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents?owner=wawong\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/documents?owner=wawong\";\n \n $params = json_decode($input);\n $data = json_encode($params); \n $response = $this->curl_post($url,$data);\n \n \n $result = json_decode($response);\n $id = $result->_id;\n \n return $id;\n }", "function _makeReferences(&$z) {\n\t// It is a reference\n\tif (isset($z->ref)) {\n\t\t$key = key($z->data);\n\t\t// Copy the data to this object for easy retrieval later\n\t\t$this->ref[$z->ref] =& $z->data[$key];\n\t// It has a reference\n\t} elseif (isset($z->refKey)) {\n\t\tif (isset($this->ref[$z->refKey])) {\n\t\t$key = key($z->data);\n\t\t// Copy the data from this object to make the node a real reference\n\t\t$z->data[$key] =& $this->ref[$z->refKey];\n\t\t}\n\t}\n\treturn true;\n\t}", "private function create_instances_from_taxon_object($rec)\n {\n $taxon = new \\eol_schema\\Taxon();\n $taxon->taxonID = $rec[\"taxon_id\"];\n $taxon->scientificName = $rec[\"Scientific name\"];\n $taxon->taxonRank = self::get_rank($rec['ancestry'], $rec[\"Scientific name\"]);\n \n foreach(array_keys($rec['ancestry']) as $rank) {\n if($rank == $taxon->taxonRank) break;\n if(in_array($rank, array('kingdom', 'phylum', 'class', 'order', 'family', 'genus'))) {\n $taxon->$rank = $rec['ancestry'][$rank];\n }\n }\n $taxon->furtherInformationURL = $rec[\"source_url\"];\n if(!isset($this->taxon_ids[$taxon->taxonID])) {\n $this->archive_builder->write_object_to_file($taxon);\n $this->taxon_ids[$taxon->taxonID] = '';\n }\n \n if($common_name = @$rec['Common name']) {\n $v = new \\eol_schema\\VernacularName();\n $v->taxonID = $rec[\"taxon_id\"];\n $v->vernacularName = trim($common_name);\n $v->language = \"en\";\n $vernacular_id = md5(\"$v->taxonID|$v->vernacularName|$v->language\");\n if(!isset($this->vernacular_ids[$vernacular_id])) {\n $this->vernacular_ids[$vernacular_id] = '';\n $this->archive_builder->write_object_to_file($v);\n }\n }\n }", "public static function createDictionary($fileSpecificationString) {}", "public function create($document){\n $doc = new CouchDocument($this, $document);\n $doc->create();\n return $doc;\n \n }", "public function create(array $data) {\r\n return $this->word->create($data);\r\n }", "public function create() {\n $data = Ensure::Input(func_get_args());\n $data = $data->get();\n\n if (isset($data['domainId'])) {\n new PathResource($this, array(\n \"domains\" => $data['domainId'],\n \"endpoints\" => \"\"\n )\n );\n }\n\n return parent::create($data);\n }", "public function __construct(array $donnees)\n {\n\t\t$this->hydrate($donnees);\n\t}", "public static function make($key)\r\n {\r\n return self::getInstance()->$key;\r\n }", "private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n }", "protected function createDonationEntry()\n {\n $this->donation = new Donation;\n \n $this->donation->set('donor_id', $this->donor->get('id'));\n $this->donation->set('fundraiser_id', $this->fundraiser_profile->get('user_id'));\n $this->donation->set('amount', $this->data['amount']);\n \n $this->donation->create();\n }", "private function createSingleInstance(array $data)\n {\n $entry = new Entry();\n $entry->setId($data[\"ID\"]);\n $entry->setDate($data[\"date\"]);\n $entry->setStart($data[\"start\"]);\n $entry->setEnd($data[\"end\"]);\n $entry->setBreak($data[\"break\"]);\n $entry->setExp($data[\"exp\"]);\n $entry->setNote($data[\"note\"]);\n $entry->setUserId($data[\"userid\"]);\n\n return $entry;\n }", "public function setDictionary()\n {\n $dictionaryId = array_shift($this->front->actionParams);\n\n if (empty($dictionaryId)) {\n // attempts to extract the dictionary posted by a form, eg \"options\"\n $dictionaryId = $this->front->getPost('dictionary');\n }\n\n if (empty($dictionaryId) and ! empty($this->front->params['default-dictionary'])) {\n if ($this->front->params['default-dictionary'] == 'last-used-dictionary') {\n $dictionaryId = $this->front->params['dictionary'];\n } else {\n $dictionaryId = $this->front->params['default-dictionary'];\n }\n }\n\n if (! empty($dictionaryId)) {\n $dictionaryId = $this->validateDictionary($dictionaryId);\n }\n\n if (empty($dictionaryId)) {\n // invalid or missing dictionary, eg \"home\", defaults to the lagnauge default dictionary\n $dictionaryId = $this->front->config['dictionary-defaults'][$this->view->language];\n }\n\n $this->setcookie('dictionary', $dictionaryId , 30);\n $this->dictionary = $this->front->config['dictionaries'][$dictionaryId];\n $this->setDictionaryDefaults($dictionaryId);\n }", "protected function create() {\n\t}" ]
[ "0.51235944", "0.50945127", "0.47428128", "0.47115842", "0.461738", "0.44723433", "0.44106826", "0.4401278", "0.43539694", "0.43376103", "0.4328578", "0.432068", "0.43194214", "0.4310321", "0.43043825", "0.4302915", "0.4298945", "0.4286619", "0.4286619", "0.4286619", "0.4286619", "0.4286619", "0.4286619", "0.42846617", "0.42846617", "0.42846617", "0.42846617", "0.4257942", "0.42578676", "0.4251249", "0.42471644", "0.4238334", "0.42326242", "0.42287418", "0.42275473", "0.4217212", "0.42159483", "0.41974616", "0.41946897", "0.4192391", "0.4192391", "0.4192391", "0.41910684", "0.41910684", "0.41910684", "0.41910684", "0.41910684", "0.41910684", "0.41910684", "0.41910684", "0.41910684", "0.41910684", "0.41910684", "0.41740006", "0.41695887", "0.4166981", "0.41517395", "0.4151731", "0.41441005", "0.41383734", "0.41351083", "0.41346914", "0.4132803", "0.41290894", "0.41272134", "0.41202438", "0.41085887", "0.41062012", "0.40959617", "0.4089925", "0.40873775", "0.40870625", "0.40832853", "0.40821326", "0.40821326", "0.4081726", "0.40807757", "0.40643302", "0.40624636", "0.4061726", "0.4060756", "0.40464458", "0.4042137", "0.40287915", "0.4026727", "0.40221515", "0.40147662", "0.40093696", "0.40092072", "0.40043974", "0.400069", "0.4000167", "0.40001434", "0.3992418", "0.39853328", "0.39816126", "0.39815184", "0.39795825", "0.39763027", "0.39669973" ]
0.784082
0
Set PID file path.
public function setPIDFile($pidFile) { $this->pidFile = $pidFile; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPidFile($pidFile)\n\t{\n\t\tif (empty($pidFile)) {\n\t\t\tthrow new \\InvalidArgumentException(\"PID file cannot be empty\");\n\t\t}\n\t\t$dir = dirname($pidFile);\n\t\tif (!file_exists($dir)) {\n\t\t\tthrow new \\RuntimeException(\"pidFile directory does not exist: {$dir}\");\n\t\t}\n\t\telseif (file_exists($pidFile) && !is_writable($pidFile)) {\n\t\t\tdie(\"Cannot write to pidFile: {$pidFile}\");\n\t\t}\n\t\t$this->pidFile = $pidFile;\n\t}", "protected function writePidfile()\n {\n if (isset($this->config['write_pidfile']) && $this->config['write_pidfile']) {\n if (!isset($this->config['pidfile'])) {\n throw new \\Exception('Please supply a pidfile location.');\n }\n\n $this->pidfile = $this->config['pidfile'];\n\n if ($pidfile = fopen($this->pidfile, 'w')) {\n fwrite($pidfile, getmypid());\n fclose($pidfile);\n } else {\n throw new \\Exception('Unable to open pidfile for writing.');\n }\n }\n }", "function setPID($pid) {\n\t\t$this->_pid = $pid;\n\t}", "public function setPid($pid)\n {\n $this->pid = $pid;\n }", "private function setPID($pid)\n {\n $this->log(\"process id is $pid\");\n $this->pid = (int)$pid;\n }", "protected function setPid($pid)\n {\n $this->pid = $pid;\n }", "public function setPid(int $pid){\n $this->pid = $pid;\n }", "private function _createPidfile()\n {\n\n if (!is_dir(self::$pidDir))\n {\n mkdir(self::$pidDir);\n }\n\n $fp = fopen(self::$pid, 'w') or die(\"cannot create pid file\".PHP_EOL);\n fwrite($fp, posix_getpid());\n fclose($fp);\n\n Log::Dump(static::LOG_PREFIX.\"creating pid file \" . self::$pid);\n }", "private function get_pid_file_path()\n {\n return $this->base_path . \"/TaskManager.pid\";\n }", "function setID($path);", "public function getPidPath();", "public function setPid($pid, $reassign = false);", "protected function setPath ($p) {\n\t\t$path = realpath($p);\n\t\tif (!$path) throw new Spd_IOException('No target path: [' . $p . ']');\n\t\tif (!is_dir($path)) throw new Spd_IOException('Target path not dir: ' . var_export($p,1));\n\t\t$this->path = $path;\n\t}", "protected function getServerPidPath()\n {\n return config('swoole_http.server.options.pid_file');\n }", "public function setPath($file);", "public function setPidFile(\\PhpTaskDaemon\\Daemon\\Pid\\File $pidFile) {\n $this->_pidFile = $pidFile;\n return $this;\n }", "public function setPid(string $pid) {\n $this->pid = $pid;\n return $this;\n }", "public function getPidFile();", "public function setPath(PhingFile $path)\n\t{\n\t\t$this->path = $path;\n\t}", "private function get_daemon_pid_file()\n {\n return $this->base_path . \"/taskmanagerDaemon.pid\";\n }", "public function setWorkingDirectory($path);", "public function setPath($path);", "public function setPath($path);", "public function setPath($path);", "public function setPath($path);", "public function setPath($path)\n\t{\n\t\t/* This must be created here to prevent the directory from\n\t\t * becoming automatically converted to an absolute path. */\n\t\t$this->path = new PhingFile($path);\n\t}", "public function setPath( $path );", "public function getPidFile() {\n if (is_null($this->_pidFile)) {\n $pidFile = \\TMP_PATH . '/phptaskdaemond.pid';\n $this->_pidFile = new \\PhpTaskDaemon\\Daemon\\Pid\\File($pidFile);\n }\n\n return $this->_pidFile;\n }", "public function setPath( $path ) {\n\t\t$this->seedPath = rtrim( $path, '/' ) . '/';\n\t}", "public function setPath(string $path)\n {\n $this->path = $path;\n\t}", "function setPath($path)\n {\n $this->path = trim($path);\n }", "public function setPath($path){ }", "public function setPath($path = '');", "protected function setPath( string $path ) : void\n {\n $this->path = DIGITAL_BASE_PATH.$path;\n }", "public function setIdentifier(){\n\n \t$this->fileIdentifier = $this->getIdentifier();\n }", "public function set_path($path) {\n $this->path = $path;\n }", "public function setPath($path)\n\t{\n\t\t$this->path = $path;\n\t}", "public function setPath(string $path): void\n {\n $this->path = (string) $path;\n }", "private static function getDefaultPidFile(): string\n {\n return \\getcwd() . \\DIRECTORY_SEPARATOR . '.web-server-pid';\n }", "public static function setPath($path)\n\t{\n\t\tself::$path = $path;\n\t}", "public function setPath($path)\r\n\t{\r\n\t\t$this->path=$path;\r\n\t}", "public function setPath( $path )\n {\n $this->path = us($path);\n }", "public function SetPath($path)\n\t{\n\t\t$this->path = $path;\n\t}", "public function setPath( $path )\n\t{\n\t\t$this->path = $path;\n\t\t$this->modified = true;\n\t}", "public function setPath($path)\n {\n $this->path = $path;\n }", "public function setPath($path)\n {\n $this->path = $path;\n }", "public function setPath($path)\n {\n $this->path = $path;\n }", "public function setPath($path)\n {\n $this->path = $path;\n }", "public function setPath($path)\n {\n $this->path = $path;\n }", "public function setPath($path)\n {\n $this->path = $path;\n }", "public function setPath($path)\n {\n $this->path = $path;\n }", "public function setPath($path)\n\t{\n\t\t\n\t\t$this->__path = (string)$path;\n\n\t}", "public static function setPath($path)\n {\n }", "public function set( $path ) {\n\t\t$this->path = $path;\n\n\t\t$path_info = pathinfo( $this->path );\n\n\t\t$this->file = $path_info['basename'];\n\t\t$this->extension = $path_info['extension'] == 'jpg' ? 'jpeg' : $path_info['extension'];\n\t\t$this->filename = $path_info['filename'];\n\n\t\t$this->server = 'http' . ($_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'];\n\n\t\t$this->url = $this->server.str_replace( $this->base_dir, '', $this->path );\n\t}", "public function setFilepath($filepath);", "function set_path($path) \n {\n $this->path = \"/\" . trim($path, \"/\");\n }", "public static function set_path($path) {\n\t\tstatic::$path = $path;\n\t}", "public function setPath($path) { \n $this->__imageSavePath = $path; \n }", "public function setFilepath(string $path)\n {\n $this->filepath = $path;\n }", "public function setScriptPath($path);", "public function start() {\n $this->getPidFile()->write($this->getPidManager()->getCurrent());\n $this->getIpc()->setVar('pid', $this->getPidManager()->getCurrent());\n $this->_run();\n }", "public function setProcessId(?int $value): void {\n $this->getBackingStore()->set('processId', $value);\n }", "public function setScriptPath()\n\t{\n\t\t$this->scriptPath = Yii::getPathOfAlias('webroot').$this->ds.$this->suffix.$this->ds;\n\t}", "public function set(string $path, $value);", "public function setDataFile($path)\n {\n $this->setDataFileFromPath($path);\n }", "public function setDataFile($path)\n {\n $this->setDataFileFromPath($path);\n }", "protected function setCachePath(): void\n {\n $filename = basename($this->pathFile);\n\n $this->pathCache = $this->cacheDir.'/'.$filename;\n }", "function setPath($path) {\r\n\t\tif($this->configured) {\r\n\t\t\treturn 'Configuration is frozen';\r\n\t\t}\r\n\t\t$URLDecodedPath = '';\r\n\t\t$URLDecodedPath = urldecode($path);\r\n\t\t$this->path = $URLDecodedPath;\r\n\t}", "protected static function getProcessMarkPath()\n {\n return LC_DIR_VAR . '.process.' . getmypid();\n }", "public function setPath( $val ) { $this->__set('path', $val); }", "public function setPath($path)\n {\n if ($path == self::AUTO_DETECT) $path = $this->findSendmail();\n $this->path = $path;\n }", "protected function setStoragePageId($pid)\n {\n if ($pid) {\n $querySettings = $this->objectManager->get(Typo3QuerySettings::class);\n $querySettings->setStoragePageIds([$pid]);\n $this->setDefaultQuerySettings($querySettings);\n }\n }", "public function setPid($pid)\n {\n $this->pid = $pid;\n\n return $this;\n }", "public function setPid($pid)\n {\n $this->pid = $pid;\n\n return $this;\n }", "public function setSavePath(string $path);", "public function setFilePath($filePath);", "public function setConfigPath ($path) {\n\t\tif (isset(self::$configPath))\n\t\t\tthrow new osid_InvalidStateException('the config path has already been set');\n\t\t\n\t\tself::$configPath = $path;\n\t}", "public function set_file($path='',$filename='') {\n\t\t$this->_init($path,$filename);\n\t}", "public function setParentProcessId(?int $value): void {\n $this->getBackingStore()->set('parentProcessId', $value);\n }", "public function changeWorkingDirectory($path);", "public function setPath(?string $value): void {\n $this->getBackingStore()->set('path', $value);\n }", "public function setParentProcessImageFile(?FileDetails $value): void {\n $this->getBackingStore()->set('parentProcessImageFile', $value);\n }", "public function setFilename($filename) {\n if (is_writable(dirname($filename))) {\n $this->filename = $filename;\n } else {\n die('Directory ' . dirname($filename) . ' is not writable');\n }\n }", "public static function setFile($file) {}", "public function setPath()\n {\n $this->path = $this->getNamespace() . $this->getControllerName();\n }", "public function getPidfile()\n {\n $resource = false;\n\n if (isset($this->pidfile) && is_readable($this->pidfile)) {\n $resource = fopen($this->pidfile, 'r');\n }\n\n return $resource ? $resource : null;\n }", "public function setPathAttribute($path) {\n\n //$this->attributes[\"path\"] asemos referencia a el atributo path\n // Carbon::now()->second es para obtener los segundos actuales\n //concadenamos luego el nombre del archivo q estamos resiviendo con $path->getClientOriginalName()\n $this->attributes[\"path\"] = Carbon::now()->second . $path->getClientOriginalName();\n\n //nombre del archivo va a ser lo mismo\n $name = Carbon::now()->second . $path->getClientOriginalName();\n\n //para subir un archivo se hace con la clase \\Storage::disk(\"local\")\n //y con el metodo put almasenamos el archivo, resive el nombre y el archivo q vamos a subir\n //en este caso entramos a la clase \\File::get() y le accinamos la ruta de nuestro archivo\n \\Storage::disk(\"local\")->put($name, \\File::get($path));\n }", "public function setPidField($name) {\n $this->_pid = $name;\n return $this;\n }", "private function set_img_path()\n {\n $file_name = sprintf('%03d',$this->img_count);\n $this->img_path = L_TEMP_IMAGE_PATH.$file_name.\".png\";\n $this->img_count++;\n }", "public function setStoragePid($storagePid) {\n\t\t$setup = $this->configurationManager->getConfiguration(\n\t\t\t\\TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK\n\t\t);\n\t\t$setup = \\TYPO3\\CMS\\Extbase\\Service\\TypoScriptService::convertPlainArrayToTypoScriptArray($setup);\n\t\t$setup['persistence.']['storagePid'] = (int) $storagePid;\n\t\t$this->configurationManager->setConfiguration($setup);\n\t}", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }" ]
[ "0.715373", "0.6960137", "0.68754274", "0.6860314", "0.6772939", "0.6724447", "0.6714826", "0.6584665", "0.65817773", "0.6417021", "0.6248157", "0.6101054", "0.610102", "0.60022837", "0.59781426", "0.5908002", "0.58853525", "0.5884555", "0.58662504", "0.58469766", "0.58144623", "0.57900673", "0.57900673", "0.57900673", "0.57900673", "0.5773514", "0.57729393", "0.57546395", "0.5735638", "0.5732427", "0.5721223", "0.57208574", "0.570385", "0.5691031", "0.56625503", "0.5657564", "0.5651558", "0.5637897", "0.5637089", "0.56281793", "0.55983454", "0.55847645", "0.5573132", "0.5573115", "0.5553094", "0.5553094", "0.5553094", "0.5553094", "0.5553094", "0.5553094", "0.5553094", "0.5551614", "0.5532967", "0.5485773", "0.54811585", "0.5459908", "0.54501003", "0.54239166", "0.541028", "0.5406372", "0.5361218", "0.53456634", "0.53116524", "0.5272394", "0.52554953", "0.52554953", "0.5237258", "0.52102417", "0.520558", "0.52023363", "0.5194192", "0.5185767", "0.5182058", "0.5182058", "0.51679397", "0.51506627", "0.5129862", "0.5129042", "0.5128256", "0.5127234", "0.51165134", "0.5114265", "0.5109089", "0.51007354", "0.5099144", "0.50891846", "0.50808746", "0.50700694", "0.50563365", "0.5054304", "0.5051722", "0.5051722", "0.50512815", "0.50512815", "0.5051237", "0.5051237", "0.5051237", "0.5051237", "0.5051237", "0.5051237" ]
0.57109207
32
Whether daemon is running.
public function isProcessRunning($pid) { if(!$pid) { return false; } if(function_exists('posix_kill')) { // This may fail if we can't signal the process because we are running as // a different user (for example, we are 'apache' and the process is some // other user's, or we are a normal user and the process is root's), but // we can check the error code to figure out if the process exists. $isRunning = posix_kill($pid, 0); if(posix_get_last_error() == 1) { // "Operation Not Permitted", indicates that the PID exists. If it // doesn't, we'll get an error 3 ("No such process") instead. $isRunning = true; } } else { // If we don't have the posix extension, just exec. list($err) = exec_manual('ps %s', $pid); $isRunning = ($err == 0); } return $isRunning; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_daemon_running()\n {\n if(!file_exists($this->get_daemon_pid_file())){\n return false;\n }\n $data = file($this->get_daemon_pid_file());\n $daemonPid = intval( $data[count($data) -1] );\n return $daemonPid ;\n }", "private function get_is_running(): bool\n\t{\n\t\treturn $this->status === self::STATUS_RUNNING;\n\t}", "public function isRunning() {\n\t\treturn (\"running\" == $this->status());\n\t}", "public function isRunning() {\n return $this->getPidFile()->isRunning();\n }", "public static function isRunning()\n\t{\n\t\treturn MHTTPD::$running;\n\t}", "public function isRunning()\n {\n return ($this->getStatus() == self::RUNNING);\n }", "public function isRunning(): bool\n {\n return $this->handle && $this->handle->status !== ProcessStatus::ENDED;\n }", "public function isRunning()\n {\n try {\n $result = shell_exec(sprintf('ps %d', $this->pid));\n if(count(preg_split(\"/\\n/\", $result)) > 2) {\n return true;\n }\n } catch(Exception $e) {}\n\n return false;\n }", "public function hasRunning()\n {\n return $this->running !== null;\n }", "protected function managerIsRunning() : bool\n {\n global $argv;\n $cliOutput = [];\n exec('ps x | grep ' . $argv[0], $cliOutput);\n $processCount = 0;\n if (empty($cliOutput)) {\n return false;\n }\n foreach ($cliOutput as $line) {\n if (strpos($line, 'grep') !== false) {\n continue;\n }\n if (strpos($line, '/bin/sh') !== false) {\n continue;\n }\n $processCount++;\n }\n return ($processCount > 1) ? true : false;\n }", "public function isRunning()\n {\n if (OS::isWin()) {\n $cmd = \"wmic process get processid | findstr \\\"{$this->pid}\\\"\";\n $res = array_filter(explode(\" \", shell_exec($cmd)));\n return count($res) > 0 && $this->pid == reset($res);\n } else {\n return !!posix_getsid($this->pid);\n }\n }", "public function serverIsRunning(): bool\n {\n [\n 'masterProcessId' => $masterProcessId,\n ] = $this->serverStateFile->read();\n\n return $masterProcessId && $this->posix->kill($masterProcessId, 0);\n }", "public function isRunning(int $pid): bool;", "public function isRunning(): bool;", "public function isWorking(): bool\n {\n if (($pid = $this->getAttribute('pid')) === null) {\n return false;\n }\n\n return $this->systemCommands()->isProcessRunning($pid);\n }", "protected function _daemon($period='any') {\n return true;\n }", "public function isAlive(){\n\t\tif(!$this->_pid) return (bool) false;\n\t\t$return = false;\n\t\t$returnArray = array();\n\n\t\t$command = 'ps -o pid | grep '.$this->_pid;\n\t\texec($command,$returnArray);\n\n\t\tif($returnArray){\n\t\t\tif($returnArray[0] == $this->_pid){\n\t\t\t\t$return = true;\n\t\t\t}\n\t\t}\n\t\treturn (bool) $return;\n\t}", "public function getIsRunning();", "public static function isRunning($daemon)\n {\n switch ($daemon) {\n case 'phpext_xdebug':\n case 'xdebug':\n return extension_loaded('xdebug');\n break;\n case 'phpext_mongo':\n return extension_loaded('mongo');\n break;\n case 'phpext_memcache':\n return extension_loaded('memcache');\n break;\n case 'php':\n $process_name = 'php-cgi.exe';\n break;\n case 'mariadb':\n $process_name = 'mysqld.exe';\n break;\n case 'mongodb':\n $process_name = 'mongod.exe';\n break;\n case 'nginx':\n $process_name = 'nginx.exe';\n break;\n case 'memcached':\n $process_name = 'memcached.exe';\n break;\n default:\n throw new \\InvalidArgumentException(\n sprintf(__METHOD__. '() has no command for the daemon: \"%s\"', $daemon)\n );\n }\n\n // lookup daemon executable in process list\n static $output = '';\n if ($output === '') {\n $process = WPNXM_DIR . '\\bin\\tools\\process.exe';\n $output = shell_exec($process);\n }\n\n if (strpos($output, $process_name) !== false) {\n return true;\n }\n\n return false;\n }", "public static function getRunning()\n\t{\n\t\treturn false;\n\t}", "public function isRunning() {\n try {\n $response = $this->execute('status');\n if (strpos($response, 'Child in state ') !== 0) {\n return false;\n }\n\n $state = trim(substr($response, 15));\n\n return $state === 'running';\n } catch (VarnishException $exception) {\n return false;\n }\n }", "public function isRunning() {\r\n return $this->_ticker->isRuning();\r\n }", "function processIsRunning(string $id) : bool\n {\n return trim(shell_exec(\"\n if [ -d /proc/$id ]\n then\n echo \\\"yes\\\"\n fi\n \")) == 'yes';\n }", "public function status() {\n\t\t// Setup\n\t\t$options = array(\n\t\t\t'appName' => 'cakedaemon',\n\t\t\t'logLocation' => TMP . \"logs\" . DS . 'cakedaemon.log'\n\t\t);\n\t\tSystem_Daemon::setOptions($options);\n\n\t\tif (System_Daemon::isRunning() == true) {\n\t\t\t$this->out('Daemon is running');\n\t\t\texit(0);\n\t\t} else {\n\t\t\t$this->out('Daemon is not running');\n\t\t\texit(1);\n\t\t}\n\t}", "public function processIsRunning()\n {\n $command = \"ps -p {$this->pid}\";\n exec($command, $output);\n if (isset($output[1])) {\n //$this->log(\"Process {$this->pid} is running\");\n return true;\n }\n //$this->log(\"Process {$this->pid} has stopped\");\n return false;\n }", "private function isProcessAlive(): bool {\n\t\treturn $this->application->process->alive($this->pid);\n\t}", "public function isStarted()\n {\n return $this->_manager->isStarted();\n }", "public function keepalive() : bool\n {\n $this->reloadPids();\n\n // if already running don't do anything:\n if ($this->managerIsRunning() === true) {\n return false;\n }\n\n // if there are no workers at all do a fresh start:\n if (empty($this->pids)) {\n $this->start();\n return true;\n }\n\n // startup new workers if necessary:\n $this->adjustRunningWorkers();\n\n // delete old pid files:\n $this->reloadPids();\n\n return true;\n }", "function isStarted()\n {\n return (TRUE == $this->started);\n }", "public function is_runnable()\n\t{\n\t\treturn (bool) $this->config['delete_pms_days'];\n\t}", "public function isStarted()\n\t{\n\t\treturn true;\n\t}", "public function getIsSystemOn(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->getIsLive();\n }", "private function isRunningConsole(): bool\n {\n return $this->app->runningInConsole();\n }", "public function status()\n {\n $command = 'ps -p ' . $this->pid;\n exec($command, $op);\n if (!isset($op[1])) {\n return false;\n }\n\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "private static function isStarted()\r\n {\r\n // several functions has been added in php 5.4\r\n // disallow determining session stuff when running from command line\r\n if (php_sapi_name() !== 'cli')\r\n {\r\n // are we on PHP 5.4 or higher?\r\n if (version_compare(phpversion(), '5.4.0', '>='))\r\n return (session_status() === PHP_SESSION_ACTIVE);\r\n else\r\n return (session_id() !== '');\r\n }\r\n\r\n return false;\r\n }", "public function runningInConsole()\n {\n if (null === $this->isRunningInConsole) {\n $this->isRunningInConsole = Environment::get('APP_RUNNING_CONSOLE') ?? isCli();\n }\n\n return $this->isRunningInConsole;\n }", "public function isStarted()\n {\n return (bool) $this->_start;\n }", "public static function isStarted() {\n return self::$isStarted;\n }", "public function runningInConsole()\n {\n return php_sapi_name() == 'cli' || php_sapi_name() == 'phpdbg';\n }", "public function isRunning() {\n\t\treturn $this->workflowActivitySpecification->isRunning();\n\t}", "public function runningInConsole()\n {\n return in_array(php_sapi_name(), ['cli', 'phpdbg']);\n }", "public function runningInConsole()\n {\n return in_array(php_sapi_name(), ['cli', 'phpdbg']);\n }", "public function isAlive() {\n\t\treturn (($this->active !== null) && $this->connections [$this->active]->isAlive ());\n\t}", "public function isProcessRunning($pid)\r\n {\r\n return($pid !== '') && file_exists(\"/proc/$pid\");\r\n }", "public static function isStarted(): bool {\n\t\treturn self::$sessionInstance->isStarted ();\n\t}", "public function isDoneRunning(): bool\n {\n assert($this->process !== null);\n\n return $this->process->isTerminated();\n }", "public function runningInConsole()\n {\n return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg';\n }", "public function isRunningSchedulerWorker()\n {\n $pids = $this->redis->hKeys(self::$workerKey);\n $schedulerPid = $this->redis->get(self::$schedulerWorkerKey);\n\n if ($schedulerPid !== false && is_array($pids)) {\n if (in_array($schedulerPid, $pids)) {\n return true;\n }\n // Pid is outdated, remove it\n $this->unregisterSchedulerWorker();\n return false;\n }\n return false;\n }", "public function isExecutionRunning() {}", "private function isProcessRunning($pid)\n {\n // Warning: this will only work on Unix\n return ($pid !== '') && file_exists(\"/proc/$pid\");\n }", "protected function isRunning($pid)\n {\n if (!$pid) {\n return false;\n }\n\n return Process::kill($pid, 0);\n }", "public function isStarted(bool $test_is_running = true): bool\n {\n // In case of previous run, let's us\n if (!$this->started && $test_is_running) {\n $this->started = $this->isProcessRunning();\n }\n\n return $this->started;\n }", "public function isStarted(){\n\t\t\treturn isset( $_SESSION );\n\t\t}", "public function isStarted()\n {\n return $this->started;\n }", "public function isProcessRunning($pid)\n {\n // Warning: this will only work on Unix\n return ($pid !== '') && file_exists(\"/proc/$pid\");\n }", "private function isRunning($pid)\n {\n try {\n $result = shell_exec(sprintf(\"ps %d\", $pid));\n if (count(preg_split(\"/\\n/\", $result)) > 2) {\n return true;\n }\n } catch (Exception $e) {\n }\n return false;\n }", "public function IsStarted()\n {\n $started = $this->GetStarted();\n \n return $started;\n }", "function is_openoffice_running() {\n\t$pid = (int) shell_exec('pidof /opt/openoffice4/program/soffice.bin');\n\tif (!empty($pid)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function isRunning($pid)\n {\n $output = $exitCode = null;\n exec(sprintf(\"ps %d\", $pid), $output, $exitCode);\n return $exitCode === 0;\n }", "public function runningInConsole()\n {\n return $this->isCli();\n }", "private function checkRunning()\n {\n $out = \"\\n Processos em andamento: \";\n foreach ($this->emAndamento as $key => $val) {\n $out .= '[' . $this->emAndamento[$key]['pid'] . '] ';\n if (!$this->isRunning($val['pid'])) {\n $this->done++;\n unset($this->emAndamento[$key]);\n }\n }\n return true;\n }", "public static function isRunning(?string $pidFile = null): bool\n {\n $pidFile = $pidFile ?? self::getDefaultPidFile();\n\n if (! \\file_exists($pidFile)) {\n return false;\n }\n\n $address = \\file_get_contents($pidFile);\n $pos = \\strrpos($address, ':');\n $hostname = \\substr($address, 0, $pos);\n $port = \\substr($address, $pos + 1);\n\n if (false !== $fp = @fsockopen($hostname, (int) $port, $errno, $errstr, 1)) {\n fclose($fp);\n\n return true;\n }\n\n \\unlink($pidFile);\n\n return false;\n }", "public function isStarted()\n {\n return $this->started_at > 0;\n }", "public static function isAvailable()\n {\n return DIRECTORY_SEPARATOR === '/' && exec(\"which ps\") && exec(\"which kill\");\n }", "public function runningInConsole()\n {\n return \\PHP_SAPI === 'cli' || \\PHP_SAPI === 'phpdbg';\n }", "function isRunning($pid){\n try{\n $result = shell_exec(sprintf(\"ps %d\", $pid));\n if( count(preg_split(\"/\\n/\", $result)) > 2){\n return true;\n }\n }catch(Exception $e){}\n\n return false;\n}", "public function is_runnable()\n\t{\n\t\treturn $this->ext_config->cleanup_titania;\n\t}", "public function runningUnitTests()\n {\n return $this->environment() == 'testing';\n }", "public function isAlive()\n {\n return !$this->isDead();\n }", "public function isStarted();", "public function isStarted();", "public function isStarted();", "private function needsRestart()\n {\n if (PHP_SAPI !== 'cli' || !defined('PHP_BINARY')) {\n return false;\n }\n\n return !getenv(self::ENV_ALLOW) && $this->loaded;\n }", "public function isStarted()\n\t{\n\t\tif($this->test_status_id == Test::STARTED)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "public function isStarted() {}", "public static function started()\n {\n return static::$isRegistered;\n }", "public static function isRunning($file): bool\n {\n if (!\\extension_loaded('posix'))\n {\n throw new \\RuntimeException('posix extension required');\n }\n if (!is_readable($file))\n {\n return false;\n }\n if (($lock = @fopen($file, 'c+')) === false)\n {\n throw new \\RuntimeException('unable to open pid file ' . $file);\n }\n if (flock($lock, LOCK_EX | LOCK_NB))\n {\n return false;\n }\n\n flock($lock, LOCK_UN);\n return true;\n }", "public function isStarted() {\n }", "private function canRun()\n {\n $confEnabled = $this->config()->get('cdn_rewrite');\n $devEnabled = ((!Director::isDev()) || ($this->config()->get('enable_in_dev')));\n return ($confEnabled && $devEnabled);\n }", "protected function runningUnitTests()\n {\n return $this->app->runningInConsole() && $this->app->runningUnitTests();\n }", "public function start() {\n if ($this->isRunning()) {\n return false;\n }\n\n $this->execute('start');\n\n return true;\n }", "public function isAlive(): bool;", "public function isBooted(): bool\n {\n return $this->booted;\n }", "public function isBooted(): bool\n {\n return $this->booted;\n }", "public function isBooted() {\n\t\treturn (bool)$this->booted;\n\t}", "private function isMyPID(): bool {\n\t\ttry {\n\t\t\treturn $this->application->process->id() === $this->memberInteger('pid');\n\t\t} catch (KeyNotFound|ParseException|ORMEmpty|ORMNotFound) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function started(): bool\n {\n return $this->session->started();\n }", "public function isListening(): bool\n {\n return $this->listening;\n }", "public function isProcessRunning($name)\n {\n $state = $this->getProcessState($name);\n // @see https://github.com/Supervisor/supervisor/blob/master/supervisor/states.py\n // RUNNING_STATES (BACKOFF is not optimal but listed there...)\n return ($state == self::PROCESS_STATE_RUNNING\n || $state == self::PROCESS_STATE_STARTING\n || $state == self::PROCESS_STATE_BACKOFF);\n }", "private function _isMine(): bool {\n\t\treturn $this->isMyServer() && $this->isMyPID();\n\t}", "public function getIsLive(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n if (is_bool($on = $this->getConfig()->getGeneral()->isSystemLive)) {\n return $on;\n }\n\n return (bool)$this->getProjectConfig()->get('system.live');\n }", "public function isAlive()\n {\n return $this->health > 0;\n }", "public function hasStarted()\n {\n return $this->started;\n }", "public function isListened()\n {\n return !empty($this->socket);\n }", "private function hasInstance()\n {\n return !self::$_instance ? false : true;\n }", "protected function isChildProcess()\n\t{\n\t\tglobal $isChildProcess;\n\n\t\treturn isset($isChildProcess) && $isChildProcess;\n\t}", "public function Running($procId) {\n\t\texec(\"ps -p $procId\",$info);\n\t\tif (count($info) > 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function is_running_config() {\n\t\treturn isset( $this->config ) && count( $this->config ) > count( self::$must_have_plugins );\n\t}" ]
[ "0.83445835", "0.7826281", "0.7737453", "0.7630518", "0.7584782", "0.7564489", "0.74163705", "0.73595303", "0.7339276", "0.7298068", "0.7278651", "0.726877", "0.72683436", "0.72427124", "0.7192779", "0.71541536", "0.7116224", "0.7104167", "0.709067", "0.70377946", "0.70119697", "0.6920178", "0.68719363", "0.6856936", "0.68357825", "0.68343204", "0.6765764", "0.67407656", "0.6707661", "0.6693243", "0.6660139", "0.6643605", "0.66334075", "0.6631096", "0.6596837", "0.6596837", "0.6596837", "0.65722287", "0.6569336", "0.65684897", "0.65278834", "0.6508715", "0.648876", "0.6482516", "0.6482516", "0.6443112", "0.64362794", "0.64265996", "0.64240086", "0.64044714", "0.6386106", "0.63838357", "0.6378561", "0.63762033", "0.63333344", "0.6330784", "0.6327367", "0.63043666", "0.63016146", "0.62930244", "0.62880266", "0.6283526", "0.6281769", "0.6276827", "0.6268376", "0.62538236", "0.6243355", "0.6219819", "0.6208472", "0.6203067", "0.619427", "0.61894476", "0.6183016", "0.6183016", "0.6183016", "0.618183", "0.6181626", "0.6169411", "0.6160396", "0.6156025", "0.6155023", "0.6152291", "0.6139847", "0.6137169", "0.61271256", "0.6126553", "0.6126553", "0.6107891", "0.61053157", "0.6102355", "0.609937", "0.6089168", "0.6084355", "0.60785073", "0.60777205", "0.60581845", "0.6046882", "0.6040099", "0.6039951", "0.6006044", "0.6005036" ]
0.0
-1
preDispatch Starting of the module (nonPHPdoc)
public function preDispatch() { $registry = Shineisp_Registry::getInstance (); $this->translator = $registry->Zend_Translate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function preDispatch() {\n\t\t\n\t\t}", "public function preDispatch()\n\t{\n\n\t\t\n\t\t\n\t}", "public function preDispatch() { }", "public function preDispatch();", "public function preDispatch()\n {\n //...\n }", "public function preDispatch()\n {\n\n }", "function preDispatch()\n {\n\n }", "public function pre_dispatch()\n\t{\n\t\t// Language and helper functions\n\t\tloadLanguage('SolveTopic');\n\t\trequire_once(SUBSDIR . '/SolveTopic.subs.php');\n\t}", "public function pre_dispatch()\n\t{\n\t\tloadTemplate('PortalArticles');\n\t\trequire_once(SUBSDIR . '/PortalArticle.subs.php');\n\t}", "protected function _init(){\n\t\t//Hook called at the beginning of self::run();\n\t}", "public function preStartPageHook() {}", "public function preStartPageHook() {}", "protected function preProcess() {}", "public function preAction()\n {\n // Nothing to do\n }", "public function preProcess();", "public function preProcess();", "public function pre()\n {}", "protected function _onStart()\n {\n $this->_raise(self::E_LOAD);\n }", "public function preExec()\n {\n }", "public function preAction()\n {\n }", "public function preDispatch(){\t\t\t\t\t\r\n\t\t\tparent::preDispatch();\t\r\n\t\t\t\r\n\t\t\t//Zend_Debug::dump($_SERVER);\r\n\t\t}", "public function dispatchLoopStartup()\n {\n //...\n }", "public function preAction() {\n\n }", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "abstract protected function _preProcess();", "public function preDispatch() {\n\t\t$this->_helper->layout ()->disableLayout ();\n\t}", "public function preExecute(){\n\n\t\n\t}", "public function preDispatcher()\n {\n $bootstrap = Front::getInstance()->getBootstrap();\n $view = $bootstrap->getResource('view');\n $settings = $bootstrap->getResource('settings');\n $navigation = $bootstrap->getResource('navigation');\n\n $module = $this->getRequest()->getModule();\n\n $view->headMeta()->setCharset('utf-8');\n\n $minDepth = 1;\n\n if ($module == 'Admin') {\n $minDepth = 2;\n $view->headTitle()->set('PHP Pro Bid Admin Control Panel');\n $view->headMeta()->setName('robots', 'noindex, nofollow');\n }\n else {\n $view->headTitle()->set($settings['sitename']);\n\n if (!empty($settings['meta_data'])) {\n $metaData = \\Ppb\\Utility::unserialize($settings['meta_data']);\n if (isset($metaData['key'])) {\n foreach ($metaData['key'] as $key => $value) {\n if (!empty($value)) {\n $view->headMeta()->appendName($value, $metaData['value'][$key]);\n }\n }\n }\n }\n }\n\n if ($navigation instanceof Navigation) {\n /** @var \\Cube\\View\\Helper\\Navigation $navigationHelper */\n $navigationHelper = $view->navigation()->setMinDepth($minDepth);\n $breadcrumbs = $navigationHelper->getBreadcrumbs();\n\n if (count($breadcrumbs) > 0) {\n $headTitle = array();\n\n foreach ($breadcrumbs as $breadcrumb) {\n $headTitle[] = $breadcrumb->label;\n }\n\n $view->headTitle()->prepend(implode(' / ', array_filter(array_reverse($headTitle))));\n }\n }\n }", "protected function _preExec()\n {\n }", "public function preDispatch()\r\n {\r\n $this->View()->setScope(Enlight_Template_Manager::SCOPE_PARENT);\r\n\r\n $this->View()->sUserLoggedIn = $this->admin->sCheckUser();\r\n $this->View()->sUserData = $this->getUserData();\r\n }", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "public function preDispatch()\n {\n parent::preDispatch();\n \n if (!Mage::helper('clarion_reviewreminder')->isExtensionEnabled()) {\n $this->setFlag('', 'no-dispatch', true);\n $this->_redirect('noRoute');\n } \n }", "public function beforeStart()\n {\n }", "public function preExecute() {\n }", "public function preDispatch()\n\t{\n\t\t$this->_actionController->initView();\n\t\t\n\t\t// We have to store the values here, because forwarding overwrites\n\t\t// the request settings.\n\t\t$request = $this->getRequest();\n\t\t$this->_lastAction = $request->getActionName();\n\t\t$this->_lastController = $request->getControllerName();\n\t}", "public function start()\n\t{\n\t\t// Get contoller and action names\n\t\t$this->getControllerName();\n\t\t$this->getActionName();\n\n\t\t// Set Names of executing class and action names\n\t\t$this->class_Name = ucfirst($this->controllerName);\n\t\t$this->action_Name = ucfirst($this->actionName);\n\n\t\t// Set globals variable\n\t\t$this->setGlobalsData();\n\n\t\t// Run action\n\t\t$this->getControllerAction();\n\t}", "public function _before_init(){}", "public function preDispatch( Zend_Controller_Request_Abstract $request )\n {\n\n }", "public function start()\n {\n // nop\n }", "public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}", "public function before_run(){}", "public function beforeStart () {\n }", "public function onStartDispatch()\n {\n /** @var Enlight_Event_EventManager $eventManager */\n $eventManager = $this->get('events');\n $container = $this->get('service_container');\n\n $resourceSubscriber = new Resource($this->get('models'), $this->get('config'));\n $eventManager->addSubscriber($resourceSubscriber);\n\n /** @var Sorting $sortingComponent */\n $sortingComponent = $container->get('swagcustomsort.sorting_component');\n /** @var Listing $listingComponent */\n $listingComponent = $this->get('swagcustomsort.listing_component');\n\n $subscribers = [\n new Resource($this->get('models'), $this->get('config')),\n new ControllerPath($this->Path(), $this->get('template')),\n new Frontend($this),\n new Backend($this, $this->get('models')),\n new Sort($this->get('models'), $sortingComponent, $listingComponent),\n new StoreFrontBundle($container, $sortingComponent)\n ];\n\n foreach ($subscribers as $subscriber) {\n $eventManager->addSubscriber($subscriber);\n }\n }", "abstract protected function _preHandle();", "public function preDispatch()\n {\n \tignore_user_abort(true);\n set_time_limit(600);\n \n if (\n !isset($this->member) ||\n !($this->member->site_admin || $this->member->profile->site_admin)\n ) { return $this->_denied(); }\n else {\n $this->view->headTitle('Admin', 'PREPEND');\n $this->view->headTitle('Cron', 'PREPEND');\n \n // Change Sub Layout\n $this->_helper->ViaMe->setSubLayout('default');\n }\n }", "public function preDispatch()\n\t{\n\t\tparent::preDispatch();\n\t\tif ($this->getRequest()->getActionName() == 'view'){\n\t\t\t$this->getRequest()->setRouteName('icecatimport');\n\t\t}\n\t}", "public function preDispatch(Zend_Controller_Request_Abstract $request)\n {\n\n }", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "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 static function start()\n {\n self::registerDefault();\n\n $page = rex_request('page', 'string');\n $subpage = rex_request('subpage', 'string');\n $function = rex_request('function', 'string');\n\n if ($page === 'import_export' && $subpage === 'import' && $function === 'dbimport') {\n rex_register_extension('A1_AFTER_DB_IMPORT', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } elseif ($page === 'developer' && $function === 'update') {\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } else {\n self::synchronize(self::START_EARLY);\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(rex_developer_manager::START_LATE);\n });\n }\n }", "protected function _beforeInit() {\n\t}", "public function beforeDispatch(\\Magento\\Framework\\Interception\\InterceptorInterface $controller)\r\n {\r\n $this->benchmark->start(__METHOD__);\r\n $actionName = $controller->getRequest()->getActionName();\r\n $fullActionName = $controller->getRequest()->getFullActionName();\r\n\r\n $this->processor->init($fullActionName, $actionName);\r\n $this->processor->addPageVisitLog($controller->getRequest()->getModuleName());\r\n $this->benchmark->end(__METHOD__);\r\n }", "function preDispatch() {\n\t\t$this->_viewHelper = new \\App\\Helper\\View();\n\t}", "protected function _before() {\n\t\tparent::_before ();\n\t\t$this->_startServices ( true );\n\t\t$this->startup = new Startup ();\n\t\tEventsManager::start ();\n\t\tTranslatorManager::start ( 'fr_FR', 'en' );\n\t\t$this->_initRequest ( 'RestApiController', 'GET' );\n\t}", "function _pre() {\n\n\t}", "public function before_run() {}", "protected function preRun()\n {\n if (@class_exists('Plugin_PreRun') &&\n in_array('Iface_PreRun', class_implements('Plugin_PreRun'))) {\n $preRun = new Plugin_PreRun();\n $preRun->process();\n }\n }", "public function preExecute()\n {\n $this->getContext()->getConfiguration()->loadHelpers(array('Url', 'sfsCurrency'));\n \n if ($this->getActionName() == 'index') {\n $this->checkOrderStatus();\n }\n }", "public static function _before() : void {\n\t}", "public function preDispatch()\n {\n parent::preDispatch();\n if (!Mage::helper('ab_adverboard')->isEnabled()) {\n $this->setFlag('', 'no-dispatch', true);\n $this->_redirect('noRoute');\n }\n }", "protected function executePreRenderHook() {}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t\t//\n\t\t$this->view->title = \"Codini\";\n\t}", "private function _preInit()\n {\n // Load the request before anything else, so everything else can safely check Craft::$app->has('request', true)\n // to avoid possible recursive fatal errors in the request initialization\n $this->getRequest();\n $this->getLog();\n\n // Set the timezone\n $this->_setTimeZone();\n\n // Set the language\n $this->updateTargetLanguage();\n }", "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "public function preDispatch()\n {\n // Get the instance of the front controller\n $this->_front = Zend_Controller_Front::getInstance();\n \n // Get the container from the front controller\n $this->_container = $this->_front->getParam('bootstrap')->getContainer();\n \n // Get the Zend_Config from the front container\n $this->_config = $this->_container->getConfig(); \n }", "public function pre_dispatch()\n\t{\n\t\tHooks::instance()->loadIntegrationsSettings();\n\t}", "public function generatePage_preProcessing() {}", "public function preDispatch() {\n\t\t$this->session = new Zend_Session_Namespace ( 'Admin' );\n\t\t$this->invoices = new Invoices ();\n\t\t$this->translator = Shineisp_Registry::getInstance ()->Zend_Translate;\n\t\t$this->datagrid = $this->_helper->ajaxgrid;\n\t\t$this->datagrid->setModule ( \"invoices\" )->setModel ( $this->invoices );\t\t\n\t}", "public function init_hooks() {\n\t}", "private function start()\n {\n // CSRF Watchdog\n $this->csrfWatchdog();\n\n // Retrieve and other services\n $this->retriever->watchdog();\n\n // Router Templater Hybrid\n $this->renderer->route();\n }", "public function preDispatch()\n {\n if (!in_array($this->Request()->getActionName(), ['index', 'load'])) {\n $this->Front()->Plugins()->Json()->setRenderer(true);\n }\n }", "public function preExecute()\n {\n if (clsCommon::permissionCheck($this->getModuleName().\"/\".$this->getActionName()) == false){\n $this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n $this->redirect('default/index');\n }\n }", "public function preExecute()\n {\n if (clsCommon::permissionCheck($this->getModuleName().\"/\".$this->getActionName()) == false){\n $this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n $this->redirect('default/index');\n } \n }", "public function before()\r\n {\r\n \t// Profile the loader\r\n \t\\Profiler::mark('Start of loader\\'s before() function');\r\n \t\\Profiler::mark_memory($this, 'Start of loader\\'s before() function');\r\n \t\r\n // Set the environment\r\n parent::before();\r\n \r\n // Load the config for Segment so we can process analytics data.\r\n \\Config::load('segment', true);\r\n \r\n // Load the config file for event names. Having events names in one place keeps things synchronized.\r\n \\Config::load('analyticsstrings', true);\r\n \r\n // Engine configuration\r\n \\Config::load('engine', true);\r\n\t\t\r\n\t\t// Load the package configuration file.\r\n\t\t\\Config::load('tiers', true);\r\n\t\t\r\n\t\t// Soccket connection configuration\r\n\t\t\\Config::load('socket', true);\r\n \r\n /**\r\n * Ensure that all user language strings are appropriately translated.\r\n * \r\n * @link https://github.com/fuel/core/issues/1860#issuecomment-92022320\r\n */\r\n if (is_string(\\Input::post('language', false))) {\r\n \t\\Environment::set_language(\\Input::post('language', 'en'));\r\n }\r\n \r\n // Load the error strings.\r\n \\Lang::load('errors', true);\r\n }", "public static function run()\n\t{\n\t\tself::initialize(__class__);\n\t\t# Add post-init hooks here\n\t}", "private function public_hooks()\n\t{\n\t}", "public function preDispatch()\n {\n if (\n !isset($this->member) ||\n !($this->member->site_admin || $this->member->profile->site_admin)\n ) { return $this->_denied(); }\n else {\n $this->view->headTitle('Admin', 'PREPEND');\n $this->view->headTitle('Quotes', 'PREPEND');\n \n // Change Sub Layout\n $this->_helper->ViaMe->setSubLayout('default');\n }\n }", "public static function firstRun(){\n\t\tparent::firstRun();\n\n\t}", "public function preRender()\n {\n }", "public function preRender()\n {\n }", "public function preRender()\n {\n }", "public function preDispatch()\n {\n \t$auth\t= Zend_Auth::getInstance();\n \t\n// \t$this->view->loginIn = $auth->hasIdentity();\n \t$this->_loggedIn\t = $auth->hasIdentity();\n \n \t/* Check if loging in is neccessary ! */\n \tif (!$auth->hasIdentity())\n \t{\n \t\t/* If required: force log-in */\n \t}\n \t\n }", "protected function beforeProcess() {\n }", "public static function pre_process() {}", "public function ullpreExecute()\n {\n $defaultUri = $this->getModuleName() . '/list';\n $this->getUriMemory()->setDefault($defaultUri);\n\n //Add ullPhone stylsheet for all actions\n $path = '/ullPhoneTheme' . sfConfig::get('app_theme_package', 'NG') . \"Plugin/css/main.css\";\n $this->getResponse()->addStylesheet($path, 'last', array('media' => 'all'));\n }", "public function preInit()\n {\n $this->_viewEngine = Bigace_Services::get()->getService('view');\n }", "protected abstract function before();", "public function start()\n {\n $this->registerDefaultServices();\n\n $this->handle($this->request->createFromGlobals());\n }", "public function initAndDispatch() {\n\t\treturn $this->initTypoScriptFrontendController()\n\t\t\t->initTypoScriptConfiguration()\n\t\t\t->initLanguage()\n\t\t\t->initCallArguments()\n\t\t\t->dispatch();\n\t}", "public function init() {\r\n if ( ! $this->_initiated ) {\r\n $this->_init_hooks();\r\n }\r\n }", "protected function processBeforeHooks()\n {\n foreach ($this->beforeHooks as $hook) {\n if (is_callable($hook)) {\n $this->documents = call_user_func($hook);\n }\n\n if (is_string($hook)) {\n $this->documents = $this->app->call($hook, [$this->documents]);\n }\n }\n }", "public function preDispatch()\n\t{\n\t\t$this->_model \t\t= new Model_HwProduct(array(), array( 'gateway' => new Model_HwProductGateway()));\n\t\t$this->view->model \t= $this->_model;\n\t}", "protected function _before(){\n $this->startApplication();\n }", "public function preDispatch()\n\t{\n\t\tparent::preDispatch();\n\n\t\tif (!$this->getRequest()->isDispatched()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$this->_getCustomerSession()->authenticate($this)) {\n\t\t\t$this->setFlag('', 'no-dispatch', true);\n\t\t}\n\t}", "public function preDispatch()\n {\n $config = Mage::getModel('emailchef/config');\n /* @var $config EMailChef_EMailChefSync_Model_Config */\n\n if (!$config->isTestMode()) {\n die('Access Denied.');\n }\n\n return parent::preDispatch();\n }", "public static function init() {\n\t\tself::setup_actions();\n\t}", "public function init()\n {\n $this->addAction('doStuff', 'performThingA');\n $this->addAction('doMoreStuff', 'performThingB');\n }", "public function setup(){\n\t\tparent::setup();\n\t\t//Do stuff...\n\t}", "public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)\n {\n \t//get view ojbect and init\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $viewRenderer->init();\n \n $view = $viewRenderer->view;\n $this->_view = $view;\n // set up common variables for the view\n // $viewRenderer->view->baseUrl = $request->getBaseUrl();\n // $viewRenderer->view->module = $request->getModuleName();\n //get controller and action names\n $viewRenderer->view->controller = $request->getControllerName();\n $viewRenderer->view->action = $request->getActionName();\n\t\t//logfire('predispatch','happened');\n }", "public function init() {\n\t\t$this->load_actions();\n\t}" ]
[ "0.7995604", "0.795324", "0.78341585", "0.783076", "0.7705896", "0.76263386", "0.7469148", "0.7300424", "0.7218474", "0.7145491", "0.71101433", "0.71101433", "0.70957583", "0.7046332", "0.70314544", "0.70314544", "0.69123805", "0.688584", "0.6869628", "0.686424", "0.6846861", "0.6819264", "0.6744898", "0.67375344", "0.6733546", "0.6728143", "0.6720096", "0.66998225", "0.66965556", "0.66820896", "0.6674991", "0.6669462", "0.6668467", "0.66281104", "0.6598543", "0.6581361", "0.6544151", "0.65404755", "0.6535096", "0.6530057", "0.65297157", "0.6526579", "0.6521077", "0.6518796", "0.6518102", "0.65117806", "0.650259", "0.6496602", "0.64634734", "0.6449697", "0.6439767", "0.642223", "0.64158624", "0.6399978", "0.6399205", "0.6394299", "0.63916355", "0.6353055", "0.6345627", "0.633897", "0.63293976", "0.6325332", "0.6324735", "0.63215405", "0.6318096", "0.6315507", "0.6312427", "0.6302019", "0.6294651", "0.6283453", "0.6271889", "0.62657815", "0.6250625", "0.6249009", "0.62480205", "0.6232049", "0.62279093", "0.6209378", "0.6205926", "0.6205926", "0.6205926", "0.6186178", "0.61684406", "0.6166408", "0.61658615", "0.6162113", "0.61491686", "0.61486787", "0.61423457", "0.61385447", "0.61373985", "0.6133713", "0.6133483", "0.61285126", "0.61247844", "0.6121121", "0.61169255", "0.6114583", "0.610913", "0.610384" ]
0.6727394
26
newAction Create the form module in order to create a record
public function doAction() { $request = $this->getRequest (); $q = $request->getParam ( 'q' ); $q = strtolower ( $q ); if (! $q) { return; } $cms = CmsPages::getList (); foreach ( $cms as $key => $value ) { if (strpos ( strtolower ( $value ), $q ) !== false) { echo "$key|$value|cmspages|" . $this->translator->translate ( 'Cms' ) . "\n"; } } $customers = Customers::getList (); if (! empty ( $customers )) { foreach ( $customers as $key => $value ) { if (strpos ( strtolower ( $value ), $q ) !== false) { echo "$key|$value|customers|" . $this->translator->translate ( 'Customer' ) . "\n"; } } } $domains = Domains::getList (); if (! empty ( $domains )) { foreach ( $domains as $key => $value ) { if (strpos ( strtolower ( $value ), $q ) !== false) { echo "$key|$value|domains|" . $this->translator->translate ( 'Domain' ) . "\n"; } } } $products = Products::getList (); if (! empty ( $products )) { foreach ( $products as $key => $value ) { if (strpos ( strtolower ( $value ), $q ) !== false) { echo "$key|$value|products|" . $this->translator->translate ( 'Product' ) . "\n"; } } } $orders = Orders::getList (); if (! empty ( $orders )) { foreach ( $orders as $key => $value ) { if (strpos ( strtolower ( $value ), $q ) !== false) { echo "$key|$value|orders|" . $this->translator->translate ( 'Order' ) . "\n"; } } } $ordersitems = OrdersItems::getItemsListbyDescription ( $q ); if (! empty ( $ordersitems )) { foreach ( $ordersitems as $key => $value ) { echo "$key|$value|orders|" . $this->translator->translate ( 'Order' ) . "\n"; } } $tickets = Tickets::getList ( ); if (! empty ( $tickets )) { foreach ( $tickets as $key => $value ) { if (strpos ( strtolower ( $value ), $q ) !== false) { echo "$key|$value|tickets|" . $this->translator->translate ( 'Ticket' ) . "\n"; } } } $wiki = Wiki::getList ( ); if (! empty ( $wiki )) { foreach ( $wiki as $key => $value ) { if (strpos ( strtolower ( $value ), $q ) !== false) { echo "$key|$value|wiki|" . $this->translator->translate ( 'Wiki' ) . "\n"; } } } $ticket = TicketsNotes::getItemsNote ($q); foreach ( $ticket as $key => $value ) { echo "$key|$value|tickets|" . $this->translator->translate ( 'Tickets' ) . "\n"; } die (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction()\n {\n //the same form is used to create and edit\n $this->_forward('edit');\n }", "public function newAction()\n\t{\n\t\t// the same form is used to create and edit\n\t\t$this->_forward('edit');\n\t}", "public function newAction(): void\n {\n $this->view->form = new AnaForm(null, ['edit' => true]);\n }", "public function newAction() {\n# process the new entry form.\n# check the post data and filter it.\n\t\tif(isset($_POST['cancel'])) {\n\t\t\tAPI::Redirect(API::printUrl($this->_redirect));\n\t\t}\n\t\t$input_check = $this->_model->check_input($_POST);\n\t\tif(is_array($input_check)) {\n\t\t\tAPI::Error($input_check);\n\n\t\t\t// redirect to index and displayed an error there.\n\t\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t\t}\n\n\t\t// all hooks will stack their errors onto the API::Error stack\n\t\t// but WILL NOT redirect.\n\t\tAPI::callHooks(self::$module, 'validate', 'controller', $_POST);\n\t\tif(API::hasErrors()) {\n\t\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t\t}\n\n\t\t// set the id into the post var for any hooks.\n\t\t$_POST['id'] = $this->_model->set_data($_POST, TRUE);\n\n\t\t// auto call the hooks for this module/action\n\t\tAPI::callHooks(self::$module, 'save', 'controller', $_POST);\n\t\tif(isset($this->params['redir'])) {\n\t\t\tAPI::Redirect($this->params['redir']);\n\t\t}\n\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t}", "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 createAction()\n {\n// $this->view->form = $form;\n }", "public function newAction()\n {\n global $config;\n\n if(empty($this->crumbs->crumbs['new']['label']))\n $this->crumbs->add('New', '/', 'New', false); \n\n $form = new ItemsTypeForm(new ItemsType(), array('new' => true));\n $this->view->setVar(\"form\", $form);\n }", "public function create()\n {\n $data = array();\n $data['formObj'] = $this->modelObj;\n $data['page_title'] = \"Add \".$this->module;\n $data['action_url'] = $this->moduleRouteText.\".store\";\n $data['action_params'] = 0;\n $data['buttonText'] = \"Save\";\n $data[\"method\"] = \"POST\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function newAction()\n {\n $reflection = new FormReflectionManager($this->flash);\n\n $url = new Url;\n $url->id = $reflection->get('id');\n $url->address = $reflection->get('address');\n \n $this->view->url = $url;\n \n #$this->view->disable(); \n }", "public function newAction()\n {\n //Add Resource\n $this->_addResource();\n\n //Add toolbar button\n $this->_toolbar->addSaveButton();\n $this->_toolbar->addCancelButton('index');\n\n $menu_items = MenuItems::find();\n $form = new MenuTypeForm();\n\n if ($this->request->isPost()) {\n $menuType = new MenuTypes();\n if ($form->isValid($_POST, $menuType)) {\n $this->saveMenuDetails($menuType);\n } else {\n $this->flashSession->error('gb_please_check_required_filed');\n }\n }\n\n $this->view->setVar('form', $form);\n $this->view->setVar('menu_items', $menu_items);\n }", "public function newAction() {\n $this->buildAssets();\n\n $this->persistent->conditions = null;\n\n\n if ($this->request->isPost()) {\n $this->createNew();\n } else {\n $view = $this->view;\n $this->ctx->pickView($view, 'users/new');\n \n $userForm = new UsersForm();\n $this->view->form = $userForm;\n }\n }", "public function newAction()\n {\n\t\tTag::appendTitle('Create Article');\n }", "public function createAction(){\n $action = \"new\";\n $actionText = \"Create Book\";\n // create empty book...\n $book = new Book();\n require_once('views/bookForm.php');\n }", "public function newAction()\n {\n if(isset($this->configs['actions'])\n && isset($this->configs['actions']['new'])\n && $this->configs['actions']['new'] == false) {\n\n return $this->redirect($this->generateUrl($this->getRouteNamePrefix()));\n }\n\n $class = $this->entityClassName;\n $entity = new $class();\n $form = $this->getForm($this->configs['new']['fields']);\n $form->setData($entity);\n\n return $this->filterResponse(\n array(\n 'name' => $this->configs['name'],\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'route_name_prefix' => $this->getRouteNamePrefix()\n ),\n array(\n 'action' => 'new'\n )\n );\n }", "public function action_create()\n {\n $this->action_edit(FALSE);\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 }", "protected function actionNew() {\r\n $strType = $this->getCurObjectClassName();\r\n\r\n if(!is_null($strType)) {\r\n /** @var $objEdit interface_model|class_model */\r\n $objEdit = new $strType();\r\n\r\n\r\n $objForm = $this->getAdminForm($objEdit);\r\n $objForm->getObjSourceobject()->setSystemid($this->getParam(\"systemid\"));\r\n $objForm->addField(new class_formentry_hidden(\"\", \"mode\"))->setStrValue(\"new\");\r\n\r\n return $objForm->renderForm(getLinkAdminHref($this->getArrModule(\"modul\"), \"save\" . $this->getStrCurObjectTypeName()));\r\n }\r\n else\r\n throw new class_exception(\"error creating new entry current object type not known \", class_exception::$level_ERROR);\r\n }", "public function actionCreate() {}", "public function actionCreate() {}", "public function newAction()\n {\n global $config;\n // $this->tag->setDefault(\"registered\", date('Y-m-d H:i:s'));\n // $this->tag->setDefault(\"status\", $this->defaultStatus);\n // $this->tag->setDefault(\"type\", $this->defaultAcademyType);\n\n $this->view->setVar(\"academyMeta\", array('image' => $this->defaultAcademyImage));\n\n $this->crumbs->add('academy', $config->application->baseUri.'academy', 'Academy');\n if(empty($this->crumbs->crumbs['new']['label']))\n $this->crumbs->add('New', '/', 'Add', false); \n\n $form = new AcademyForm(new Academy(), array('new' => true));\n $this->view->setVar(\"form\", $form);\n\n // $prefixName = json_encode($this->elements->getPrefixNameData());\n // $this->view->setVar(\"prefixName\", $prefixName);\n }", "public function newAction()\r\n\t{\r\n\t\t$this->_forward('edit');\r\n\t}", "public function newAction()\r\n\t{\r\n\t\t$this->_forward('edit');\r\n\t}", "public function newAction() {\n\t\t$this->_forward('edit');\n\t}", "public function newAction() {\n\n if ($this->values['permisos']['permisosModulo']['IN']) {\n switch ($this->request[\"METHOD\"]) {\n\n case 'POST': //CREAR NUEVO REGISTRO\n $datos = new $this->entity();\n $datos->bind($this->request[$this->entity]);\n\n if ($datos->valida($this->form->getRules())) {\n $datos->create();\n }\n\n $this->values['alertas'] = $datos->getAlertas();\n $this->values['errores'] = $datos->getErrores();\n unset($datos);\n return $this->listAction();\n break;\n }\n } else {\n return array(\n 'template' => '_global/forbiden.html.twig',\n 'values' => $this->values);\n }\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function newAction()\n {\n $this->redirectToCreateNewRecord('tx_t3events_domain_model_event');\n }", "public function newAction()\n {\n $this->_forward('edit');\n }", "public function newAction()\n {\n $this->_forward('edit');\n }", "public function newAction()\n {\n $this->_forward('edit');\n }", "public function newAction()\n {\n $this->_forward('edit');\n }", "public function newAction()\n {\n $this->_forward('edit');\n }", "public function newAction()\n {\n $this->_forward('edit');\n }", "public function newAction()\n {\n $this->_forward('edit');\n }", "public function newAction()\n {\n $this->_forward('edit');\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 }", "public function createAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_createExtraParameters;\n\n parent::createAction();\n }", "public function newAction() {\n\n if ($this->values['permisos']['permisosModulo']['IN']) {\n switch ($this->request[\"METHOD\"]) {\n\n case 'POST': //CREAR NUEVO REGISTRO\n //COGER EL LINK A LA ENTIDAD PADRE\n if ($this->values['linkBy']['id'] != '') {\n $this->values['linkBy']['value'] = $this->request[$this->entity][$this->values['linkBy']['id']];\n }\n\n $datos = new $this->entity();\n $datos->bind($this->request[$this->entity]);\n\n if ($datos->valida($this->form->getRules())) {\n $datos->create();\n $this->values['alertas'] = $datos->getAlertas();\n\n //Recargo el objeto para refrescar las propiedas que\n //hayan podido ser objeto de algun calculo durante el proceso\n //de guardado.\n $datos = new $this->entity($datos->getPrimaryKeyValue());\n $this->values['datos'] = $datos;\n } else {\n $this->values['datos'] = $datos;\n $this->values['errores'] = $datos->getErrores();\n }\n unset($datos);\n return $this->listAction($this->values['linkBy']['value']);\n break;\n }\n } else {\n return array('template' => '_global/forbiden.html.twig');\n }\n }", "public function xadmin_createform() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$form_title = $args [1];\n\t\t$form_type = @$args [2] ? $args [2] : 'blank';\n\t\t\n\t\t/* Load Model */\n\t\t$form = $this->getModel ( 'form' );\n\t\t$this->session->returnto ( 'forms' );\n\t\t\n\t\t/* create the form */\n\t\t$form->createNewForm ( $form_title, $form_type );\n\t\t\n\t\t$this->loadPluginModel ( 'forms' );\n\t\t$plug = Plugins_Forms::getInstance ();\n\t\t\n\t\t$plug->_pluginList [$form_type]->onAfterCreateForm ( $form );\n\t\t\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( 'xforms' );\n\t\n\t}", "public function newAction()\r\n {\r\n $entity = new Consulta();\r\n //Recuperación del paciente\r\n $request = $this->getRequest();\r\n $identidad= $request->get('identidad');\r\n $form = $this->createCreateForm($entity,1,$identidad);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "public function createForm();", "public function createForm();", "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 newAction()\r\n {\r\n $this->_forward('edit');\r\n }", "public function newAction()\r\n {\r\n $this->_forward('edit');\r\n }", "public function createForm()\n {\n }", "function show_new_record() {\r\n if ($this->allow_new) {\r\n #~ echo \"<p><a href='{$_SERVER['PHP_SELF']}?m={$this->module}&amp;act=new&amp;go=\".urlencode($GLOBALS['full_self_url']).\"'>Insert new row</a>\";\r\n echo '<form method=POST action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=\"m\" value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=\"act\" value=\"new\">';\r\n echo '<input type=hidden name=\"go\" value=\"'.htmlentities($GLOBALS['full_self_url']).'\">'; # url to go after successful submitation\r\n # if i'm a detail, get master-detail field's value and pass it to new-form\r\n if ($this->logical_parent) {\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->parentkey) { # foreign key always int\r\n echo '<input type=hidden name=\"sugg_field['.$colvar.']\" value=\"'.htmlentities($col->parentkey_value).'\">';\r\n }\r\n }\r\n }\r\n echo '<p>'.lang('Add').' <input type=text name=\"num_row\" size=2 value=\"1\"> '.lang($this->unit).' <input type=submit value=\"'.lang('Go').'\">';\r\n echo '</form>';\r\n }\r\n }", "public function actionCreate()\n\t{\n\t\t\n\t\t//$data['model'] = new ClientForm();\n\n\t\t//$data['action'] = 'add';\n\t\t\n\t\t//$model=new Client;\n\t\t//$DPmodel=new Driverparticular;\n\t\t$data['modelBroker'] = new Broker;\n\t\t$data['model'] = new ClientForm();\n\t \t$data['DPmodel'] = new DriverParticularForm();\n\t\t$data['action'] = 'add';\n\t\t$data['i'] = 0;\n\t\t\n\t\t$this->render('_form', $data);\n\n\t\t\n\n\t}", "public function actionCreate(){\n $parents=CylTables::model()->findAll(\n array(\n 'condition'=>'isParent=\"1\" AND display_status = \"1\"',\n 'order'=>'menu_order'\n ));\n $model = new CylFields();\n $this->render('new-field', array('model' => $model,'parents' => $parents));\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "function create_new() {\n if($this->table_title != '' ) {\n $this->title = 'New ' . $this->table_title .\n $this->makeForm();\n }\n }", "public function newAction()\n {\n $this->view->org = new OrganizationForm();\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function newAction()\n {\n\n return parent::newAction();\n\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 $createAdd = 0;\n $auth_user = \\Auth::guard(\"admins\")->check();\n if($auth_user)\n {\n $auth_id = \\Auth::guard(\"admins\")->user()->id;\n if($auth_id == SUPER_ADMIN_ID)\n $createAdd = 1;\n }\n if($createAdd == 1){\n\n $data = array();\n $data['formObj'] = $this->modelObj;\n $data['page_title'] = \"Add \".$this->module;\n $data['action_url'] = $this->moduleRouteText.\".store\";\n $data['action_params'] = 0;\n $data['buttonText'] = \"Save\";\n $data[\"method\"] = \"POST\";\n $data['blood_groups'] = Member::getBloodGroups();\n $data['villages'] = Member::getVillages();\n\t\t\t$data['members'] = Member::getMembers();\n return view($this->moduleViewName.'.add', $data);\n }\n if($createAdd == 0)\n {\n return redirect('/members/otpform');\n }\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "#[Route(path: '/new', name: 'logger_new', methods: ['GET'])]\n public function newAction()\n {\n $userSecUtil = $this->container->get('user_security_utility');\n $site = $userSecUtil->getSiteBySitename($this->getParameter('employees.sitename'));\n\n $entity = new Logger($site);\n $form = $this->createCreateForm($entity,$this->getParameter('employees.sitename'));\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function actionCreate()\n {\n $models = $this->loadModelsByPid();\n\n $this->performAjaxValidationTabular($models);\n\n $success = $this->doAction($models);\n $newPid = current($models)->pid;\n\n if($success)\n {\n if(isset($_POST['apply']))\n {\n $this->redirectAction($newPid);\n }\n $this->redirectAction();\n }\n\n if($success !== null && $newPid)\n {\n $this->redirectAction($newPid);\n }\n\n $this->render($this->view['create'], array(\n 'models' => $models,\n 'model' => reset($models),\n 'languages' => Language::getList(),\n ));\n }", "public function CreateForm();", "public function createFormAction()\n {\n \t$form_type = $this->params()->fromQuery(\"ftype\", \"\");\n\n\t\t//load form\n\t\t$form = $this->getFormAdminModel()->getFormAdminForm($form_type);\n\n\t\t//set default content for submit button\n\t\tif ($form->has(\"submit_button\"))\n\t\t{\n\t\t\t$form->get(\"submit_button\")->setValue(\"Submit\");\n\t\t}//end if\n\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost())\n\t\t{\n\t\t\t$form->setData($request->getPost());\n\t\t\tif ($form->isValid())\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t//create the form\n\t\t\t\t\t$objForm = $this->getFormAdminModel()->createForm($form->getData());\n\n\t\t\t\t\t//set success message\n\t\t\t\t\t$this->flashMessenger()->addSuccessMessage(\"Form created\");\n\t\t\t\t\t\n\t\t\t\t\t//redirect to form edit page\n\t\t\t\t\tif ($form_type != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->redirect()->toUrl($this->url()->fromRoute(\"front-form-admin/form\", array(\"action\" => \"edit-form\", \"id\" => $objForm->get(\"id\"))) . \"?ftype=$form_type\");\n\t\t\t\t\t}//end if\n\t\t\t\t\t\n\t\t\t\t\treturn $this->redirect()->toRoute(\"front-form-admin/form\", array(\"action\" => \"edit-form\", \"id\" => $objForm->get(\"id\")));\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t//set error message\n\t\t\t\t\t$form = $this->frontFormHelper()->formatFormErrors($form, $e->getMessage());\n\t\t\t\t}//end catch\n\t\t\t}//end if\n\t\t}//end if\n\n\t\treturn array(\"form\" => $form);\n }", "public function newAction()\n {\n $entity = new Turno();\n $request = $this->getRequest();\n $form = $this->createForm(new TurnoType(), $entity);\n \n if ($request->isMethod(\"POST\"))\n {\n \t$form->bind($request);\n \tif ($form->isValid())\n \t{\n \t\t$em = $this->getDoctrine()->getManager();\n \t\t$em->persist($entity);\n \t\t$em->flush();\n \t\treturn $this->redirect($this->generateUrl('turno', array()));\n \t}\n }\n return array('entity'=>$entity,'form'=>$form->createView(),);\n }", "public function newAction()\n {\n // TASK 1: create form\n $form = $this->generateCreateForm();\n\n return array(\n // TASK 1: pass form to view\n 'form' => $form->createView(),\n );\n }", "public function newAction()\n {\n $entity = new GestionPartenariat();\n $request = $this->getRequest();\n $partenariat_id = $request->query->get('partenariat_id');\n $this->get('session')->set('partenariat_id', $partenariat_id);\n $entity->setPartenariatId($partenariat_id);\n $form = $this->createForm(new GestionPartenariatType(), $entity);\n\n\t\t\t\t$contact = new Contact();\n\t\t\t\t$contact_form = $this->createForm(new ContactType(), $contact);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n\t\t\t\t\t\t'contact_form' => $contact_form->createView()\n );\n }", "public function newAction() {\n\n\t}", "public function newAction() {\n\n $entity = $this->get('admin.helper.ClothingType')->createNew();\n $form = $this->createForm(new ClothingTypes('add',$entity), $entity);\n return $this->render('LoveThatFitAdminBundle:ClothingType:new.html.twig', array(\n 'form' => $form->createView()));\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 newAction() {\n $this->_title($this->__(\"Supportticket\"));\n $this->_title($this->__(\"Supportticket\"));\n $this->_title($this->__(\"New Item\"));\n $id = $this->getRequest()->getParam(\"id\");\n $model = Mage::getModel(\"supportticket/supportticket\")->load($id);\n $data = Mage::getSingleton(\"adminhtml/session\")->getFormData(true);\n if (!empty($data)) {\n $model->setData($data);\n }\n Mage::register(\"supportticket_data\", $model);\n $this->loadLayout();\n $this->_setActiveMenu(\"supportticket/supportticket\");\n $this->getLayout()->getBlock(\"head\")->setCanLoadExtJs(true);\n $this->_addBreadcrumb(Mage::helper(\"adminhtml\")->__(\"Supportticket Manager\"), Mage::helper(\"adminhtml\")->__(\"Supportticket Manager\"));\n $this->_addBreadcrumb(Mage::helper(\"adminhtml\")->__(\"Supportticket Description\"), Mage::helper(\"adminhtml\")->__(\"Supportticket Description\"));\n $this->_addContent($this->getLayout()->createBlock(\"supportticket/adminhtml_supportticket_edit\"))->_addLeft($this->getLayout()->createBlock(\"supportticket/adminhtml_supportticket_edit_tabs\"));\n $this->renderLayout();\n }", "public function createAction()\n {\n\t $form = new Core_Form_Product_Create;\n $action = $this->_helper->url('create', 'product', 'default');\n $form->setAction($action);\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n $this->_model->create($form->getValues());\n\t \t $this->_helper->FlashMessenger('Product added successfully');\n $this->_helper->Redirector('index','product','default');\n } else {\n $form->populate($_POST);\n }\n } \n $this->view->form = $form;\n }", "public function newAction() {\n\t\t$Session = new Zend_Session_Namespace ( 'Admin' );\n\t\t$this->view->form = $this->getForm ( \"/admin/productsattributes/process\" );\n\n\t\t// I have to add the language id into the hidden field in order to save the record with the language selected \n\t\t$this->view->form->populate ( array('language_id' => $Session->langid) );\n\t\t\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\t\t array(\"url\" => \"/admin/productsattributes/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t\n\t\t$this->view->title = $this->translator->translate(\"Attributes\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can edit the attribute details.\");\n\t\t$this->render ( 'applicantform' );\n\t}", "public function newAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\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->insert($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n\n return new ViewModel(array('form' => $form));\n\n }", "abstract public function createForm();", "abstract public function createForm();", "public function newAction()\n {\n $entity = new ActionListe();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\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 newAction() {\n\t}", "public function create()\n {\n //see modal controller\n }", "public function create()\n {\n //see modal controller\n }", "public function create()\n {\n //see modal controller\n }", "public function newAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "public function newAction()\n {\n\t\tTag::appendTitle('Add New Category');\n }", "public function actionCreate()\n {\n $model = new Module();\n\n \n if ($model->load(Yii::$app->request->post())) {\n\n $createdBy = Yii::$app->user->getId();\n $model->owner_id = $createdBy;\n $model->status = 'in-making';\n $model->review_status = 'yet-to-review';\n\n if(!$model->validate()) { \n $errors = $model->getErrors();\n var_dump($errors); //or print_r($errors)\n exit;\n }\n $model->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function newAction()\n {\n $entity = new Lead();\n // $contact = new LeadContact();\n // $entity->addContact($contact);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "abstract protected function _setNewForm();", "public function newAction()\n {\n }", "public function newAction()\n {\n $this->_forward('edit');\n return $this;\n }", "public function actionCreate()\n\t{\n $this->actionUpdate();\n\t}", "public function newAction()\n {\n // Layout\n $this->loadLayout();\n\n // Title\n $this->_title($this->__('Add a credit card'));\n\n // Init messages\n $this->_initLayoutMessages('mbiz_cc/session');\n\n // Active menu\n $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation');\n if ($navigationBlock) {\n $navigationBlock->setActive('customer/cc');\n }\n\n // Render\n $this->renderLayout();\n }", "public function newAction()\n\t{\n\t}", "public function actionCreate() {\n $this->actionUpdate();\n }", "protected function create() {\n $this->db->insertRow($this->table_name, $this->update);\n storeDbMsg($this->db,\"New \" . $this->form_ID . \" successfully created!\");\n }", "public function actionCreate() {\n\t\t$request = Yii::app()->request;\n $form = new PersonaForm(\"new\");\n if($request->isPostRequest) {\n $form->attributes = $request->getPost('PersonaForm');\n if($form->validate()) {\n PersonaManager::savePersona($form);\n Yii::app()->user->setFlash('general-success', \"$form->nombre $form->apellido ha sido creado.\");\n $this->redirect('admin');\n }\n }\n $this->render('create', array('model'=>$form));\n }", "public function newAction()\n {\n $entity = new Payment();\n \n $user = $this->getUser();\n $em = $this->getDoctrine();\n \n //exit(\\Doctrine\\Common\\Util\\Debug::dump($guides));\n $pobox = $user->getPobox();\n if (!$pobox) {\n throw $this->createNotFoundException('Usted no es cliente...');\n } \n $customer = $pobox->getCustomer();\n $entity->setCustomer($customer);\n $form = $this->createCreateForm($entity);\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'nameform' => 'Reportar pago',\n );\n }", "public function newAction()\n {\n $entity = new Capacitador();\n $form = $this->createForm(new CapacitadorType(), $entity);\n\n /*** -Institucion ***/\n $institucion = new Institucioncapacitadora();\n $forminst = $this->createForm(new InstitucioncapacitadoraType(), $institucion);\n /** ---- **/\n \n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Facilitadores\", $this->get(\"router\")->generate(\"pantalla_facilitadores\"));\n $breadcrumbs->addItem(\"Registrar facilitador\", $this->get(\"router\")->generate(\"hello_page\"));\n\n return $this->render('CapacitacionBundle:Capacitador:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'forminst'=>$forminst->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Titeur();\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new TiteurType(), $entity, array('user' => $user));\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function createAction()\r\n\t{\r\n\t\treturn $this->_crud();\r\n\t}", "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 }", "private function newModel(){\n\t\t$this->assign('title', 'New Model');\n\t\t$this->assign('types', $this->getModelTypes());\n\t\t$this->display('model/new.tpl');\n\t}", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }" ]
[ "0.7908345", "0.78979737", "0.7888787", "0.78054065", "0.7710949", "0.7673343", "0.76732326", "0.75751275", "0.7570182", "0.7544481", "0.75305974", "0.7525074", "0.7483471", "0.7445332", "0.74449766", "0.74317545", "0.73895466", "0.7330956", "0.7330956", "0.7320867", "0.7320823", "0.7320823", "0.7301017", "0.7300917", "0.72737837", "0.7264618", "0.72493136", "0.72493136", "0.72493136", "0.72493136", "0.72493136", "0.72493136", "0.72493136", "0.72493136", "0.72292143", "0.72162724", "0.721576", "0.71990997", "0.7198319", "0.7197111", "0.7197111", "0.71936744", "0.71936375", "0.71936375", "0.7172336", "0.7167493", "0.7154739", "0.7154589", "0.7152558", "0.7150384", "0.713838", "0.7131752", "0.7131752", "0.7130693", "0.71265167", "0.71144456", "0.7108761", "0.7063167", "0.70597285", "0.704726", "0.7042154", "0.7034209", "0.7018906", "0.70095", "0.7006987", "0.6994916", "0.69930285", "0.6983309", "0.69808215", "0.69761896", "0.6974261", "0.6958461", "0.6958461", "0.69558495", "0.6932655", "0.69298846", "0.69276386", "0.69276386", "0.69276386", "0.692665", "0.6916922", "0.6916677", "0.6908884", "0.69057", "0.69041485", "0.6903591", "0.68947995", "0.688775", "0.68874425", "0.68827105", "0.68794024", "0.6870633", "0.68682134", "0.6865051", "0.6853242", "0.6846271", "0.68377376", "0.6812141", "0.68094635", "0.68094635", "0.68094635" ]
0.0
-1
Evaluate a double quoted string literal We need to replace the double quoted string with a
public function StringLiteral_DoubleQuotedStringLiteral(&$result, $sub) { $result['code'] = '\'' . substr(str_replace(['\'', '\\"'], ['\\\'', '"'], $sub['text']), 1, -1) . '\''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quote4Eval($in) {\n\t\tif (is_numeric($in)) {\n\t\t\treturn $in;\n\t\t} else {\n\t\t\treturn '\"' . str_replace(\"\\\\'\", \"'\", addslashes($in)) . '\"';\n\t\t}\n\t}", "public static function intoQuote($string){ return \"'\".$string.\"'\"; }", "function prepare_eval($phrase)\n{\n $retVal = \"\";\n $retVal = str_replace(\"!\", \"\\\"\",$phrase);\n $retVal = str_replace(\"#\", \"'\", $retVal);\n return str_replace(\"~\", \"#\", $retVal);\n}", "protected function quote($literal)\n {\n return \"'\" . addslashes($literal) . \"'\";\n }", "public function quote($stringValue);", "function trataApostrofe($str){\n\t\t$result_subst = str_replace(\"\\'\", \"'\", $str);\n\t\t$result_subst = str_replace(\"'\", \"\\'\", $result_subst);\n\t\treturn $result_subst;\n\t}", "abstract public function quoteString($value);", "public function quote_literal($value)\n\t{\n\t\tif (is_object($value) OR is_string($value))\n\t\t\treturn $this->escape($value);\n\n\t\treturn parent::quote_literal($value);\n\t}", "public function quoteAndEscape(string $str): string;", "public function quote_literal($value)\n\t{\n\t\tif (is_object($value) OR is_string($value))\n\t\t\treturn $this->escape_literal($value);\n\n\t\treturn parent::quote_literal($value);\n\t}", "public function addDoubleQuotes($str){\n\t\treturn '\"'.$str.'\"';\n\t}", "function changesqlquote($str,$rep=\"'\")\r\n{\r\n\treturn str_replace(\"`\", $rep, $str);\r\n}", "static function quote($s){\r\n return '\"' . str_replace('\"', '\\\"', $s) . '\"';\r\n }", "function escape_sq($str)\n{\n $esc_str = str_replace(\"'\", \"''\", $str);\n return $esc_str;\n}", "static function squote($s){\r\n return \"'\" . str_replace(\"'\", '\\'', $s) . \"'\";\r\n }", "function addSlhs($elm){return \"'\".$elm.\"'\";}", "private function newStringLiteralFromSemanticString($value) {\n // a character which needs to be escaped -- e.g., \"\\q\" and \"\\'\" are\n // literally \"\\q\" and \"\\'\". stripcslashes() is too aggressive, so find\n // all these under-escaped backslashes and escape them.\n\n $len = strlen($value);\n $esc = false;\n $out = '';\n\n for ($ii = 0; $ii < $len; $ii++) {\n $c = $value[$ii];\n if ($esc) {\n $esc = false;\n switch ($c) {\n case 'x':\n $u = isset($value[$ii + 1]) ? $value[$ii + 1] : '';\n if (!preg_match('/^[a-f0-9]/i', $u)) {\n // PHP treats \\x followed by anything which is not a hex digit\n // as a literal \\x.\n $out .= '\\\\\\\\'.$c;\n break;\n }\n /* fallthrough */\n case 'n':\n case 'r':\n case 'f':\n case 'v':\n case '\"':\n case '$':\n case 't':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n $out .= '\\\\'.$c;\n break;\n case 'e':\n // Since PHP 5.4.0, this means \"esc\". However, stripcslashes() does\n // not perform this conversion.\n $out .= chr(27);\n break;\n default:\n $out .= '\\\\\\\\'.$c;\n break;\n }\n } else if ($c == '\\\\') {\n $esc = true;\n } else {\n $out .= $c;\n }\n }\n\n return stripcslashes($out);\n }", "function quote($s) { \n return \"'\".str_replace('\\\\\"', '\"', addslashes($s)).\"'\"; \n }", "protected function _expressionString($ast, $class = null, $method = null) {\n $string = str_replace('\\\\\\\\', '\\\\', $ast['value']);\n // Make usre that string that include quotes and such, are properly escaped.\n $string = addslashes($string);\n $this->_emitter->emit(\"'{$string}'\");\n }", "function reholdQuotes($str){\n $str = str_replace(\"\\`\", \"`\", $str);\n $str = str_replace(\"\\\\\\\"\", \"\\\"\", $str);\n $str = str_replace(\"\\'\", \"'\", $str);\n $str = str_replace(\"\\\\\\\\\", \"\\\\\", $str);\n return $str;\n }", "function snmp_parser_unquote($str)\n{\n return str_replace(array('PLACEHOLDER-DOT', 'PLACEHOLDER-SPACE', 'PLACEHOLDER-ESCAPED-QUOTE'),\n array('.',' ','\"'), $str);\n}", "static public function addSingleQuotes($arg) \n { \n /* single quote and escape single quotes and backslashes */ \n return \"'\" . addcslashes($arg, \"'\\\\\") . \"'\"; \n }", "function testUrlEncodeQuotes3()\n\t{\n\t\t\t$input = 'This is a test with a \"double quote';\n\t\t\t$expectedOutput = \"This is a test with a &quot;double 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 unquote($str)\n{\n $pos = strpos($str, \"\\\"\");\n if ($pos === 0) {\n $qstr = substr($str, 1, -1);\n return trim($qstr);\n } else {\n return trim($str);\n }\n}", "function escape_double_quotes_in_json_string(string $jsonString, string $replacement = \"''\"): string\n {\n return preg_replace_callback(\n '/(?<!\\\\\\\\)(?:\\\\\\\\{2})*\\\\\\\\(?!\\\\\\\\)\"/',\n static function (array $match) use ($replacement): string {\n return str_replace('\\\\\"', $replacement, $match[0]);\n },\n $jsonString\n );\n }", "function ps_escape_string($str, $as_token = false, $esc_quotes = false) {\n $s = '';\n foreach (str_split($str) as $c) {\n if (($i = strpos(\"\\n\\r\\t\\10\\f\\\\()\", $c)) !== false)\n $c = '\\\\' . 'nrtbf\\\\()'[$i]; // postscript escapes, see PLRM 3.2.2 Literals\n elseif (($o = ord($c)) < 0x20 || $o >= 0x7F)\n $c = sprintf('\\\\%03o', $o); // control & non-ASCII\n elseif ($esc_quotes && $c == '\"')\n $c = '\\\\042'; // octal escape \" (for gs v9 parameters)\n $s .= $c;\n }\n return $as_token ? \"($s)\" : $s;\n}", "public function testCanEscapeTextInLiteralValuesSoItCanBeUsedDirectlyInSqlQuery()\n\t {\n\t\t$this->assertEquals(\"'test'\", $this->object->sqlText(\"test\"));\n\t\t$this->assertEquals(\"'won\\'t'\", $this->object->sqlText(\"won't\"));\n\n\t\t$this->object = new MySQLdatabase($GLOBALS[\"DB_HOST\"], \"nonexistentdb\", $GLOBALS[\"DB_USER\"], $GLOBALS[\"DB_PASSWD\"]);\n\t\t$this->assertEquals(\"'test'\", $this->object->sqlText(\"test\"));\n\t\t$this->assertEquals(\"'won''t'\", $this->object->sqlText(\"won't\"));\n\t }", "function bab_pm_quote($str)\n{\n return '\"' . str_replace('\"', '\"\"', $str) . '\"';\n}", "private static function parseDoubleQuotedStringWithEmbeddedVars($globals)\n\t{\n\t\t$scanner = $globals->curr_pkg->scanner;\n\t\t$value = $scanner->s;\n\t\t$scanner->readSym();\n\t\twhile( $scanner->sym === Symbol::$sym_embedded_variable ){\n\t\t\t# Embedded vars found, cannot determine the resulting value:\n\t\t\t$value = NULL;\n\t\t\t$v = $globals->searchVar($scanner->s);\n\t\t\tif( $v === NULL ){\n\t\t\t\t$globals->logger->error($scanner->here(), \"undefined variable \\$\" . $scanner->s);\n\t\t\t} else {\n\t\t\t\t// Check implicit conversion of $v to string:\n\t\t\t\t$r = Result::factory($v->type);\n\t\t\t\t$r->convertToString($globals->logger, $scanner->here());\n\t\t\t\t$globals->accountVarRHS($v);\n\t\t\t}\n\t\t\t$scanner->readSym();\n\t\t\tif( $scanner->sym === Symbol::$sym_continuing_double_quoted_string ){\n\t\t\t\t$scanner->readSym();\n\t\t\t}\n\t\t}\n\t\treturn Result::factory(Globals::$string_type, $value);\n\t}", "function unescape_quotes($str\n{\n $esc_str = str_replace(\"''\", \"'\", $str);\n $esc2_str = str_replace(\"\\\"\\\"\", \"\\\"\", $esc_str);\n return $esc2_str;\n}", "function sql_quote_string($val,$dbh=NULL) {\n global $SQL_DBH;\n if (is_null($dbh))\n return $SQL_DBH->quote($val);\n else\n return $dbh->quote($val);\n }", "function aQuote($matches){\n// print \"matches:\\n\";\n// print_r($matches);\n// print \"\\n\";\n\n $matches[1] = str_replace('**' , '', $matches[1]);\n list($type, $val) = preg_split('/:/', $matches[1]);\n\n switch($type){\n case 'localVar':\n return \"\\\". \\${$val} .\\\"\";\n break;\n case 'fieldVal':\n return \"\\\". dbQuote(\\$data['{$val}']) .\\\"\";\n break;\n case 'fieldChkVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'bool') .\\\"\";\n break;\n case 'fieldDateVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'date') .\\\"\";\n break;\n case 'fieldDateTimeVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'datetime') .\\\"\";\n break;\n case 'fieldIntVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'int') .\\\"\";\n break;\n case 'fieldMoneyVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'money') .\\\"\";\n break;\n case 'UserID':\n return \"\\\".\\$User->PersonID.\\\"\";\n break;\n case 'PR-ID':\n return \"\\\".\\$recordID.\\\"\";\n break;\n case 'RecordID':\n return \"\\\".\\$recordID.\\\"\";\n break;\n default:\n return $val;\n }\n\n //return \"replaced\";\n}", "static public function real_escape_string($s) { return self::escape($s); }", "public function doubleQuoteValue($value) {\n\t\t$value = addcslashes(\n\t\t\t$value,\n\t\t\timplode('', static::DOUBLE_QUOTED_MUST_ESCAPE)\n\t\t);\n\t\treturn '\"' . $value . '\"';\n\t}", "protected function pScalar_String(String_ $node): string\n {\n $kind = $node->getAttribute('kind', String_::KIND_SINGLE_QUOTED);\n\n if ($kind === String_::KIND_DOUBLE_QUOTED && $node->getAttribute('is_regular_pattern') === true) {\n return '\"' . $node->value . '\"';\n }\n\n return parent::pScalar_String($node);\n }", "function mswRemoveDoubleApostrophes($data) {\n return str_replace(\"''\",\"'\",$data);\n}", "function parse_php_string_simple($str)\n\n{\n\n return '<span class=\"php_string\">'.preg_replace('#\\\\\\\\([\\\\\\\\\\'])#', '<span class=\"php_string_escape\">$0</span>', htmlspecialchars(str_replace('\\\\\"', '\"', $str))).'</span>';\n\n}", "function yy_r66(){ $this->_retvalue = str_replace(array('.\"\".','\"\".','.\"\"'),array('.','',''),'\"'.$this->yystack[$this->yyidx + -1]->minor.'\"'); }", "private static function escapeSql($s) // {{{\n {\n $matches = array(\"\\\\\", \"'\", \"\\\"\" /*,\"\\0\", \"\\b\", \"\\n\", \"\\r\", \"\\t\"*/);\n $replacements = array(\"\\\\\\\\\", \"\\\\'\", \"\\\\\\\"\", /*\"\\\\0\", \"\\\\b\", \"\\\\n\", \"\\\\r\",\n \"\\\\t\"*/);\n $st = str_replace($matches, $replacements, $s);\n return $st;\n }", "public static function quotedString($str)\n {\n }", "function escapeSimple($string) {\n return $this->dbH->quote($string);\n }", "function qescape($str)\n{\n $str = str_replace('\\\\', '\\\\\\\\', $str);\n return str_replace('\"', '\\\\\"', $str);\n}", "protected function quote_escaped()\n {\n }", "public function quoteString($str)\n {\n return $this->quote($str);\n }", "function wrapper_escape($string) {\n\t\treturn str_replace(\"'\", \"''\", $string);\n\t}", "function OneTwoQuoteToCode($str) {\n\t$from = array(\"'\", \"\\\"\");\n\t$to = array(\"&#145;\", \"&quot;\");\t\n\treturn str_replace($from, $to, $str);\n}", "protected function quote ( $str ) {\n\n\t\tif(strpos($str, '\"')) {\n\t\t\t$str = str_replace('\"', '\\\"', $str);\n\t\t\t$str = '\"'.$str.'\"';\n\t\t}\n\t\telseif(strpos($str, \"'\")) {\n\t\t\t$str = str_replace(\"'\", \"\\'\", $str);\n\t\t\t$str = \"'\".$str.\"'\";\n\t\t}\n\n\t\treturn $str;\n }", "function trataApostrofeFromBD($str){\n\t\t$result_subst = str_replace(\"\\'\", \"'\", $str);\t\t\t\t\t\t\n\t\treturn $result_subst;\n\t}", "function escape($inString) {\r\n\t\treturn str_replace('\"', '\\\"', $inString);\r\n\t}", "private function quoted(string $value): string\n {\n return sprintf('\\'%s\\'', $value);\n }", "private function escapeString(string $value): string\n {\n return str_replace(\"'\", \"''\", $value);\n }", "public function jsQuoteEscapeDataAttribute($data)\r\n\t{\r\n\t\treturn str_replace(array(chr(34), chr(39)),array('&quot;','&apos;'),$data);\r\n\t}", "public static function quote($s){\r\n\t\treturn LEFT_QUOTES . $s . RIGHT_QUOTES;\r\n\t}", "public function quote($value){\n $connection = $this -> connect();\n return pg_escape_literal($value);\n }", "abstract public function escapeString($value);", "private function unquote($value) {\n\t//--\n\tif(!$value) {\n\t\treturn $value;\n\t} //end if\n\tif(!is_string($value)) {\n\t\treturn $value;\n\t} //end if\n\tif($value[0] == '\\'') {\n\t\treturn trim($value, '\\'');\n\t} //end if\n\tif($value[0] == '\"') {\n\t\treturn trim($value, '\"');\n\t} //end if\n\t//--\n\treturn $value;\n\t//--\n}", "public function quote($str) {\n\t\treturn $this->_resource->quote($str);\n\t}", "private function quote( )\n {\n if ( @ count( $this->data_buffer ) == 0 )\n return;\n foreach ( $this->data_buffer as $key => $val )\n {\n if ( in_array( $key, $this->string_fields ))\n $this->data_buffer[$key] = @\"'\".mysql_real_escape_string($val,underQL::$db_handle).\"'\";\n else\n $this->data_buffer[$key] = $val;\n }\n }", "public function literal($literalValue);", "function mSTRING_LITERAL2(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$STRING_LITERAL2;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:427:3: ( '\\\"' ( options {greedy=false; } : ~ ( '\\\\u0022' | '\\\\u005C' | '\\\\u000A' | '\\\\u000D' ) | ECHAR )* '\\\"' ) \n // Tokenizer11.g:428:3: '\\\"' ( options {greedy=false; } : ~ ( '\\\\u0022' | '\\\\u005C' | '\\\\u000A' | '\\\\u000D' ) | ECHAR )* '\\\"' \n {\n $this->matchChar(34); \n // Tokenizer11.g:429:3: ( options {greedy=false; } : ~ ( '\\\\u0022' | '\\\\u005C' | '\\\\u000A' | '\\\\u000D' ) | ECHAR )* \n //loop19:\n do {\n $alt19=3;\n $LA19_0 = $this->input->LA(1);\n\n if ( (($LA19_0>=$this->getToken('0') && $LA19_0<=$this->getToken('9'))||($LA19_0>=$this->getToken('11') && $LA19_0<=$this->getToken('12'))||($LA19_0>=$this->getToken('14') && $LA19_0<=$this->getToken('33'))||($LA19_0>=$this->getToken('35') && $LA19_0<=$this->getToken('91'))||($LA19_0>=$this->getToken('93') && $LA19_0<=$this->getToken('65535'))) ) {\n $alt19=1;\n }\n else if ( ($LA19_0==$this->getToken('92')) ) {\n $alt19=2;\n }\n else if ( ($LA19_0==$this->getToken('34')) ) {\n $alt19=3;\n }\n\n\n switch ($alt19) {\n \tcase 1 :\n \t // Tokenizer11.g:430:5: ~ ( '\\\\u0022' | '\\\\u005C' | '\\\\u000A' | '\\\\u000D' ) \n \t {\n \t if ( ($this->input->LA(1)>=$this->getToken('0') && $this->input->LA(1)<=$this->getToken('9'))||($this->input->LA(1)>=$this->getToken('11') && $this->input->LA(1)<=$this->getToken('12'))||($this->input->LA(1)>=$this->getToken('14') && $this->input->LA(1)<=$this->getToken('33'))||($this->input->LA(1)>=$this->getToken('35') && $this->input->LA(1)<=$this->getToken('91'))||($this->input->LA(1)>=$this->getToken('93') && $this->input->LA(1)<=$this->getToken('65535')) ) {\n \t $this->input->consume();\n\n \t }\n \t else {\n \t $mse = new MismatchedSetException(null,$this->input);\n \t $this->recover($mse);\n \t throw $mse;}\n\n\n \t }\n \t break;\n \tcase 2 :\n \t // Tokenizer11.g:436:7: ECHAR \n \t {\n \t $this->mECHAR(); \n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop19;\n }\n } while (true);\n\n $this->matchChar(34); \n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "function prepare2eval($evalStr)\n// ****************************\n{\n return html_entity_decode($evalStr);\n}", "public function testQuoteWorksWithAlreadyQuotedValue()\n {\n $quoted = $this->database->quote(\"NonEmptyValue\");\n $quoted = $this->database->quote($quoted);\n\n $this->assertEquals(\"'\\'NonEmptyValue\\''\", $quoted);\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}", "public function testDefaultStringForStringWithQuotes()\n {\n $this->assertEquals(\n static::TEST_STRING . static::TEST_STRING . static::TEST_STRING,\n StringUtils::defaultString(static::TEST_STRING, StringUtils::NULL_STR, static::TEST_STRING)\n );\n }", "public static function fixQuotes($_val) {\n\t\tif (is_array($_val))\n\t\t\treturn array_map('self::fixQuotes',$_val);\n\t\treturn is_string($_val)?\n\t\t\tstr_replace('\"','&#34;',self::resolve($_val)):$_val;\n\t}", "public function getLiteralValue();", "function testUrlEncodeQuotes4()\n\t{\n\t\t\t$input = 'This \\'is \"a \"test \"with lot\\'s of quote\\'s';\n\t\t\t$expectedOutput = \"This &#39;is &quot;a &quot;test &quot;with lot&#39;s of quote&#39;s\";\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}", "public static function literalize ($value)\n {\n\n static\n $keys = array(\"\\\\\", \"%'\", \"'\"),\n $reps = array(\"\\\\\\\\\", \"\\\"\", \"\\\\'\");\n\n if ($value == null)\n {\n\n // null value\n return 'null';\n\n }\n\n // lowercase our value for comparison\n $value = trim($value);\n $lvalue = strtolower($value);\n\n if ($lvalue == 'on' || $lvalue == 'yes' || $lvalue == 'true')\n {\n\n // replace values 'on' and 'yes' with a boolean true value\n return 'true';\n\n } else if ($lvalue == 'off' || $lvalue == 'no' || $lvalue == 'false')\n {\n\n // replace values 'off' and 'no' with a boolean false value\n return 'false';\n\n } else if (!is_numeric($value))\n {\n\n $value = str_replace($keys, $reps, $value);\n\n return \"'\" . $value . \"'\";\n\n }\n\n // numeric value\n return $value;\n\n }", "function filterinput($variable)\n{\n // this will add a slash in front of every occurnece of ' in the string \n $variable = str_replace(\"'\", \"\\'\", $variable);\n // this will attempt to add a slash in front og every \" in the string\n // this will not run there is a syntax error the first parmeter need to add a \\ in the middle \n // it would be a better practice to just re-write the arameters as ('\"', '\\\"', $variable)\n $variable = str_replace(\"\"\", \"\\\"\", $variable);\n return $variable;\n}", "function jstr($str)\n{\n\t$str = str_replace( \"\\n\", '', $str );\n\treturn \"'\".$str.\"'\";\n}", "public function escape($stringValue);", "abstract public function escape_string( $str );", "function mswConvertSmartQuotes($string) {\n return $string;\n //$search = array(chr(145),chr(146),chr(147),chr(148),chr(151));\n //$replace = array(\"'\",\"'\",'\"','\"','-');\n //return str_replace($search,$replace,$string);\n}", "public function t_constant_encapsed_string($sTag) {\n\t\tif (substr($sTag, 0, 1) == '\\'') {\n\t\t\t$prev = $this->oBeaut->getPreviousTokenConstant();\n\t\t\t\n\t\t\tif ($prev == T_INCLUDE || $prev == T_INCLUDE_ONCE || $prev == T_REQUIRE || $prev == T_REQUIRE_ONCE || $prev == T_ECHO) {\n\t\t\t\t$this->oBeaut->removeWhitespace();\n\t\t\t\t$this->oBeaut->add(' ');\n\t\t\t\t$this->oBeaut->add($sTag);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\treturn PHP_Beautifier_Filter::BYPASS;\n\t\t}\n\t\t\n\t\t// Detect for things that require double quotes\n\t\t$isEscaped = false;\n\t\t$singleQuoteString = '';\n\t\t$sTag = substr($sTag, 1, strlen($sTag) - 2);\n\t\t\n\t\tforeach (str_split($sTag) as $char) {\n\t\t\tif ($isEscaped) {\n\t\t\t\tif (preg_match('/[nrtvf0-9x]/', $char)) {\n\t\t\t\t\treturn PHP_Beautifier_Filter::BYPASS;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$isEscaped = false;\n\t\t\t\t\n\t\t\t\tif ($char == '$' || $char == '\"') {\n\t\t\t\t\t$singleQuoteString .= $char;\n\t\t\t\t} elseif ($char == '\\\\') {\n\t\t\t\t\t$singleQuoteString .= '\\\\\\\\';\n\t\t\t\t} elseif ($char == '\\'') {\n\t\t\t\t\t$singleQuoteString .= '\\\\\\'';\n\t\t\t\t} else {\n\t\t\t\t\t$singleQuoteString .= '\\\\\\\\' . $char;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($char == '$') {\n\t\t\t\t\treturn PHP_Beautifier_Filter::BYPASS;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($char == '\\\\') {\n\t\t\t\t\t$isEscaped = true;\n\t\t\t\t} elseif ($char == '\\'') {\n\t\t\t\t\t$singleQuoteString .= '\\\\\\'';\n\t\t\t\t} else {\n\t\t\t\t\t$singleQuoteString .= $char;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->oBeaut->add('\\'' . $singleQuoteString . '\\'');\n\t}", "public static function compileString($value) {\n\t\t$value = str_replace(chr(39), chr(92) . chr(39), $value);\n\t\treturn \"'{$value}'\";\n\t}", "public function escapeSingleQuotes($str)\n {\n return str_replace(\"'\", \"\\'\", $str);\n }", "public function escapeSingleQuotes($str)\n {\n return str_replace(\"'\", \"\\'\", $str);\n }", "public function escape(string $str): string;", "public abstract function escapeString($value);", "function string_process_quote($p_string) {\n\n\t\t\t$pattern = '#\\[quote[^\\]]*\\]#imsU';\n\t\t\tif ( !preg_match($pattern, $p_string, $matches) ) {\n\t\t\t\treturn $p_string;\n\t\t\t}\n\t\t\t$pattern = '#\\[quote(?:=([^\\]]+))?\\](.+)\\[/quote\\]#imsU';\n\t\t\t$p_string = preg_replace_callback($pattern, array($this, 'replaceQuotes'), $p_string);\n\t\t\treturn $p_string;\n\t\t}", "function qa_js($value, $forcequotes = false)\n{\n\t$boolean = is_bool($value);\n\tif ($boolean)\n\t\t$value = $value ? 'true' : 'false';\n\tif ((is_numeric($value) || $boolean) && !$forcequotes)\n\t\treturn $value;\n\telse\n\t\treturn \"'\" . strtr($value, array(\n\t\t\t\t\"'\" => \"\\\\'\",\n\t\t\t\t'/' => '\\\\/',\n\t\t\t\t'\\\\' => '\\\\\\\\',\n\t\t\t\t\"\\n\" => \"\\\\n\",\n\t\t\t\t\"\\r\" => \"\\\\n\",\n\t\t\t)) . \"'\";\n}", "function string($value) {\n return \"'$value'\";\n}", "function filtrarSql($valor) {\n\n $valor = str_replace(\"'\", \"\\'\", $valor);\n $valor = str_replace('\"', '\\\"', $valor);\n return $valor;\n}", "public function quoteSingleIdentifier($str)\n {\n $c = '\"';//$this->getIdentifierQuoteCharacter();\n\n return $c . str_replace($c, $c . $c, $str) . $c;\n }", "public function escapeString(string $value): string;", "public static function escapeSql($str)\n {\n return StringUtils::replace($str, '\\'', '\\'\\'');\n }", "public static function escapeQuote($val){\n\t\t\tswitch(gettype($val)){\n\t\t\t\tcase 'array': case 'object':\n\t\t\t\t\t$val=(array)$val;\n\t\t\t\t\tforeach($val as $k=>$v)\n\t\t\t\t\t\t$val[$k]=self::escapeQuote($v);\n\t\t\t\t\treturn $val;\n\t\t\t\tcase 'string':\n\t\t\t\t\treturn '\"'.self::escape($val).'\"';\n\t\t\t\tcase 'NULL':\n\t\t\t\t\treturn 'NULL';\n\t\t\t\tcase 'boolean':\n\t\t\t\t\treturn $val ? 'TRUE' : 'FALSE';\n\t\t\t\tdefault:\n\t\t\t\t\treturn strval($val); \n\t\t\t}\n\t\t}", "public function quote($input)\n {\n return \"'\" . str_replace(\"'\",\"''\",$input) . \"'\";\n }", "private static function addQuotes($el) {\r\n if( is_array($el) ) {\r\n $el = array_map(array($this, __FUNCTION__), $el);\r\n }\r\n if( is_string($el) ) {\r\n $el = '\\'' . SQLite3::escapeString($el) . '\\'';\r\n }\r\n if( is_bool($el) ){\r\n $el = $el?'1':'0';\r\n }\r\n if( is_null($el) ){\r\n $el = 'NULL';\r\n }\r\n return $el;\r\n }", "protected function quoteContent(string $content): string {\n return \"'\".str_replace(\n ['\\\\', \"\\r\", \"\\n\", \"'\"],\n ['\\\\\\\\', '\\\\r', '\\\\n', \"\\\\'\"],\n $content\n ).\"'\";\n }", "function privSwapBackMagicQuotes()\n {\n }", "function reemplazar_comillas($string){\n\t$string = str_replace (\"'\", \"\\\"\", $string);\n\t$string = str_replace ('\"', '\\\"', $string);\n\t$string = str_replace (\"\\'\", \"\\\"\", $string);\n\t$string = str_replace ('\\\"', '\\\"', $string);\n\t\n\treturn $string;\n}", "protected function processDoubleQuotedString (File $phpcsFile, $stackPtr, $qtString)\n {\n // so there should be at least a single quote or a special char\n // if there are the 2 kinds of quote and no special char, then add a warning\n $has_variable = parent::processDoubleQuotedString($phpcsFile, $stackPtr, '\"'.$qtString.'\"');\n $has_specific_sequence = $this->_hasSpecificSequence($qtString);\n $dbl_qt_at = strpos($qtString, '\"');\n $smpl_qt_at = strpos($qtString, \"'\");\n if (false === $has_variable && false === $has_specific_sequence\n && false === $smpl_qt_at\n ) {\n $error = 'Single-quoted strings should be used unless it contains variables, special chars like \\n or single quotes.';\n $phpcsFile->addError($error, $stackPtr, 'DoubleQuoteUsageSniff');\n } else if (false !== $smpl_qt_at && false !== $dbl_qt_at\n && false === $has_variable && false === $has_specific_sequence\n ) {\n $warning = 'It is encouraged to use a single-quoted string, since it doesn\\'t contain any variable nor special char though it mixes single and double quotes.';\n $phpcsFile->addWarning($warning, $stackPtr, 'DoubleQuoteUsageSniff');\n }\n }", "function trataApostrofeToBD($str){\n\t\t$result_subst = str_replace(\"\\'\", \"'\", $str);\t\t\t\t\t\t\n\t\t$result_subst = str_replace(\"'\", \"\\'\", $result_subst);\n\t\treturn $result_subst;\n\t}", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}", "public function quoteString($str)\n {\n return $this->quote($str);\n }", "function Quote( $text ) {\n\t\treturn '\\'' . getEscaped( $text ) . '\\'';\n\t}", "function escape($_str) {\n\t\treturn str_replace('\"', '&quot;', $_str);\n\t}" ]
[ "0.64030397", "0.6339041", "0.63248557", "0.6257721", "0.6214622", "0.62100613", "0.62001795", "0.61983013", "0.61735827", "0.61577743", "0.61317647", "0.6129143", "0.60889196", "0.6074564", "0.60499704", "0.6026522", "0.5969111", "0.59674126", "0.59493345", "0.5938987", "0.59042895", "0.5902477", "0.5896604", "0.5894231", "0.58786976", "0.5852648", "0.58315825", "0.58196", "0.58012354", "0.57762575", "0.5772706", "0.57661116", "0.5740859", "0.5728143", "0.571765", "0.5710762", "0.5710535", "0.5704908", "0.5701074", "0.56778336", "0.5674809", "0.56531435", "0.5652163", "0.5639046", "0.56304264", "0.5628113", "0.5623008", "0.5618447", "0.5611927", "0.5609906", "0.5603833", "0.5603555", "0.5603361", "0.5597514", "0.5593811", "0.55835104", "0.5574762", "0.55664265", "0.55619353", "0.55596805", "0.5557347", "0.5555307", "0.55420643", "0.5518067", "0.5517821", "0.55136245", "0.55128944", "0.55117446", "0.55074465", "0.55072963", "0.55035645", "0.54940087", "0.5485989", "0.54810536", "0.54687136", "0.54515797", "0.54515797", "0.5445447", "0.54428047", "0.5435247", "0.54249424", "0.54195625", "0.5414399", "0.5405887", "0.54053545", "0.5403533", "0.54028106", "0.53961927", "0.53919095", "0.5388109", "0.5383831", "0.5383761", "0.5376013", "0.5372753", "0.53682435", "0.53682435", "0.5365784", "0.53624487", "0.5359222", "0.5342633" ]
0.70083034
0
Return an expression that unwraps the given expression if it is a Context object.
protected function unwrapExpression($expression) { $varName = '$_' . $this->tmpId++; return '((' . $varName . '=' . $expression . ') instanceof \Neos\Eel\Context?' . $varName . '->unwrap():' . $varName . ')'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExpressionContext()\n {\n return $this->expressionContext;\n }", "public function normalize($value)\n {\n if ($value instanceof Expression ||\n $value instanceof Expressionable) {\n return $value;\n }\n\n return parent::normalize($value);\n }", "public static function expression($expression) {\n\t\treturn new \\db\\expression($expression);\n\t}", "public function raw($expression = null) {\n // Execute the closure on the mongodb collection\n if ($expression instanceof Closure) {\n return call_user_func($expression, $this->collection);\n }\n\n // Create an expression for the given value\n else if (!is_null($expression)) {\n return new Expression($expression);\n }\n\n // Quick access to the mongodb collection\n return $this->collection;\n }", "public function raw($expression)\n\t{\n\t\treturn $this->rawFactory->__invoke($expression);\n\t}", "public function raw($expression = null)\n {\n // Execute the closure on the mongodb collection\n if ($expression instanceof Closure) {\n return call_user_func($expression, $this->collection);\n }\n\n // Create an expression for the given value\n elseif (!is_null($expression)) {\n return new Expression($expression);\n }\n\n // Quick access to the mongodb collection\n return $this->collection;\n }", "public function raw($expression = null)\n {\n // Execute the closure on the mongodb collection\n if ($expression instanceof Closure)\n {\n return call_user_func($expression, $this->collection);\n }\n\n // Create an expression for the given value\n else if ( ! is_null($expression))\n {\n return new Expression($expression);\n }\n\n // Quick access to the mongodb collection\n return $this->collection;\n }", "public function evaluateExpression($expression)\n {\n if ($this->getTalesMode() === 'php') {\n return PHPTAL_Php_TalesInternal::php($expression);\n }\n return PHPTAL_Php_TalesInternal::compileToPHPExpressions($expression, false);\n }", "public function getExpression()\n {\n if (array_key_exists(\"expression\", $this->_propDict)) {\n return $this->_propDict[\"expression\"];\n } else {\n return null;\n }\n }", "public function raw($value)\n {\n return new Expression($value);\n }", "public function reverseTransform($expression)\n {\n if (!$expression) {\n return null;\n }\n\n $expression = $this->serializer->deserialize($expression);\n\n if (null === $expression) {\n throw new TransformationFailedException(sprintf(\n 'An issue with number \"%s\" does not exist!',\n $expression\n ));\n }\n\n return $expression;\n }", "public function CheckIsLiteral($expression)\n\t\t{\n\t\t\tif (!is_a($expression, SqlEntity)) \n\t\t\t{\n\t\t\t\treturn new SqlLiteral($expression);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $expression;\n\t\t\t}\n\t\t}", "public function getExpression(): string\n {\n if ($this->wrapMode > 0) {\n return ($this->wrapMode === static::WRAP_IN_TAGS ? '<?php ' : '<?= ') . $this->expression . ' ?>';\n }\n\n return $this->expression;\n }", "public static function evalExpression($expression, Container $container) {\n if ($expression instanceof Statement) {\n $arguments = [];\n foreach ($expression->arguments as $attribute) {\n if ($attribute === '...') {\n continue;\n }\n $arguments[] = self::evalExpression($attribute, $container);\n }\n $entity = self::$semanticMap[$expression->entity] ?? $expression->entity;\n if (function_exists($entity)) {\n return $entity(...$arguments);\n } else {\n throw new NotImplementedException();\n /* $rc = ClassType::from($entity);\n return $rc->newInstanceArgs(Resolver::autowireArguments($rc->getConstructor(), $arguments, function (string $type, bool $single) use ($container) {\n return $this->getByType($type);\n }));*/\n // TODO!!!\n }\n } else {\n return $expression;\n }\n }", "public function expr()/*# : ExpressionInterface */;", "function evaluateExpression($expression)\n\t{\n\t\treturn eval('return '.$expression.';');\n\t}", "public function getExpression();", "protected function evalaluate($expression) {\n $evaluated = @eval('return (' . $expression . ');');\n \n return $evaluated !== false ? $evaluated : '';\n }", "public function getExpressionNode()\n {\n return $this->expressionNode;\n }", "final public static function unwrap(mixed $value): mixed\n {\n if ($value instanceof self) {\n $value = $value->value;\n }\n\n return $value;\n }", "public static function createExpression($sql_expression) {\r\n\t return new LazyDBExpressionType($sql_expression);\r\n\t}", "public function transform($expression)\n {\n if (null === $expression) {\n return '';\n }\n\n return $this->serializer->serialize($expression);\n }", "static function expr(string $expression) : string\n {\n '' !== $expression && '(' === $expression[0]\n && $expression = substr($expression, 1, -1);\n\n return trim($expression);\n }", "public static function expr($string = '')\n\t{\n\t\treturn new Expression($string);\n\t}", "public function expressionFunction();", "public function setExpressionContext(ExpressionContext $expressionContext)\n {\n $this->expressionContext = $expressionContext;\n\n return $this;\n }", "private function onWrapper()\n {\n return function ($parameter) {\n if ($parameter instanceof FragmentInterface) {\n return $parameter;\n }\n\n return new Expression($parameter);\n };\n }", "private function wrapExpression( $from, callable $expr, array $types ) {\n\t\tlist( $fn, $pos ) = explode( ':', $from );\n\t\t$from = \"The expression return value of argument {$pos} of {$fn}\";\n\n\t\treturn function ( $value ) use ( $from, $expr, $types ) {\n\t\t\t$value = $expr( $value );\n\t\t\t$this->validateType( $from, $value, $types );\n\n\t\t\treturn $value;\n\t\t};\n\t}", "public final static function unwrapThrowable(Throwable $x) {\n if ($x instanceof ThrowableException)\n return $x->unwrap();\n return $x;\n }", "private function parenthesizeIfLowerThanArrow(\n /*IExpression*/ $expression, /*string*/ $expr) /*: string*/ {\n if ($expression instanceof BinaryOpExpression ||\n $expression instanceof ClosureExpression ||\n $expression instanceof ConditionalExpression ||\n $expression instanceof ListAssignmentExpression ||\n $expression instanceof NewObjectExpression ||\n $expression instanceof UnaryOpExpression) {\n $expr = '('.$expr.')';\n }\n return $expr;\n }", "public function calculateExpression($expression) {\n if (!is_numeric($expression)) {\n foreach ($this->operators as $operator) {\n if (strpos($expression, $operator)) {\n $result = $this->getCalculateOperation($operator);\n $operands = explode($operator, $expression);\n $this->setOperationOperands($result, $operands);\n return $result->calculate();\n }\n }\n } else {\n $operand = new Number($expression);\n return $operand;\n }\n }", "public function expression(){\n try {\n // Sparql11query.g:375:3: ( conditionalOrExpression ) \n // Sparql11query.g:376:3: conditionalOrExpression \n {\n $this->pushFollow(self::$FOLLOW_conditionalOrExpression_in_expression1283);\n $this->conditionalOrExpression();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function getExpression()\n {\n return $this->expression;\n }", "public function getExpression()\n {\n return $this->expression;\n }", "public function getArgumentUnwrapped()\n {\n return $this->readWrapperValue(\"argument\");\n }", "public function visitIfelem(Node $node) : Context\n {\n $condition = $node->children['cond'];\n\n // dig nodes to avoid NOT('!') operator's converting its value to boolean type\n while (isset($condition->flags) && $condition->flags === ast\\flags\\UNARY_BOOL_NOT){\n $condition = $condition->children['expr'];\n }\n\n // evaluate the type of conditional expression\n $union_type = UnionType::fromNode($this->context, $this->code_base, $condition);\n // $condition === null will be appeared in else-clause, then avoid them\n if (($union_type->serialize() !== \"bool\") && $condition !== null) {\n $this->emit(\n 'PhanPluginNonBoolBranch',\n 'Non bool value evaluated in if clause',\n []\n );\n }\n return $this->context;\n }", "public static function expr()\n {\n $out = call_user_func_array('self::parse', func_get_args());\n $obj = text($out);\n return $obj;\n }", "public function getExpressionResult()\n {\n if (array_key_exists(\"expressionResult\", $this->_propDict)) {\n return $this->_propDict[\"expressionResult\"];\n } else {\n return null;\n }\n }", "public function evaluate ($expression, DomNode $contextNode = null, $registerNodeNS = null) {}", "protected function getValue($value)\n {\n if (is_array($value) || is_bool($value)) {\n return $value;\n }\n\n return new Expr($value);\n }", "public function getExpression() {\n return $this->expression;\n }", "public function getExpressionLanguageEvaluator()\n {\n return $this->expressionLanguageEvaluator;\n }", "private function wrap($result)\r\n {\r\n $final_string = $this->treat_as_subexpression && !$this->has_alias() ? sprintf(\"(%s)\", $result) : $result;\r\n if($this->has_alias()){\r\n $final_string = sprintf(\"(%s) AS %s\",$final_string,$this->get_alias_identifier());\r\n }\r\n return $final_string;\r\n }", "function invert(callable $x): callable\n{\n return function ($y) use ($x): bool {\n return ! $x($y);\n };\n}", "function e($expr) \n {\n //call the core evaluation method\n return $this->evaluate($expr);\n }", "public function getExpressionEvaluationDetails()\n {\n if (array_key_exists(\"expressionEvaluationDetails\", $this->_propDict)) {\n if (is_a($this->_propDict[\"expressionEvaluationDetails\"], \"\\Beta\\Microsoft\\Graph\\Model\\ExpressionEvaluationDetails\") || is_null($this->_propDict[\"expressionEvaluationDetails\"])) {\n return $this->_propDict[\"expressionEvaluationDetails\"];\n } else {\n $this->_propDict[\"expressionEvaluationDetails\"] = new ExpressionEvaluationDetails($this->_propDict[\"expressionEvaluationDetails\"]);\n return $this->_propDict[\"expressionEvaluationDetails\"];\n }\n }\n return null;\n }", "protected function parseExpression()\n {\n $entities = array();\n while ($e = $this->matchFuncs(array('parseAddition', 'parseEntity'))) {\n $entities[] = $e;\n // operations do not allow keyword \"/\" dimension (e.g. small/20px) so we support that here\n if (!$this->peekReg('/\\\\G\\/[\\/*]/') && ($delim = $this->matchChar('/'))) {\n $entities[] = new ILess_Node_Anonymous($delim);\n }\n }\n if (count($entities) > 0) {\n return new ILess_Node_Expression($entities);\n }\n }", "public function getContextForUser(User $user): ?Context;", "public function analyzeClassAssertion($object_node, $expr_node): ?Context\n {\n if (!($object_node instanceof Node)) {\n return null;\n }\n if ($expr_node instanceof Node) {\n $expr_value = UnionTypeVisitor::unionTypeFromNode($this->code_base, $this->context, $expr_node)->asSingleScalarValueOrNull();\n } else {\n $expr_value = $expr_node;\n }\n if (!is_string($expr_value)) {\n $expr_type = UnionTypeVisitor::unionTypeFromNode($this->code_base, $this->context, $expr_node);\n if (!$expr_type->canCastToUnionType(UnionType::fromFullyQualifiedPHPDocString('string|false'), $this->code_base)) {\n Issue::maybeEmit(\n $this->code_base,\n $this->context,\n Issue::TypeComparisonToInvalidClassType,\n $this->context->getLineNumberStart(),\n $expr_type,\n 'false|string'\n );\n }\n // TODO: Could warn about invalid assertions\n return null;\n }\n $fqsen_string = '\\\\' . $expr_value;\n try {\n $fqsen = FullyQualifiedClassName::fromFullyQualifiedString($fqsen_string);\n } catch (FQSENException $_) {\n Issue::maybeEmit(\n $this->code_base,\n $this->context,\n Issue::TypeComparisonToInvalidClass,\n $this->context->getLineNumberStart(),\n StringUtil::encodeValue($expr_value)\n );\n\n return null;\n }\n $expr_type = \\is_string($expr_node) ? $fqsen->asType()->asRealUnionType() : $fqsen->asType()->asPHPDocUnionType();\n\n $var_name = $object_node->children['name'] ?? null;\n // Don't analyze variables such as $$a\n if (!\\is_string($var_name)) {\n return null;\n }\n try {\n // Get the variable we're operating on\n $variable = $this->getVariableFromScope($object_node, $this->context);\n if (\\is_null($variable)) {\n return null;\n }\n // Make a copy of the variable\n $variable = clone($variable);\n\n $variable->setUnionType($expr_type);\n\n // Overwrite the variable with its new type in this\n // scope without overwriting other scopes\n return $this->context->withScopeVariable(\n $variable\n );\n } catch (\\Exception $_) {\n // Swallow it (E.g. IssueException for undefined variable)\n }\n return null;\n }", "protected function compileRaw($expression)\n {\n if (Str::startsWith($expression, '(')) {\n $expression = substr($expression, 1, -1);\n }\n\n return \"<?php echo \\$__env->make($expression, ['raw' => true], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>\";\n }", "public function evaluate($expression) {\n $postfix = $this->convertInfixToPostfix($expression);\n $result = $this->evaluatePostfix($postfix);\n\n return $result;\n }", "public function isExpression($value)\n {\n return $value instanceof Expression;\n }", "function using(&$expr, $as, $block) {\n if (xp::registry('exceptions')) {\n xp::registry('using', NULL);\n return xp::null();\n }\n\n if (NULL === ($u= xp::registry('using'))) {\n $e= &new NullPointerException('Shadowing of as ('.xp::stringOf($as).')');\n $expr && $expr->__exit($e);\n return throw($e);\n }\n\n extract($u[1]);\n xp::registry('using', NULL);\n\n if (!$expr) {\n return throw(new NullPointerException('using('.$u[0].')'));\n }\n\n try(); {\n eval('$'.$u[0].'= &$expr; '.$block);\n } if (catch('Throwable', $e)) {\n // Intentionally empty\n } finally(); {\n $expr->__exit($e);\n if ($e) return throw($e);\n }\n }", "public function resolveTransformer()\n {\n if (\\is_string($this->resolver)) {\n return $this->container->make($this->resolver);\n } elseif (\\is_callable($this->resolver)) {\n return \\call_user_func($this->resolver, $this->container);\n } elseif (\\is_object($this->resolver)) {\n return $this->resolver;\n }\n\n throw new RuntimeException('Unable to resolve transformer binding.');\n }", "public function evaluate($expression, $context, $x=NULL)\n\t{\n\t\t$context->node=$this;\n\n\t\treturn $this->script->evaluate($expression, $context, $x);\n\t}", "public function postUnwrap($expression, $expression2) {\n foreach (explode(',', $expression2) as $tag) {\n $ex = \"{$expression} {$tag}\";\n $i = 0;\n do {\n if ($i++ > 5000) // 224084 page24 p6668049 - 200, 7738442 page5 p29348959 - ??\n throw new Exception(\"postUnwrap very deep loop here!\");\n $continueLoop = false;\n $v2 = $this->post->first($ex);\n if ($v2) {\n $p = $v2->parent();\n\n foreach ($v2->children() as $child) {\n // echo htmlspecialchars(\"<tag>\" . . \"</tag>\");\n // if (!$child->isTextNode()) {}\n $p->appendChild($child);\n }\n $v2->remove();\n $continueLoop = true;\n }\n } while ($continueLoop);\n }\n return $this;\n }", "public function context()\n {\n return $this->setRightOperand(PVar::CONTEXT);\n }", "protected function wrap($value)\n {\n return $this->query->getQuery()->getGrammar()->wrap($value);\n }", "public function raw($value)\n {\n return new Query\\Expression($value);\n }", "public function evaluate($context)\n {\n return $context->getVariable($this->name);\n }", "public static function statementFromExpression($expression) {\n if ($expression instanceof Statement) {\n $arguments = [];\n foreach ($expression->arguments as $attribute) {\n $arguments[] = self::statementFromExpression($attribute);\n }\n $class = $expression->entity;\n if (!is_array($expression->entity)) {\n $class = self::$semanticMap[$expression->entity] ?? $class;\n if (function_exists($class)) { // workaround for Nette interpretation of entities\n $class = ['', $class];\n }\n }\n\n return new Statement($class, $arguments);\n } elseif (is_array($expression)) {\n return array_map(function ($subExpresion) {\n return self::statementFromExpression($subExpresion);\n }, $expression);\n } else {\n return $expression;\n }\n }", "public function compile($expression, Scope $scope) {\n $expression = trim($expression, '{} ');\n\n /**\n * We forbid any function calls inside expressions.\n */\n if(preg_match('/[\\(\\)]/', $expression) === 1) {\n throw new InvalidExpressionException(\n 'Expression contains one or both of forbidden characters: \"()\"!'\n );\n }\n \n $expressionOperators = '/[^' . preg_quote('+-/*!=&|?:<>%,\\'\"', '/') . ']+/';\n\n preg_match_all($expressionOperators, $expression, $expressionMatches);\n \n /**\n * I no special operators found just replace access string with value.\n */\n if(isset($expressionMatches[0][0]) && $expressionMatches[0][0] === $expression) {\n $renderedExpression = $scope->getData($expression);\n } else {\n /**\n * Check each expression we can replace.\n */\n foreach($expressionMatches[0] as $expressionMatch) {\n $expressionMatch = trim($expressionMatch);\n\n\n /**\n * If we can replace it with data - do this and format variable if required for later eval.\n */\n if(is_numeric($expressionMatch) === false) {\n $expression = str_replace($expressionMatch, var_export($scope->getData($expressionMatch), true), $expression);\n }\n }\n $renderedExpression = $this->evalaluate($expression);\n }\n\n return $renderedExpression;\n }", "public static function ownUnwrap($x) {\n if ($x instanceof Nihil) return null;\n return $x;\n }", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function getValue(Expression $expression)\n {\n return $expression->getValue();\n }", "final protected function loadQuery(O\\Expression $expression)\n {\n return $this->provider->load($expression);\n }", "public function createExpression()\n {\n return new ezcQueryExpressionPgsql( $this );\n }", "public function executeInContext(callable $callable, $context) {\n $this->contextOverride = $context;\n try {\n return $callable();\n } catch(\\Exception $exc) {\n throw $exc;\n } finally {\n $this->contextOverride = NULL;\n }\n }", "function negate() {\n static $negate = false;\n $negate = $negate ?: curry(function($x){\n return -$x;\n });\n return _apply($negate, func_get_args());\n}", "final public function exp()\n {\n $func = function(&$element)\n {\n $element = exp($element);\n };\n\n return $this->copy()->walk_recursive($func);\n }", "private function compileTalesToPHPExpression($expression)\n {\n if ($this->getTalesMode() === 'php') {\n return PHPTAL_Php_TalesInternal::php($expression);\n }\n return PHPTAL_Php_TalesInternal::compileToPHPExpression($expression, false);\n }", "public function getContext(): mixed;", "function evaluate($expr, $local_context = false, $function_context = false) \n {\n //clear the record of the last error\n $this->last_error = null;\n\n //clear the current assignment record\n $this->assignment_target = null;\n\n //store the initial execution context\n $initial_vars = $this->vars;\n\n //assume an initial return value of false\n $retval = false;\n\n //and strip off any leading/trailing whitespace\n $expr = trim($expr);\n\n //remove any semicolons from the end of the expression\n if (substr($expr, -1, 1) == ';') \n $expr = substr($expr, 0, strlen($expr)-1); \n\n //perform common preprocessing tasks on the expression\n //(this resolves TCL-style variables, and allows TCL-style function calls)\n $expr = $this->preprocess($expr);\n\n //if the given expression is a variable assignment:\n if (preg_match(MATHSCRIPT_VAR_ASSIGNMENT, $expr, $matches)) \n {\n //set the assignment target\n $this->assignment_target = $matches[1];\n\n //parse the data to be assigned\n $to_assign = $this->evaluate_infix($matches[2]);\n\n //if an error occurred during processing of the RHS (data to be assigned), return false\n if ($to_assign === false) \n return false; \n\n //otherwise, set the relevant variable\n $this->vars[$this->assignment_target] = $to_assign;\n\n //and return the value that resulted from the assignment\n $retval = $to_assign; // and return the resulting value\n }\n\n elseif(preg_match(MATHSCRIPT_VAR_OPERATION_ASSIGNMENT, $expr, $matches))\n {\n //get the initial value of the left-hand-side of the expression\n $lhs = $this->dereference($matches[1]);\n\n //if it does not exist, fail\n if($lhs === null)\n return false;\n\n //compute the RHS of the expression, which will be added to the LHS\n $rhs = $this->evaluate_infix($matches[3]);\n\n //if we couldn't compute the RHS, fail\n if($rhs === false)\n return false;\n\n //call the correct opreator for this block\n $handler = self::$operators[$matches[2]]['handler'];\n $result = call_user_func($handler, $this, $lhs, $rhs);\n\n //and store the result\n $this->vars[$matches[1]] = $result;\n\n //and return the value that resulted from the assignment\n $retval = $result;\n }\n\n //handle function definitions \n elseif (preg_match(MATHSCRIPT_FUNCTION_DEF, $expr, $matches))\n {\n\n //extract the function name\n $function_name = $matches[1];\n\n //ensure we're not able to override a built-in function (user defined functions can be overridden)\n if ($this->extensions->function_exists($function_name))\n return $this->trigger('cannot redefine built-in function \"'.$matches[1]().'\"');\n\n //parse the argument list for the function\n $args = explode(\",\", preg_replace(\"/\\s+/\", \"\", $matches[2])); // get the arguments\n\n //convert the infix expression for the function to postfix\n $stack = $this->infix_to_postfix($matches[3]);\n\n //if we failed to parse the infix expression, return false\n if ($stack === false) \n return false;\n\n //finally, store the function definition\n $this->user_functions[$function_name] = array(MATHSCRIPT_ARGUMENTS => $args, MATHSCRIPT_FUNCTION_BODY=> $stack);\n\n //and return, indicating success\n $retval = true;\n \n } \n //if the line wasn't any of our special cases above, attempt to evaluate it directly\n else\n {\n //if the code was empty (or an straight zero), return 0 (this is typical of comments)\n if(empty($expr))\n return 0;\n\n //evaluate the given function, and get the return value\n $retval = $this->evaluate_infix($expr); \n\n }\n\n //if we're inside of a function context, don't allow changes to the global scope\n if($function_context)\n {\n $this->vars = $initial_vars;\n }\n //if this evaluation is occurring in a local context\n elseif($local_context)\n {\n //delete any variables that were not present in the initial list of variables\n //this establishes a \"local context\"\n foreach($this->vars as $name => $value)\n if(!array_key_exists($name, $initial_vars))\n unset($this->vars[$name]);\n }\n\n //return the previously-set return value\n return $retval;\n\n }", "public static function callByExpression($expression)\n {\n return static::__callStatic($expression, []);\n }", "abstract protected function createExpression();", "protected function parseExpression($expression) {\n\t\t$expression = str_replace(\n\t\t\tarray('{', '}', '[', ']', '`', ';'),\n\t\t\tarray('&#123', '&#125', '&#91', '&#93', '&#96', '&#59'),\n\t\t\t$expression\n\t\t);\n\t\tif ($this->isExpression($expression)) {\n\t\t\t$this->checkSafety($expression);\n\t\t}\n\t\treturn $expression;\n\t}", "public static function expression($value)\n {\n return '__expression[:]expression[:]' . $value;\n }", "public function expr($template = [], array $arguments = []): Expression\n {\n $class = $this->expressionClass;\n $e = new $class($template, $arguments);\n $e->connection = $this;\n\n return $e;\n }", "public function isExpression(): bool\n {\n return $this->isExpression;\n }", "public function raw($value)\n {\n return new Query\\Expression ( $value );\n }", "public function analyzeClassCheck(ConditionVisitorInterface $visitor, $object, $expr): Context\n {\n return $visitor->analyzeClassAssertion($object, $expr) ?? $visitor->getContext();\n }", "public function getDSQLExpression($expression)\n {\n if (isset($this->owner->persistence_data['use_table_prefixes'])) {\n return $expression->expr('{}.{}', [\n $this->join\n ? (isset($this->join->foreign_alias)\n ? $this->join->foreign_alias\n : $this->join->short_name)\n : (isset($this->owner->table_alias)\n ? $this->owner->table_alias\n : $this->owner->table),\n $this->actual ?: $this->short_name,\n ]);\n } else {\n // references set flag use_table_prefixes, so no need to check them here\n return $expression->expr('{}', [\n $this->actual ?: $this->short_name,\n ]);\n }\n }", "protected function typecastValue(ArrayExpression $expression, $value)\n {\n if ($value instanceof ExpressionInterface) {\n return $value;\n }\n\n if (in_array($expression->getType(), [Schema::TYPE_JSON, Schema::TYPE_JSONB], true)) {\n return new JsonExpression($value);\n }\n\n return $value;\n }", "public function evaluate(array $context=[]) {\n\n try {\n $wkContext = $context;\n $vars = $this->getCodeSnippetVariables();\n\n //default to NULL for missing vars\n foreach ($vars as $var) {\n if (!in_array($var->getName(), array_keys($context))) {\n $wkContext[ $var->getName() ] = null;\n }\n }\n\n return evaluate_in_lambda($this->getSnippet(), $wkContext, $this->getType() == self::TYPE_EXPRESSION);\n } catch(\\Error $e) {\n throw new \\Exception('Snippet '.$this->getHumanDescription().' produced an ERROR: '.$e->getMessage());\n } catch(\\Throwable $e) {\n throw new \\Exception('Snippet '.$this->getHumanDescription().' threw an Exception : '.$e->getMessage(), 0, $e);\n }\n }", "#[@test]\n public function withoutExpression() {\n $this->assertEquals(array(new TernaryNode(array(\n 'condition' => new VariableNode('i'),\n 'expression' => NULL,\n 'conditional' => new IntegerNode('2'),\n ))), $this->parse('\n $i ?: 2;\n '));\n }", "public function resolveExpressionNodeToType(Node\\Expr $expr): Type\n {\n if ($expr instanceof Node\\Expr\\Variable || $expr instanceof Node\\Expr\\ClosureUse) {\n if ($expr instanceof Node\\Expr\\Variable && $expr->name === 'this') {\n $classNode = getClosestNode($expr, Node\\Stmt\\Class_::class);\n if ($classNode) {\n return self::resolveClassNameToType($classNode->namespacedName);\n }\n return new Types\\This;\n }\n // Find variable definition\n $defNode = $this->resolveVariableToNode($expr);\n if ($defNode instanceof Node\\Expr) {\n return $this->resolveExpressionNodeToType($defNode);\n }\n if ($defNode instanceof Node\\Param) {\n return $this->getTypeFromNode($defNode);\n }\n }\n if ($expr instanceof Node\\Expr\\FuncCall) {\n // Find the function definition\n if ($expr->name instanceof Node\\Expr) {\n // Cannot get type for dynamic function call\n return new Types\\Mixed;\n }\n $fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name);\n $def = $this->index->getDefinition($fqn, true);\n if ($def !== null) {\n return $def->type;\n }\n }\n if ($expr instanceof Node\\Expr\\ConstFetch) {\n if (strtolower((string)$expr->name) === 'true' || strtolower((string)$expr->name) === 'false') {\n return new Types\\Boolean;\n }\n // Resolve constant\n $fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name);\n $def = $this->index->getDefinition($fqn, true);\n if ($def !== null) {\n return $def->type;\n }\n }\n if ($expr instanceof Node\\Expr\\MethodCall || $expr instanceof Node\\Expr\\PropertyFetch) {\n if ($expr->name instanceof Node\\Expr) {\n return new Types\\Mixed;\n }\n // Resolve object\n $objType = $this->resolveExpressionNodeToType($expr->var);\n if (!($objType instanceof Types\\Compound)) {\n $objType = new Types\\Compound([$objType]);\n }\n for ($i = 0; $t = $objType->get($i); $i++) {\n if ($t instanceof Types\\This) {\n $classFqn = self::getContainingClassFqn($expr);\n if ($classFqn === null) {\n return new Types\\Mixed;\n }\n } else if (!($t instanceof Types\\Object_) || $t->getFqsen() === null) {\n return new Types\\Mixed;\n } else {\n $classFqn = substr((string)$t->getFqsen(), 1);\n }\n $fqn = $classFqn . '->' . $expr->name;\n if ($expr instanceof Node\\Expr\\MethodCall) {\n $fqn .= '()';\n }\n if ($def = $this->index->getDefinition($fqn)) {\n if ($def->type instanceof Types\\This || $def->type instanceof Types\\Self_) {\n return $this->resolveExpressionNodeToType($expr->var);\n }\n return $def->type;\n }\n }\n }\n if (\n $expr instanceof Node\\Expr\\StaticCall\n || $expr instanceof Node\\Expr\\StaticPropertyFetch\n || $expr instanceof Node\\Expr\\ClassConstFetch\n ) {\n $classType = self::resolveClassNameToType($expr->class);\n if (!($classType instanceof Types\\Object_) || $classType->getFqsen() === null || $expr->name instanceof Node\\Expr) {\n return new Types\\Mixed;\n }\n $fqn = substr((string)$classType->getFqsen(), 1) . '::';\n if ($expr instanceof Node\\Expr\\StaticPropertyFetch) {\n $fqn .= '$';\n }\n $fqn .= $expr->name;\n if ($expr instanceof Node\\Expr\\StaticCall) {\n $fqn .= '()';\n }\n $def = $this->index->getDefinition($fqn);\n if ($def === null) {\n return new Types\\Mixed;\n }\n return $def->type;\n }\n if ($expr instanceof Node\\Expr\\New_) {\n return self::resolveClassNameToType($expr->class);\n }\n if ($expr instanceof Node\\Expr\\Clone_ || $expr instanceof Node\\Expr\\Assign) {\n return $this->resolveExpressionNodeToType($expr->expr);\n }\n if ($expr instanceof Node\\Expr\\Ternary) {\n // ?:\n if ($expr->if === null) {\n return new Types\\Compound([\n $this->resolveExpressionNodeToType($expr->cond),\n $this->resolveExpressionNodeToType($expr->else)\n ]);\n }\n // Ternary is a compound of the two possible values\n return new Types\\Compound([\n $this->resolveExpressionNodeToType($expr->if),\n $this->resolveExpressionNodeToType($expr->else)\n ]);\n }\n if ($expr instanceof Node\\Expr\\BinaryOp\\Coalesce) {\n // ?? operator\n return new Types\\Compound([\n $this->resolveExpressionNodeToType($expr->left),\n $this->resolveExpressionNodeToType($expr->right)\n ]);\n }\n if (\n $expr instanceof Node\\Expr\\InstanceOf_\n || $expr instanceof Node\\Expr\\Cast\\Bool_\n || $expr instanceof Node\\Expr\\BooleanNot\n || $expr instanceof Node\\Expr\\Empty_\n || $expr instanceof Node\\Expr\\Isset_\n || $expr instanceof Node\\Expr\\BinaryOp\\Greater\n || $expr instanceof Node\\Expr\\BinaryOp\\GreaterOrEqual\n || $expr instanceof Node\\Expr\\BinaryOp\\Smaller\n || $expr instanceof Node\\Expr\\BinaryOp\\SmallerOrEqual\n || $expr instanceof Node\\Expr\\BinaryOp\\BooleanAnd\n || $expr instanceof Node\\Expr\\BinaryOp\\BooleanOr\n || $expr instanceof Node\\Expr\\BinaryOp\\LogicalAnd\n || $expr instanceof Node\\Expr\\BinaryOp\\LogicalOr\n || $expr instanceof Node\\Expr\\BinaryOp\\LogicalXor\n || $expr instanceof Node\\Expr\\BinaryOp\\NotEqual\n || $expr instanceof Node\\Expr\\BinaryOp\\NotIdentical\n ) {\n return new Types\\Boolean;\n }\n if (\n $expr instanceof Node\\Expr\\Concat\n || $expr instanceof Node\\Expr\\Cast\\String_\n || $expr instanceof Node\\Expr\\BinaryOp\\Concat\n || $expr instanceof Node\\Expr\\AssignOp\\Concat\n || $expr instanceof Node\\Expr\\Scalar\\String_\n || $expr instanceof Node\\Expr\\Scalar\\Encapsed\n || $expr instanceof Node\\Expr\\Scalar\\EncapsedStringPart\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Class_\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Dir\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Function_\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Method\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Namespace_\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Trait_\n ) {\n return new Types\\String_;\n }\n if (\n $expr instanceof Node\\Expr\\BinaryOp\\Minus\n || $expr instanceof Node\\Expr\\BinaryOp\\Plus\n || $expr instanceof Node\\Expr\\BinaryOp\\Pow\n || $expr instanceof Node\\Expr\\BinaryOp\\Mul\n || $expr instanceof Node\\Expr\\AssignOp\\Minus\n || $expr instanceof Node\\Expr\\AssignOp\\Plus\n || $expr instanceof Node\\Expr\\AssignOp\\Pow\n || $expr instanceof Node\\Expr\\AssignOp\\Mul\n ) {\n if (\n $this->resolveExpressionNodeToType($expr->left) instanceof Types\\Integer_\n && $this->resolveExpressionNodeToType($expr->right) instanceof Types\\Integer_\n ) {\n return new Types\\Integer;\n }\n return new Types\\Float_;\n }\n if (\n $expr instanceof Node\\Scalar\\LNumber\n || $expr instanceof Node\\Expr\\Cast\\Int_\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Line\n || $expr instanceof Node\\Expr\\BinaryOp\\Spaceship\n || $expr instanceof Node\\Expr\\BinaryOp\\BitwiseAnd\n || $expr instanceof Node\\Expr\\BinaryOp\\BitwiseOr\n || $expr instanceof Node\\Expr\\BinaryOp\\BitwiseXor\n ) {\n return new Types\\Integer;\n }\n if (\n $expr instanceof Node\\Expr\\BinaryOp\\Div\n || $expr instanceof Node\\Expr\\DNumber\n || $expr instanceof Node\\Expr\\Cast\\Double\n ) {\n return new Types\\Float_;\n }\n if ($expr instanceof Node\\Expr\\Array_) {\n $valueTypes = [];\n $keyTypes = [];\n foreach ($expr->items as $item) {\n $valueTypes[] = $this->resolveExpressionNodeToType($item->value);\n $keyTypes[] = $item->key ? $this->resolveExpressionNodeToType($item->key) : new Types\\Integer;\n }\n $valueTypes = array_unique($keyTypes);\n $keyTypes = array_unique($keyTypes);\n if (empty($valueTypes)) {\n $valueType = null;\n } else if (count($valueTypes) === 1) {\n $valueType = $valueTypes[0];\n } else {\n $valueType = new Types\\Compound($valueTypes);\n }\n if (empty($keyTypes)) {\n $keyType = null;\n } else if (count($keyTypes) === 1) {\n $keyType = $keyTypes[0];\n } else {\n $keyType = new Types\\Compound($keyTypes);\n }\n return new Types\\Array_($valueType, $keyType);\n }\n if ($expr instanceof Node\\Expr\\ArrayDimFetch) {\n $varType = $this->resolveExpressionNodeToType($expr->var);\n if (!($varType instanceof Types\\Array_)) {\n return new Types\\Mixed;\n }\n return $varType->getValueType();\n }\n if ($expr instanceof Node\\Expr\\Include_) {\n // TODO: resolve path to PhpDocument and find return statement\n return new Types\\Mixed;\n }\n return new Types\\Mixed;\n }", "static function evalExpression(\n\t $expression,\n\t $params = array())\n\t{\n\t\tif (is_array($params)) {\n\t\t\textract($params);\n\t\t}\n\t\teval('$value = ' . $expression . ';');\n\t\treturn $value;\n\t}", "public function getContext()\n {\n if (!isset($this->context)) {\n $this->context = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getContextQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->context;\n }", "private function preprocess($expr, $allow_tcl_calls = true)\n {\n $prefix = '';\n $suffix = '';\n\n //determine if the given statement is a TCL-like function call\n $tcl_call = preg_match('#^(\\$?'.MATHSCRIPT_IDENTIFIER.')\\s+(.+)*$#ss', $expr, $matches) && $allow_tcl_calls;\n\n //if the expression is a TCL-style function call, process it\n if($tcl_call)\n {\n //extract the function's name\n $function_name = $matches[1];\n\n //if the function name starts with a dollar sign, it's a TCL-style variable\n if(substr($function_name, 0, 1) == '$')\n {\n //the TCL-style variable name is equivalent to the function's \"name\" without the leading $\n $var_name = substr($function_name, 1);\n\n //if the variable exists, set the function name to its value\n if(array_key_exists($var_name, $this->vars))\n $function_name = $this->vars[$var_name];\n }\n\n //if this represents a valid function, handle it\n if($this->extensions->function_exists($function_name))\n {\n //extract the function name, and set the pre/suffix to parenthesis\n $prefix = $function_name.'(';\n $suffix = ')';\n\n //convert the expression to a standard MathScript function\n $expr = trim($matches[2]);\n }\n //otherwise, it's not a real TCL call\n else\n {\n $tcl_call = false;\n }\n\n }\n\n //initialize our flags: we'll start off outside of a quote/curly string, and _not_ at the start of a block of whitespace\n $quote = false;\n $curly_depth = 0;\n $paren_depth = 0;\n $last_was_space = false;\n\n //start a \"buffer\" for the new expression\n $new_expr = '';\n\n //for each charcter in the input string\n $expr_length = strlen($expr);\n for($i = 0; $i < $expr_length; ++$i)\n {\n //extract a single character from the string\n $char = substr($expr, $i, 1);\n\n //if we have the escape character\n if($char == '\\\\')\n {\n //push it, and the next character, directly onto the string \n $new_expr .= substr($expr, i, 2);\n\n //and skip the next character\n ++$i;\n continue;\n }\n\n //if we've hit a quote, toggle quotes\n if($char == '\"')\n $quote = !$quote;\n\n //if we've hit an open-curly, increase the curly-depth\n if($char == '{')\n ++$curly_depth;\n\n //if we've hit a close-curly, decrease the curly-depth\n if($char == '}')\n --$curly_depth;\n\n //if we've hit an open-paren, increase the paren-depth\n if($char == '(')\n ++$paren_depth;\n\n //if we've hit a close-paren, increase the paren-depth\n if($char == ')')\n --$paren_depth;\n\n //if we are not inside of a \" or { string, preprocess\n if($curly_depth == 0)\n {\n //get the rest of the expression, starting at $i\n $rest_of_expr = substr($expr, $i);\n\n //if we've run into a TCL-style variable, in ${identifier} form, require the entire contents of {} to match\n if(preg_match('#^\\$\\{('.MATHSCRIPT_IDENTIFIER.')\\}#', $rest_of_expr, $matches))\n {\n //if we have a variable with that exact name, \n if(array_key_exists($matches[1], $this->vars))\n {\n //append the _value_ of the new variable\n $new_expr .= $this->vars[$matches[1]];\n\n //and continue past the end of the varaible\n $i += strlen($matches[1]) + 2;\n continue;\n }\n // if the varaible does't exist, throw an error\n else\n {\n $this->trigger('Tried to $-reference an undefined variable \"'.$matches[1].'\".');\n return '';\n }\n }\n\n //if we've run into a TCL-style variable, in $identifier form\n elseif(preg_match('#^\\$('.MATHSCRIPT_IDENTIFIER.')#', $rest_of_expr, $matches))\n {\n //get the longest matching varaible\n $var_name = $this->longest_matching_varaible($matches[1]);\n\n //if the variable is defined, replace it with its value\n if($var_name !== null)\n {\n //add the variable's _value_ to the string\n $new_expr .= $this->vars[$var_name];\n\n //and continue past the end of the variable\n $i += strlen($var_name);\n continue;\n }\n }\n //if we're parsing a tcl-style call, and we've a space\n elseif(self::is_preprocessor_whitespace($char) && $tcl_call && !$quote && $paren_depth == 0) \n {\n //if this is the first space, add a comma before it\n if(!$last_was_space)\n $new_expr .= ',';\n\n //and set that the last character was a space\n $last_was_space = true;\n }\n //otherwise, indicate that we haven't hit whitespace (that we care about)\n else\n {\n $last_was_space = false;\n }\n \n }\n\n //push the character directly to the string\n $new_expr .= $char;\n }\n\n //return the new expression, surrounded by the prefix and suffix\n return $prefix.$new_expr.$suffix;\n }", "public static function resolve($_str) {\n\t\t// Analyze string for correct framework expression syntax\n\t\t$_str=preg_replace_callback(\n\t\t\t// Expression\n\t\t\t'/\\{('.\n\t\t\t\t// Capture group\n\t\t\t\t'(?:'.\n\t\t\t\t\t// Variable token\n\t\t\t\t\t'@\\w+\\b(?:\\[[^\\]]+\\]|\\.\\w+\\b)*|'.\n\t\t\t\t\t// Function/method/parenthesized expression\n\t\t\t\t\t'\\w*\\h*[\\(\\,\\)]|'.\n\t\t\t\t\t// Whitespaces and operators\n\t\t\t\t\t'[\\h\\?\\.\\+\\-\\*\\/%!=<>&\\|:]|'.\n\t\t\t\t\t// String and numeric constants\n\t\t\t\t\t'\\'[^\\']*\\'|\"[^\"]*\"|\\d*\\.?\\d+(?:e\\d+)*|'.\n\t\t\t\t\t// Null and boolean constants\n\t\t\t\t\t'NULL|TRUE|FALSE'.\n\t\t\t\t// End of captured string\n\t\t\t\t')+'.\n\t\t\t// End of expression\n\t\t\t')\\}/i',\n\t\t\t// Evaluate expression; This will cause a syntax error\n\t\t\t// if framework is running on an old version of PHP!\n\t\t\tfunction($_expr) {\n\t\t\t\t// Find and replace variables\n\t\t\t\treturn eval('return (string)'.\n\t\t\t\t\tpreg_replace_callback(\n\t\t\t\t\t\t// Framework variable\n\t\t\t\t\t\t'/@(\\w+\\b(?:\\[[^\\]]+\\]|\\.\\w+\\b)*)/',\n\t\t\t\t\t\tfunction($_var) {\n\t\t\t\t\t\t\t$_val=F3::get($_var[1]);\n\t\t\t\t\t\t\t// Retrieve variable contents\n\t\t\t\t\t\t\treturn !is_object($_val) ||\n\t\t\t\t\t\t\t\tmethod_exists($_val,'__set_state')?\n\t\t\t\t\t\t\t\t\tvar_export($_val,TRUE):(string)$_val;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpreg_replace_callback(\n\t\t\t\t\t\t\t// Function\n\t\t\t\t\t\t\t'/(\\w+)\\h*\\(([^\\)]*)\\)/',\n\t\t\t\t\t\t\tfunction($_val) {\n\t\t\t\t\t\t\t\treturn ($_val[1].trim($_val[2]))=='array'?\n\t\t\t\t\t\t\t\t\t// Null out empty array\n\t\t\t\t\t\t\t\t\t'\\'\\'':\n\t\t\t\t\t\t\t\t\t// check if prohibited function\n\t\t\t\t\t\t\t\t\t(F3::allowed($_val[1])?\n\t\t\t\t\t\t\t\t\t\t$_val[0]:('\\''.$_val[0].'\\''));\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t$_expr[1]\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\t// Coerce input\n\t\t\t(string)$_str\n\t\t);\n\t\tif (preg_last_error()!=PREG_NO_ERROR) {\n\t\t\ttrigger_error(self::TEXT_PCRELimit);\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn $_str;\n\t}", "protected function _translateUnaryExpression(UnaryExpression $expression, Query $query, JsonTypeMap $jsonTypes)\n {\n $reflection = new \\ReflectionClass($expression);\n $operator = $reflection->getProperty('_operator');\n $operator->setAccessible(true);\n $op = $operator->getValue($expression);\n $value = $reflection->getProperty('_value');\n $value->setAccessible(true);\n $value = $value->getValue($expression);\n\n switch ($op) {\n case 'IS NULL':\n $datfield = $value->getIdentifier();\n if ($this->isDatField($datfield)) {\n $expression = $this->_translateIsNull($datfield, $query, $jsonTypes);\n }\n break;\n case 'IS NOT NULL':\n $datfield = $value->getIdentifier();\n if ($this->isDatField($datfield)) {\n $expression = $this->_translateIsNotNull($datfield, $query, $jsonTypes);\n }\n break;\n default:\n if ($value instanceof ExpressionInterface) {\n $this->translateExpression($value, $query, $jsonTypes);\n }\n break;\n }\n\n return $expression;\n }", "public function query ($expression, DomNode $contextNode = null, $registerNodeNS = null) {}", "public function analyzeVar(ConditionVisitorInterface $visitor, Node $var, $expr): Context\n {\n return $visitor->updateVariableToBeEqual($var, $expr);\n }", "public function execute(string $expression, array $context = [])\n {\n $this->simplifications = [];\n $this->guardToken($expression);\n $expression = $this->prepareStrings($expression);\n $expression = $this->prepareVariables($expression, $context);\n $expression = $this->prepareConstants($expression);\n $expression = $this->prepareNumbers($expression);\n $expression = preg_replace('/\\s+/u', '', $expression);\n $expression = $this->calculate($expression, $context);\n\n if (preg_match('~^`[a-f\\d]{32}`$~', $expression)) {\n return $this->recall($expression);\n }\n\n throw new SyntaxException('Unexpected execution exception');\n }", "public static function escape($str)\n {\n switch (true) {\n case is_object($str) && is_a($str, Expression::class):\n return $str;\n }\n\n return self::pdo()->quote($str);\n }", "public function getContext(): ContextInterface;", "public function getContextValue();", "protected function compileEchoStack(string $expression): string\n {\n foreach (['RawEcho', 'Echo'] as $token) {\n $out = $this->{'compile' . $token}($expression);\n\n if (strlen($out) !== 0) {\n $expression = $out;\n }\n }\n\n return $expression;\n }" ]
[ "0.53272545", "0.5058471", "0.48233417", "0.47118062", "0.46983784", "0.46795946", "0.46736154", "0.463953", "0.46379808", "0.46356824", "0.45975503", "0.45570228", "0.45417708", "0.45283318", "0.45200315", "0.4510017", "0.4508338", "0.43867028", "0.43540326", "0.43398088", "0.43187594", "0.43161866", "0.42687097", "0.4268108", "0.4264251", "0.42406633", "0.4240528", "0.4216311", "0.42072964", "0.42071506", "0.41879594", "0.418513", "0.4184817", "0.4184817", "0.41796893", "0.41596273", "0.4159007", "0.41453916", "0.41442034", "0.4132224", "0.41315943", "0.4113178", "0.41041857", "0.40988418", "0.4077725", "0.40775385", "0.40539226", "0.40424767", "0.40315872", "0.4031043", "0.4015483", "0.40066832", "0.40062863", "0.40021572", "0.39944705", "0.39703548", "0.39682335", "0.3964569", "0.39563543", "0.39307255", "0.39275658", "0.3919413", "0.39152193", "0.3912785", "0.3912785", "0.3912785", "0.38968393", "0.38840324", "0.38814363", "0.3878378", "0.38773334", "0.38725555", "0.38704944", "0.38661107", "0.38553482", "0.3852096", "0.38408354", "0.38407174", "0.38373962", "0.3824416", "0.38068625", "0.38063857", "0.38045606", "0.3796523", "0.379602", "0.37761143", "0.37695527", "0.37565953", "0.37528446", "0.3750832", "0.37412634", "0.37388244", "0.3734348", "0.3727561", "0.3714786", "0.37070513", "0.3705363", "0.36881235", "0.36786106", "0.3678409" ]
0.73917663
0
Seed the application's database.
public function run() { $this->call(RolSeeder::class); $this->call(UserSeeder::class); Category::factory(4)->create(); Doctor::factory(25)->create(); Patient::factory(50)->create(); Status::factory(3)->create(); Appointment::factory(100)->create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');// <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t}\n\t}", "protected function seedDB()\n {\n $ans = $this->ask('Seed your database?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n $this->call('db:seed');\n $this->comment('');\n $this->comment('Database successfully seeded.');\n $this->comment('=====================================');\n echo \"Your app is now ready!\";\n }\n }", "protected function seedDatabase(): void\n {\n $this->seedProductCategories();\n $this->seedProducts();\n }", "public function setupDatabase()\n {\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n\n self::$setupDatabase = false;\n }", "public function run()\n {\n $this->seed('FormsMenuItemsTableSeeder');\n $this->seed('FormsDataTypesTableSeeder');\n $this->seed('FormsDataRowsTableSeeder');\n $this->seed('FormsPermissionsTableSeeder');\n $this->seed('FormsSettingsTableSeeder');\n $this->seed('FormsTableSeeder');\n }", "public function run()\n {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"\\n--- Seeding ---\\n\", TRUE));\n\n if (App::environment('production')) {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- ERROR: Seeding in Production is prohibited ---\\n\", TRUE));\n return;\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(ConfigsTableSeeder::class);\n $this->call(ConfigContentsTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n if (defined('STDERR')) fwrite(STDERR, print_r(\"Set FOREIGN_KEY_CHECKS=1 --- DONE\\n\", TRUE));\n\n // \\Artisan::call('command:regenerate-user-feeds');\n\n \\Cache::flush();\n\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- End Seeding ---\\n\\n\", TRUE));\n }", "protected function setupDatabase()\n {\n $this->call('migrate');\n $this->call('db:seed');\n\n $this->info('Database migrated and seeded.');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }", "public function initDatabase()\n {\n $this->call('migrate');\n\n $userModel = config('admin.database.users_model');\n\n if ($userModel::count() == 0) {\n $this->call('db:seed', ['--class' => AdminSeeder::class]);\n }\n }", "public function run ()\n {\n if (App::environment() === 'production') {\n exit('Seed should be run only in development/debug environment.');\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('role_user')->truncate();\n\n // Root user\n $user = User::find(1);\n $user->assignRole('owner');\n\n $user = User::find(2);\n $user->assignRole('admin');\n\n $user = User::find(3);\n $user->assignRole('admin');\n\n $user = User::find(4);\n $user->assignRole('moderator');\n\n $user = User::find(5);\n $user->assignRole('moderator');\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n Model::unguard();\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(EntrustTableSeeder::class);\n\n $this->call(AccounttypeSeeder::class);\n $this->call(AppUserTableSeeder::class);\n $this->call(AppEmailUserTableSeeder::class);\n\n\n $this->call(CountryTableSeeder::class);\n $this->call(CityTableSeeder::class);\n\n\n $this->call(PostTypeTableSeeder::class);\n $this->call(PostSubTypeTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(AppPostSolvedTableSeeder::class);\n\n\n $this->call(AppCommentTypeTableSeeder::class);\n // $this->call(AppCommentTableSeeder::class);\n // $this->call(AppSubCommentTableSeeder::class);\n\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n\n Model::reguard();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('domains')->truncate();\n DB::table('folders')->truncate();\n DB::table('bookmarks')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->seedUserAccount('[email protected]');\n $this->seedUserAccount('[email protected]');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n // $this->call(UsersTableSeeder::class);\n /* Schema::dropIfExists('employees');\n Schema::dropIfExists('users');\n Schema::dropIfExists('requests');\n Schema::dropIfExists('requeststatus');*/\n User::truncate();\n InstallRequest::truncate();\n RequestStatus::truncate();\n\n $cantidadEmployyes = 20;\n $cantidadUsers = 20;\n $cantidadRequestStatus = 3;\n $cantidadRequests = 200;\n\n factory(User::class, $cantidadUsers)->create();\n factory(RequestStatus::class, $cantidadRequestStatus)->create();\n factory(InstallRequest::class, $cantidadRequests)->create();\n }", "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "public function run()\n\t{\n $this->cleanDatabase();\n\n Eloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('CartsTableSeeder');\n $this->call('StoreTableSeeder');\n $this->call('AdvertisementsTableSeeder');\n \n\t}", "public function run()\n {\n \tDB::table('seeds')->truncate();\n\n $seeds = array(\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_18_2013',\n ),\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_20_2013',\n ),\n );\n\n // Uncomment the below to run the seeder\n DB::table('seeds')->insert($seeds);\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "public function run()\n {\n //$this->call('UserTableSeeder');\n //$this->call('ProjectTableSeeder');\n //$this->call('TaskTableSeeder');\n\n /**\n * Prepare seeding\n */\n $faker = Faker::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Model::unguard();\n\n /**\n * Seeding user table\n */\n App\\User::truncate();\n factory(App\\User::class)->create([\n 'name' => 'KCK',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n /*factory(App\\User::class, 9)->create();\n $this->command->info('users table seeded');*/\n\n /**\n * Seeding roles table\n */\n Spatie\\Permission\\Models\\Role::truncate();\n DB::table('model_has_roles')->truncate();\n $superAdminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '최고 관리자'\n ]);\n $adminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '관리자'\n ]);\n $regularRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '정회원'\n ]);\n $associateRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '준회원'\n ]);\n\n App\\User::where('email', '!=', '[email protected]')->get()->map(function ($user) use ($regularRole) {\n $user->assignRole($regularRole);\n });\n\n App\\User::whereEmail('[email protected]')->get()->map(function ($user) use ($superAdminRole) {\n $user->assignRole($superAdminRole);\n });\n $this->command->info('roles table seeded');\n\n /**\n * Seeding articles table\n */\n App\\Article::truncate();\n $users = App\\User::all();\n\n $users->each(function ($user) use ($faker) {\n $user->articles()->save(\n factory(App\\Article::class)->make()\n );\n });\n $this->command->info('articles table seeded');\n\n /**\n * Seeding comments table\n */\n App\\Comment::truncate();\n $articles = App\\Article::all();\n\n $articles->each(function ($article) use ($faker, $users) {\n for ($i = 0; $i < 10; $i++) {\n $article->comments()->save(\n factory(App\\Comment::class)->make([\n 'author_id' => $faker->randomElement($users->pluck('id')->toArray()),\n //'parent_id' => $article->id\n ])\n );\n };\n });\n $this->command->info('comments table seeded');\n\n /**\n * Seeding tags table\n */\n App\\Tag::truncate();\n DB::table('article_tag')->truncate();\n $articles->each(function ($article) use ($faker) {\n $article->tags()->save(\n factory(App\\Tag::class)->make()\n );\n });\n $this->command->info('tags table seeded');\n\n /**\n * Seeding attachments table\n */\n App\\Attachment::truncate();\n if (!File::isDirectory(attachment_path())) {\n File::deleteDirectory(attachment_path(), true);\n }\n\n $articles->each(function ($article) use ($faker) {\n $article->attachments()->save(\n factory(App\\Attachment::class)->make()\n );\n });\n\n //$files = App\\Attachment::pluck('name');\n\n if (!File::isDirectory(attachment_path())) {\n File::makeDirectory(attachment_path(), 777, true);\n }\n\n /*\n foreach ($files as $file) {\n File::put(attachment_path($file), '');\n }\n */\n\n $this->command->info('attachments table seeded');\n\n /**\n * Close seeding\n */\n Model::reguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(CountriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n\n factory(Group::class)->create();\n factory(Contact::class, 5000)->create();\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('AdminTableSeeder');\n\t\t// $this->call('UserTableSeeder');\n\t\t// $this->call('MenuTableSeeder');\n\t\t// $this->call('ProductTableSeeder');\n\t\t// $this->call('CategoryTableSeeder');\n\t\t// $this->call('OptionTableSeeder');\n\t\t// $this->call('OptionGroupTableSeeder');\n\t\t// $this->call('TypeTableSeeder');\n\t\t// $this->call('LayoutTableSeeder');\n\t\t// $this->call('LayoutDetailTableSeeder');\n\t\t// $this->call('BannerTableSeeder');\n\t\t// $this->call('ConfigureTableSeeder');\n\t\t// $this->call('PageTableSeeder');\n\t\t// $this->call('ImageTableSeeder');\n\t\t// $this->call('ImageableTableSeeder');\n\t\t// ======== new Seed =======\n\t\t$this->call('AdminsTableSeeder');\n\t\t$this->call('BannersTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('ConfiguresTableSeeder');\n\t\t$this->call('ImageablesTableSeeder');\n\t\t$this->call('ImagesTableSeeder');\n\t\t$this->call('LayoutsTableSeeder');\n\t\t$this->call('LayoutDetailsTableSeeder');\n\t\t$this->call('MenusTableSeeder');\n\t\t$this->call('OptionablesTableSeeder');\n\t\t$this->call('OptionsTableSeeder');\n\t\t$this->call('OptionGroupsTableSeeder');\n\t\t$this->call('PagesTableSeeder');\n\t\t$this->call('PriceBreaksTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('ProductsCategoriesTableSeeder');\n\t\t$this->call('SizeListsTableSeeder');\n\t\t$this->call('TypesTableSeeder');\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ContactsTableSeeder');\n\t\t$this->call('RolesTableSeeder');\n\t\t$this->call('PermissionsTableSeeder');\n\t\t$this->call('PermissionRoleTableSeeder');\n\t\t$this->call('AssignedRolesTableSeeder');\n\t\t$this->call('OrdersTableSeeder');\n\t\t$this->call('OrderDetailsTableSeeder');\n\t\tCache::flush();\n\t\t// BackgroundProcess::copyFromVI();\n\t}", "public function run()\n {\n Model::unguard();\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'admin',\n 'password' => Hash::make('1234'),\n 'email_verified_at' => Carbon::now()\n ]);\n\n factory(User::class, 200)->create();\n\n // $this->call(\"OthersTableSeeder\");\n }", "public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "public function run()\n {\n if (\\App::environment() === 'local') {\n\n // Delete existing data\n\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // Truncate all tables, except migrations\n $tables = array_except(DB::select('SHOW TABLES'), ['migrations']);\n foreach ($tables as $table) {\n $tables_in_database = \"Tables_in_\" . Config::get('database.connections.mysql.database');\n DB::table($table->$tables_in_database)->truncate();\n }\n\n // supposed to only apply to a single connection and reset it's self\n // but I like to explicitly undo what I've done for clarity\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n //get roles\n $this->call('AccountSeeder');\n $this->call('CountrySeeder');\n $this->call('StateSeeder');\n $this->call('CitySeeder');\n $this->call('OptionSeeder');\n $this->call('TagSeeder');\n $this->call('PrintTemplateSeeder');\n $this->call('SettingsSeeder');\n\n\n\n if(empty($web_installer)) {\n $admin = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"admin\",\n 'first_name' => 'Admin',\n 'last_name' => 'Doe',\n ));\n $admin->user_id = $admin->id;\n $admin->save();\n\n $adminRole = Sentinel::findRoleById(1);\n $adminRole->users()->attach($admin);\n }\n else {\n $admin = Sentinel::findById(1);\n }\n\n //add dummy staff and customer\n $staff = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"staff\",\n 'first_name' => 'Staff',\n 'last_name' => 'Doe',\n ));\n $admin->users()->save($staff);\n\n foreach ($this->getPermissions() as $permission) {\n $staff->addPermission($permission);\n }\n $staff->save();\n\n $customer = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"customer\",\n 'first_name' => 'Customer',\n 'last_name' => 'Doe',\n ));\n Customer::create(array('user_id' => $customer->id, 'belong_user_id' => $staff->id));\n $staff->users()->save($customer);\n\n //add respective roles\n\n $staffRole = Sentinel::findRoleById(2);\n $staffRole->users()->attach($staff);\n $customerRole = Sentinel::findRoleById(3);\n $customerRole->users()->attach($customer);\n\n\n\n DB::table('sales_teams')->truncate();\n DB::table('opportunities')->truncate();\n\n //Delete existing seeded users except the first 4 users\n User::where('id', '>', 3)->get()->each(function ($user) {\n $user->forceDelete();\n });\n\n //Get the default ADMIN\n $user = User::find(1);\n $staffRole = Sentinel::getRoleRepository()->findByName('staff');\n $customerRole = Sentinel::getRoleRepository()->findByName('customer');\n\n //Seed Sales teams for default ADMIN\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($user->id, $j, $user);\n $this->createOpportunity($user, $user->id, $j);\n }\n\n\n //Get the default STAFF\n $staff = User::find(2);\n $this->createSalesTeam($staff->id, 1, $staff);\n $this->createSalesTeam($staff->id, 2, $staff);\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $staff->id, $j);\n }\n\n foreach (range(1, 3) as $i) {\n $staff = $this->createStaff($i);\n $user->users()->save($staff);\n $staffRole->users()->attach($staff);\n\n $customer = $this->createCustomer($i);\n $staff->users()->save($customer);\n $customerRole->users()->attach($customer);\n $customer->customer()->save(factory(\\App\\Models\\Customer::class)->make());\n\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 5) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $i, $j);\n }\n\n }\n\n //finally call it installation is finished\n file_put_contents(storage_path('installed'), 'Welcome to LCRM');\n }\n }", "public function run()\n {\n if (env('DB_DATABASE') == 'connection') {\n Connection::create([\n \"ruc\" => \"12312312312\",\n \"basedata\" => \"nbdata2018_1\",\n ]);\n \n Connection::create([\n \"ruc\" => \"12312312315\",\n \"basedata\" => \"nbdata2018_2\",\n ]);\n \n $this->call(ConnectionTableSeeder::class);\n } else {\n $this->call(AppSeeder::class);\n }\n }", "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n # truncates tables before seeding\n foreach ($this->toTruncate as $table) {\n DB::table($table)->delete();\n }\n\n factory(App\\Models\\Product::class, 25)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Post::truncate();\n Comment::truncate();\n // CommentReply::truncate();\n \n\n\n factory(User::class,10)->create();\n factory(Post::class,20)->create();\n factory(Comment::class,30)->create();\n // factory(CommentReply::class,30)->create();\n }", "public function run()\n\t{\n \n Eloquent::unguard();\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t$this->call('UserTableSeeder');\n\t $this->call('LayerTableSeeder');\n $this->call('UserLevelTableSeeder');\n $this->call('RoleUserTableSeeder');\n $this->call('RoleLayerTableSeeder');\n $this->call('BookmarkTableSeeder');\n \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('topics')->truncate();\n\n factory(\\App\\Topic::class, 100)->create();\n // ->each(function($topic) {\n\n // // Seed para a relação com group\n // $topic->group()->save(factory(App\\Group::class)->make());\n\n // // Seed para a relação com topicMessages\n // $topic->topicMessages()->save(factory(App\\TopicMessage::class)->make());\n\n // // Seed para a relação com user\n // $topic->user()->save(factory(App\\User::class)->make());\n // });\n \n DB::statement('SET foreign_key_checks = 1');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n Categoria::truncate();\n Atractivo::truncate();\n Galeria::truncate();\n User::truncate();\n\n $this->call(CategoriasTableSeeder::class);\n $this->call(AtractivosTableSeeder::class);\n $this->call(GaleriasTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n }", "public function run(Faker $faker)\n {\n Schema::disableForeignKeyConstraints();\n DB::table('users')->insert([\n 'name' => $faker->name(),\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n\t $this->call(CategoryTableSeed::class);\n\t $this->call(ProductTableSeed::class);\n\t $this->call(UserTableSeed::class);\n }", "public function run()\n {\n $this->cleanDatabase();\n\n factory(User::class, 50)->create();\n factory(Document::class, 30)->create();\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n \t// DB::table('webapps')->delete();\n\n $webapps = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('webapps')->insert($webapps);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $tables = array(\n 'users',\n 'companies',\n 'stands',\n 'events',\n 'visitors',\n 'api_keys'\n );\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }\n\n foreach ($tables as $table) {\n DB::table($table)->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(CompaniesTableSeeder::class);\n $this->call(StandsTableSeeder::class);\n $this->call(VisitorsTableSeeder::class);\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $clear = $this->command->confirm('Wil je de database leegmaken? (Dit haalt alle DATA weg)');\n\n if ($clear):\n $this->command->callSilent('migrate:refresh');\n $this->command->info('Database Cleared, starting seeding');\n endif;\n\n $this->call([\n SeedSeeder::class,\n RoleSeeder::class,\n UserSeeder::class,\n // BoardgameSeeder::class,\n BoardgamesTableSeeder::class,\n StatusSeeder::class,\n TournamentSeeder::class,\n AchievementsSeeder::class,\n TournamentUsersSeeder::class,\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n $this->call(PaisSeeder::class);\n $this->call(DepartamentoSeeder::class);\n $this->call(MunicipioSeeder::class);\n $this->call(PersonaSeeder::class);\n }", "public function run()\n {\n //\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('events')->truncate();\n \n Event::create([\n 'id' => 1,\n 'name' => 'Spot Registration For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n Event::create([\n 'id' => 2,\n 'name' => 'Spot Screening For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'screen',\n 'formId'\t\t=> 1,\n ]);\n \n Event::create([\n 'id' => 3,\n 'name' => 'Spot Registration For Skin Cancer',\n 'cancerId' => 2,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n\n Event::create([\n 'id' => 3,\n 'name' => 'Registration cum Screening camp for Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addWeeks(1),\n 'eventType'\t\t=> 'register_screen',\n 'formId'\t\t=> 1,\n ]);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Para que no verifique el control de claves foráneas al hacer el truncate haremos:\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n\t\t// Primero hacemos un truncate de las tablas para que no se estén agregando datos\n\t\t// cada vez que ejecutamos el seeder.\n\t\t//Foto::truncate();\n\t\t//Album::truncate();\n\t\t//Usuario::truncate();\n DB::table('users')->delete();\n DB::table('ciudades')->delete();\n DB::table('tiendas')->delete();\n DB::table('ofertas')->delete();\n DB::table('ventas')->delete();\n\n\n\t\t// Es importante el orden de llamada.\n\t\t$this->call('UserSeeder');\n $this->call('CiudadSeeder');\n\t\t$this->call('TiendaSeeder');\n $this->call('OfertaSeeder');\n $this->call('VentaSeeder');\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $this->truncateTables([\n 'users',\n 'categories',\n 'types',\n 'courses',\n 'classrooms',\n 'contents',\n 'companies',\n ]);\n\n $this->call(CompanyTableSeeder::class);\n $this->call(TypeTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(CoursesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(ContentTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(ClassroomTableSeeder::class);\n $this->call(TestTableSeeder::class);\n $this->call(BankTableSeeder::class);\n\n\n // factory(\\App\\User::class, 50)\n // ->create()\n // ->each(function ($user) {\n // // $user->companies()->save();\n // $company = \\App\\Company::inRandomOrder()->first();\n // $user->companies()->attach($company->id);\n // $user->assignRole(['participante']);\n // });\n /*\n factory(\\App\\User::class, 50)\n ->create()\n ->each(function ($user) {\n $user->assignRole(['participante']);\n });*/\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Question::truncate();\n Option::truncate();\n// Answer::truncate();\n Quiz::truncate();\n QuizQuestion::truncate();\n\n //for admin\n $admin = factory(User::class)->create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'is_admin' => 1,\n ]);\n\n //for user\n $user = factory(User::class)->create([\n 'name' => 'User',\n 'email' => '[email protected]',\n ]);\n\n factory(Question::class, 100)->create()->each(function ($question) {\n factory(Option::class, mt_rand(2, 4))->create([\n 'question_id' => $question->id,\n ]);\n });\n\n factory(Quiz::class, 10)->create()->each(function ($quiz) {\n\n factory(QuizQuestion::class, mt_rand(5, 10))->create();\n });\n\n\n }", "public function run()\n {\n $this->call([\n SiteSettingsSeeder::class,\n LaratrustSeeder::class,\n CountrySeeder::class,\n GovernorateSeeder::class,\n FaqSeeder::class,\n SitePageSeeder::class,\n UsersSeeder::class,\n ]);\n\n Country::whereiso(\"EG\")->update(['enable_shipping' => true]);\n\n factory(User::class, 400)->create();\n\n Category::create([\n 'en' => [\n 'name' => \"cake tools\"\n ]\n ]);\n\n Category::create([\n 'en' => [\n 'name' => \"Party Supplies\"\n ]\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ProductSeeder::class\n ]);\n }", "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n\n if (App::environment('local')) {\n $this->call(FakeUsersTableSeeder::class);\n $this->call(FakeArticlesTableSeeder::class);\n $this->call(FakeEventsTableSeeder::class);\n }\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(CategoryTypesTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(AccountTypesTableSeeder::class);\n $this->call(TransactionTypesTableSeeder::class);\n\n if (App::environment() !== 'production') {\n $this->call(UserTableSeeder::class);\n $this->call(AccountBudgetTableSeeder::class);\n $this->call(TransactionTableSeeder::class);\n }\n\n Model::reguard();\n }", "public function run()\n {\n User::truncate();\n Product::truncate();\n User::forceCreate([\n 'name' => 'foo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n factory(User::class, 5)->create();\n factory(Product::class, 5)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n {\n $this->call([UsersTableSeeder::class]);\n $this->call([ContratosTableSeeder::class]);\n $this->call([UsuariosTableSeeder::class]);\n $this->call([UnidadesTableSeeder::class]);\n $this->call([AtestadosTableSeeder::class]);\n }", "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n\n // DB::table('locations')->insert([\n // 'id' => 1,\n // 'name' => 'Default',\n // 'name' => 'district',\n // 'district_id' => 1,\n // 'province_id' => 1,\n // ]);\n }", "public function run()\n {\n $data = include env('DATA_SEED');\n\n \\Illuminate\\Support\\Facades\\DB::table('endpoints')->insert((array)$data);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('admins')->truncate();\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Factory::create('en_US');\n $values = [\n 'name' => $faker->userName,\n 'email' => $faker->freeEmail,\n 'password' => bcrypt($faker->password),\n 'phone' => $faker->phoneNumber,\n 'status' => random_int(0,1)\n ];\n admin::create($values);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::beginTransaction();\n// $this->seed();\n DB::commit();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n \\DB::table('provinces')->delete();\n \\DB::table('cities')->delete();\n \\DB::table('districts')->delete();\n // import provinces and cities from sql file\n $sqlFile = app_path() . '/../database/raw/administrative_indonesia_without_districts.sql';\n DB::unprepared(file_get_contents($sqlFile));\n $this->command->info('Successfully seed Provinces and Cities!');\n\n // import districts with latitude and longitude from csv file\n $csvFile = app_path() . '/../database/raw/administrative_indonesia_districts_with_lat_lng.csv';\n $districts = $this->csvToArray($csvFile);\n // check if lat lng exists\n foreach ($districts as $i => $d) {\n if ($d['latitude'] == '') $districts[$i]['latitude'] = 0;\n if ($d['longitude'] == '') $districts[$i]['longitude'] = 0;\n }\n // insert it\n $insert = District::insert($districts);\n if ($insert) $this->command->info('Successfully seed Districts!');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(SubDistrictsTableSeeder::class);\n $this->call(PostcodesTableSeeder::class);\n\n if (env('APP_ENV') !== 'production') {\n // Wipe up 5 churches, and each church has 5 cells, and each cell has 20 members associated with.\n // In other word, we wipe up 500 church members.\n for ($i = 0; $i < 2; $i++) {\n $church = factory(\\App\\Models\\Church::class)->create();\n\n $church->areas()->saveMany(factory(\\App\\Models\\Area::class, 2)->create([\n 'church_id' => $church->id\n ])->each(function($area) {\n $area->cells()->saveMany(factory(\\App\\Models\\Cell::class, 2)->create([\n 'area_id' => $area->id\n ])->each(function($cell) {\n $cell->members()->saveMany(factory(App\\Models\\Member::class, 10)->create([\n 'cell_id' => $cell\n ]));\n }));\n }));\n }\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->environmentPath = env('APP_ENV') === 'production' ||\n env('APP_ENV') === 'qa' ||\n env('APP_ENV') === 'integration' ?\n 'Production':\n 'local';\n //disable FK\n Model::unguard();\n DB::statement(\"SET session_replication_role = 'replica';\");\n\n // $this->call(HrEmployeeTableSeeder::class);\n $this->call(\"Modules\\HR\\Database\\Seeders\\\\$this->environmentPath\\HrEmployeePosTableSeeder\");\n // $this->call(HrEmployeePresetsDiscountTableSeeder::class);\n\n // Enable FK\n DB::statement(\"SET session_replication_role = 'origin';\");\n Model::reguard();\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n $faker = F::create('App\\Proovedores');\n for($i=0; $i < 10; $i++){\n DB::table('users')->insert([\n 'usuario' => $i,\n 'password' => $i,\n 'email' => $faker->email,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Delete all records.\n DB::table('users')->delete();\n // Reset AUTO_INCREMENT.\n DB::table('users')->truncate();\n\n // Dev user.\n App\\Models\\User::create([\n 'email' => '[email protected]',\n 'password' => '$2y$10$t6q81nz.XrMrh20NHDvxUu/szwHBwgzPd.01e8uuP0qVy0mPa6H/e',\n 'first_name' => 'L5',\n 'last_name' => 'App',\n 'username' => 'l5-app',\n 'is_email_verified' => 1,\n ]);\n\n // Dummy users.\n TestDummy::times(10)->create('App\\Models\\User');\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // We did this for test purposes. Shouldn't be doing this for production\n $password = Hash::make('123456');\n\n User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n }", "public function run()\n {\n Model::unguard();\n \n factory('App\\User','admin')->create();\n factory('App\\Evento',100)->create();\n //factory('App\\User','miembro',10)->create();\n factory('App\\Telefono',13)->create();\n factory('App\\Notificacion',10)->create();\n factory('App\\Rubro',10)->create();\n factory('App\\Tecnologia',10)->create();\n factory('App\\Cultivo',10)->create();\n factory('App\\Etapa',10)->create();\n factory('App\\Variedad',10)->create();\n factory('App\\Caracteristica',10)->create();\n factory('App\\Practica',30)->create();\n factory('App\\Tag',15)->create();\n // $this->call(PracticaTableSeeder::class);\n $this->call(TrTableSeeder::class);\n $this->call(MesTableSeeder::class);\n $this->call(SemanasTableSeeder::class);\n $this->call(PsTableSeeder::class);\n $this->call(MsTableSeeder::class);\n $this->call(CeTableSeeder::class);\n $this->call(CvTableSeeder::class);\n $this->call(PtSeeder::class);\n \n\n Model::unguard();\n }", "public function run() {\n $this->call(UserSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(CreateAdminUserSeeder::class);\n // $this->call(PhoneSeeder::class);\n // $this->call(AddressSeeder::class);\n\n $this->call(ContactFormSeeder::class);\n //$this->call(ContactSeeder::class);\n\n User::factory()->count(20)->create()->each(function ($user) {\n // Seed the relation with one address\n $address = Address::factory()->make();\n $user->address()->save($address);\n\n // Seed the relation with one phone\n $phone = Phone::factory()->make();\n $user->phone()->save($phone);\n\n // Seed the relation with 15 contacts\n $contact = Contact::factory()->count(25)->make();\n $user->contacts()->saveMany($contact);\n });\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Activity::truncate();\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n $this->call(UserTableSeeder::class);\n $this->call(ActivityTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n DB::table('category_product')->truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n\n $usersQuentity = 1000;\n $categoriesQuentity = 30;\n $productsQuentity = 1000;\n $transactionsQuentity = 1000;\n\n factory(\\App\\User::class, $usersQuentity)->create();\n factory(\\App\\Category::class, $categoriesQuentity)->create();\n factory(\\App\\Product::class, $productsQuentity)->create()->each(\n function ($product){\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class, $transactionsQuentity)->create();\n\n }", "public function run()\n {\n Eloquent::unguard();\n \n $this->call('AdminMemberTableSeeder');\n $this->call('BankInfoTableSeeder');\n $this->call('LocationLookUpTableSeeder');\n $this->call('OrderStatusTableSeeder');\n $this->call('AdminRoleTableSeeder');\n\n }", "public static function setUpBeforeClass()\n {\n parent::setUpBeforeClass();\n $app = require __DIR__ . '/../../bootstrap/app.php';\n /** @var \\Pterodactyl\\Console\\Kernel $kernel */\n $kernel = $app->make(Kernel::class);\n $kernel->bootstrap();\n $kernel->call('migrate:fresh');\n\n \\Artisan::call('db:seed');\n }", "public function run()\n {\n Model::unguard();\n\n if( !User::where('email', '[email protected]')->count() ) {\n User::create([\n 'nombre'=>'Nick'\n ,'apellidos'=>'Palomino'\n ,'email'=>'[email protected]'\n ,'password'=> Hash::make('1234567u')\n ,'celular'=>'966463589'\n ]);\n }\n\n $this->call('CategoriaTableSeeder');\n $this->call('WhateverSeeder');\n $this->call('ProductTableSeeder');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n Model::unguard();\n\n $this->command->info('seed start!');\n\n // 省市县\n $this->call('RegionTableSeeder');\n // 用户、角色\n $this->call('UserTableSeeder');\n // 权限\n $this->call('PurviewTableSeeder');\n // 博文分类\n $this->call('CategoryTableSeeder');\n // 博文、评论、标签\n $this->call('ArticleTableSeeder');\n // 心情\n $this->call('MoodTableSeeder');\n // 留言\n $this->call('MessageTableSeeder');\n // 文件\n $this->call('StorageTableSeeder');\n\n $this->command->info('seed end!');\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n {\n $this->call(RolesDatabaseSeeder::class);\n $this->call(UsersDatabaseSeeder::class);\n $this->call(LocalesDatabaseSeeder::class);\n $this->call(MainDatabaseSeeder::class);\n }", "public function run()\n {\n\n Schema::disableForeignKeyConstraints(); //in order to execute truncate before seeding\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostCategoriesSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(PostsSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n\n\n }", "public function run()\n {\n // DB::table('users')->insert([\n // ['id'=>1, 'email'=>'nhat','password'=>bcrypt(1234), 'lever'=>0]\n // ]);\n // $this->call(UsersTableSeeder::class);\n // $this->call(CatTableSeeder::class);\n // $this->call(TypeTableSeeder::class);\n // $this->call(AppTableSeeder::class);\n // $this->call(GameTableSeeder::class);\n \n \n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\n\t{\n\t\t//composer require fzaninotto/faker\n\t\t\n\t\t$this->call(populateAllSeeder::class);\n\t\t\n\t}", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n Model::unguard();\n\n $faker =Faker\\Factory::create();\n\n // $this->call(UserTableSeeder::class);\n\n $this->seedTasks($faker);\n $this->seedTags($faker);\n\n Model::reguard($faker);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n $this->call([\n CountriesSeeder::class,\n ProvincesSeeder::class,\n SettingsSeeder::class,\n AdminsTableSeeder::class,\n ]);\n }" ]
[ "0.8064933", "0.7848158", "0.7674873", "0.724396", "0.7216743", "0.7132209", "0.70970356", "0.70752203", "0.704928", "0.699208", "0.6987078", "0.69839287", "0.6966499", "0.68990964", "0.6868679", "0.68468624", "0.68307716", "0.68206114", "0.6803113", "0.6803113", "0.6801801", "0.6789746", "0.6788733", "0.6788008", "0.6786291", "0.67765796", "0.67742485", "0.677106", "0.67651874", "0.6761959", "0.675823", "0.67337847", "0.6733437", "0.67295784", "0.67290515", "0.6724652", "0.67226326", "0.6722267", "0.6721339", "0.6715842", "0.67070943", "0.67060536", "0.67031103", "0.6702514", "0.6702361", "0.67017967", "0.6695973", "0.6693496", "0.66868156", "0.66837406", "0.6678434", "0.66755766", "0.66726524", "0.666599", "0.664943", "0.6640641", "0.663921", "0.66387916", "0.6636016", "0.6633116", "0.6629787", "0.6627134", "0.6625862", "0.661699", "0.66093796", "0.6602538", "0.65996546", "0.659914", "0.6596484", "0.6596383", "0.65922767", "0.65922284", "0.65913564", "0.65889347", "0.65812707", "0.65811145", "0.6579546", "0.6578819", "0.6575912", "0.65749073", "0.6574314", "0.657148", "0.65696406", "0.6568972", "0.65624833", "0.6560332", "0.6559092", "0.6557491", "0.65555155", "0.6554255", "0.65509576", "0.6548099", "0.65479296", "0.6545845", "0.65443295", "0.65434265", "0.65432936", "0.654295", "0.65426385", "0.6541781", "0.6539325" ]
0.0
-1